[
  {
    "path": ".gitattributes",
    "content": "* text=auto eol=lf\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug-report.yml",
    "content": "name: Bug report\ndescription: Report something that is broken\nlabels: [\"bug\", \"needs-triage\"]\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for taking the time to fill out this bug report!\n        \n        Note that since Altair is a Python wrapper around the Vega-Lite visualization grammar, [most bugs should be reported directly to Vega-Lite](https://github.com/vega/vega-lite/issues). You can click the Action Button (`...`) of your Altair chart and \"Open in Vega Editor\" to see if you get the same error in the Vega Editor.\n        \n        If you can't reproduce the bug in the Vega Editor, then make sure you are using [the latest version of Altair](https://github.com/vega/altair/releases) and search for duplicate issues before filling out the form below.\n  - type: textarea\n    id: what-happened\n    attributes:\n      label: What happened?\n      description: |\n        Describe what happened and how to reproduce the bug.\n        Include the full code and data to reproduce it. Use a simple toy data set, e.g. from `altair.datasets`.\n    validations:\n      required: true\n  - type: textarea\n    id: desired-behavior\n    attributes:\n      label: What would you like to happen instead?\n      description: Describe the expected/desired behavior.\n  - type: input\n    id: altair-version\n    attributes:\n      label: Which version of Altair are you using?\n      description: Use `alt.__version__` to find out\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "content": "blank_issues_enabled: false\ncontact_links:\n  - name: Question\n    url: https://stackoverflow.com/tags/altair\n    about: Please ask questions such as \"How do I do X?\" or \"Why does this not work?\" on Stack Overflow using the `altair` tag.\n  - name: Discussion\n    url: https://github.com/vega/altair/discussions\n    about: If you want to discuss a topic or ask a question that is not a good fit for Stack Overflow, please open a new disscussion here on GitHub.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature-request.yml",
    "content": "name: Feature request\ndescription: Suggest an improvement\nlabels: [\"enhancement\"]\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for taking the time to suggest a new feature!\n        \n        Note that since Altair is a Python wrapper around the Vega-Lite visualization grammar, [most feature requests should be reported directly to Vega-Lite](https://github.com/vega/vega-lite/issues). You can click the Action Button (`...`) of your Altair chart and \"Open in Vega Editor\" to see the Vega-Lite chart specification.\n        \n        If you believe this feature is more relevant for Altair than Vega-Lite, then make sure to search for duplicate issues before filling out the form below.\n  - type: textarea\n    id: what-happened\n    attributes:\n      label: What is your suggestion?\n      description: Describe the feature's goal, motivating use cases, and its expected behavior.\n    validations:\n      required: true\n  - type: textarea\n    id: alternative-solutions\n    attributes:\n      label: Have you considered any alternative solutions?\n"
  },
  {
    "path": ".github/dependabot.yaml",
    "content": "version: 2\nupdates:\n  - package-ecosystem: \"github-actions\"\n    directory: \"/\"\n    schedule:\n      interval: \"monthly\"\n    groups:\n      github-actions:\n        patterns:\n          - \"*\"\n    commit-message:\n      prefix: \"ci\"\n"
  },
  {
    "path": ".github/pull_request_template.md",
    "content": "<!-- Click \"Preview\" to read this message; then delete it. -->\n\n## Thanks for contributing to Altair! 🎉\n\nPlease follow these guidelines:\n\n### 1. **PR Description**\n   - Briefly describe the changes and their purpose. For help, check this [guide](https://medium.com/@greenberg/writing-pull-requests-your-coworkers-might-enjoy-reading-9d0307e93da3).\n\n### 2. **Tests & Docs**\n   - Include unit tests and update documentation for new features.\n\n### 3. **Commit Message**\n   - Use [semantic commit messages](https://www.conventionalcommits.org/), e.g., `\"feat: Add embed_options to charts\"`.\n   - Add `!` for breaking changes (e.g., `\"fix!: Raise error when embed_options is None\"`).\n\n### 4. **PR Title Types**\n   - **feat**: New feature\n   - **fix**: Bug fix\n   - **docs**: Documentation changes\n   - **style**: Code style changes (no functionality change)\n   - **refactor**: Code restructuring\n   - **perf**: Performance improvements\n   - **test**: Add or fix tests\n   - **build**: Changes to build system or dependencies\n   - **ci**: CI configuration changes\n   - **chore**: Miscellaneous tasks\n   - **revert**: Reverts a commit\n"
  },
  {
    "path": ".github/release.yml",
    "content": "changelog:\n  categories:\n    - title: Breaking\n      labels:\n        - breaking\n    - title: Deprecation\n      labels:\n        - deprecation\n    - title: Enhancements\n      labels:\n        - enhancement\n    - title: Bug Fixes\n      labels:\n        - bug\n    - title: Maintainance\n      labels:\n        - maintainance\n    - title: Documentation\n      labels:\n        - documentation\n    - title: Other Changes\n      labels:\n        - \"*\"\n"
  },
  {
    "path": ".github/workflows/build-free-threaded.yml",
    "content": "name: build-free-threaded\n\non:\n  workflow_dispatch:  # Manual trigger only; no automatic CI runs\n\nenv:\n  UV_SYSTEM_PYTHON: 1\n\njobs:\n  free-threaded:\n    runs-on: ubuntu-latest\n    name: py 3.14t free-threaded\n    steps:\n      - uses: actions/checkout@v6\n      - name: Set up Python 3.14t\n        uses: actions/setup-python@v6\n        with:\n          python-version: \"3.14t\"\n      - name: Install uv\n        uses: astral-sh/setup-uv@v7\n      - name: Install targeted dependencies\n        run: |\n          set -xe\n          uv pip install -e .\n          # From [project.optional-dependencies].dev in pyproject.toml\n          uv pip install pytest\n          uv pip install pytest-cov\n          uv pip install pytest-run-parallel\n          # uv pip install hatch>=1.13.0\n          # uv pip install ruff>=0.9.5\n          # uv pip install 'duckdb>=1.0; python_version<\"3.14\"'\n          # uv pip install ipython\n          # uv pip install ipykernel\n          # uv pip install pandas>=1.1.3\n          # uv pip install pyarrow-stubs\n          # uv pip install 'pytest-xdist[psutil]~=3.5'\n          # uv pip install mistune\n          # uv pip install mypy\n          # uv pip install pandas-stubs\n          # uv pip install types-jsonschema\n          # uv pip install types-setuptools\n          # uv pip install geopandas>=0.14.3\n          # uv pip install polars>=0.20.3\n          # uv pip install taskipy>=1.14.1\n          # uv pip install tomli>=2.2.1\n      - name: Run pytest with pytest-run-parallel\n        run: |\n          uv run pytest -o addopts= --pyargs --doctest-modules --doctest-ignore-import-errors --iterations=8 --parallel-threads=auto tests\n\n"
  },
  {
    "path": ".github/workflows/build.yml",
    "content": "name: build\n\non: [push, pull_request]\n\nenv:\n  UV_SYSTEM_PYTHON: 1\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        python-version: [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"]\n        required-dependencies: [\"minimum\", \"latest\"]\n\n    name: py ${{ matrix.python-version }} with ${{ matrix.required-dependencies }} required deps\n    steps:\n      - uses: actions/checkout@v6\n      - name: Set up Python ${{ matrix.python-version }}\n        uses: actions/setup-python@v6\n        with:\n          python-version: ${{ matrix.python-version }}\n      - name: Install uv\n        uses: astral-sh/setup-uv@v7\n\n      # Install dependencies from pyproject.toml (latest versions for all matrix jobs)\n      - name: Install dependencies\n        run: uv pip install -e \".[dev, all]\"\n\n      # Install minimum required versions for compatibility testing (only for 'minimum' matrix value)\n      - name: Pin minimum dependency versions\n        if: ${{ matrix.required-dependencies == 'minimum' }}\n        run: |\n          # Keep in sync with versions in `pyproject.toml`\n          uv pip install jsonschema==3.0 narwhals==1.27.1 typing_extensions==4.12.0 setuptools==81.0.0\n      - name: Maybe uninstall optional dependencies\n        # We uninstall pyarrow and vegafusion for one job to test that we have not\n        # accidentally introduced a hard dependency on these libraries.\n        # Uninstalling for Python 3.10 is an arbitrary choice.\n        # Also see https://github.com/vega/altair/pull/3114\n        if: ${{ matrix.python-version == '3.10' }}\n        run: |\n          uv pip uninstall pyarrow vegafusion vl-convert-python anywidget\n      - name: Maybe install lowest supported pandas version\n        # We install the lowest supported pandas version for one job to test that\n        # it still works. Downgrade to the oldest versions of pandas and numpy that include\n        # Python 3.10 wheels, so only run this job for Python 3.10\n        if: ${{ matrix.python-version == '3.10' }}\n        run: |\n          uv pip install pandas==1.3.4 numpy==1.21.2\n      - name: Test that schema generation has no effect\n        run: |\n          uv pip install vl-convert-python\n          python tools/generate_schema_wrapper.py\n          # This gets the paths of all files which were either deleted, modified\n          # or are not yet tracked by Git\n          files=$(git ls-files --deleted --modified --others --exclude-standard)\n          # Exclude dataset metadata that is regenerated by the script; parquet output\n          # can differ across platforms/Polars versions (binary non-determinism).\n          exclude_pattern='altair/datasets/_metadata/metadata\\.parquet'\n          files_filtered=$(echo \"$files\" | grep -v -E \"^${exclude_pattern}$\" || true)\n          # Depending on the shell it can happen that 'files' contains empty\n          # lines which are filtered out in the for loop below\n          files_cleaned=()\n          while IFS= read -r i; do\n            # Skip empty items\n            [ -z \"$i\" ] && continue\n            files_cleaned+=(\"$i\")\n          done <<< \"$files_filtered\"\n          if [ ${#files_cleaned[@]} -gt 0 ]; then\n              echo \"The code generation modified the following files:\"\n              printf '%s\\n' \"${files_cleaned[@]}\"\n              git diff\n              exit 1\n          fi\n      - name: Test with pytest\n        run: |\n          uv run pytest --pyargs --numprocesses=logical --doctest-modules --doctest-ignore-import-errors tests\n      - name: Validate Vega-Lite schema\n        run: |\n          # We install all 'format' dependencies of jsonschema as check-jsonschema\n          # only does the 'format' checks which are installed.\n          # We can always use the latest jsonschema version here.\n          # uri-reference check is disabled as the URIs in the Vega-Lite schema do\n          # not conform RFC 3986.\n          uv pip install 'jsonschema[format]' check-jsonschema --upgrade\n          uv run check-jsonschema --check-metaschema altair/vegalite/v6/schema/vega-lite-schema.json --disable-formats uri-reference\n      - name: Show installed versions\n        run: uv pip list\n"
  },
  {
    "path": ".github/workflows/check-pr.yml",
    "content": "name: \"Lint PR\"\n\non:\n  pull_request_target:\n    types:\n      - opened\n      - edited\n      - synchronize\n\npermissions:\n  pull-requests: read\n\njobs:\n  main:\n    name: Validate PR title\n    runs-on: ubuntu-latest\n    steps:\n      - uses: amannn/action-semantic-pull-request@v6\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/docbuild.yml",
    "content": "name: docbuild\n\non: [push, pull_request]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v6\n    - name: Set up Python 3.12\n      uses: actions/setup-python@v6\n      with:\n        python-version: \"3.12\"\n    - name: Install uv\n      uses: astral-sh/setup-uv@v7\n      with:\n        enable-cache: true\n        cache-dependency-glob: |\n          **/uv.lock\n          **/pyproject.toml\n    - name: Install dependencies\n      run: uv sync --all-extras\n    - name: Build docs\n      run: |\n        mkdir -p doc/_images\n        uv run sphinx-build -b html -d doc/_build/doctrees doc doc/_build/html\n    - name: Run doctests\n      run: |\n        uv run sphinx-build -b doctest -d doc/_build/doctrees doc doc/_build/doctest\n\n        \n"
  },
  {
    "path": ".github/workflows/lint.yml",
    "content": "name: lint\n\non: [push, pull_request]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    name: ruff-mypy\n    steps:\n    - name: \"Set up Python\"\n      uses: actions/setup-python@v6\n      with:\n        python-version: \"3.12\"\n    - uses: actions/checkout@v6\n    - name: Install uv\n      uses: astral-sh/setup-uv@v7\n      with:\n        enable-cache: true\n        cache-dependency-glob: |\n          **/uv.lock\n          **/pyproject.toml\n    # Installing all dependencies and not just the linters as mypy needs them for type checking\n    - name: Install dependencies\n      run: uv sync --all-extras\n    - name: ruff check (lint)\n      run: |        \n        uv run ruff check\n    - name: ruff format\n      run: |\n        uv run ruff format --check --diff\n    - name: mypy (type check)\n      run: |\n        uv run mypy altair tests\n"
  },
  {
    "path": ".github/workflows/weekly.yml",
    "content": "---\nname: Weekly Build and Publish\n'on':\n  schedule:\n    - cron: '0 3 * * 1'  # Weekly on Mondays at 3am UTC\n  workflow_dispatch:\n    inputs:\n      force_build:\n        description: 'Force build even if no changes detected'\n        type: boolean\n        default: false\n        required: false\nenv:\n  UV_SYSTEM_PYTHON: 1\njobs:\n  check-changes:\n    runs-on: ubuntu-latest\n    outputs:\n      has-changes: '${{ steps.check.outputs.has-changes }}'\n      last-weekly-tag: '${{ steps.check.outputs.last-weekly-tag }}'\n      current-commit: '${{ steps.check.outputs.current-commit }}'\n    steps:\n      - uses: actions/checkout@v6\n        with:\n          fetch-depth: 0\n      - name: Check for changes since last weekly build\n        id: check\n        run: |\n          # Get the latest weekly release tag\n          LATEST_WEEKLY_TAG=$(git tag --list \"weekly-*\" --sort=-version:refname | head -n 1)\n\n          if [ -z \"$LATEST_WEEKLY_TAG\" ]; then\n            echo \"No weekly tags found, will build (first time)\"\n            echo \"has-changes=true\" >> $GITHUB_OUTPUT\n            echo \"last-weekly-tag=\" >> $GITHUB_OUTPUT\n            echo \"current-commit=$(git rev-parse HEAD)\" >> $GITHUB_OUTPUT\n            exit 0\n          fi\n\n          # Get the commit hash from the latest weekly tag\n          LATEST_WEEKLY_COMMIT=$(git rev-list -n 1 \"$LATEST_WEEKLY_TAG\")\n          CURRENT_COMMIT=$(git rev-parse HEAD)\n\n          echo \"last-weekly-tag=${LATEST_WEEKLY_TAG}\" >> $GITHUB_OUTPUT\n          echo \"current-commit=${CURRENT_COMMIT}\" >> $GITHUB_OUTPUT\n\n          # Check if there are any commits since the last weekly build\n          if [ \"$LATEST_WEEKLY_COMMIT\" = \"$CURRENT_COMMIT\" ]; then\n            echo \"No changes since last weekly build\"\n            echo \"has-changes=false\" >> $GITHUB_OUTPUT\n          else\n            echo \"Changes detected since last weekly build\"\n            echo \"has-changes=true\" >> $GITHUB_OUTPUT\n          fi\n  weekly-build:\n    needs: check-changes\n    if: needs.check-changes.outputs.has-changes == 'true' || github.event.inputs.force_build == 'true'\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        python-version:\n          - '3.10'\n          - '3.11'\n          - '3.12'\n          - '3.13'\n    name: 'Test py ${{ matrix.python-version }}'\n    steps:\n      - uses: actions/checkout@v6\n      - name: 'Set up Python ${{ matrix.python-version }}'\n        uses: actions/setup-python@v6\n        with:\n          python-version: '${{ matrix.python-version }}'\n      - name: Install uv\n        uses: astral-sh/setup-uv@v7\n        with:\n          enable-cache: true\n          cache-dependency-glob: |\n            **/uv.lock\n            **/pyproject.toml\n      - name: Install dependencies\n        run: |\n          uv sync --all-extras\n      - name: Test with pytest\n        run: |\n          uv run task test\n  weekly-publish:\n    needs:\n      - check-changes\n      - weekly-build\n    if: needs.check-changes.outputs.has-changes == 'true' || github.event.inputs.force_build == 'true'\n    runs-on: ubuntu-latest\n    environment:\n      name: pypi\n      url: https://pypi.org/p/altair\n    permissions:\n      contents: write\n      id-token: write\n    steps:\n      - uses: actions/checkout@v6\n        with:\n          fetch-depth: 0\n      - name: Set up Python\n        uses: actions/setup-python@v6\n        with:\n          python-version: '3.12'\n      - name: Install uv\n        uses: astral-sh/setup-uv@v7\n        with:\n          enable-cache: true\n          cache-dependency-glob: |\n            **/uv.lock\n            **/pyproject.toml\n      - name: Install dependencies\n        run: |\n          uv sync --all-extras\n      - name: Generate weekly version and tag\n        id: version\n        run: |\n          # Generate weekly version based on current date and commit\n          # Get base version from altair/__init__.py\n          BASE_VERSION=$(grep '__version__ = ' altair/__init__.py | sed 's/__version__ = \"\\(.*\\)\"/\\1/')\n          DATE=$(date +%Y%m%d)\n          COMMIT=$(git rev-parse --short HEAD)\n          COMMIT_SHA=$(git rev-parse HEAD)\n          # PEP 440 compliant dev version - handle cases where base version already has 'dev'\n          if [[ \"$BASE_VERSION\" == *\"dev\" ]]; then\n            # If base version already has 'dev', replace it with proper dev format\n            VERSION=$(echo \"$BASE_VERSION\" | sed 's/dev$/.dev'${DATE}'/')\n          else\n            # If base version doesn't have 'dev', add it\n            VERSION=\"${BASE_VERSION}.dev${DATE}\"\n          fi\n          TAG_NAME=\"weekly-${DATE}-${COMMIT}\"\n          echo \"Generated weekly version: ${VERSION}\"\n          echo \"Generated tag name: ${TAG_NAME}\"\n          echo \"version=${VERSION}\" >> $GITHUB_OUTPUT\n          echo \"tag_name=${TAG_NAME}\" >> $GITHUB_OUTPUT\n          echo \"commit_sha=${COMMIT_SHA}\" >> $GITHUB_OUTPUT\n      - name: Update version files\n        run: |\n          # Update version in __init__.py\n          sed -i \"s/__version__ = .*/__version__ = \\\"${{ steps.version.outputs.version }}\\\"/\" altair/__init__.py\n          # Update version in conf.py\n          sed -i \"s/release = .*/release = \\\"${{ steps.version.outputs.version }}\\\"/\" doc/conf.py\n      - name: Build package\n        run: |\n          uv run task build\n      - name: Generate dependency snapshot\n        id: deps\n        run: |\n          # Get current dependencies\n          uv pip freeze > current_deps.txt\n\n          # Check if we can compare with previous weekly release\n          LATEST_WEEKLY_TAG=\"${{ needs.check-changes.outputs.last-weekly-tag }}\"\n          if [ -n \"$LATEST_WEEKLY_TAG\" ]; then\n            echo \"Comparing dependencies with previous tag: ${LATEST_WEEKLY_TAG}\"\n            # Try to get previous uv.lock from git history\n            if git show ${LATEST_WEEKLY_TAG}:uv.lock > previous_uv.lock 2>/dev/null; then\n              if diff -u previous_uv.lock uv.lock > dependency_changes.txt 2>&1; then\n                echo \"No dependency changes detected\"\n                echo \"dependency_changes=false\" >> $GITHUB_OUTPUT\n                # Ensure the artifact has content even when there are no changes\n                if [ ! -s dependency_changes.txt ]; then\n                  echo \"No dependency changes detected\" > dependency_changes.txt\n                fi\n              else\n                echo \"Dependency changes detected\"\n                echo \"dependency_changes=true\" >> $GITHUB_OUTPUT\n              fi\n            else\n              echo \"No previous uv.lock found at ${LATEST_WEEKLY_TAG}\" > dependency_changes.txt\n              echo \"dependency_changes=false\" >> $GITHUB_OUTPUT\n            fi\n          else\n            echo \"First weekly build - no previous dependencies to compare\" > dependency_changes.txt\n            echo \"dependency_changes=false\" >> $GITHUB_OUTPUT\n          fi\n      - name: Generate binary file checksums\n        id: checksums\n        run: |\n          # Find all binary files in the project (with proper parentheses for OR operations)\n          find . \\( -name \"*.csv.gz\" -o -name \"*.parquet\" -o -name \"*.json.gz\" \\) -type f | while read file; do\n            sha256sum \"$file\" >> binary_checksums.txt\n            echo \"Processed: $file\"\n          done\n\n          # Ensure file exists even if no binary files found\n          touch binary_checksums.txt\n\n          # Note: We cannot compare with previous checksums since binary_checksums.txt\n          # is generated during the workflow and not committed to git.\n          # Instead, we just upload the current checksums for reference.\n          echo \"Generated checksums for $(wc -l < binary_checksums.txt) binary files\" > binary_changes.txt\n          echo \"binary_changes=false\" >> $GITHUB_OUTPUT\n      - name: Prepare release assets\n        run: |\n          # Ensure all text files exist to avoid upload errors\n          touch dependency_changes.txt current_deps.txt binary_checksums.txt binary_changes.txt\n\n          # List files that will be uploaded\n          echo \"Release assets:\"\n          ls -lh dist/\n          ls -lh *.txt 2>/dev/null || echo \"No text files\"\n      - name: Publish to PyPI\n        uses: pypa/gh-action-pypi-publish@release/v1\n        with:\n          verbose: true\n          skip-existing: true\n      - name: Create GitHub release\n        uses: softprops/action-gh-release@v2\n        with:\n          tag_name: ${{ steps.version.outputs.tag_name }}\n          name: Weekly Build ${{ steps.version.outputs.version }}\n          body: |\n            ## Weekly Pre-Release Build of Altair\n\n            This is a pre-release version for testing purposes.\n\n            ### Build Information\n\n            **Version:** ${{ steps.version.outputs.version }}\n            **Tag:** ${{ steps.version.outputs.tag_name }}\n            **Previous Weekly Tag:** ${{ needs.check-changes.outputs.last-weekly-tag || 'None (first build)' }}\n\n            ## Installation\n\n            ### From PyPI (recommended)\n\n            Install the latest weekly build directly from PyPI:\n\n            ```bash\n            pip install altair==${{ steps.version.outputs.version }}\n            # or\n            uv pip install altair==${{ steps.version.outputs.version }}\n            ```\n\n            _Note_: Weekly builds publish timestamped development versions (for example `${{ steps.version.outputs.version }}`) to PyPI. When you pin that exact version, `pip` installs the dev build automatically, without the need for a `--pre` flag.\n\n            ### From GitHub Repository (direct install)\n\n            Install directly from the tagged commit without downloading the wheel:\n\n            **Command line (pip or uv):**\n            ```bash\n            pip install git+https://github.com/${{ github.repository }}.git@${{ steps.version.outputs.tag_name }}\n            # or\n            uv pip install git+https://github.com/${{ github.repository }}.git@${{ steps.version.outputs.tag_name }}\n            ```\n\n            _Note_: Installing directly from the `weekly-...` tag will surface the base development version (without the timestamp suffix) because the version file edits are not committed.\n\n            **Add to pyproject.toml (pip/uv):**\n            ```toml\n            [project]\n            dependencies = [\n                \"altair @ git+https://github.com/${{ github.repository }}.git@${{ steps.version.outputs.tag_name }}\",\n            ]\n            ```\n\n            **Add to pixi.toml (pixi):**\n            ```toml\n            [pypi-dependencies]\n            altair = { git = \"https://github.com/${{ github.repository }}.git\", rev = \"${{ steps.version.outputs.tag_name }}\" }\n            ```\n\n            ### From GitHub Release (manual download)\n\n            Download the wheel file from the assets below and install:\n\n            ```bash\n            pip install altair-${{ steps.version.outputs.version }}-py3-none-any.whl\n            ```\n\n            ## Testing & Feedback\n\n            **Please note:** This is a testing version. If you encounter any issues or unexpected behavior, we would greatly appreciate if you [open an issue](https://github.com/${{ github.repository }}/issues) to report it. Your feedback helps improve Altair!\n          draft: false\n          prerelease: true\n          files: |\n            dist/*.whl\n            dist/*.tar.gz\n            dependency_changes.txt\n            current_deps.txt\n            binary_checksums.txt\n            binary_changes.txt\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      - name: Cleanup old weekly releases\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          # Wait a moment to ensure the new release is fully created\n          sleep 5\n\n          # Get all weekly releases sorted by creation date (newest first)\n          echo \"Fetching all weekly releases...\"\n          WEEKLY_RELEASES=$(gh release list --limit 100 --json tagName,isPrerelease,createdAt --jq '.[] | select(.tagName | startswith(\"weekly-\")) | .tagName' | head -n 100)\n\n          # Count total weekly releases (handle empty list)\n          if [ -z \"$WEEKLY_RELEASES\" ]; then\n            echo \"No weekly releases found\"\n            exit 0\n          fi\n\n          TOTAL_WEEKLY=$(echo \"$WEEKLY_RELEASES\" | wc -l | tr -d ' ')\n          echo \"Found ${TOTAL_WEEKLY} weekly releases\"\n\n          # Keep only the 7 most recent, delete the rest\n          if [ \"$TOTAL_WEEKLY\" -gt 7 ]; then\n            echo \"Keeping 7 most recent weekly releases, deleting $(($TOTAL_WEEKLY - 7)) old ones...\"\n            echo \"$WEEKLY_RELEASES\" | tail -n +8 | while read -r tag; do\n              if [ -n \"$tag\" ]; then\n                echo \"Deleting release and tag: $tag\"\n                gh release delete \"$tag\" --yes --cleanup-tag 2>&1 || echo \"Warning: Failed to delete $tag, continuing...\"\n              fi\n            done\n            echo \"Cleanup complete!\"\n          else\n            echo \"Only ${TOTAL_WEEKLY} weekly releases found, no cleanup needed (keeping max 7)\"\n          fi\n"
  },
  {
    "path": ".gitignore",
    "content": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n\n# C extensions\n*.so\n\n# Distribution / packaging\n.Python\nenv/\nvenv\n.venv\nbuild/\ndevelop-eggs/\ndist/\ndownloads/\neggs/\n.eggs/\nlib/\nlib64/\nparts/\nsdist/\nvar/\n*.egg-info/\n.installed.cfg\n*.egg\n\n# PyInstaller\n#  Usually these files are written by a python script from a template\n#  before PyInstaller builds the exe, so as to inject date/other infos into it.\n*.manifest\n*.spec\n\n# Installer logs\npip-log.txt\npip-delete-this-directory.txt\n\n# Unit test / coverage reports\nhtmlcov/\n.tox/\n.coverage\n.coverage.*\n.cache\nnosetests.xml\ncoverage.xml\n*,cover\n\n# Translations\n*.mo\n*.pot\n\n# Django stuff:\n*.log\n\n# Sphinx documentation\ndocs/_build/\n\n# PyBuilder\ntarget/\n\n# emacs backups\n*~\n\\#*\\#\n\n.ipynb_checkpoints\n.idea/*\ntools/_build\nUntitled*.ipynb\n.mypy*\n.pytest_cache\n*.DS_Store\n\n# VSCode\n.vscode\n\n# hatch, doc generation\ndata.json\n\n# type stubs\ntypings/\n\n# Zed editor\n.zed\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\nAs a project of the Vega Organization, we use the [Vega Code of Conduct](https://github.com/vega/.github/blob/main/CODE_OF_CONDUCT.md).\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Feedback and Contribution\n\nWe welcome any input, feedback, bug reports, and contributions via [Altair's\nGitHub Repository](http://github.com/vega/altair/). In particular, we\nwelcome companion efforts from other visualization libraries to render the\nVega-Lite specifications output by Altair. We see this portion of the effort\nas much bigger than Altair itself: the Vega and Vega-Lite specifications are\nperhaps the best existing candidates for a principled *lingua franca* of data\nvisualization.\n\nWe are also seeking contributions of additional Jupyter notebook-based examples\nin our separate GitHub repository: https://github.com/altair-viz/altair_notebooks.\n\nAll contributions, suggestions, and feedback you submitted are accepted under the [Project's license](./LICENSE). You represent that if you do not own copyright in the code that you have the authority to submit it under the [Project's license](./LICENSE). All feedback, suggestions, or contributions are not confidential. The Project abides by the Vega Organization's [code of conduct](https://github.com/vega/.github/blob/main/CODE_OF_CONDUCT.md) and [governance](https://github.com/vega/.github/blob/main/project-docs/GOVERNANCE.md).\n\n## How To Contribute Code to Vega-Altair\n\n### Setting Up Your Environment\n\nFork the Altair repository on GitHub and then clone the fork to you local\nmachine. For more details on forking see the [GitHub\nDocumentation](https://help.github.com/en/articles/fork-a-repo).\n\n```cmd\ngit clone https://github.com/YOUR-USERNAME/altair.git\n```\n\nTo keep your fork up to date with changes in this repo,\nyou can [use the fetch upstream button on GitHub](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork).\n\n\n[Install `uv`](https://docs.astral.sh/uv/getting-started/installation/), or update to the latest version:\n\n```cmd\nuv self update\n```\nInstall Python:\n\n```cmd\nuv python install 3.12\n```\n\nInitialize a new virtual environment:\n\n```cmd\ncd altair/\nuv venv -p 3.12\n```\n\nActivate your environment:\n\n<details><summary>macOS/Linux</summary>\n<p>\n\n```bash\nsource .venv/bin/activate\n```\n\n</p>\n</details> \n\n<details><summary>Windows</summary>\n<p>\n\n```cmd\n.venv\\Scripts\\activate\n```\n\n</p>\n</details> \n\nInstall the project with all development dependencies:\n```cmd\nuv sync --all-extras\n```\n\n> [!TIP]\n> If you're new to `uv`, check out their [Getting started](https://docs.astral.sh/uv/getting-started/) guide for help\n\n### Creating a Branch\n\nOnce your local environment is up-to-date, you can create a new git branch\nwhich will contain your contribution\n(always create a new branch instead of making changes to the main branch):\n\n```cmd\ngit switch -c <your-branch-name>\n```\n\nWith this branch checked-out, make the desired changes to the package.\n\nA large part of Altair's code base is automatically generated.\nAfter you have made your manual changes,\nmake sure to run the following to see if there are any changes\nto the automatically generated files: \n\n```bash\nuv run task generate-schema-wrapper\n```\n\nFor information on how to update the Vega-Lite version that Altair uses,\nplease read [the maintainers' notes](NOTES_FOR_MAINTAINERS.md).\n\n### Testing your Changes\n\nBefore submitting your changes to the main Altair repository,\nit is recommended that you run the Altair test suite,\nwhich includes a number of tests to validate the correctness of your code:\n\n```bash\nuv run task test\n```\n\n\nThis also runs the [`ruff`](https://ruff.rs/) linter and formatter as well as [`mypy`](https://mypy-lang.org/) as type checker.\n\n\nStudy the output of any failed tests and try to fix the issues\nbefore proceeding to the next section.\n\n#### Failures on specific python version(s)\n\nBy default, `uv run task test` will run the test suite against the currently active python version.\nTwo useful variants for debugging failures that only appear *after* you've submitted your PR:\n\n```bash\n# Test against all python version(s) in the matrix\nuv run task test-all\n# Test against our minimum required version\nuv run task test-min\n```\n\nSee [hatch test](https://hatch.pypa.io/latest/cli/reference/#hatch-test) docs for other options.\n\n#### Changes to `__all__`\nIf `test_completeness_of__all__` fails, you may need to run:\n\n```bash\nuv run task update-init-file\n```\nHowever, this test usually indicates *unintentional* addition(s) to the top-level `alt.` namespace that will need resolving first.\n\n### Creating a Pull Request\n\nWhen you are happy with your changes, you can commit them to your branch by running\n\n```cmd\ngit add <modified-file>\ngit commit -m \"Some descriptive message about your change\"\ngit push origin <your-branch-name>\n```\n\nYou will then need to submit a pull request (PR) on GitHub asking to merge\nyour example branch into the main Altair repository. For details on creating a PR see GitHub\ndocumentation [Creating a pull\nrequest](https://help.github.com/en/articles/creating-a-pull-request). You can\nadd more details about your example in the PR such as motivation for the\nexample or why you thought it would be a good addition.  You will get feed back\nin the PR discussion if anything needs to be changed. To make changes continue\nto push commits made in your local example branch to origin and they will be\nautomatically shown in the PR. \n\nHopefully your PR will be answered in a timely manner and your contribution will\nhelp others in the future.\n\n## How To Contribute Documentation to Vega-Altair\n\nAltair documentation is written in [reStructuredText](http://docutils.sourceforge.net/rst.html)\nand compiled into html pages using [Sphinx](http://www.sphinx-doc.org/en/master/).\nContributing to the documentation requires some extra dependencies and \nwe have some conventions and plugins that are used to help navigate the docs and \ngenerate great Altair visualizations. \n\nNote that the [Altair website](https://altair-viz.github.io/)\nis only updated when a new version is released so your contribution might not show\nup for a while.\n\n### Adding Examples\n\nWe are always interested in new examples contributed from the community. These\ncould be everything from simple one-panel scatter and line plots, to more\ncomplicated layered or stacked plots, to more advanced interactive features.\nBefore submitting a new example check the [Altair Example\nGallery](https://altair-viz.github.io/gallery/index.html) to make sure that\nyour idea has not already been implemented. \n\nOnce you have an example you would like to add there are a few guide lines to follow.\nEvery example should:\n- have a `arguments_syntax` and `methods_syntax` implementation. Each implementation \n  must be saved as a stand alone script in the `tests/examples_arguments_syntax` \n  and `tests/examples_methods_syntax` directories.\n- have a descriptive docstring, which will eventually be extracted for the\n  documentation website.\n- contain a category tag.\n- define a chart variable with the main chart object (This will be used both in\n  the unit tests to confirm that the example executes properly, and also\n  eventually used to display the visualization on the documentation website).\n- not make any external calls to download data within the script (i.e. don't\n  use urllib). You can define your data directly within the example file,\n  generate your data using pandas and numpy, or you can use data\n  available in the `altair.datasets` module.\n\nThe easiest way to get started would be to adapt examples from the [Vega-Lite\nexample gallery](https://vega.github.io/vega-lite/examples/) which are missing\nin the Altair gallery. Or you can feel free to be creative and build your own\nvisualizations.\n\nOften it is convenient to draft an example outside of the main repository, such\nas [Google Colab](https://colab.research.google.com/), to avoid difficulties\nwhen working with git. Once you have an example you would like to add, follow the\nsame contribution procedure outlined above.\n\nSome additional notes:\n\n- The format and style of new contributions should generally match that of existing examples.\n- The file docstring will be rendered into HTML via\n  [reStructuredText](http://docutils.sourceforge.net/rst.html), so use that\n  format for any hyperlinks or text styling. In particular, be sure you include\n  a title in the docstring underlined with `---`, and be sure that the size of\n  the underline exactly matches the size of the title text.\n- If your example fits into a chart type but involves significant configuration\n  it should be in the `Case Studies` category.\n- For consistency all data used for a visualization should be assigned to the\n  variable `source`. Then `source` is passed to the `alt.Chart` object.\n  If the example requires multiple dataframes then this does not apply. See\n  other examples for guidance. \n- Example code should not require downloading external datasets. We suggest\n  using the `altair.datasets` module if possible.\n  If you are using the `altair.datasets` module there are multiple ways to refer\n  to a data source. The data can be referenced directly, such as `source = data.penguins()`, or it can be referenced by URL, such as `source =\n  data.movies.url`. This is to ensure that Altair's automated test suite does\n  not depend on availability of external HTTP resources.\n- If VlConvert does not support PNG export of the chart (e.g. in the case of emoji),\n  then add the name of the example to the `SVG_EXAMPLES` set in \n  `tests/examples_arguments_syntax/__init__.py` and `tests/examples_methods_syntax/__init__.py`\n\n### Building the Documentation Locally\n\nThe process to build the documentation locally consists of three steps:\n\n1. **Clean** (remove) any previously generated documentation files.\n2. **Build** the documentation in HTML format.\n3. View the documentation using a *local* Python testing **server**.\n\nSteps 1 & 2 can be run as a single command, followed by step 3:\n```cmd\nuv run task doc-clean-build\nuv run task doc-serve\n```\n\n> [!TIP]\n> If these commands were not available for you, make sure you've [set up your environment](#setting-up-your-environment)\n\n\nTo view the documentation, open your browser and go to `http://localhost:8000`. To stop the server, use `^C` (control+c) in the terminal.\n\n---\n\nPart of MVG-0.1-beta.\nMade with love by GitHub. Licensed under the [CC-BY 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/).\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) 2015-2025, Vega-Altair Developers\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of vega-altair nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n"
  },
  {
    "path": "NOTES_FOR_MAINTAINERS.md",
    "content": "# Notes for Maintainers of Altair\n\n## Auto-generating the Python code\n\nThe core Python API for Altair can be found in the following locations:\n\n- ``altair/vegalite/v6/schema/``\n\nAll the files within these directories are created automatically by running\nthe following script:\n\n```bash\nuv run task generate-schema-wrapper\n```\n\nThis script does a couple things:\n\n- downloads the appropriate schema files from the specified vega-lite\n  release versions & copies the JSON file to the appropriate ``schema``\n  directory\n- generates basic low-level schemapi wrappers from the definitions within\n  the schema: this is put in the ``schema/core.py`` file\n- generates a second layer of higher level wrappers for some vega-lite\n  functionality; this is put in ``schema/channels.py`` and ``schema/mixins.py``\n\nThe script output is designed to be deterministic; if the vega-lite version\nis not changed, then running the script should overwrite the schema wrappers\nwith identical copies.\n\n## Updating Vega versions\nAll versions are maintained in [pyproject.toml](pyproject.toml).\n\n### Python Packages\n\nProjects which publish a package to PyPI are listed with a version bound in one of the following tables:\n\n- [`project.dependencies`](https://packaging.python.org/en/latest/specifications/pyproject-toml/#dependencies-optional-dependencies): Published dependencies.\n- [`project.optional-dependencies`](https://packaging.python.org/en/latest/specifications/pyproject-toml/#dependencies-optional-dependencies): Published optional dependencies, or \"extras\".\n- [`dependency-groups`](https://peps.python.org/pep-0735/): Local dependencies for development.\n\n> [!NOTE]\n> All are currently declared in sub-tables of `project.optional-dependencies`.\n\nThe lower version bounds defined here are reused for [altair/utils/_importers.py](altair/utils/_importers.py).\n\n#### `vl-convert`\n\nWe need to ensure that [vl-convert](https://github.com/vega/vl-convert) includes support for the new Vega-Lite version. \nCheck the [vl-convert releases](https://github.com/vega/vl-convert/releases) to find the minimum\nversion of `vl-convert` that includes support for the desired version of Vega-Lite (and [open\nan issue](https://github.com/vega/vl-convert/issues) if this version hasn't been\nincluded in a released yet).\n\n### Javascript/other\n\nAdditional version constraints, including for [`Vega-Lite`](https://github.com/vega/vega-lite) itself are declared in `[tool.altair.vega]`.\n\nWhereas the [previous dependencies](#python-packages) are used primarily at *install-time*; this group is embedded into `altair` for use at *runtime* or when [generating the python code](#auto-generating-the-python-code):\n\n```toml\n[tool.altair.vega]\nvega-datasets     = \"...\" # https://github.com/vega/vega-datasets\nvega-embed        = \"...\" # https://github.com/vega/vega-embed\nvega-lite         = \"...\" # https://github.com/vega/vega-lite\n```\n\nSome examples of where these propagate to:\n- [altair/jupyter/js/index.js](altair/jupyter/js/index.js)\n- [altair/utils/_importers.py](altair/utils/_importers.py)\n- [tools/generate_schema_wrapper.py](tools/generate_schema_wrapper.py)\n- [tools/versioning.py](tools/versioning.py)\n- [altair/utils/schemapi.py](https://github.com/vega/altair/blob/0e23fd33e9a755bab0ef73a856340c48c14897e6/altair/utils/schemapi.py#L1619-L1640)\n\n> [!IMPORTANT]\n> When updating **any** of these versions, be sure to [re-generate the python code](#auto-generating-the-python-code).\n\n#### Updating the Vega-Lite version\n\nThe Vega-Lite version for the Python code propagates to `tools.generate_schema_wrapper.SCHEMA_VERSION`.\n\nThis will update all of the automatically-generated files in the ``schema``\ndirectory for each version, but please note that it will *not* update other\npieces (for example, the core of the Altair API, including methods and\ndoc strings within ``altair/vegalite/v6/api.py``).\nThese additional methods have fairly good test coverage, so running the test\nsuite should identify any inconsistencies:\n\n```bash\nuv run task test\n```\n\nGenerally, minor version updates (e.g. Vega-Lite 2.3->2.4) have been relatively\npainless, maybe requiring the addition of a few chart methods or modification\nof some docstrings.\nMajor version updates (e.g. Vega-Lite 1.X->2.X) have required substantial\nrewrites, because the internal structure of the schema changed appreciably.\n\n## Releasing the Package\n\nTo cut a new release of Altair, follow the steps outlined in\n[RELEASING.md](RELEASING.md).\n\n## Web analytics\nWe use the privacy-friendly [plausible.io](https://plausible.io/) for tracking usage statistics of our documentation.\nIt is hosted on [https://views.scientific-python.org](https://views.scientific-python.org). You can view the stats [here](https://views.scientific-python.org/altair-viz.github.io). To get an account to edit the settings of the web tracking, ask another maintainer."
  },
  {
    "path": "README.md",
    "content": "# Vega-Altair <a href=\"https://altair-viz.github.io/\"><img align=\"right\" src=\"https://altair-viz.github.io/_static/altair-logo-light.png\" height=\"50\"></img></a>\n\n[![github actions](https://github.com/vega/altair/workflows/build/badge.svg)](https://github.com/vega/altair/actions?query=workflow%3Abuild)\n[![typedlib_mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://www.mypy-lang.org)\n[![JOSS Paper](https://joss.theoj.org/papers/10.21105/joss.01057/status.svg)](https://joss.theoj.org/papers/10.21105/joss.01057)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/altair)](https://pypi.org/project/altair)\n\n**Vega-Altair** is a declarative statistical visualization library for Python. With Vega-Altair, you can spend more time understanding your data and its meaning. Vega-Altair's\nAPI is simple, friendly and consistent and built on top of the powerful\n[Vega-Lite](https://github.com/vega/vega-lite) JSON specification. This elegant\nsimplicity produces beautiful and effective visualizations with a minimal amount of code. \n\n*Vega-Altair was originally developed by [Jake Vanderplas](https://github.com/jakevdp) and [Brian\nGranger](https://github.com/ellisonbg) in close collaboration with the [UW\nInteractive Data Lab](https://idl.cs.washington.edu/).*\n*The Vega-Altair open source project is not affiliated with Altair Engineering, Inc.*\n\n## Documentation\n\nSee [Vega-Altair's Documentation Site](https://altair-viz.github.io) as well as the [Tutorial Notebooks](https://github.com/altair-viz/altair_notebooks). You can\nrun the notebooks directly in your browser by clicking on one of the following badges:\n\n[![Binder](https://beta.mybinder.org/badge.svg)](https://beta.mybinder.org/v2/gh/altair-viz/altair_notebooks/master)\n[![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/altair-viz/altair_notebooks/blob/master/notebooks/Index.ipynb)\n\n## Example\n\nHere is an example using Vega-Altair to quickly visualize and display a dataset with the native Vega-Lite renderer in the JupyterLab:\n\n```python\nimport altair as alt\n\n# load a simple dataset as a pandas DataFrame\nfrom altair.datasets import data\ncars = data.cars()\n\nalt.Chart(cars).mark_point().encode(\n    x='Horsepower',\n    y='Miles_per_Gallon',\n    color='Origin',\n)\n```\n\n![Vega-Altair Visualization](https://raw.githubusercontent.com/altair-viz/altair/main/images/cars.png)\n\nOne of the unique features of Vega-Altair, inherited from Vega-Lite, is a declarative grammar of not just visualization, but _interaction_. \nWith a few modifications to the example above we can create a linked histogram that is filtered based on a selection of the scatter plot.\n\n```python \nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\nbrush = alt.selection_interval()\n\npoints = alt.Chart(source).mark_point().encode(\n    x='Horsepower',\n    y='Miles_per_Gallon',\n    color=alt.when(brush).then(\"Origin\").otherwise(alt.value(\"lightgray\"))\n).add_params(\n    brush\n)\n\nbars = alt.Chart(source).mark_bar().encode(\n    y='Origin',\n    color='Origin',\n    x='count(Origin)'\n).transform_filter(\n    brush\n)\n\npoints & bars\n```\n\n![Vega-Altair Visualization Gif](https://raw.githubusercontent.com/altair-viz/altair/main/images/cars_scatter_bar.gif)\n\n## Features\n\n* Carefully-designed, declarative Python API.\n* Auto-generated internal Python API that guarantees visualizations are type-checked and\n  in full conformance with the [Vega-Lite](https://github.com/vega/vega-lite)\n  specification.\n* Display visualizations in JupyterLab, Jupyter Notebook, Visual Studio Code, on GitHub and\n  [nbviewer](https://nbviewer.jupyter.org/), and many more.\n* Export visualizations to various formats such as PNG/SVG images, stand-alone HTML pages and the\n[Online Vega-Lite Editor](https://vega.github.io/editor/#/).\n* Serialize visualizations as JSON files.\n\n## Installation\n\nVega-Altair can be installed with:\n```bash\npip install altair\n```\n\nIf you are using the conda package manager, the equivalent is:\n```bash\nconda install altair -c conda-forge\n```\n\nFor full installation instructions, please see [the documentation](https://altair-viz.github.io/getting_started/installation.html).\n\n## Getting Help\n\nIf you have a question that is not addressed in the documentation, \nyou can post it on [StackOverflow](https://stackoverflow.com/questions/tagged/altair) using the `altair` tag.\nFor bugs and feature requests, please open a [Github Issue](https://github.com/vega/altair/issues).\n\n## Development\n[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![pytest](https://img.shields.io/badge/logo-pytest-blue?logo=pytest&labelColor=5c5c5c&label=%20)](https://github.com/pytest-dev/pytest)\n\nFor information on how to contribute your developments back to the Vega-Altair repository, see\n[`CONTRIBUTING.md`](https://github.com/vega/altair/blob/main/CONTRIBUTING.md)\n\n## Citing Vega-Altair\n\n[![JOSS Paper](https://joss.theoj.org/papers/10.21105/joss.01057/status.svg)](https://joss.theoj.org/papers/10.21105/joss.01057)\n\nIf you use Vega-Altair in academic work, please consider citing https://joss.theoj.org/papers/10.21105/joss.01057 as\n\n```bib\n@article{VanderPlas2018,\n    doi = {10.21105/joss.01057},\n    url = {https://doi.org/10.21105/joss.01057},\n    year = {2018},\n    publisher = {The Open Journal},\n    volume = {3},\n    number = {32},\n    pages = {1057},\n    author = {Jacob VanderPlas and Brian Granger and Jeffrey Heer and Dominik Moritz and Kanit Wongsuphasawat and Arvind Satyanarayan and Eitan Lees and Ilia Timofeev and Ben Welsh and Scott Sievert},\n    title = {Altair: Interactive Statistical Visualizations for Python},\n    journal = {Journal of Open Source Software}\n}\n```\nPlease additionally consider citing the [Vega-Lite](https://vega.github.io/vega-lite/) project, which Vega-Altair is based on: https://dl.acm.org/doi/10.1109/TVCG.2016.2599030\n\n```bib\n@article{Satyanarayan2017,\n    author={Satyanarayan, Arvind and Moritz, Dominik and Wongsuphasawat, Kanit and Heer, Jeffrey},\n    title={Vega-Lite: A Grammar of Interactive Graphics},\n    journal={IEEE transactions on visualization and computer graphics},\n    year={2017},\n    volume={23},\n    number={1},\n    pages={341-350},\n    publisher={IEEE}\n} \n```\n"
  },
  {
    "path": "RELEASING.md",
    "content": "1. Check all [Vega project](https://github.com/orgs/vega/repositories?type=source) versions are up-to-date. See [NOTES_FOR_MAINTAINERS.md](NOTES_FOR_MAINTAINERS.md)\n\n\n2. Make sure to have [set up your environment](CONTRIBUTING.md#setting-up-your-environment).\n   Update your environment with the latest dependencies:\n   \n        uv sync --all-extras\n\n3. Make certain your branch is in sync with head, and that you have no uncommitted modifications. If you work on a fork, replace `origin` with `upstream`:\n \n        git checkout main\n        git pull origin main\n        git status  # Should show \"nothing to commit, working tree clean\"\n\n4. Do a [clean doc build](CONTRIBUTING.md#building-the-documentation-locally):\n   \n   Navigate to http://localhost:8000 and ensure it looks OK (particularly\n   do a visual scan of the gallery thumbnails).\n\n5. Create a new release branch:\n       \n        git switch -c version_6.0.0\n\n6. Update version to, e.g. 6.0.0:\n\n   - in ``altair/__init__.py``\n   - in ``doc/conf.py``\n\n7. Commit changes and push:\n\n        git add . -u\n        git commit -m \"chore: Bump version to 6.0.0\"\n        git push\n\n8. Merge release branch into main, make sure that all required checks pass\n\n9.  Switch to main, If you work on a fork, replace `origin` with `upstream`:\n\n        git switch main\n        git pull origin main\n        \n10. Build a source distribution and universal wheel, \n    publish to PyPI (Requires correct PyPI owner permissions and [UV_PUBLISH_TOKEN](https://docs.astral.sh/uv/configuration/environment/#uv_publish_token)):\n\n        uv run task publish\n\n11. Build and publish docs (Requires write-access to [altair-viz/altair-viz.github.io](https://github.com/altair-viz/altair-viz.github.io)):\n\n        uv run task doc-publish-clean-build\n\n12. On main, tag the release. If you work on a fork, replace `origin` with `upstream`:\n\n       git tag -a v6.0.0 -m \"Version 6.0.0 release\"\n       git push origin v6.0.0\n\n13. Create a new branch:\n       \n       git switch -c maint_6.1.0dev\n\n14. Update version and add 'dev' suffix, e.g. 6.1.0dev:\n\n    - in ``altair/__init__.py``\n    - in ``doc/conf.py``\n\n15. Commit changes and push:\n\n        git add . -u\n        git commit -m \"chore: Bump version to 6.1.0dev\"\n        git push\n        \n16. Merge maintenance branch into main\n\n17. Double-check that a conda-forge pull request is generated from the updated\n    pip package by the conda-forge bot (may take up to several hours):\n    https://github.com/conda-forge/altair-feedstock/pulls\n\n18. Publish a new release in https://github.com/vega/altair/releases/\n"
  },
  {
    "path": "altair/__init__.py",
    "content": "# ruff: noqa\n__version__ = \"6.1.0dev\"\n\n# The content of __all__ is automatically written by\n# tools/update_init_file.py. Do not modify directly.\n__all__ = [\n    \"Aggregate\",\n    \"AggregateOp\",\n    \"AggregateTransform\",\n    \"AggregatedFieldDef\",\n    \"Align\",\n    \"AllSortString\",\n    \"AltairDeprecationWarning\",\n    \"Angle\",\n    \"AngleDatum\",\n    \"AngleValue\",\n    \"AnyMark\",\n    \"AnyMarkConfig\",\n    \"AreaConfig\",\n    \"ArgmaxDef\",\n    \"ArgminDef\",\n    \"AutoSizeParams\",\n    \"AutosizeType\",\n    \"Axis\",\n    \"AxisConfig\",\n    \"AxisOrient\",\n    \"AxisResolveMap\",\n    \"BBox\",\n    \"BarConfig\",\n    \"BaseTitleNoValueRefs\",\n    \"Baseline\",\n    \"Bin\",\n    \"BinExtent\",\n    \"BinParams\",\n    \"BinTransform\",\n    \"BindCheckbox\",\n    \"BindDirect\",\n    \"BindInput\",\n    \"BindRadioSelect\",\n    \"BindRange\",\n    \"Binding\",\n    \"BinnedTimeUnit\",\n    \"Blend\",\n    \"BoxPlot\",\n    \"BoxPlotConfig\",\n    \"BoxPlotDef\",\n    \"BrushConfig\",\n    \"CalculateTransform\",\n    \"Categorical\",\n    \"ChainedWhen\",\n    \"Chart\",\n    \"ChartDataType\",\n    \"Color\",\n    \"ColorDatum\",\n    \"ColorDef\",\n    \"ColorName\",\n    \"ColorScheme\",\n    \"ColorValue\",\n    \"Column\",\n    \"CompositeMark\",\n    \"CompositeMarkDef\",\n    \"CompositionConfig\",\n    \"ConcatChart\",\n    \"ConcatSpecGenericSpec\",\n    \"ConditionalAxisColor\",\n    \"ConditionalAxisLabelAlign\",\n    \"ConditionalAxisLabelBaseline\",\n    \"ConditionalAxisLabelFontStyle\",\n    \"ConditionalAxisLabelFontWeight\",\n    \"ConditionalAxisNumber\",\n    \"ConditionalAxisNumberArray\",\n    \"ConditionalAxisPropertyAlignnull\",\n    \"ConditionalAxisPropertyColornull\",\n    \"ConditionalAxisPropertyFontStylenull\",\n    \"ConditionalAxisPropertyFontWeightnull\",\n    \"ConditionalAxisPropertyTextBaselinenull\",\n    \"ConditionalAxisPropertynumberArraynull\",\n    \"ConditionalAxisPropertynumbernull\",\n    \"ConditionalAxisPropertystringnull\",\n    \"ConditionalAxisString\",\n    \"ConditionalMarkPropFieldOrDatumDef\",\n    \"ConditionalMarkPropFieldOrDatumDefTypeForShape\",\n    \"ConditionalParameterMarkPropFieldOrDatumDef\",\n    \"ConditionalParameterMarkPropFieldOrDatumDefTypeForShape\",\n    \"ConditionalParameterStringFieldDef\",\n    \"ConditionalParameterValueDefGradientstringnullExprRef\",\n    \"ConditionalParameterValueDefTextExprRef\",\n    \"ConditionalParameterValueDefnumber\",\n    \"ConditionalParameterValueDefnumberArrayExprRef\",\n    \"ConditionalParameterValueDefnumberExprRef\",\n    \"ConditionalParameterValueDefstringExprRef\",\n    \"ConditionalParameterValueDefstringnullExprRef\",\n    \"ConditionalPredicateMarkPropFieldOrDatumDef\",\n    \"ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape\",\n    \"ConditionalPredicateStringFieldDef\",\n    \"ConditionalPredicateValueDefAlignnullExprRef\",\n    \"ConditionalPredicateValueDefColornullExprRef\",\n    \"ConditionalPredicateValueDefFontStylenullExprRef\",\n    \"ConditionalPredicateValueDefFontWeightnullExprRef\",\n    \"ConditionalPredicateValueDefGradientstringnullExprRef\",\n    \"ConditionalPredicateValueDefTextBaselinenullExprRef\",\n    \"ConditionalPredicateValueDefTextExprRef\",\n    \"ConditionalPredicateValueDefnumber\",\n    \"ConditionalPredicateValueDefnumberArrayExprRef\",\n    \"ConditionalPredicateValueDefnumberArraynullExprRef\",\n    \"ConditionalPredicateValueDefnumberExprRef\",\n    \"ConditionalPredicateValueDefnumbernullExprRef\",\n    \"ConditionalPredicateValueDefstringExprRef\",\n    \"ConditionalPredicateValueDefstringnullExprRef\",\n    \"ConditionalStringFieldDef\",\n    \"ConditionalValueDefGradientstringnullExprRef\",\n    \"ConditionalValueDefTextExprRef\",\n    \"ConditionalValueDefnumber\",\n    \"ConditionalValueDefnumberArrayExprRef\",\n    \"ConditionalValueDefnumberExprRef\",\n    \"ConditionalValueDefstringExprRef\",\n    \"ConditionalValueDefstringnullExprRef\",\n    \"Config\",\n    \"CsvDataFormat\",\n    \"Cursor\",\n    \"Cyclical\",\n    \"Data\",\n    \"DataFormat\",\n    \"DataSource\",\n    \"DataType\",\n    \"Datasets\",\n    \"DateTime\",\n    \"DatumChannelMixin\",\n    \"DatumDef\",\n    \"Day\",\n    \"DensityTransform\",\n    \"DerivedStream\",\n    \"Description\",\n    \"DescriptionValue\",\n    \"Detail\",\n    \"Dict\",\n    \"DictInlineDataset\",\n    \"DictSelectionInit\",\n    \"DictSelectionInitInterval\",\n    \"Diverging\",\n    \"DomainUnionWith\",\n    \"DsvDataFormat\",\n    \"Element\",\n    \"Encoding\",\n    \"EncodingSortField\",\n    \"ErrorBand\",\n    \"ErrorBandConfig\",\n    \"ErrorBandDef\",\n    \"ErrorBar\",\n    \"ErrorBarConfig\",\n    \"ErrorBarDef\",\n    \"ErrorBarExtent\",\n    \"EventStream\",\n    \"EventType\",\n    \"Expr\",\n    \"ExprRef\",\n    \"ExtentTransform\",\n    \"Facet\",\n    \"FacetChart\",\n    \"FacetEncodingFieldDef\",\n    \"FacetFieldDef\",\n    \"FacetMapping\",\n    \"FacetSpec\",\n    \"FacetedEncoding\",\n    \"FacetedUnitSpec\",\n    \"Feature\",\n    \"FeatureCollection\",\n    \"FeatureGeometryGeoJsonProperties\",\n    \"Field\",\n    \"FieldChannelMixin\",\n    \"FieldDefWithoutScale\",\n    \"FieldEqualPredicate\",\n    \"FieldGTEPredicate\",\n    \"FieldGTPredicate\",\n    \"FieldLTEPredicate\",\n    \"FieldLTPredicate\",\n    \"FieldName\",\n    \"FieldOneOfPredicate\",\n    \"FieldOrDatumDefWithConditionDatumDefGradientstringnull\",\n    \"FieldOrDatumDefWithConditionDatumDefnumber\",\n    \"FieldOrDatumDefWithConditionDatumDefnumberArray\",\n    \"FieldOrDatumDefWithConditionDatumDefstringnull\",\n    \"FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull\",\n    \"FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull\",\n    \"FieldOrDatumDefWithConditionMarkPropFieldDefnumber\",\n    \"FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray\",\n    \"FieldOrDatumDefWithConditionStringDatumDefText\",\n    \"FieldOrDatumDefWithConditionStringFieldDefText\",\n    \"FieldOrDatumDefWithConditionStringFieldDefstring\",\n    \"FieldRange\",\n    \"FieldRangePredicate\",\n    \"FieldValidPredicate\",\n    \"Fill\",\n    \"FillDatum\",\n    \"FillOpacity\",\n    \"FillOpacityDatum\",\n    \"FillOpacityValue\",\n    \"FillValue\",\n    \"FilterTransform\",\n    \"Fit\",\n    \"FlattenTransform\",\n    \"FoldTransform\",\n    \"FontStyle\",\n    \"FontWeight\",\n    \"Format\",\n    \"FormatConfig\",\n    \"Generator\",\n    \"GenericUnitSpecEncodingAnyMark\",\n    \"GeoJsonFeature\",\n    \"GeoJsonFeatureCollection\",\n    \"GeoJsonProperties\",\n    \"Geometry\",\n    \"GeometryCollection\",\n    \"Gradient\",\n    \"GradientStop\",\n    \"GraticuleGenerator\",\n    \"GraticuleParams\",\n    \"HConcatChart\",\n    \"HConcatSpecGenericSpec\",\n    \"Header\",\n    \"HeaderConfig\",\n    \"HexColor\",\n    \"Href\",\n    \"HrefValue\",\n    \"Impute\",\n    \"ImputeMethod\",\n    \"ImputeParams\",\n    \"ImputeSequence\",\n    \"ImputeTransform\",\n    \"InlineData\",\n    \"InlineDataset\",\n    \"Interpolate\",\n    \"IntervalSelectionConfig\",\n    \"IntervalSelectionConfigWithoutType\",\n    \"JoinAggregateFieldDef\",\n    \"JoinAggregateTransform\",\n    \"JsonDataFormat\",\n    \"JupyterChart\",\n    \"Key\",\n    \"LabelOverlap\",\n    \"LatLongDef\",\n    \"LatLongFieldDef\",\n    \"Latitude\",\n    \"Latitude2\",\n    \"Latitude2Datum\",\n    \"Latitude2Value\",\n    \"LatitudeDatum\",\n    \"LayerChart\",\n    \"LayerRepeatMapping\",\n    \"LayerRepeatSpec\",\n    \"LayerSpec\",\n    \"LayoutAlign\",\n    \"Legend\",\n    \"LegendBinding\",\n    \"LegendConfig\",\n    \"LegendOrient\",\n    \"LegendResolveMap\",\n    \"LegendStreamBinding\",\n    \"LineConfig\",\n    \"LineString\",\n    \"LinearGradient\",\n    \"LocalMultiTimeUnit\",\n    \"LocalSingleTimeUnit\",\n    \"Locale\",\n    \"LoessTransform\",\n    \"LogicalAndPredicate\",\n    \"LogicalNotPredicate\",\n    \"LogicalOrPredicate\",\n    \"Longitude\",\n    \"Longitude2\",\n    \"Longitude2Datum\",\n    \"Longitude2Value\",\n    \"LongitudeDatum\",\n    \"LookupData\",\n    \"LookupSelection\",\n    \"LookupTransform\",\n    \"Mark\",\n    \"MarkConfig\",\n    \"MarkDef\",\n    \"MarkInvalidDataMode\",\n    \"MarkPropDefGradientstringnull\",\n    \"MarkPropDefnumber\",\n    \"MarkPropDefnumberArray\",\n    \"MarkPropDefstringnullTypeForShape\",\n    \"MarkType\",\n    \"MaxRowsError\",\n    \"MergedStream\",\n    \"Month\",\n    \"MultiLineString\",\n    \"MultiPoint\",\n    \"MultiPolygon\",\n    \"MultiTimeUnit\",\n    \"NamedData\",\n    \"NonArgAggregateOp\",\n    \"NonLayerRepeatSpec\",\n    \"NonNormalizedSpec\",\n    \"NumberLocale\",\n    \"NumericArrayMarkPropDef\",\n    \"NumericMarkPropDef\",\n    \"OffsetDef\",\n    \"Opacity\",\n    \"OpacityDatum\",\n    \"OpacityValue\",\n    \"Order\",\n    \"OrderFieldDef\",\n    \"OrderOnlyDef\",\n    \"OrderValue\",\n    \"OrderValueDef\",\n    \"Orient\",\n    \"Orientation\",\n    \"OverlayMarkDef\",\n    \"Padding\",\n    \"Parameter\",\n    \"ParameterExpression\",\n    \"ParameterExtent\",\n    \"ParameterName\",\n    \"ParameterPredicate\",\n    \"Parse\",\n    \"ParseValue\",\n    \"PivotTransform\",\n    \"Point\",\n    \"PointSelectionConfig\",\n    \"PointSelectionConfigWithoutType\",\n    \"PolarDef\",\n    \"Polygon\",\n    \"Position\",\n    \"Position2Def\",\n    \"PositionDatumDef\",\n    \"PositionDatumDefBase\",\n    \"PositionDef\",\n    \"PositionFieldDef\",\n    \"PositionFieldDefBase\",\n    \"PositionValueDef\",\n    \"Predicate\",\n    \"PredicateComposition\",\n    \"PrimitiveValue\",\n    \"Projection\",\n    \"ProjectionConfig\",\n    \"ProjectionType\",\n    \"QuantileTransform\",\n    \"RadialGradient\",\n    \"Radius\",\n    \"Radius2\",\n    \"Radius2Datum\",\n    \"Radius2Value\",\n    \"RadiusDatum\",\n    \"RadiusValue\",\n    \"RangeConfig\",\n    \"RangeEnum\",\n    \"RangeRaw\",\n    \"RangeRawArray\",\n    \"RangeScheme\",\n    \"RectConfig\",\n    \"RegressionTransform\",\n    \"RelativeBandSize\",\n    \"RepeatChart\",\n    \"RepeatMapping\",\n    \"RepeatRef\",\n    \"RepeatSpec\",\n    \"Resolve\",\n    \"ResolveMode\",\n    \"Root\",\n    \"Row\",\n    \"RowColLayoutAlign\",\n    \"RowColboolean\",\n    \"RowColnumber\",\n    \"RowColumnEncodingFieldDef\",\n    \"SCHEMA_URL\",\n    \"SCHEMA_VERSION\",\n    \"SampleTransform\",\n    \"Scale\",\n    \"ScaleBinParams\",\n    \"ScaleBins\",\n    \"ScaleConfig\",\n    \"ScaleDatumDef\",\n    \"ScaleFieldDef\",\n    \"ScaleInterpolateEnum\",\n    \"ScaleInterpolateParams\",\n    \"ScaleInvalidDataConfig\",\n    \"ScaleInvalidDataShowAsValueangle\",\n    \"ScaleInvalidDataShowAsValuecolor\",\n    \"ScaleInvalidDataShowAsValuefill\",\n    \"ScaleInvalidDataShowAsValuefillOpacity\",\n    \"ScaleInvalidDataShowAsValueopacity\",\n    \"ScaleInvalidDataShowAsValueradius\",\n    \"ScaleInvalidDataShowAsValueshape\",\n    \"ScaleInvalidDataShowAsValuesize\",\n    \"ScaleInvalidDataShowAsValuestroke\",\n    \"ScaleInvalidDataShowAsValuestrokeDash\",\n    \"ScaleInvalidDataShowAsValuestrokeOpacity\",\n    \"ScaleInvalidDataShowAsValuestrokeWidth\",\n    \"ScaleInvalidDataShowAsValuetheta\",\n    \"ScaleInvalidDataShowAsValuetime\",\n    \"ScaleInvalidDataShowAsValuex\",\n    \"ScaleInvalidDataShowAsValuexOffset\",\n    \"ScaleInvalidDataShowAsValuey\",\n    \"ScaleInvalidDataShowAsValueyOffset\",\n    \"ScaleInvalidDataShowAsangle\",\n    \"ScaleInvalidDataShowAscolor\",\n    \"ScaleInvalidDataShowAsfill\",\n    \"ScaleInvalidDataShowAsfillOpacity\",\n    \"ScaleInvalidDataShowAsopacity\",\n    \"ScaleInvalidDataShowAsradius\",\n    \"ScaleInvalidDataShowAsshape\",\n    \"ScaleInvalidDataShowAssize\",\n    \"ScaleInvalidDataShowAsstroke\",\n    \"ScaleInvalidDataShowAsstrokeDash\",\n    \"ScaleInvalidDataShowAsstrokeOpacity\",\n    \"ScaleInvalidDataShowAsstrokeWidth\",\n    \"ScaleInvalidDataShowAstheta\",\n    \"ScaleInvalidDataShowAstime\",\n    \"ScaleInvalidDataShowAsx\",\n    \"ScaleInvalidDataShowAsxOffset\",\n    \"ScaleInvalidDataShowAsy\",\n    \"ScaleInvalidDataShowAsyOffset\",\n    \"ScaleResolveMap\",\n    \"ScaleType\",\n    \"SchemaBase\",\n    \"SchemeParams\",\n    \"SecondaryFieldDef\",\n    \"SelectionConfig\",\n    \"SelectionExpression\",\n    \"SelectionInit\",\n    \"SelectionInitInterval\",\n    \"SelectionInitIntervalMapping\",\n    \"SelectionInitMapping\",\n    \"SelectionParameter\",\n    \"SelectionPredicateComposition\",\n    \"SelectionResolution\",\n    \"SelectionType\",\n    \"SequenceGenerator\",\n    \"SequenceParams\",\n    \"SequentialMultiHue\",\n    \"SequentialSingleHue\",\n    \"Shape\",\n    \"ShapeDatum\",\n    \"ShapeDef\",\n    \"ShapeValue\",\n    \"SharedEncoding\",\n    \"SingleDefUnitChannel\",\n    \"SingleTimeUnit\",\n    \"Size\",\n    \"SizeDatum\",\n    \"SizeValue\",\n    \"Sort\",\n    \"SortArray\",\n    \"SortByChannel\",\n    \"SortByChannelDesc\",\n    \"SortByEncoding\",\n    \"SortField\",\n    \"SortOrder\",\n    \"Spec\",\n    \"SphereGenerator\",\n    \"StackOffset\",\n    \"StackTransform\",\n    \"StandardType\",\n    \"Step\",\n    \"StepFor\",\n    \"Stream\",\n    \"StringFieldDef\",\n    \"StringFieldDefWithCondition\",\n    \"StringValueDefWithCondition\",\n    \"Stroke\",\n    \"StrokeCap\",\n    \"StrokeDash\",\n    \"StrokeDashDatum\",\n    \"StrokeDashValue\",\n    \"StrokeDatum\",\n    \"StrokeJoin\",\n    \"StrokeOpacity\",\n    \"StrokeOpacityDatum\",\n    \"StrokeOpacityValue\",\n    \"StrokeValue\",\n    \"StrokeWidth\",\n    \"StrokeWidthDatum\",\n    \"StrokeWidthValue\",\n    \"StyleConfigIndex\",\n    \"SymbolShape\",\n    \"TOPLEVEL_ONLY_KEYS\",\n    \"Text\",\n    \"TextBaseline\",\n    \"TextDatum\",\n    \"TextDef\",\n    \"TextDirection\",\n    \"TextValue\",\n    \"Then\",\n    \"Theta\",\n    \"Theta2\",\n    \"Theta2Datum\",\n    \"Theta2Value\",\n    \"ThetaDatum\",\n    \"ThetaValue\",\n    \"TickConfig\",\n    \"TickCount\",\n    \"Time\",\n    \"TimeDef\",\n    \"TimeFieldDef\",\n    \"TimeFormatSpecifier\",\n    \"TimeInterval\",\n    \"TimeIntervalStep\",\n    \"TimeLocale\",\n    \"TimeUnit\",\n    \"TimeUnitParams\",\n    \"TimeUnitTransform\",\n    \"TimeUnitTransformParams\",\n    \"Title\",\n    \"TitleAnchor\",\n    \"TitleConfig\",\n    \"TitleFrame\",\n    \"TitleOrient\",\n    \"TitleParams\",\n    \"Tooltip\",\n    \"TooltipContent\",\n    \"TooltipValue\",\n    \"TopLevelConcatSpec\",\n    \"TopLevelFacetSpec\",\n    \"TopLevelHConcatSpec\",\n    \"TopLevelLayerSpec\",\n    \"TopLevelMixin\",\n    \"TopLevelParameter\",\n    \"TopLevelRepeatSpec\",\n    \"TopLevelSelectionParameter\",\n    \"TopLevelSpec\",\n    \"TopLevelUnitSpec\",\n    \"TopLevelVConcatSpec\",\n    \"TopoDataFormat\",\n    \"Transform\",\n    \"Type\",\n    \"TypeForShape\",\n    \"TypedFieldDef\",\n    \"URI\",\n    \"Undefined\",\n    \"UnitSpec\",\n    \"UnitSpecWithFrame\",\n    \"Url\",\n    \"UrlData\",\n    \"UrlValue\",\n    \"UtcMultiTimeUnit\",\n    \"UtcSingleTimeUnit\",\n    \"VConcatChart\",\n    \"VConcatSpecGenericSpec\",\n    \"VEGAEMBED_VERSION\",\n    \"VEGALITE_VERSION\",\n    \"VEGA_VERSION\",\n    \"ValueChannelMixin\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefnumber\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefstringnull\",\n    \"ValueDefWithConditionStringFieldDefText\",\n    \"ValueDefnumber\",\n    \"ValueDefnumberwidthheightExprRef\",\n    \"VariableParameter\",\n    \"Vector10string\",\n    \"Vector12string\",\n    \"Vector2DateTime\",\n    \"Vector2Vector2number\",\n    \"Vector2boolean\",\n    \"Vector2number\",\n    \"Vector2string\",\n    \"Vector3number\",\n    \"Vector7string\",\n    \"VegaLite\",\n    \"VegaLiteSchema\",\n    \"ViewBackground\",\n    \"ViewConfig\",\n    \"When\",\n    \"WindowEventType\",\n    \"WindowFieldDef\",\n    \"WindowOnlyOp\",\n    \"WindowTransform\",\n    \"X\",\n    \"X2\",\n    \"X2Datum\",\n    \"X2Value\",\n    \"XDatum\",\n    \"XError\",\n    \"XError2\",\n    \"XError2Value\",\n    \"XErrorValue\",\n    \"XOffset\",\n    \"XOffsetDatum\",\n    \"XOffsetValue\",\n    \"XValue\",\n    \"Y\",\n    \"Y2\",\n    \"Y2Datum\",\n    \"Y2Value\",\n    \"YDatum\",\n    \"YError\",\n    \"YError2\",\n    \"YError2Value\",\n    \"YErrorValue\",\n    \"YOffset\",\n    \"YOffsetDatum\",\n    \"YOffsetValue\",\n    \"YValue\",\n    \"api\",\n    \"binding\",\n    \"binding_checkbox\",\n    \"binding_radio\",\n    \"binding_range\",\n    \"binding_select\",\n    \"channels\",\n    \"check_fields_and_encodings\",\n    \"compiler\",\n    \"concat\",\n    \"condition\",\n    \"core\",\n    \"data\",\n    \"data_transformers\",\n    \"datasets\",\n    \"datum\",\n    \"default_data_transformer\",\n    \"display\",\n    \"expr\",\n    \"graticule\",\n    \"hconcat\",\n    \"jupyter\",\n    \"layer\",\n    \"limit_rows\",\n    \"load_ipython_extension\",\n    \"load_schema\",\n    \"mixins\",\n    \"param\",\n    \"parse_shorthand\",\n    \"renderers\",\n    \"repeat\",\n    \"sample\",\n    \"schema\",\n    \"selection_interval\",\n    \"selection_point\",\n    \"sequence\",\n    \"sphere\",\n    \"theme\",\n    \"to_csv\",\n    \"to_json\",\n    \"to_values\",\n    \"topo_feature\",\n    \"typing\",\n    \"utils\",\n    \"v6\",\n    \"value\",\n    \"vconcat\",\n    \"vegalite\",\n    \"vegalite_compilers\",\n    \"when\",\n    \"with_property_setters\",\n]\n\n\ndef __dir__():\n    return __all__\n\n\nfrom altair.vegalite import *\nfrom altair.vegalite.v6.schema.core import Dict\nfrom altair.jupyter import JupyterChart\nfrom altair.expr import expr\nfrom altair.utils import AltairDeprecationWarning, parse_shorthand, Undefined\nfrom altair import datasets, theme, typing\n\n\ndef load_ipython_extension(ipython):\n    from altair._magics import vegalite\n\n    ipython.register_magic_function(vegalite, \"cell\")\n\n\ndef __getattr__(name: str):\n    from altair.utils.deprecation import deprecated_warn\n\n    if name == \"themes\":\n        deprecated_warn(\n            \"Most cases require only the following change:\\n\\n\"\n            \"    # Deprecated\\n\"\n            \"    alt.themes.enable('quartz')\\n\\n\"\n            \"    # Updated\\n\"\n            \"    alt.theme.enable('quartz')\\n\\n\"\n            \"If your code registers a theme, make the following change:\\n\\n\"\n            \"    # Deprecated\\n\"\n            \"    def custom_theme():\\n\"\n            \"        return {'height': 400, 'width': 700}\\n\"\n            \"    alt.themes.register('theme_name', custom_theme)\\n\"\n            \"    alt.themes.enable('theme_name')\\n\\n\"\n            \"    # Updated\\n\"\n            \"    @alt.theme.register('theme_name', enable=True)\\n\"\n            \"    def custom_theme():\\n\"\n            \"        return alt.theme.ThemeConfig(\\n\"\n            \"            {'height': 400, 'width': 700}\\n\"\n            \"        )\\n\\n\"\n            \"See the updated User Guide for further details:\\n\"\n            \"    https://altair-viz.github.io/user_guide/api.html#theme\\n\"\n            \"    https://altair-viz.github.io/user_guide/customization.html#chart-themes\",\n            version=\"5.5.0\",\n            alternative=\"altair.theme\",\n            stacklevel=3,\n            action=\"once\",\n        )\n        return theme._themes\n    else:\n        msg = f\"module {__name__!r} has no attribute {name!r}\"\n        raise AttributeError(msg)\n"
  },
  {
    "path": "altair/_magics.py",
    "content": "\"\"\"Magic functions for rendering vega-lite specifications.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport warnings\nfrom importlib.util import find_spec\nfrom typing import Any\n\nfrom IPython.core import magic_arguments\nfrom narwhals.stable.v1.dependencies import is_pandas_dataframe\n\nfrom altair.vegalite import v6 as vegalite_v6\n\n__all__ = [\"vegalite\"]\n\nRENDERERS = {\n    \"vega-lite\": {\n        \"6\": vegalite_v6.VegaLite,\n    },\n}\n\n\nTRANSFORMERS = {\n    \"vega-lite\": {\n        \"6\": vegalite_v6.data_transformers,\n    },\n}\n\n\ndef _prepare_data(data, data_transformers):\n    \"\"\"Convert input data to data for use within schema.\"\"\"\n    if data is None or isinstance(data, dict):\n        return data\n    elif is_pandas_dataframe(data):\n        if func := data_transformers.get():\n            data = func(data)\n        return data\n    elif isinstance(data, str):\n        return {\"url\": data}\n    else:\n        warnings.warn(f\"data of type {type(data)} not recognized\", stacklevel=1)\n        return data\n\n\ndef _get_variable(name: str) -> Any:\n    \"\"\"Get a variable from the notebook namespace.\"\"\"\n    from IPython.core.getipython import get_ipython\n\n    if ip := get_ipython():\n        if name not in ip.user_ns:\n            msg = f\"argument '{name}' does not match the name of any defined variable\"\n            raise NameError(msg)\n        return ip.user_ns[name]\n    else:\n        msg = (\n            \"Magic command must be run within an IPython \"\n            \"environment, in which get_ipython() is defined.\"\n        )\n        raise ValueError(msg)\n\n\n@magic_arguments.magic_arguments()\n@magic_arguments.argument(\n    \"data\",\n    nargs=\"?\",\n    help=\"local variablename of a pandas DataFrame to be used as the dataset\",\n)\n@magic_arguments.argument(\"-v\", \"--version\", dest=\"version\", default=\"v6\")\n@magic_arguments.argument(\"-j\", \"--json\", dest=\"json\", action=\"store_true\")\ndef vegalite(line, cell) -> vegalite_v6.VegaLite:\n    \"\"\"\n    Cell magic for displaying vega-lite visualizations in CoLab.\n\n    %%vegalite [dataframe] [--json] [--version='v6']\n\n    Visualize the contents of the cell using Vega-Lite, optionally\n    specifying a pandas DataFrame object to be used as the dataset.\n\n    if --json is passed, then input is parsed as json rather than yaml.\n    \"\"\"\n    args = magic_arguments.parse_argstring(vegalite, line)\n    existing_versions = {\"v6\": \"6\"}\n    version = existing_versions[args.version]\n    assert version in RENDERERS[\"vega-lite\"]\n    VegaLite = RENDERERS[\"vega-lite\"][version]\n    data_transformers = TRANSFORMERS[\"vega-lite\"][version]\n\n    if args.json:\n        spec = json.loads(cell)\n    elif not find_spec(\"yaml\"):\n        try:\n            spec = json.loads(cell)\n        except json.JSONDecodeError as err:\n            msg = (\n                \"%%vegalite: spec is not valid JSON. \"\n                \"Install pyyaml to parse spec as yaml\"\n            )\n            raise ValueError(msg) from err\n    else:\n        import yaml\n\n        spec = yaml.load(cell, Loader=yaml.SafeLoader)\n\n    if args.data is not None:\n        data = _get_variable(args.data)\n        spec[\"data\"] = _prepare_data(data, data_transformers)\n\n    return VegaLite(spec)\n"
  },
  {
    "path": "altair/datasets/__init__.py",
    "content": "\"\"\"\nLoad example datasets *remotely* from `vega-datasets`_.\n\nProvides **70+** datasets, used throughout our `Example Gallery`_.\n\nYou can learn more about each dataset at `datapackage.md`_.\n\nExamples\n--------\n**Primary Interface - Data Object**::\n\n    from altair.datasets import data\n\n    # Load with default engine (pandas)\n    cars_df = data.cars()\n\n    # Load with specific engine\n    cars_polars = data.cars(engine=\"polars\")\n    cars_pyarrow = data.cars(engine=\"pyarrow\")\n\n    # Get URL\n    cars_url = data.cars.url\n\n    # Set default engine for all datasets\n    data.set_default_engine(\"polars\")\n    movies_df = data.movies()  # Uses polars engine\n\n    # List available datasets\n    available_datasets = data.list_datasets()\n\n**Expert Interface - Loader**::\n\n    from altair.datasets import Loader\n\n    load = Loader.from_backend(\"polars\")\n    load(\"penguins\")\n    load.url(\"penguins\")\n\nThis method also provides *precise* <kbd>Tab</kbd> completions on the returned object::\n\n    load(\"cars\").<Tab>\n    #            bottom_k\n    #            drop\n    #            drop_in_place\n    #            drop_nans\n    #            dtypes\n    #            ...\n\n**Expert Interface - Direct Functions**::\n\n    from altair.datasets import load, url\n\n    # Load a dataset\n    cars_df = load(\"cars\", backend=\"polars\")\n\n    # Get dataset URL\n    cars_url = url(\"cars\")\n\n.. note::\n   Requires installation of either `polars`_, `pandas`_, or `pyarrow`_.\n\n.. _vega-datasets:\n    https://github.com/vega/vega-datasets\n.. _Example Gallery:\n    https://altair-viz.github.io/gallery/index.html#example-gallery\n.. _datapackage.md:\n    https://github.com/vega/vega-datasets/blob/main/datapackage.md\n.. _polars:\n    https://docs.pola.rs/user-guide/installation/\n.. _pandas:\n    https://pandas.pydata.org/docs/getting_started/install.html\n.. _pyarrow:\n    https://arrow.apache.org/docs/python/install.html\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nfrom altair.datasets._loader import Loader\n\nif TYPE_CHECKING:\n    import sys\n    from typing import Any\n\n    if sys.version_info >= (3, 11):\n        from typing import LiteralString\n    else:\n        from typing_extensions import LiteralString\n\n    from altair.datasets._data import DataObject\n    from altair.datasets._loader import _Load\n    from altair.datasets._typing import Dataset, Extension\n\n__all__ = [\"Loader\", \"data\", \"load\", \"url\"]\n\n\nload: _Load[Any, Any]\n\"\"\"\nGet a remote dataset and load as tabular data.\n\nThis is an expert interface. For most users, the data object interface is recommended::\n\n    from altair.datasets import data\n    cars = data.cars(engine=\"polars\")\n\nFor full <kbd>Tab</kbd> completions, instead use::\n\n    from altair.datasets import Loader\n    load = Loader.from_backend(\"polars\")\n    cars = load(\"cars\")\n    movies = load(\"movies\")\n\nAlternatively, specify ``backend`` during a call::\n\n    from altair.datasets import load\n    cars = load(\"cars\", backend=\"polars\")\n    movies = load(\"movies\", backend=\"polars\")\n\"\"\"\n\ndata: DataObject\n\n\ndef url(\n    name: Dataset | LiteralString,\n    suffix: Extension | None = None,\n    /,\n) -> str:\n    \"\"\"\n    Return the address of a remote dataset.\n\n    This is an expert interface. For most users, the data object interface is recommended::\n\n        from altair.datasets import data\n\n        cars_url = data.cars.url\n\n    Parameters\n    ----------\n    name\n        Name of the dataset/`Path.stem`_.\n    suffix\n        File extension/`Path.suffix`_.\n\n        .. note::\n            Only needed if ``name`` is available in multiple formats.\n\n    Returns\n    -------\n    ``str``\n\n    .. _Path.stem:\n        https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.stem\n    .. _Path.suffix:\n        https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.suffix\n    \"\"\"\n    from altair.datasets._exceptions import AltairDatasetsError\n\n    try:\n        from altair.datasets._loader import load\n\n        url = load.url(name, suffix)\n    except AltairDatasetsError:\n        from altair.datasets._cache import csv_cache\n\n        url = csv_cache.url(name)\n\n    return url\n\n\nif not TYPE_CHECKING:\n\n    def __getattr__(name):\n        if name == \"data\":\n            from altair.datasets._data import data\n\n            return data\n        elif name == \"load\":\n            from altair.datasets._loader import load\n\n            return load\n        else:\n            msg = f\"module {__name__!r} has no attribute {name!r}\"\n            raise AttributeError(msg)\n"
  },
  {
    "path": "altair/datasets/_cache.py",
    "content": "from __future__ import annotations\n\nimport os\nimport sys\nfrom collections import defaultdict\nfrom importlib.util import find_spec\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, ClassVar, TypeVar, cast\n\nimport narwhals.stable.v1 as nw\n\nfrom altair.datasets._exceptions import AltairDatasetsError\n\nif sys.version_info >= (3, 12):\n    from typing import Protocol\nelse:\n    from typing_extensions import Protocol\n\nif TYPE_CHECKING:\n    from collections.abc import (\n        Iterable,\n        Iterator,\n        Mapping,\n        MutableMapping,\n        MutableSequence,\n        Sequence,\n    )\n    from io import IOBase\n    from typing import Any, Final, TypeAlias\n    from urllib.request import OpenerDirector\n\n    from _typeshed import StrPath\n    from narwhals.stable.v1.dtypes import DType\n    from narwhals.stable.v1.typing import IntoExpr\n\n    from altair.datasets._typing import Dataset, Metadata\n\n    if sys.version_info >= (3, 12):\n        from typing import Unpack\n    else:\n        from typing_extensions import Unpack\n\n    if sys.version_info >= (3, 11):\n        from typing import LiteralString\n    else:\n        from typing_extensions import LiteralString\n\n    from altair.datasets._typing import FlFieldStr\n    from altair.vegalite.v6.schema._typing import OneOrSeq\n\n    _Dataset: TypeAlias = \"Dataset | LiteralString\"\n    _FlSchema: TypeAlias = Mapping[str, FlFieldStr]\n\n__all__ = [\"CsvCache\", \"DatasetCache\", \"SchemaCache\", \"csv_cache\"]\n\n\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n_T = TypeVar(\"_T\")\n\n_METADATA_DIR: Final[Path] = Path(__file__).parent / \"_metadata\"\n\n_DTYPE_TO_FIELD: Mapping[type[DType], FlFieldStr] = {\n    nw.Int64: \"integer\",\n    nw.Float64: \"number\",\n    nw.Boolean: \"boolean\",\n    nw.String: \"string\",\n    nw.Struct: \"object\",\n    nw.List: \"array\",\n    nw.Date: \"date\",\n    nw.Datetime: \"datetime\",\n    nw.Duration: \"duration\",\n    # nw.Time: \"time\" (Not Implemented, but we don't have any cases using it anyway)\n}\n\"\"\"\nSimilar to `pl.datatypes.convert.dtype_to_ffiname`_.\n\nBut using `narwhals.dtypes`_ to the string repr of ``frictionless`` `Field Types`_.\n\n.. _pl.datatypes.convert.dtype_to_ffiname:\n    https://github.com/pola-rs/polars/blob/85d078c066860e012f5e7e611558e6382b811b82/py-polars/polars/datatypes/convert.py#L139-L165\n.. _Field Types:\n    https://datapackage.org/standard/table-schema/#field-types\n.. _narwhals.dtypes:\n    https://narwhals-dev.github.io/narwhals/api-reference/dtypes/\n\"\"\"\n\n_FIELD_TO_DTYPE: Mapping[FlFieldStr, type[DType]] = {\n    v: k for k, v in _DTYPE_TO_FIELD.items()\n}\n\n\ndef _iter_metadata(df: nw.DataFrame[Any], /) -> Iterator[Metadata]:\n    \"\"\"\n    Yield rows from ``df``, where each represents a dataset.\n\n    See Also\n    --------\n    ``altair.datasets._typing.Metadata``\n    \"\"\"\n    yield from cast(\"Iterator[Metadata]\", df.iter_rows(named=True))\n\n\nclass CompressedCache(Protocol[_KT, _VT]):\n    fp: Path\n    _mapping: MutableMapping[_KT, _VT]\n\n    def read(self) -> Any: ...\n    def __getitem__(self, key: _KT, /) -> _VT: ...\n\n    def __enter__(self) -> IOBase:\n        import gzip\n\n        return gzip.open(self.fp, mode=\"rb\").__enter__()\n\n    def __exit__(self, *args) -> None:\n        return\n\n    def get(self, key: _KT, default: _T, /) -> _VT | _T:\n        return self.mapping.get(key, default)\n\n    @property\n    def mapping(self) -> MutableMapping[_KT, _VT]:\n        if not self._mapping:\n            self._mapping.update(self.read())\n        return self._mapping\n\n\nclass CsvCache(CompressedCache[\"_Dataset\", \"Metadata\"]):\n    \"\"\"\n    `csv`_, `gzip`_ -based, lazy metadata lookup.\n\n    Used as a fallback for 2 scenarios:\n\n    1. ``url(...)`` when no optional dependencies are installed.\n    2. ``(Loader|load)(...)`` when the backend is missing* ``.parquet`` support.\n\n    Notes\n    -----\n    *All backends *can* support ``.parquet``, but ``pandas`` requires an optional dependency.\n\n    .. _csv:\n        https://docs.python.org/3/library/csv.html\n    .. _gzip:\n        https://docs.python.org/3/library/gzip.html\n    \"\"\"\n\n    fp = _METADATA_DIR / \"metadata.csv.gz\"\n\n    def __init__(\n        self,\n        *,\n        tp: type[MutableMapping[_Dataset, Metadata]] = dict[\"_Dataset\", \"Metadata\"],\n    ) -> None:\n        self._mapping: MutableMapping[_Dataset, Metadata] = tp()\n        self._rotated: MutableMapping[str, MutableSequence[Any]] = defaultdict(list)\n\n    def read(self) -> Any:\n        import csv\n\n        with self as f:\n            b_lines = f.readlines()\n        reader = csv.reader((bs.decode() for bs in b_lines), dialect=csv.unix_dialect)\n        header = tuple(next(reader))\n        return {row[0]: dict(self._convert_row(header, row)) for row in reader}\n\n    def _convert_row(\n        self, header: Iterable[str], row: Iterable[str], /\n    ) -> Iterator[tuple[str, Any]]:\n        map_tf = {\"true\": True, \"false\": False}\n        for col, value in zip(header, row, strict=False):\n            if col.startswith((\"is_\", \"has_\")):\n                yield col, map_tf[value]\n            elif col == \"bytes\":\n                yield col, int(value)\n            else:\n                yield col, value\n\n    @property\n    def rotated(self) -> Mapping[str, Sequence[Any]]:\n        \"\"\"Columnar view.\"\"\"\n        if not self._rotated:\n            for record in self.mapping.values():\n                for k, v in record.items():\n                    self._rotated[k].append(v)\n        return self._rotated\n\n    def __getitem__(self, key: _Dataset, /) -> Metadata:\n        if meta := self.get(key, None):\n            return meta\n        msg = f\"{key!r} does not refer to a known dataset.\"\n        raise TypeError(msg)\n\n    def url(self, name: _Dataset, /) -> str:\n        meta = self[name]\n        if meta[\"suffix\"] == \".parquet\" and not find_spec(\"vegafusion\"):\n            raise AltairDatasetsError.from_url(meta)\n        return meta[\"url\"]\n\n    def __repr__(self) -> str:\n        return f\"<{type(self).__name__}: {'COLLECTED' if self._mapping else 'READY'}>\"\n\n\nclass SchemaCache(CompressedCache[\"_Dataset\", \"_FlSchema\"]):\n    \"\"\"\n    `json`_, `gzip`_ -based, lazy schema lookup.\n\n    - Primarily benefits ``pandas``, which needs some help identifying **temporal** columns.\n    - Utilizes `data package`_ schema types.\n    - All methods return falsy containers instead of exceptions\n\n    .. _json:\n        https://docs.python.org/3/library/json.html\n    .. _gzip:\n        https://docs.python.org/3/library/gzip.html\n    .. _data package:\n        https://github.com/vega/vega-datasets/pull/631\n    \"\"\"\n\n    fp = _METADATA_DIR / \"schemas.json.gz\"\n\n    def __init__(\n        self,\n        *,\n        tp: type[MutableMapping[_Dataset, _FlSchema]] = dict[\"_Dataset\", \"_FlSchema\"],\n        implementation: nw.Implementation = nw.Implementation.UNKNOWN,\n    ) -> None:\n        self._mapping: MutableMapping[_Dataset, _FlSchema] = tp()\n        self._implementation: nw.Implementation = implementation\n\n    def read(self) -> Any:\n        import json\n\n        with self as f:\n            return json.load(f)\n\n    def __getitem__(self, key: _Dataset, /) -> _FlSchema:\n        return self.get(key, {})\n\n    def by_dtype(self, name: _Dataset, *dtypes: type[DType]) -> list[str]:\n        \"\"\"\n        Return column names specfied in ``name``'s schema.\n\n        Parameters\n        ----------\n        name\n            Dataset name.\n        *dtypes\n            Optionally, only return columns matching the given data type(s).\n        \"\"\"\n        if (match := self[name]) and dtypes:\n            include = {_DTYPE_TO_FIELD[tp] for tp in dtypes}\n            return [col for col, tp_str in match.items() if tp_str in include]\n        else:\n            return list(match)\n\n    def is_active(self) -> bool:\n        return self._implementation in {\n            nw.Implementation.PANDAS,\n            nw.Implementation.PYARROW,\n            nw.Implementation.MODIN,\n            nw.Implementation.PYARROW,\n        }\n\n    def schema(self, name: _Dataset, /) -> nw.Schema:\n        it = ((col, _FIELD_TO_DTYPE[tp_str]()) for col, tp_str in self[name].items())\n        return nw.Schema(it)\n\n    def schema_kwds(self, meta: Metadata, /) -> dict[str, Any]:\n        name: Any = meta[\"dataset_name\"]\n        if self.is_active() and (self[name]):\n            suffix = meta[\"suffix\"]\n            if self._implementation.is_pandas_like():\n                if cols := self.by_dtype(name, nw.Date, nw.Datetime):\n                    if suffix == \".json\":\n                        return {\"convert_dates\": cols}\n                    elif suffix in {\".csv\", \".tsv\"}:\n                        return {\"parse_dates\": cols}\n            else:\n                schema = self.schema(name).to_arrow()\n                if suffix in {\".csv\", \".tsv\"}:\n                    from pyarrow.csv import ConvertOptions\n\n                    # For pyarrow CSV reading, use the schema as intended\n                    # This will fail for non-ISO date formats, but that's the correct behavior\n                    # Users can handle this by using a different backend or converting dates manually\n                    return {\"convert_options\": ConvertOptions(column_types=schema)}\n                elif suffix == \".parquet\":\n                    return {\"schema\": schema}\n\n        return {}\n\n\nclass _SupportsScanMetadata(Protocol):\n    _opener: ClassVar[OpenerDirector]\n\n    def _scan_metadata(\n        self, *predicates: OneOrSeq[IntoExpr], **constraints: Unpack[Metadata]\n    ) -> nw.LazyFrame[Any]: ...\n\n\nclass DatasetCache:\n    \"\"\"Opt-out caching of remote dataset requests.\"\"\"\n\n    _ENV_VAR: ClassVar[LiteralString] = \"ALTAIR_DATASETS_DIR\"\n    _XDG_CACHE: ClassVar[Path] = (\n        Path(os.environ.get(\"XDG_CACHE_HOME\", Path.home() / \".cache\")) / \"altair\"\n    ).resolve()\n\n    def __init__(self, reader: _SupportsScanMetadata, /) -> None:\n        self._rd: _SupportsScanMetadata = reader\n\n    def clear(self) -> None:\n        \"\"\"Delete all previously cached datasets.\"\"\"\n        self._ensure_active()\n        if self.is_empty():\n            return None\n        ser = (\n            self._rd._scan_metadata()\n            .select(\"sha\", \"suffix\")\n            .unique(\"sha\")\n            .select(nw.concat_str(\"sha\", \"suffix\").alias(\"sha_suffix\"))\n            .collect()\n            .get_column(\"sha_suffix\")\n        )\n        names = set[str](ser.to_list())\n        for fp in self:\n            if fp.name in names:\n                fp.unlink()\n\n    def download_all(self) -> None:\n        \"\"\"\n        Download any missing datasets for latest version.\n\n        Requires **30-50MB** of disk-space.\n        \"\"\"\n        stems = tuple(fp.stem for fp in self)\n        predicates = (~(nw.col(\"sha\").is_in(stems)),) if stems else ()\n        frame = (\n            self._rd._scan_metadata(*predicates, is_image=False)\n            .select(\"sha\", \"suffix\", \"url\")\n            .unique(\"sha\")\n            .collect()\n        )\n        if frame.is_empty():\n            print(\"Already downloaded all datasets\")\n            return None\n        print(f\"Downloading {len(frame)} missing datasets...\")\n        for meta in _iter_metadata(frame):\n            self._download_one(meta[\"url\"], self.path_meta(meta))\n        print(\"Finished downloads\")\n        return None\n\n    def _maybe_download(self, meta: Metadata, /) -> Path:\n        fp = self.path_meta(meta)\n        return (\n            fp\n            if (fp.exists() and fp.stat().st_size)\n            else self._download_one(meta[\"url\"], fp)\n        )\n\n    def _download_one(self, url: str, fp: Path, /) -> Path:\n        with self._rd._opener.open(url) as f:\n            fp.touch()\n            fp.write_bytes(f.read())\n        return fp\n\n    @property\n    def path(self) -> Path:\n        \"\"\"\n        Returns path to datasets cache.\n\n        Defaults to (`XDG_CACHE_HOME`_)::\n\n            \"$XDG_CACHE_HOME/altair/\"\n\n        But can be configured using the environment variable::\n\n            \"$ALTAIR_DATASETS_DIR\"\n\n        You can set this for the current session via::\n\n            from pathlib import Path\n            from altair.datasets import load\n\n            load.cache.path = Path.home() / \".altair_cache\"\n\n            load.cache.path.relative_to(Path.home()).as_posix()\n            \".altair_cache\"\n\n        You can *later* disable caching via::\n\n           load.cache.path = None\n\n        .. _XDG_CACHE_HOME:\n            https://specifications.freedesktop.org/basedir-spec/latest/#variables\n        \"\"\"\n        self._ensure_active()\n        fp = Path(usr) if (usr := os.environ.get(self._ENV_VAR)) else self._XDG_CACHE\n        fp.mkdir(parents=True, exist_ok=True)\n        return fp\n\n    @path.setter\n    def path(self, source: StrPath | None, /) -> None:\n        if source is not None:\n            os.environ[self._ENV_VAR] = str(Path(source).resolve())\n        else:\n            os.environ[self._ENV_VAR] = \"\"\n\n    def path_meta(self, meta: Metadata, /) -> Path:\n        return self.path / (meta[\"sha\"] + meta[\"suffix\"])\n\n    def __iter__(self) -> Iterator[Path]:\n        yield from self.path.iterdir()\n\n    def __repr__(self) -> str:\n        name = type(self).__name__\n        if self.is_not_active():\n            return f\"{name}<UNSET>\"\n        else:\n            return f\"{name}<{self.path.as_posix()!r}>\"\n\n    def is_active(self) -> bool:\n        return not self.is_not_active()\n\n    def is_not_active(self) -> bool:\n        return os.environ.get(self._ENV_VAR) == \"\"\n\n    def is_empty(self) -> bool:\n        \"\"\"Cache is active, but no files are stored in ``self.path``.\"\"\"\n        return next(iter(self), None) is None\n\n    def _ensure_active(self) -> None:\n        if self.is_not_active():\n            msg = (\n                f\"Cache is unset.\\n\"\n                f\"To enable dataset caching, set the environment variable:\\n\"\n                f\"    {self._ENV_VAR!r}\\n\\n\"\n                f\"You can set this for the current session via:\\n\"\n                f\"    from pathlib import Path\\n\"\n                f\"    from altair.datasets import load\\n\\n\"\n                f\"    load.cache.path = Path.home() / '.altair_cache'\"\n            )\n            raise ValueError(msg)\n\n\ncsv_cache: CsvCache\n\n\ndef __getattr__(name):\n    if name == \"csv_cache\":\n        global csv_cache\n        csv_cache = CsvCache()\n        return csv_cache\n\n    else:\n        msg = f\"module {__name__!r} has no attribute {name!r}\"\n        raise AttributeError(msg)\n"
  },
  {
    "path": "altair/datasets/_constraints.py",
    "content": "\"\"\"Set-like guards for matching metadata to an implementation.\"\"\"\n\nfrom __future__ import annotations\n\nfrom collections.abc import Set\nfrom itertools import chain\nfrom typing import TYPE_CHECKING, Any\n\nfrom narwhals.stable import v1 as nw\n\nif TYPE_CHECKING:\n    import sys\n    from collections.abc import Iterable, Iterator\n\n    from altair.datasets._typing import Metadata\n\n    if sys.version_info >= (3, 12):\n        from typing import Unpack\n    else:\n        from typing_extensions import Unpack\n    from typing import TypeAlias\n\n__all__ = [\n    \"Items\",\n    \"MetaIs\",\n    \"is_arrow\",\n    \"is_csv\",\n    \"is_json\",\n    \"is_meta\",\n    \"is_not_tabular\",\n    \"is_parquet\",\n    \"is_spatial\",\n    \"is_topo\",\n    \"is_tsv\",\n]\n\nItems: TypeAlias = Set[tuple[str, Any]]\n\n\nclass MetaIs(Set[tuple[str, Any]]):\n    _requires: frozenset[tuple[str, Any]]\n\n    def __init__(self, kwds: frozenset[tuple[str, Any]], /) -> None:\n        object.__setattr__(self, \"_requires\", kwds)\n\n    @classmethod\n    def from_metadata(cls, meta: Metadata, /) -> MetaIs:\n        return cls(frozenset(meta.items()))\n\n    def to_metadata(self) -> Metadata:\n        if TYPE_CHECKING:\n\n            def collect(**kwds: Unpack[Metadata]) -> Metadata:\n                return kwds\n\n            return collect(**dict(self))\n        return dict(self)\n\n    def to_expr(self) -> nw.Expr:\n        \"\"\"Convert constraint into a narwhals expression.\"\"\"\n        if not self:\n            msg = f\"Unable to convert an empty set to an expression:\\n\\n{self!r}\"\n            raise TypeError(msg)\n        return nw.all_horizontal(nw.col(name) == val for name, val in self)\n\n    def isdisjoint(self, other: Iterable[Any]) -> bool:\n        return super().isdisjoint(other)\n\n    def issubset(self, other: Iterable[Any]) -> bool:\n        return self._requires.issubset(other)\n\n    def __call__(self, meta: Items, /) -> bool:\n        return self._requires <= meta\n\n    def __hash__(self) -> int:\n        return hash(self._requires)\n\n    def __contains__(self, x: object) -> bool:\n        return self._requires.__contains__(x)\n\n    def __iter__(self) -> Iterator[tuple[str, Any]]:\n        yield from self._requires\n\n    def __len__(self) -> int:\n        return self._requires.__len__()\n\n    def __setattr__(self, name: str, value: Any):\n        msg = (\n            f\"{type(self).__name__!r} is immutable.\\n\"\n            f\"Could not assign self.{name} = {value}\"\n        )\n        raise TypeError(msg)\n\n    def __repr__(self) -> str:\n        items = dict(self)\n        if not items:\n            contents = \"<placeholder>\"\n        elif suffix := items.pop(\"suffix\", None):\n            contents = \", \".join(\n                chain([f\"'*{suffix}'\"], (f\"{k}={v!r}\" for k, v in items.items()))\n            )\n        else:\n            contents = \", \".join(f\"{k}={v!r}\" for k, v in items.items())\n        return f\"is_meta({contents})\"\n\n\ndef is_meta(**kwds: Unpack[Metadata]) -> MetaIs:\n    return MetaIs.from_metadata(kwds)\n\n\nis_csv = is_meta(suffix=\".csv\")\nis_json = is_meta(suffix=\".json\")\nis_tsv = is_meta(suffix=\".tsv\")\nis_arrow = is_meta(suffix=\".arrow\")\nis_parquet = is_meta(suffix=\".parquet\")\nis_spatial = is_meta(is_spatial=True)\nis_topo = is_meta(is_topo=True)\nis_not_tabular = is_meta(is_tabular=False)\n"
  },
  {
    "path": "altair/datasets/_data.py",
    "content": "\"\"\"\nData object interface for Altair datasets.\n\nThis module provides a `data` object that allows accessing datasets as attributes\nand calling them with backend options, similar to the vega_datasets interface.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport typing as t\n\nfrom altair.datasets._loader import Loader\n\nif t.TYPE_CHECKING:\n    from typing_extensions import LiteralString\n\n    import pandas as pd\n    import polars as pl\n    import pyarrow as pa\n\n    from altair.datasets._reader import _Backend\n    from altair.datasets._typing import Dataset\n\n\nclass DatasetAccessor:\n    \"\"\"\n    Accessor for individual datasets that can be called with backend options.\n\n    This object provides access to a specific dataset with support for\n    different backends and autocompletion.\n\n    Call this object to load the dataset:\n        dataset_accessor(engine=\"polars\", **kwds)\n\n    Parameters for __call__:\n        engine : {\"polars\", \"pandas\", \"pandas[pyarrow]\", \"pyarrow\"}, optional\n            The backend to use for loading the dataset.\n        **kwds : Any\n            Additional arguments passed to the loader.\n\n    Examples\n    --------\n    >>> from altair.datasets import data\n    >>>\n    >>> # Load with default backend\n    >>> cars_df = data.cars()\n    >>>\n    >>> # Load with specific backend\n    >>> cars_polars = data.cars(engine=\"polars\")\n    >>> cars_pandas = data.cars(engine=\"pandas\")\n    >>> # Note: pandas[pyarrow] backend requires pyarrow package\n    >>>\n    >>> # Get URL\n    >>> url = data.cars.url\n    >>>\n    >>> # Use explicit load method\n    >>> cars_df = data.cars.load(engine=\"polars\")\n    \"\"\"\n\n    def __init__(self, name: Dataset, backend: _Backend = \"pandas\") -> None:\n        import inspect\n\n        self._name: Dataset = name\n        self._backend: _Backend = backend\n        self._prev_loader: Loader[t.Any, t.Any]\n        self.__signature__ = inspect.signature(self._call_impl)\n\n        docstring = f\"\"\"Load the '{name}' dataset.\n\nParameters\n----------\nengine : {{\"polars\", \"pandas\", \"pandas[pyarrow]\", \"pyarrow\"}}, optional\n    The backend to use for loading the dataset.\n**kwds : Any\n    Additional arguments passed to the loader.\n\nReturns\n-------\nDataFrame or Table\n    The loaded dataset.\n\nExamples\n--------\n>>> data.{name}()  # Load with default backend\n>>> data.{name}(engine=\"polars\")  # Load with specific backend\n>>> data.{name}.url  # Get dataset URL\n>>> data.{name}.load(engine=\"polars\")  # Explicit load method\n\"\"\"\n\n        self.__doc__ = docstring\n\n    def _call_impl(\n        self,\n        *,\n        engine: _Backend | None = None,\n        **kwds: t.Any,\n    ) -> t.Any:\n        load = Loader.from_backend(engine) if engine else self._loader\n        return load(self._name, **kwds)\n\n    @property\n    def _loader(self) -> Loader[t.Any, t.Any]:\n        if hasattr(self, \"_prev_loader\"):\n            return self._prev_loader\n        self._prev_loader = Loader.from_backend(self._backend)\n        return self._prev_loader\n\n    @_loader.setter\n    def _loader(self, value: Loader[t.Any, t.Any]) -> None:\n        self._prev_loader = value\n\n    @property\n    def url(self) -> str:\n        \"\"\"\n        Get the URL for this dataset.\n\n        Returns\n        -------\n        str\n            The URL of the dataset.\n\n        Examples\n        --------\n        >>> from altair.datasets import data\n        >>> cars_url = data.cars.url\n        >>> print(cars_url)\n        https://cdn.jsdelivr.net/npm/vega-datasets@v3.2.1/data/cars.json\n        \"\"\"\n        return self._loader.url(self._name)\n\n    def load(self, *, engine: _Backend | None = None, **kwds: t.Any) -> t.Any:\n        \"\"\"\n        Load the dataset with the specified engine.\n\n        This method provides the same functionality as calling the accessor directly,\n        but with more explicit parameter autocompletion in some IDEs.\n\n        Parameters\n        ----------\n        engine : {\"polars\", \"pandas\", \"pandas[pyarrow]\", \"pyarrow\"}, optional\n            The backend to use for loading the dataset.\n        **kwds : Any\n            Additional arguments passed to the loader.\n\n        Returns\n        -------\n        DataFrame or Table\n            The loaded dataset.\n\n        Examples\n        --------\n        >>> from altair.datasets import data\n        >>> cars_df = data.cars.load(engine=\"polars\")\n        >>> movies_df = data.movies.load(engine=\"pandas\")\n        \"\"\"\n        return self._call_impl(engine=engine, **kwds)\n\n    def __repr__(self) -> str:\n        return f\"DatasetAccessor('{self._name}', default_engine='{self._backend}')\"\n\n    @t.overload\n    def __call__(\n        self,\n        *,\n        engine: t.Literal[\"polars\"],\n        **kwds: t.Any,\n    ) -> pl.DataFrame: ...\n\n    @t.overload\n    def __call__(\n        self,\n        *,\n        engine: t.Literal[\"pandas\", \"pandas[pyarrow]\"],\n        **kwds: t.Any,\n    ) -> pd.DataFrame: ...\n\n    @t.overload\n    def __call__(\n        self,\n        *,\n        engine: t.Literal[\"pyarrow\"],\n        **kwds: t.Any,\n    ) -> pa.Table: ...\n\n    @t.overload\n    def __call__(\n        self,\n        *,\n        engine: _Backend | None = None,\n        **kwds: t.Any,\n    ) -> t.Any: ...\n\n    def __call__(\n        self,\n        *,\n        engine: _Backend | None = None,\n        **kwds: t.Any,\n    ) -> t.Any:\n        \"\"\"\n        Load the dataset with the specified engine.\n\n        Parameters\n        ----------\n        engine : {{\"polars\", \"pandas\", \"pandas[pyarrow]\", \"pyarrow\"}}, optional\n            The backend to use for loading the dataset.\n        **kwds\n            Additional arguments passed to the loader.\n\n        Returns\n        -------\n        The loaded dataset as a DataFrame/Table from the specified engine.\n\n        Examples\n        --------\n        >>> from altair.datasets import data\n        >>>\n        >>> # Load with default engine\n        >>> df = data.cars()\n        >>>\n        >>> # Load with specific engine\n        >>> df = data.cars(engine=\"polars\")\n        \"\"\"\n        return self._call_impl(engine=engine, **kwds)\n\n\nclass DataObject:\n    \"\"\"\n    Main data object that provides access to all datasets as attributes.\n\n    This is the primary interface for loading Altair datasets. It provides\n    a simple, intuitive way to access datasets with autocompletion support.\n\n    Examples\n    --------\n    >>> from altair.datasets import data\n    >>>\n    >>> # Access datasets as attributes with autocompletion\n    >>> cars_df = data.cars()\n    >>> movies_df = data.movies(engine=\"pandas\")\n    >>>\n    >>> # Get URLs\n    >>> cars_url = data.cars.url\n    >>> movies_url = data.movies.url\n    >>>\n    >>> # Set default engine for all datasets\n    >>> data.set_default_engine(\"polars\")\n    >>> penguins_df = data.penguins()  # Uses polars engine\n    >>>\n    >>> # List available datasets\n    >>> available_datasets = data.list_datasets()\n    >>> print(f\"Available datasets: {len(available_datasets)}\")\n    Available datasets: 72\n    \"\"\"\n\n    def __init__(self, backend: _Backend = \"pandas\") -> None:\n        self._backend: _Backend = backend\n        self._accessors: dict[Dataset, DatasetAccessor] = {}\n        self._dataset_names: list[Dataset | LiteralString] | None = None\n\n    def _get_dataset_names(self) -> list[Dataset | LiteralString]:\n        \"\"\"Get the list of available dataset names from metadata.\"\"\"\n        if self._dataset_names is None:\n            try:\n                from altair.datasets._cache import CsvCache\n\n                cache = CsvCache()\n                self._dataset_names = list(cache.mapping.keys())\n            except Exception:\n                # Fallback if metadata is not available\n                self._dataset_names = []\n        return self._dataset_names\n\n    def __dir__(self) -> list[str]:\n        \"\"\"Return list of available attributes for autocompletion.\"\"\"\n        standard_attrs = list(super().__dir__())\n        dataset_names = self._get_dataset_names()\n        return standard_attrs + dataset_names\n\n    def __getattr__(self, name: Dataset) -> DatasetAccessor:  # type: ignore[misc]\n        dataset_names = self._get_dataset_names()\n        if name not in dataset_names:\n            available_datasets = dataset_names[:10]\n            error_msg = (\n                f\"Dataset '{name}' not found. Available datasets: {available_datasets}\"\n            )\n            raise AttributeError(error_msg)\n\n        self._accessors[name] = DatasetAccessor(name, self._backend)\n        return self._accessors[name]\n\n    def set_default_engine(self, engine: _Backend) -> None:\n        \"\"\"\n        Set the default engine for all datasets.\n\n        Parameters\n        ----------\n        engine : {\"polars\", \"pandas\", \"pandas[pyarrow]\", \"pyarrow\"}\n            The backend to use as default for all datasets.\n\n        Examples\n        --------\n        >>> from altair.datasets import data\n        >>> data.set_default_engine(\"polars\")\n        >>> # Now all datasets will use polars by default\n        >>> cars_df = data.cars()  # Uses polars\n        >>> movies_df = data.movies()  # Uses polars\n        \"\"\"\n        self._backend = engine\n        # Clear cached accessors so they use the new default\n        self._accessors.clear()\n\n    def list_datasets(self) -> list[Dataset | LiteralString]:\n        \"\"\"\n        Get a list of all available dataset names.\n\n        Returns\n        -------\n        list[str]\n            List of available dataset names.\n\n        Examples\n        --------\n        >>> from altair.datasets import data\n        >>> datasets = data.list_datasets()\n        >>> print(f\"Available datasets: {len(datasets)}\")\n        Available datasets: 72\n        >>> print(datasets[:5])  # First 5 datasets\n        ['airports', 'annual_precip', 'anscombe', 'barley', 'birdstrikes']\n        \"\"\"\n        return self._get_dataset_names()\n\n    def get_default_engine(self) -> _Backend:\n        \"\"\"\n        Get the current default engine.\n\n        Returns\n        -------\n        str\n            The current default engine.\n\n        Examples\n        --------\n        >>> from altair.datasets import data\n        >>> data.set_default_engine(\"pandas\")\n        >>> print(data.get_default_engine())\n        pandas\n        >>> data.set_default_engine(\"polars\")\n        >>> print(data.get_default_engine())\n        polars\n        \"\"\"\n        return self._backend\n\n    def __repr__(self) -> str:\n        dataset_count = len(self._get_dataset_names())\n        return f\"AltairDataObject(default_engine='{self._backend}', datasets={dataset_count})\"\n\n\ndata = DataObject()\n"
  },
  {
    "path": "altair/datasets/_exceptions.py",
    "content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from collections.abc import Sequence\n\n    from altair.datasets._reader import _Backend\n    from altair.datasets._typing import Metadata\n\n\nclass AltairDatasetsError(Exception):\n    @classmethod\n    def from_url(cls, meta: Metadata, /) -> AltairDatasetsError:\n        if meta[\"suffix\"] == \".parquet\":\n            msg = (\n                f\"{_failed_url(meta)}\"\n                f\"{meta['suffix']!r} datasets require `vegafusion`.\\n\"\n                \"See upstream issue for details: https://github.com/vega/vega/issues/3961\"\n            )\n        else:\n            msg = (\n                f\"{cls.from_url.__qualname__}() called for \"\n                f\"unimplemented extension: {meta['suffix']}\\n\\n{meta!r}\"\n            )\n            raise NotImplementedError(msg)\n        return cls(msg)\n\n    @classmethod\n    def from_tabular(cls, meta: Metadata, backend_name: str, /) -> AltairDatasetsError:\n        if meta[\"is_image\"]:\n            reason = \"Image data is non-tabular.\"\n            return cls(f\"{_failed_tabular(meta)}{reason}{_suggest_url(meta)}\")\n        elif not meta[\"is_tabular\"] or meta[\"suffix\"] in {\".arrow\", \".parquet\"}:\n            if meta[\"suffix\"] in {\".arrow\", \".parquet\"}:\n                install: tuple[str, ...] = \"pyarrow\", \"polars\"\n                what = f\"{meta['suffix']!r}\"\n            else:\n                install = (\"polars\",)\n                if meta[\"is_spatial\"]:\n                    what = \"Geospatial data\"\n                elif meta[\"is_json\"]:\n                    what = \"Non-tabular json\"\n                else:\n                    what = f\"{meta['file_name']!r}\"\n            reason = _why(what, backend_name)\n            return cls(f\"{_failed_tabular(meta)}{reason}{_suggest_url(meta, *install)}\")\n        else:\n            return cls(_implementation_not_found(meta))\n\n    @classmethod\n    def from_priority(cls, priority: Sequence[_Backend], /) -> AltairDatasetsError:\n        msg = f\"Found no supported backend, searched:\\n{priority!r}\"\n        return cls(msg)\n\n\ndef module_not_found(\n    backend_name: str, reqs: Sequence[str], missing: str\n) -> ModuleNotFoundError:\n    if len(reqs) == 1:\n        depends = f\"{reqs[0]!r} package\"\n    else:\n        depends = \", \".join(f\"{req!r}\" for req in reqs) + \" packages\"\n    msg = (\n        f\"Backend {backend_name!r} requires the {depends}, but {missing!r} could not be found.\\n\"\n        f\"This can be installed with pip using:\\n\"\n        f\"    pip install {missing}\\n\"\n        f\"Or with conda using:\\n\"\n        f\"    conda install -c conda-forge {missing}\"\n    )\n    return ModuleNotFoundError(msg, name=missing)\n\n\ndef _failed_url(meta: Metadata, /) -> str:\n    return f\"Unable to load {meta['file_name']!r} via url.\\n\"\n\n\ndef _failed_tabular(meta: Metadata, /) -> str:\n    return f\"Unable to load {meta['file_name']!r} as tabular data.\\n\"\n\n\ndef _why(what: str, backend_name: str, /) -> str:\n    return f\"{what} is not supported natively by {backend_name!r}.\"\n\n\ndef _suggest_url(meta: Metadata, *install_other: str) -> str:\n    other = \"\"\n    if install_other:\n        others = \" or \".join(f\"`{other}`\" for other in install_other)\n        other = f\" installing {others}, or use\"\n    return (\n        f\"\\n\\nInstead, try{other}:\\n\"\n        \"    from altair.datasets import data\\n\"\n        f\"    data.{meta['dataset_name']}.url\"\n    )\n\n\ndef _implementation_not_found(meta: Metadata, /) -> str:\n    \"\"\"Search finished without finding a *declared* incompatibility.\"\"\"\n    INDENT = \" \" * 4\n    record = f\",\\n{INDENT}\".join(\n        f\"{k}={v!r}\"\n        for k, v in meta.items()\n        if not (k.startswith((\"is_\", \"sha\", \"bytes\", \"has_\")))\n        or (v is True and k.startswith(\"is_\"))\n    )\n    return f\"Found no implementation that supports:\\n{INDENT}{record}\"\n"
  },
  {
    "path": "altair/datasets/_loader.py",
    "content": "from __future__ import annotations\n\nimport typing as t\nfrom typing import Generic, final, overload\n\nfrom altair.datasets import _reader\nfrom altair.datasets._reader import IntoDataFrameT, IntoLazyFrameT\n\nif t.TYPE_CHECKING:\n    import sys\n    from typing import Any, Literal\n\n    import pandas as pd\n    import polars as pl\n    import pyarrow as pa\n\n    from altair.datasets._cache import DatasetCache\n    from altair.datasets._reader import Reader\n\n    if sys.version_info >= (3, 11):\n        from typing import LiteralString, Self\n    else:\n        from typing_extensions import LiteralString, Self\n    from altair.datasets._reader import _Backend\n    from altair.datasets._typing import Dataset, Extension\n\n\n__all__ = [\"Loader\", \"load\"]\n\n\nclass Loader(Generic[IntoDataFrameT, IntoLazyFrameT]):\n    \"\"\"\n    Load example datasets *remotely* from `vega-datasets`_, with caching.\n\n    A new ``Loader`` must be initialized by specifying a backend::\n\n        from altair.datasets import Loader\n\n        load = Loader.from_backend(\"polars\")\n        load\n        Loader[polars]\n\n    .. _vega-datasets:\n        https://github.com/vega/vega-datasets\n    \"\"\"\n\n    _reader: Reader[IntoDataFrameT, IntoLazyFrameT]\n\n    @overload\n    @classmethod\n    def from_backend(\n        cls, backend_name: Literal[\"polars\"] = ..., /\n    ) -> Loader[pl.DataFrame, pl.LazyFrame]: ...\n\n    @overload\n    @classmethod\n    def from_backend(\n        cls, backend_name: Literal[\"pandas\", \"pandas[pyarrow]\"], /\n    ) -> Loader[pd.DataFrame]: ...\n\n    @overload\n    @classmethod\n    def from_backend(cls, backend_name: Literal[\"pyarrow\"], /) -> Loader[pa.Table]: ...\n\n    @classmethod\n    def from_backend(\n        cls: type[Loader[Any, Any]], backend_name: _Backend = \"polars\", /\n    ) -> Loader[Any, Any]:\n        \"\"\"\n        Initialize a new loader, with the specified backend.\n\n        Parameters\n        ----------\n        backend_name\n            DataFrame package/config used to return data.\n\n            * *polars*: Using `polars defaults`_\n            * *pandas*: Using `pandas defaults`_.\n            * *pandas[pyarrow]*: Using ``dtype_backend=\"pyarrow\"``\n            * *pyarrow*: (*Experimental*)\n\n            .. warning::\n                Most datasets use a `JSON format not supported`_ by ``pyarrow``\n\n        Examples\n        --------\n        Using ``polars``::\n\n            from altair.datasets import Loader\n\n            load = Loader.from_backend(\"polars\")\n            cars = load(\"cars\")\n\n            type(cars)\n            polars.dataframe.frame.DataFrame\n\n        Using ``pandas``::\n\n            load = Loader.from_backend(\"pandas\")\n            cars = load(\"cars\")\n\n            type(cars)\n            pandas.core.frame.DataFrame\n\n        Using ``pandas``, backed by ``pyarrow`` dtypes::\n\n            load = Loader.from_backend(\"pandas[pyarrow]\")\n            co2 = load(\"co2\")\n\n            type(co2)\n            pandas.core.frame.DataFrame\n\n            co2.dtypes\n            Date             datetime64[ns]\n            CO2             double[pyarrow]\n            adjusted CO2    double[pyarrow]\n            dtype: object\n\n        .. _polars defaults:\n            https://docs.pola.rs/api/python/stable/reference/io.html\n        .. _pandas defaults:\n            https://pandas.pydata.org/docs/reference/io.html\n        .. _JSON format not supported:\n            https://arrow.apache.org/docs/python/json.html#reading-json-files\n        \"\"\"\n        return cls.from_reader(_reader._from_backend(backend_name))\n\n    @classmethod\n    def from_reader(cls, reader: Reader[IntoDataFrameT, IntoLazyFrameT], /) -> Self:\n        obj = cls.__new__(cls)\n        obj._reader = reader\n        return obj\n\n    def __call__(\n        self,\n        name: Dataset | LiteralString,\n        suffix: Extension | None = None,\n        /,\n        **kwds: Any,\n    ) -> IntoDataFrameT:\n        \"\"\"\n        Get a remote dataset and load as tabular data.\n\n        Parameters\n        ----------\n        name\n            Name of the dataset/`Path.stem`_.\n        suffix\n            File extension/`Path.suffix`_.\n\n            .. note::\n                Only needed if ``name`` is available in multiple formats.\n        **kwds\n            Arguments passed to the underlying read function.\n\n        Examples\n        --------\n        Using ``polars``::\n\n            from altair.datasets import Loader\n\n            load = Loader.from_backend(\"polars\")\n            source = load(\"iowa_electricity\")\n\n            source.columns\n            ['year', 'source', 'net_generation']\n\n            source.head(5)\n            shape: (5, 3)\n            ┌────────────┬──────────────┬────────────────┐\n            │ year       ┆ source       ┆ net_generation │\n            │ ---        ┆ ---          ┆ ---            │\n            │ date       ┆ str          ┆ i64            │\n            ╞════════════╪══════════════╪════════════════╡\n            │ 2001-01-01 ┆ Fossil Fuels ┆ 35361          │\n            │ 2002-01-01 ┆ Fossil Fuels ┆ 35991          │\n            │ 2003-01-01 ┆ Fossil Fuels ┆ 36234          │\n            │ 2004-01-01 ┆ Fossil Fuels ┆ 36205          │\n            │ 2005-01-01 ┆ Fossil Fuels ┆ 36883          │\n            └────────────┴──────────────┴────────────────┘\n\n        Using ``pandas``::\n\n            load = Loader.from_backend(\"pandas\")\n            source = load(\"iowa_electricity\")\n\n            source.columns\n            Index(['year', 'source', 'net_generation'], dtype='object')\n\n            source.head(5)\n                    year        source  net_generation\n            0 2001-01-01  Fossil Fuels           35361\n            1 2002-01-01  Fossil Fuels           35991\n            2 2003-01-01  Fossil Fuels           36234\n            3 2004-01-01  Fossil Fuels           36205\n            4 2005-01-01  Fossil Fuels           36883\n\n        Using ``pyarrow``::\n\n            load = Loader.from_backend(\"pyarrow\")\n            source = load(\"iowa_electricity\")\n\n            source.column_names\n            ['year', 'source', 'net_generation']\n\n            source.slice(0, 5)\n            pyarrow.Table\n            year: date32[day]\n            source: string\n            net_generation: int64\n            ----\n            year: [[2001-01-01,2002-01-01,2003-01-01,2004-01-01,2005-01-01]]\n            source: [[\"Fossil Fuels\",\"Fossil Fuels\",\"Fossil Fuels\",\"Fossil Fuels\",\"Fossil Fuels\"]]\n            net_generation: [[35361,35991,36234,36205,36883]]\n\n        .. _Path.stem:\n            https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.stem\n        .. _Path.suffix:\n            https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.suffix\n        \"\"\"\n        return self._reader.dataset(name, suffix, **kwds)\n\n    def url(\n        self,\n        name: Dataset | LiteralString,\n        suffix: Extension | None = None,\n        /,\n    ) -> str:\n        \"\"\"\n        Return the address of a remote dataset.\n\n        Parameters\n        ----------\n        name\n            Name of the dataset/`Path.stem`_.\n        suffix\n            File extension/`Path.suffix`_.\n\n            .. note::\n                Only needed if ``name`` is available in multiple formats.\n\n        .. _Path.stem:\n            https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.stem\n        .. _Path.suffix:\n            https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.suffix\n\n        Examples\n        --------\n        The returned url will always point to an accessible dataset::\n\n            import altair as alt\n            from altair.datasets import Loader\n\n            load = Loader.from_backend(\"polars\")\n            load.url(\"cars\")\n            \"https://cdn.jsdelivr.net/npm/vega-datasets@v2.11.0/data/cars.json\"\n\n        We can pass the result directly to a chart::\n\n            url = load.url(\"cars\")\n            alt.Chart(url).mark_point().encode(x=\"Horsepower:Q\", y=\"Miles_per_Gallon:Q\")\n        \"\"\"\n        return self._reader.url(name, suffix)\n\n    @property\n    def cache(self) -> DatasetCache:\n        \"\"\"\n        Caching of remote dataset requests.\n\n        Configure cache path::\n\n            self.cache.path = \"...\"\n\n        Download the latest datasets *ahead-of-time*::\n\n            self.cache.download_all()\n\n        Remove all downloaded datasets::\n\n            self.cache.clear()\n\n        Disable caching::\n\n            self.cache.path = None\n        \"\"\"\n        return self._reader.cache\n\n    def __repr__(self) -> str:\n        return f\"{type(self).__name__}[{self._reader._name}]\"\n\n\n@final\nclass _Load(Loader[IntoDataFrameT, IntoLazyFrameT]):\n    @overload\n    def __call__(  # pyright: ignore[reportOverlappingOverload]\n        self,\n        name: Dataset | LiteralString,\n        suffix: Extension | None = ...,\n        /,\n        backend: None = ...,\n        **kwds: Any,\n    ) -> IntoDataFrameT: ...\n    @overload\n    def __call__(\n        self,\n        name: Dataset | LiteralString,\n        suffix: Extension | None = ...,\n        /,\n        backend: Literal[\"polars\"] = ...,\n        **kwds: Any,\n    ) -> pl.DataFrame: ...\n    @overload\n    def __call__(\n        self,\n        name: Dataset | LiteralString,\n        suffix: Extension | None = ...,\n        /,\n        backend: Literal[\"pandas\", \"pandas[pyarrow]\"] = ...,\n        **kwds: Any,\n    ) -> pd.DataFrame: ...\n    @overload\n    def __call__(\n        self,\n        name: Dataset | LiteralString,\n        suffix: Extension | None = ...,\n        /,\n        backend: Literal[\"pyarrow\"] = ...,\n        **kwds: Any,\n    ) -> pa.Table: ...\n    def __call__(\n        self,\n        name: Dataset | LiteralString,\n        suffix: Extension | None = None,\n        /,\n        backend: _Backend | None = None,\n        **kwds: Any,\n    ) -> IntoDataFrameT | pl.DataFrame | pd.DataFrame | pa.Table:\n        if backend is None:\n            return super().__call__(name, suffix, **kwds)\n        else:\n            return self.from_backend(backend)(name, suffix, **kwds)\n\n\nload: _Load[Any, Any]\n\n\ndef __getattr__(name):\n    if name == \"load\":\n        reader = _reader.infer_backend()\n        global load\n        load = _Load.from_reader(reader)\n        return load\n    else:\n        msg = f\"module {__name__!r} has no attribute {name!r}\"\n        raise AttributeError(msg)\n"
  },
  {
    "path": "altair/datasets/_reader.py",
    "content": "\"\"\"\nBackend for ``alt.datasets.Loader``.\n\nNotes\n-----\nExtending would be more ergonomic if `read`, `scan`, `_constraints` were available under a single export::\n\n    from altair.datasets import ext, reader\n    import polars as pl\n\n    impls = (\n        ext.read(pl.read_parquet, ext.is_parquet),\n        ext.read(pl.read_csv, ext.is_csv),\n        ext.read(pl.read_json, ext.is_json),\n    )\n    user_reader = reader(impls)\n    user_reader.dataset(\"airports\")\n\"\"\"\n\nfrom __future__ import annotations\n\nfrom collections import Counter\nfrom collections.abc import Mapping\nfrom importlib import import_module\nfrom importlib.util import find_spec\nfrom itertools import chain\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, ClassVar, Generic, Literal, overload\nfrom urllib.request import build_opener as _build_opener\n\nfrom narwhals.stable import v1 as nw\nfrom packaging.requirements import Requirement\n\nfrom altair.datasets import _readimpl\nfrom altair.datasets._cache import CsvCache, DatasetCache, SchemaCache, _iter_metadata\nfrom altair.datasets._constraints import is_parquet\nfrom altair.datasets._exceptions import AltairDatasetsError, module_not_found\nfrom altair.datasets._readimpl import IntoDataFrameT, IntoLazyFrameT, is_available\n\nif TYPE_CHECKING:\n    import sys\n    from collections.abc import Callable, Sequence\n    from urllib.request import OpenerDirector\n\n    import pandas as pd\n    import polars as pl\n    import pyarrow as pa\n    from narwhals.stable.v1.typing import IntoExpr\n\n    from altair.datasets._readimpl import BaseImpl, R, Read, Scan\n    from altair.datasets._typing import Dataset, Extension, Metadata\n    from altair.vegalite.v6.schema._typing import OneOrSeq\n\n    if sys.version_info >= (3, 13):\n        from typing import TypeIs, TypeVar\n    else:\n        from typing_extensions import TypeIs, TypeVar\n    if sys.version_info >= (3, 12):\n        from typing import Unpack\n    else:\n        from typing_extensions import Unpack\n    if sys.version_info >= (3, 11):\n        from typing import LiteralString\n    else:\n        from typing_extensions import LiteralString\n    from typing import TypeAlias\n\n    _Polars: TypeAlias = Literal[\"polars\"]\n    _Pandas: TypeAlias = Literal[\"pandas\"]\n    _PyArrow: TypeAlias = Literal[\"pyarrow\"]\n    _PandasAny: TypeAlias = Literal[_Pandas, \"pandas[pyarrow]\"]\n    _Backend: TypeAlias = Literal[_Polars, _PandasAny, _PyArrow]\n    _CuDF: TypeAlias = Literal[\"cudf\"]\n    _Dask: TypeAlias = Literal[\"dask\"]\n    _DuckDB: TypeAlias = Literal[\"duckdb\"]\n    _Ibis: TypeAlias = Literal[\"ibis\"]\n    _PySpark: TypeAlias = Literal[\"pyspark\"]\n    _NwSupport: TypeAlias = Literal[\n        _Polars, _Pandas, _PyArrow, _CuDF, _Dask, _DuckDB, _Ibis, _PySpark\n    ]\n    _NwSupportT = TypeVar(\n        \"_NwSupportT\",\n        _Polars,\n        _Pandas,\n        _PyArrow,\n        _CuDF,\n        _Dask,\n        _DuckDB,\n        _Ibis,\n        _PySpark,\n    )\n    _EagerAllowedImpl: TypeAlias = Literal[\n        nw.Implementation.PANDAS,\n        nw.Implementation.POLARS,\n        nw.Implementation.PYARROW,\n    ]\n    _EagerAllowed: TypeAlias = Literal[_Pandas, _Polars, _PyArrow]\n\n_SupportProfile: TypeAlias = Mapping[\n    Literal[\"supported\", \"unsupported\"], \"Sequence[Dataset]\"\n]\n\"\"\"\nDataset support varies between backends and available dependencies.\n\nAny name listed in ``\"unsupported\"`` will raise an error on::\n\n    from altair.datasets import load\n\n    load(\"7zip\")\n\nInstead, they can be loaded via::\n\n    import altair as alt\n    from altair.datasets import url\n\n    alt.Chart(url(\"7zip\"))\n\"\"\"\n\n\nclass Reader(Generic[IntoDataFrameT, IntoLazyFrameT]):\n    \"\"\"\n    Modular file reader, targeting remote & local tabular resources.\n\n    .. warning::\n        Use ``reader(...)`` instead of instantiating ``Reader`` directly.\n    \"\"\"\n\n    _read: Sequence[Read[IntoDataFrameT]]\n    \"\"\"Eager file read functions.\"\"\"\n\n    _scan: Sequence[Scan[IntoLazyFrameT]]\n    \"\"\"Lazy file read functions.\"\"\"\n\n    _name: str\n    \"\"\"\n    Used in error messages, repr and matching ``@overload``(s).\n\n    Otherwise, has no concrete meaning.\n    \"\"\"\n\n    _implementation: _EagerAllowedImpl\n    \"\"\"\n    Corresponding `narwhals implementation`_.\n\n    .. _narwhals implementation:\n        https://github.com/narwhals-dev/narwhals/blob/9b6a355530ea46c590d5a6d1d0567be59c0b5742/narwhals/utils.py#L61-L290\n    \"\"\"\n\n    _opener: ClassVar[OpenerDirector] = _build_opener()\n    _metadata_path: ClassVar[Path] = (\n        Path(__file__).parent / \"_metadata\" / \"metadata.parquet\"\n    )\n\n    def __init__(\n        self,\n        read: Sequence[Read[IntoDataFrameT]],\n        scan: Sequence[Scan[IntoLazyFrameT]],\n        name: str,\n        implementation: _EagerAllowedImpl,\n    ) -> None:\n        self._read = read\n        self._scan = scan\n        self._name = name\n        self._implementation = implementation\n        self._schema_cache = SchemaCache(implementation=implementation)\n\n    def __repr__(self) -> str:\n        from textwrap import indent\n\n        PREFIX = \" \" * 4\n        NL = \"\\n\"\n        body = f\"read\\n{indent(NL.join(str(el) for el in self._read), PREFIX)}\"\n        if self._scan:\n            body += f\"\\nscan\\n{indent(NL.join(str(el) for el in self._scan), PREFIX)}\"\n        return f\"Reader[{self._name}] {self._implementation!r}\\n{body}\"\n\n    def read_fn(self, meta: Metadata, /) -> Callable[..., IntoDataFrameT]:\n        return self._solve(meta, self._read)\n\n    def scan_fn(self, meta: Metadata | Path | str, /) -> Callable[..., IntoLazyFrameT]:\n        meta = meta if isinstance(meta, Mapping) else {\"suffix\": _into_suffix(meta)}\n        return self._solve(meta, self._scan)\n\n    @property\n    def cache(self) -> DatasetCache:\n        return DatasetCache(self)\n\n    def _handle_pyarrow_date_error(self, e: Exception, name: str) -> None:\n        \"\"\"Handle PyArrow date parsing errors with informative error messages, see https://github.com/apache/arrow/issues/41488.\"\"\"\n        if \"CSV conversion error to date\" in str(e) and \"pyarrow\" in str(\n            type(e).__module__\n        ):\n            message = (\n                f\"PyArrow cannot parse date format in dataset '{name}'. \"\n                f\"This is a known limitation of PyArrow's CSV reader for non-ISO date formats.\\n\\n\"\n                f\"Alternatives:\\n\"\n                f\"1. Use a different backend: data.{name}(engine='pandas') or data.{name}(engine='polars')\\n\"\n                f\"2. Convert dates manually after loading as strings\\n\\n\"\n                f\"Original error: {e}\"\n            )\n            raise AltairDatasetsError(message) from e\n        raise e\n\n    def dataset(\n        self,\n        name: Dataset | LiteralString,\n        suffix: Extension | None = None,\n        /,\n        **kwds: Any,\n    ) -> IntoDataFrameT:\n        frame = self._query(name, suffix)\n        meta = next(_iter_metadata(frame))\n        fn = self.read_fn(meta)\n        fn_kwds = self._merge_kwds(meta, kwds)\n        if self.cache.is_active():\n            fp = self.cache._maybe_download(meta)\n            try:\n                return fn(fp, **fn_kwds)\n            except Exception as e:\n                self._handle_pyarrow_date_error(e, name)\n                raise\n        else:\n            with self._opener.open(meta[\"url\"]) as f:\n                try:\n                    return fn(f, **fn_kwds)\n                except Exception as e:\n                    self._handle_pyarrow_date_error(e, name)\n                    raise\n\n    def url(\n        self, name: Dataset | LiteralString, suffix: Extension | None = None, /\n    ) -> str:\n        frame = self._query(name, suffix)\n        meta = next(_iter_metadata(frame))\n        if is_parquet(meta.items()) and not is_available(\"vegafusion\"):\n            raise AltairDatasetsError.from_url(meta)\n        url = meta[\"url\"]\n        if isinstance(url, str):\n            return url\n        else:\n            msg = f\"Expected 'str' but got {type(url).__name__!r}\\nfrom {url!r}.\"\n            raise TypeError(msg)\n\n    # TODO: (Multiple)\n    # - Settle on a better name\n    # - Add method to `Loader`\n    # - Move docs to `Loader.{new name}`\n    def open_markdown(self, name: Dataset, /) -> None:\n        \"\"\"\n        Learn more about a dataset, opening `vega-datasets/datapackage.md`_ with the default browser.\n\n        Additional info *may* include: `description`_, `schema`_, `sources`_, `licenses`_.\n\n        .. _vega-datasets/datapackage.md:\n            https://github.com/vega/vega-datasets/blob/main/datapackage.md\n        .. _description:\n            https://datapackage.org/standard/data-resource/#description\n        .. _schema:\n            https://datapackage.org/standard/table-schema/#schema\n        .. _sources:\n            https://datapackage.org/standard/data-package/#sources\n        .. _licenses:\n            https://datapackage.org/standard/data-package/#licenses\n        \"\"\"\n        import webbrowser\n\n        from altair.utils import VERSIONS\n\n        ref = self._query(name).get_column(\"file_name\").item(0).replace(\".\", \"\")\n        tag = VERSIONS[\"vega-datasets\"]\n        url = f\"https://github.com/vega/vega-datasets/blob/v{tag}/datapackage.md#{ref}\"\n        webbrowser.open(url)\n\n    @overload\n    def profile(self, *, show: Literal[False] = ...) -> _SupportProfile: ...\n\n    @overload\n    def profile(self, *, show: Literal[True]) -> None: ...\n\n    def profile(self, *, show: bool = False) -> _SupportProfile | None:\n        \"\"\"\n        Describe which datasets can be loaded as tabular data.\n\n        Parameters\n        ----------\n        show\n            Print a densely formatted repr *instead of* returning a mapping.\n        \"\"\"\n        relevant_columns = set(\n            chain.from_iterable(impl._relevant_columns for impl in self._read)\n        )\n        frame = self._scan_metadata().select(\"dataset_name\", *relevant_columns)\n        inc_expr = nw.any_horizontal(impl._include_expr for impl in self._read)\n        result: _SupportProfile = {\n            \"unsupported\": _dataset_names(frame, ~inc_expr),\n            \"supported\": _dataset_names(frame, inc_expr),\n        }\n        if show:\n            import pprint\n\n            pprint.pprint(result, compact=True, sort_dicts=False)\n            return None\n        return result\n\n    def _query(\n        self, name: Dataset | LiteralString, suffix: Extension | None = None, /\n    ) -> nw.DataFrame[IntoDataFrameT]:\n        \"\"\"\n        Query a tabular version of `vega-datasets/datapackage.json`_.\n\n        Applies a filter, erroring out when no results would be returned.\n\n        .. _vega-datasets/datapackage.json:\n            https://github.com/vega/vega-datasets/blob/main/datapackage.json\n        \"\"\"\n        constraints = _into_constraints(name, suffix)\n        frame = self._scan_metadata(**constraints).collect()\n        if not frame.is_empty():\n            return frame\n        else:\n            msg = f\"Found no results for:\\n    {constraints!r}\"\n            raise ValueError(msg)\n\n    def _merge_kwds(self, meta: Metadata, kwds: dict[str, Any], /) -> Mapping[str, Any]:\n        \"\"\"\n        Extend user-provided arguments with dataset & library-specfic defaults.\n\n        .. important:: User-provided arguments have a higher precedence.\n        \"\"\"\n        if self._schema_cache.is_active() and (\n            schema := self._schema_cache.schema_kwds(meta)\n        ):\n            kwds = schema | kwds if kwds else schema\n        return kwds\n\n    @property\n    def _metadata_frame(self) -> nw.LazyFrame[IntoLazyFrameT]:\n        fp = self._metadata_path\n        return nw.from_native(self.scan_fn(fp)(fp)).lazy()\n\n    def _scan_metadata(\n        self, *predicates: OneOrSeq[IntoExpr], **constraints: Unpack[Metadata]\n    ) -> nw.LazyFrame[IntoLazyFrameT]:\n        if predicates or constraints:\n            return self._metadata_frame.filter(*predicates, **constraints)\n        return self._metadata_frame\n\n    def _solve(\n        self, meta: Metadata, impls: Sequence[BaseImpl[R]], /\n    ) -> Callable[..., R]:\n        \"\"\"\n        Return the first function that satisfies dataset constraints.\n\n        See Also\n        --------\n        ``altair.datasets._readimpl.BaseImpl.unwrap_or_skip``\n        \"\"\"\n        items = meta.items()\n        it = (some for impl in impls if (some := impl.unwrap_or_skip(items)))\n        if fn_or_err := next(it, None):\n            if _is_err(fn_or_err):\n                raise fn_or_err.from_tabular(meta, self._name)\n            return fn_or_err\n        raise AltairDatasetsError.from_tabular(meta, self._name)\n\n\ndef _dataset_names(\n    frame: nw.LazyFrame, *predicates: OneOrSeq[IntoExpr]\n) -> Sequence[Dataset]:\n    # NOTE: helper function for `Reader.profile`\n    return (\n        frame.filter(*predicates)\n        .select(\"dataset_name\")\n        .collect()\n        .get_column(\"dataset_name\")\n        .to_list()\n    )\n\n\nclass _NoParquetReader(Reader[IntoDataFrameT]):\n    def __repr__(self) -> str:\n        return f\"{super().__repr__()}\\ncsv_cache\\n    {self.csv_cache!r}\"\n\n    @property\n    def csv_cache(self) -> CsvCache:\n        if not hasattr(self, \"_csv_cache\"):\n            self._csv_cache = CsvCache()\n        return self._csv_cache\n\n    @property\n    def _metadata_frame(self) -> nw.LazyFrame[Any]:\n        data = self.csv_cache.rotated\n        impl = self._implementation\n        return nw.maybe_convert_dtypes(nw.from_dict(data, backend=impl)).lazy()\n\n\n@overload\ndef reader(\n    read_fns: Sequence[Read[IntoDataFrameT]],\n    scan_fns: tuple[()] = ...,\n    *,\n    name: str | None = ...,\n    implementation: nw.Implementation = ...,\n) -> Reader[IntoDataFrameT]: ...\n\n\n@overload\ndef reader(\n    read_fns: Sequence[Read[IntoDataFrameT]],\n    scan_fns: Sequence[Scan[IntoLazyFrameT]],\n    *,\n    name: str | None = ...,\n    implementation: nw.Implementation = ...,\n) -> Reader[IntoDataFrameT, IntoLazyFrameT]: ...\n\n\ndef reader(\n    read_fns: Sequence[Read[IntoDataFrameT]],\n    scan_fns: Sequence[Scan[IntoLazyFrameT]] = (),\n    *,\n    name: str | None = None,\n    implementation: nw.Implementation = nw.Implementation.UNKNOWN,\n) -> Reader[IntoDataFrameT, IntoLazyFrameT] | Reader[IntoDataFrameT]:\n    name = name or Counter(el._inferred_package for el in read_fns).most_common(1)[0][0]\n    if not _is_eager_allowed(implementation):\n        implementation = _into_implementation(Requirement(name))\n    if scan_fns:\n        return Reader(read_fns, scan_fns, name, implementation)\n    if stolen := _steal_eager_parquet(read_fns):\n        return Reader(read_fns, stolen, name, implementation)\n    else:\n        return _NoParquetReader[IntoDataFrameT](read_fns, (), name, implementation)\n\n\ndef infer_backend(\n    *, priority: Sequence[_Backend] = (\"polars\", \"pandas[pyarrow]\", \"pandas\", \"pyarrow\")\n) -> Reader[Any, Any]:\n    \"\"\"\n    Return the first available reader in order of `priority`.\n\n    Notes\n    -----\n    - ``\"polars\"``: can natively load every dataset (including ``(Geo|Topo)JSON``)\n    - ``\"pandas[pyarrow]\"``: can load *most* datasets, guarantees ``.parquet`` support\n    - ``\"pandas\"``: supports ``.parquet``, if `fastparquet`_ is installed\n    - ``\"pyarrow\"``: least reliable\n\n    .. _fastparquet:\n        https://github.com/dask/fastparquet\n    \"\"\"\n    it = (_from_backend(name) for name in priority if is_available(_requirements(name)))\n    if reader := next(it, None):\n        return reader\n    raise AltairDatasetsError.from_priority(priority)\n\n\n@overload\ndef _from_backend(name: _Polars, /) -> Reader[pl.DataFrame, pl.LazyFrame]: ...\n@overload\ndef _from_backend(name: _PandasAny, /) -> Reader[pd.DataFrame]: ...\n@overload\ndef _from_backend(name: _PyArrow, /) -> Reader[pa.Table]: ...\n\n\n# FIXME: The order this is defined in makes splitting the module complicated\n# - Can't use a classmethod, since some result in a subclass used\ndef _from_backend(name: _Backend, /) -> Reader[Any, Any]:\n    \"\"\"\n    Reader initialization dispatcher.\n\n    FIXME: Works, but defining these in mixed shape functions seems off.\n    \"\"\"\n    if not _is_backend(name):\n        msg = f\"Unknown backend {name!r}\"\n        raise TypeError(msg)\n    implementation = _into_implementation(name)\n    if name == \"polars\":\n        rd, sc = _readimpl.pl_only()\n        return reader(rd, sc, name=name, implementation=implementation)\n    elif name == \"pandas[pyarrow]\":\n        return reader(_readimpl.pd_pyarrow(), name=name, implementation=implementation)\n    elif name == \"pandas\":\n        return reader(_readimpl.pd_only(), name=name, implementation=implementation)\n    elif name == \"pyarrow\":\n        return reader(_readimpl.pa_any(), name=name, implementation=implementation)\n\n\ndef _is_backend(obj: Any) -> TypeIs[_Backend]:\n    return obj in {\"polars\", \"pandas\", \"pandas[pyarrow]\", \"pyarrow\"}\n\n\ndef _is_err(obj: Any) -> TypeIs[type[AltairDatasetsError]]:\n    return obj is AltairDatasetsError\n\n\ndef _into_constraints(\n    name: Dataset | LiteralString, suffix: Extension | None, /\n) -> Metadata:\n    \"\"\"Transform args into a mapping to column names.\"\"\"\n    m: Metadata = {}\n    if \".\" in name:\n        m[\"file_name\"] = name\n    elif suffix is None:\n        m[\"dataset_name\"] = name\n    elif suffix.startswith(\".\"):\n        m = {\"dataset_name\": name, \"suffix\": suffix}\n    else:\n        from typing import get_args\n\n        from altair.datasets._typing import Extension\n\n        msg = (\n            f\"Expected 'suffix' to be one of {get_args(Extension)!r},\\n\"\n            f\"but got: {suffix!r}\"\n        )\n        raise TypeError(msg)\n    return m\n\n\ndef _is_eager_allowed(impl: nw.Implementation, /) -> TypeIs[_EagerAllowedImpl]:\n    return impl in {\n        nw.Implementation.PANDAS,\n        nw.Implementation.POLARS,\n        nw.Implementation.PYARROW,\n    }\n\n\ndef _into_implementation(\n    backend: _NwSupport | _PandasAny | nw.Implementation | Requirement, /\n) -> _EagerAllowedImpl:\n    req = (\n        Requirement(str(backend)) if isinstance(backend, nw.Implementation) else backend\n    )\n    primary = _import_guarded(req)\n    impl = nw.Implementation.from_backend(primary)\n    if not _is_eager_allowed(impl):\n        if impl is nw.Implementation.UNKNOWN:\n            msg = f\"Package {primary!r} is not supported by `narwhals`.\"\n            raise ValueError(msg)\n        raise NotImplementedError(impl)\n    return impl\n\n\ndef _into_suffix(obj: Path | str, /) -> Any:\n    if isinstance(obj, Path):\n        return obj.suffix\n    elif isinstance(obj, str):\n        return obj\n    else:\n        msg = f\"Unexpected type {type(obj).__name__!r}\"\n        raise TypeError(msg)\n\n\ndef _steal_eager_parquet(\n    read_fns: Sequence[Read[IntoDataFrameT]], /\n) -> Sequence[Scan[Any]] | None:\n    if convertable := next((rd for rd in read_fns if rd.include <= is_parquet), None):\n        return (_readimpl.into_scan(convertable),)\n    return None\n\n\n@overload\ndef _import_guarded(req: _PandasAny, /) -> _Pandas: ...\n\n\n@overload\ndef _import_guarded(req: _NwSupportT, /) -> _NwSupportT: ...\n\n\n@overload\ndef _import_guarded(req: Requirement, /) -> LiteralString: ...\n\n\ndef _import_guarded(req: Any, /) -> LiteralString:\n    requires = _requirements(req)\n    for name in requires:\n        if spec := find_spec(name):\n            import_module(spec.name)\n        else:\n            raise module_not_found(str(req), requires, missing=name)\n    return requires[0]\n\n\ndef _requirements(req: Requirement | str, /) -> tuple[Any, ...]:\n    req = Requirement(req) if isinstance(req, str) else req\n    return (req.name, *req.extras)\n"
  },
  {
    "path": "altair/datasets/_readimpl.py",
    "content": "\"\"\"Individual read functions and siuations they support.\"\"\"\n\nfrom __future__ import annotations\n\nimport sys\nfrom enum import Enum\nfrom functools import partial, wraps\nfrom importlib.util import find_spec\nfrom itertools import chain\nfrom operator import itemgetter\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Generic, Literal\n\nfrom narwhals.stable import v1 as nw\nfrom narwhals.stable.v1.dependencies import get_pandas, get_polars\n\nfrom altair.datasets._constraints import (\n    is_arrow,\n    is_csv,\n    is_json,\n    is_meta,\n    is_not_tabular,\n    is_parquet,\n    is_spatial,\n    is_topo,\n    is_tsv,\n)\nfrom altair.datasets._exceptions import AltairDatasetsError\n\nif sys.version_info >= (3, 13):\n    from typing import TypeVar\nelse:\n    from typing_extensions import TypeVar\nif sys.version_info >= (3, 12):\n    from typing import TypeAliasType\nelse:\n    from typing_extensions import TypeAliasType\n\nif TYPE_CHECKING:\n    from collections.abc import Callable, Iterable, Iterator, Sequence\n    from io import IOBase\n    from types import ModuleType\n\n    import pandas as pd\n    import polars as pl\n    import pyarrow as pa\n    from narwhals.stable.v1 import typing as nwt\n\n    from altair.datasets._constraints import Items, MetaIs\n\n__all__ = [\"is_available\", \"pa_any\", \"pd_only\", \"pd_pyarrow\", \"pl_only\", \"read\", \"scan\"]\n\n\nR = TypeVar(\n    \"R\",\n    bound=\"nwt.IntoDataFrame | nwt.IntoLazyFrame\",\n    covariant=True,\n)\nIntoDataFrameT = TypeVar(\"IntoDataFrameT\", bound=\"nwt.IntoDataFrame\")\nIntoLazyFrameT = TypeVar(\n    \"IntoLazyFrameT\",\n    bound=\"nwt.IntoLazyFrame\",\n    default=Any,\n)\nRead = TypeAliasType(\"Read\", \"BaseImpl[IntoDataFrameT]\", type_params=(IntoDataFrameT,))\n\"\"\"An *eager* file read function.\"\"\"\n\nScan = TypeAliasType(\"Scan\", \"BaseImpl[IntoLazyFrameT]\", type_params=(IntoLazyFrameT,))\n\"\"\"A *lazy* file read function.\"\"\"\n\n\nclass Skip(Enum):\n    \"\"\"Falsy sentinel.\"\"\"\n\n    skip = 0\n\n    def __bool__(self) -> Literal[False]:\n        return False\n\n    def __repr__(self) -> Literal[\"<Skip>\"]:\n        return \"<Skip>\"\n\n\nclass BaseImpl(Generic[R]):\n    \"\"\"\n    A function wrapped with dataset support constraints.\n\n    The ``include``, ``exclude`` properties form a `NIMPLY gate`_ (`Material nonimplication`_).\n\n    Examples\n    --------\n    For some dataset ``D``, we can use ``fn`` if::\n\n        impl: BaseImpl\n        impl.include(D) and not impl.exclude(D)\n\n\n    .. _NIMPLY gate:\n        https://en.m.wikipedia.org/wiki/NIMPLY_gate\n    .. _Material nonimplication:\n        https://en.m.wikipedia.org/wiki/Material_nonimplication#Truth_table\n    \"\"\"\n\n    fn: Callable[..., R]\n    \"\"\"Wrapped read/scan function.\"\"\"\n\n    include: MetaIs\n    \"\"\"Constraint indicating ``fn`` **supports** reading a dataset.\"\"\"\n\n    exclude: MetaIs\n    \"\"\"Constraint *subsetting* ``include`` to mark **non-support**.\"\"\"\n\n    def __init__(\n        self,\n        fn: Callable[..., R],\n        include: MetaIs,\n        exclude: MetaIs | None,\n        kwds: dict[str, Any],\n        /,\n    ) -> None:\n        exclude = exclude or self._exclude_none()\n        if not include.isdisjoint(exclude):\n            intersection = \", \".join(f\"{k}={v!r}\" for k, v in include & exclude)\n            msg = f\"Constraints overlap at: `{intersection}`\\ninclude={include!r}\\nexclude={exclude!r}\"\n            raise TypeError(msg)\n        object.__setattr__(self, \"fn\", partial(fn, **kwds) if kwds else fn)\n        object.__setattr__(self, \"include\", include)\n        object.__setattr__(self, \"exclude\", exclude)\n\n    def unwrap_or_skip(\n        self, meta: Items, /\n    ) -> Callable[..., R] | type[AltairDatasetsError] | Skip:\n        \"\"\"\n        Indicate an action to take for a dataset.\n\n        **Supports** dataset, use this function::\n\n            Callable[..., R]\n\n        Has explicitly marked as **not supported**::\n\n            type[AltairDatasetsError]\n\n        No relevant constraints overlap, safe to check others::\n\n            Skip\n        \"\"\"\n        if self.include.issubset(meta):\n            return self.fn if self.exclude.isdisjoint(meta) else AltairDatasetsError\n        return Skip.skip\n\n    @classmethod\n    def _exclude_none(cls) -> MetaIs:\n        \"\"\"Represents the empty set.\"\"\"\n        return is_meta()\n\n    def __setattr__(self, name: str, value: Any):\n        msg = (\n            f\"{type(self).__name__!r} is immutable.\\n\"\n            f\"Could not assign self.{name} = {value}\"\n        )\n        raise TypeError(msg)\n\n    @property\n    def _inferred_package(self) -> str:\n        return _root_package_name(_unwrap_partial(self.fn), \"UNKNOWN\")\n\n    def __repr__(self) -> str:\n        tp_name = f\"{type(self).__name__}[{self._inferred_package}?]\"\n        return f\"{tp_name}({self})\"\n\n    def __str__(self) -> str:\n        if isinstance(self.fn, partial):\n            fn = _unwrap_partial(self.fn)\n            kwds = self.fn.keywords.items()\n            fn_repr = f\"{fn.__name__}(..., {', '.join(f'{k}={v!r}' for k, v in kwds)})\"\n        else:\n            fn_repr = f\"{self.fn.__name__}(...)\"\n        inc, exc = self.include, self.exclude\n        return f\"{fn_repr}, {f'include={inc!r}, exclude={exc!r}' if exc else repr(inc)}\"\n\n    @property\n    def _relevant_columns(self) -> Iterator[str]:\n        name = itemgetter(0)\n        yield from (name(obj) for obj in chain(self.include, self.exclude))\n\n    @property\n    def _include_expr(self) -> nw.Expr:\n        return (\n            self.include.to_expr() & ~self.exclude.to_expr()\n            if self.exclude\n            else self.include.to_expr()\n        )\n\n    @property\n    def _exclude_expr(self) -> nw.Expr:\n        if self.exclude:\n            return self.include.to_expr() & self.exclude.to_expr()\n        msg = f\"Unable to generate an exclude expression without setting exclude\\n\\n{self!r}\"\n        raise TypeError(msg)\n\n\ndef read(\n    fn: Callable[..., IntoDataFrameT],\n    /,\n    include: MetaIs,\n    exclude: MetaIs | None = None,\n    **kwds: Any,\n) -> Read[IntoDataFrameT]:\n    return BaseImpl(fn, include, exclude, kwds)\n\n\ndef scan(\n    fn: Callable[..., IntoLazyFrameT],\n    /,\n    include: MetaIs,\n    exclude: MetaIs | None = None,\n    **kwds: Any,\n) -> Scan[IntoLazyFrameT]:\n    return BaseImpl(fn, include, exclude, kwds)\n\n\ndef into_scan(impl: Read[IntoDataFrameT], /) -> Scan[Any]:\n    def scan_fn(fn: Callable[..., IntoDataFrameT], /) -> Callable[..., Any]:\n        @wraps(_unwrap_partial(fn))\n        def wrapper(*args: Any, **kwds: Any) -> nw.LazyFrame[Any]:\n            return nw.from_native(fn(*args, **kwds)).lazy()\n\n        return wrapper\n\n    return scan(scan_fn(impl.fn), impl.include, impl.exclude)\n\n\ndef is_available(\n    pkg_names: str | Iterable[str], *more_pkg_names: str, require_all: bool = True\n) -> bool:\n    \"\"\"\n    Check for importable package(s), without raising on failure.\n\n    Parameters\n    ----------\n    pkg_names, more_pkg_names\n        One or more packages.\n    require_all\n        * ``True`` every package.\n        * ``False`` at least one package.\n    \"\"\"\n    if not more_pkg_names and isinstance(pkg_names, str):\n        return find_spec(pkg_names) is not None\n    pkgs_names = pkg_names if not isinstance(pkg_names, str) else (pkg_names,)\n    names = chain(pkgs_names, more_pkg_names)\n    fn = all if require_all else any\n    return fn(find_spec(name) is not None for name in names)\n\n\ndef _root_package_name(obj: Any, default: str, /) -> str:\n    # NOTE: Defers importing `inspect`, if we can get the module name\n    if hasattr(obj, \"__module__\"):\n        return obj.__module__.split(\".\")[0]\n    else:\n        from inspect import getmodule\n\n        module = getmodule(obj)\n    if module and (pkg := module.__package__):\n        return pkg.split(\".\")[0]\n    return default\n\n\ndef _unwrap_partial(fn: Any, /) -> Any:\n    # NOTE: ``functools._unwrap_partial``\n    func = fn\n    while isinstance(func, partial):\n        func = func.func\n    return func\n\n\ndef pl_only() -> tuple[Sequence[Read[pl.DataFrame]], Sequence[Scan[pl.LazyFrame]]]:  # pyright: ignore[reportInvalidTypeForm]\n    import polars as pl\n\n    pl_read_json = read(_pl_read_json_roundtrip(get_polars()), is_json)\n    if is_available(\"polars_st\"):\n        fn_json: Sequence[Read[pl.DataFrame]] = (\n            _pl_read_json_polars_st_topo_impl(),  # TopoJSON files first\n            _pl_read_json_polars_st_impl(),  # Then other spatial JSON\n            pl_read_json,\n        )\n    else:\n        fn_json = (pl_read_json,)\n\n    read_fns = (\n        read(pl.read_csv, is_csv, try_parse_dates=True),\n        *fn_json,\n        read(pl.read_csv, is_tsv, separator=\"\\t\", try_parse_dates=True),\n        read(pl.read_ipc, is_arrow),\n        read(pl.read_parquet, is_parquet),\n    )\n    scan_fns = (scan(pl.scan_parquet, is_parquet),)\n    return read_fns, scan_fns\n\n\ndef pd_only() -> Sequence[Read[pd.DataFrame]]:\n    import pandas as pd\n\n    opt: Sequence[Read[pd.DataFrame]]\n    if is_available(\"pyarrow\"):\n        opt = read(pd.read_feather, is_arrow), read(pd.read_parquet, is_parquet)\n    elif is_available(\"fastparquet\"):\n        opt = (read(pd.read_parquet, is_parquet),)\n    else:\n        opt = ()\n    pd_read_json = read(_pd_read_json(get_pandas()), is_json, exclude=is_spatial)\n    if is_available(\"geopandas\"):\n        fn_json: Sequence[Read[pd.DataFrame]] = (\n            _pd_read_json_geopandas_impl(),\n            pd_read_json,\n        )\n    else:\n        fn_json = (pd_read_json,)\n    return (\n        read(pd.read_csv, is_csv),\n        *fn_json,\n        read(pd.read_csv, is_tsv, sep=\"\\t\"),\n        *opt,\n    )\n\n\ndef pd_pyarrow() -> Sequence[Read[pd.DataFrame]]:\n    import pandas as pd\n\n    kwds: dict[str, Any] = {\"dtype_backend\": \"pyarrow\"}\n    pd_read_json = read(\n        _pd_read_json(get_pandas()), is_json, exclude=is_spatial, **kwds\n    )\n    if is_available(\"geopandas\"):\n        fn_json: Sequence[Read[pd.DataFrame]] = (\n            _pd_read_json_geopandas_impl(),\n            pd_read_json,\n        )\n    else:\n        fn_json = (pd_read_json,)\n    return (\n        read(pd.read_csv, is_csv, **kwds),\n        *fn_json,\n        read(pd.read_csv, is_tsv, sep=\"\\t\", **kwds),\n        read(pd.read_feather, is_arrow, **kwds),\n        read(pd.read_parquet, is_parquet, **kwds),\n    )\n\n\ndef pa_any() -> Sequence[Read[pa.Table]]:\n    from pyarrow import csv, feather, parquet\n\n    return (\n        read(csv.read_csv, is_csv),\n        _pa_read_json_impl(),\n        read(csv.read_csv, is_tsv, parse_options=csv.ParseOptions(delimiter=\"\\t\")),\n        read(feather.read_table, is_arrow),\n        read(parquet.read_table, is_parquet),\n    )\n\n\ndef _pa_read_json_impl() -> Read[pa.Table]:\n    \"\"\"\n    Mitigating ``pyarrow``'s `line-delimited`_ JSON requirement.\n\n    .. _line-delimited:\n        https://arrow.apache.org/docs/python/json.html#reading-json-files\n    \"\"\"\n    if is_available(\"polars\"):\n        polars_ns = get_polars()\n        if polars_ns is not None:\n            return read(_pl_read_json_roundtrip_to_arrow(polars_ns), is_json)\n    if is_available(\"pandas\"):\n        pandas_ns = get_pandas()\n        if pandas_ns is not None:\n            return read(_pd_read_json_to_arrow(pandas_ns), is_json, exclude=is_spatial)\n    return read(_stdlib_read_json_to_arrow, is_json, exclude=is_not_tabular)\n\n\ndef _pd_read_json(ns: ModuleType, /) -> Callable[..., pd.DataFrame]:\n    @wraps(ns.read_json)\n    def fn(source: Path | Any, /, **kwds: Any) -> pd.DataFrame:\n        return _pd_fix_dtypes_nw(ns.read_json(source, **kwds), **kwds).to_native()\n\n    return fn\n\n\ndef _pd_read_json_geopandas_impl() -> Read[pd.DataFrame]:\n    import geopandas\n\n    @wraps(geopandas.read_file)\n    def fn(source: Path | Any, /, schema: Any = None, **kwds: Any) -> pd.DataFrame:\n        return geopandas.read_file(source, **kwds)\n\n    return read(fn, is_meta(is_spatial=True, suffix=\".json\"))\n\n\ndef _pd_fix_dtypes_nw(\n    df: pd.DataFrame, /, *, dtype_backend: Any = None, **kwds: Any\n) -> nw.DataFrame[pd.DataFrame]:\n    kwds = {\"dtype_backend\": dtype_backend} if dtype_backend else {}\n    return (\n        df.convert_dtypes(**kwds)\n        .pipe(nw.from_native, eager_only=True)\n        .with_columns(nw.selectors.by_dtype(nw.Object).cast(nw.String))\n    )\n\n\ndef _pd_read_json_to_arrow(ns: ModuleType, /) -> Callable[..., pa.Table]:\n    @wraps(ns.read_json)\n    def fn(source: Path | Any, /, *, schema: Any = None, **kwds: Any) -> pa.Table:\n        \"\"\"``schema`` is only here to swallow the ``SchemaCache`` if used.\"\"\"\n        return (\n            ns.read_json(source, **kwds)\n            .pipe(_pd_fix_dtypes_nw, dtype_backend=\"pyarrow\")\n            .to_arrow()\n        )\n\n    return fn\n\n\ndef _pl_read_json_polars_st_impl() -> Read[pl.DataFrame]:\n    import polars_st as st\n\n    @wraps(st.read_file)\n    def fn(source: Path | Any, /, schema: Any = None, **kwds: Any) -> pl.DataFrame:\n        return st.read_file(source, **kwds)\n\n    return read(fn, is_meta(is_spatial=True, suffix=\".json\"))\n\n\ndef _pl_read_json_polars_st_topo_impl() -> Read[pl.DataFrame]:\n    import polars_st as st\n\n    @wraps(st.read_file)\n    def fn(source: Path | Any, /, schema: Any = None, **kwds: Any) -> pl.DataFrame:\n        # Add TopoJSON driver prefix for URLs\n        if isinstance(source, str) and source.startswith(\"http\"):\n            source = f\"TopoJSON:{source}\"\n        return st.read_file(source, **kwds)\n\n    return read(fn, is_topo)\n\n\ndef _pl_read_json_roundtrip(ns: ModuleType, /) -> Callable[..., pl.DataFrame]:\n    \"\"\"\n    Try to utilize better date parsing available in `pl.read_csv`_.\n\n    `pl.read_json`_ has few options when compared to `pl.read_csv`_.\n\n    Chaining the two together - *where possible* - is still usually faster than `pandas.read_json`_.\n\n    .. _pl.read_json:\n        https://docs.pola.rs/api/python/stable/reference/api/polars.read_json.html\n    .. _pl.read_csv:\n        https://docs.pola.rs/api/python/stable/reference/api/polars.read_csv.html\n    .. _pandas.read_json:\n        https://pandas.pydata.org/docs/reference/api/pandas.read_json.html\n    \"\"\"\n    from io import BytesIO\n\n    @wraps(ns.read_json)\n    def fn(source: Path | IOBase, /, **kwds: Any) -> pl.DataFrame:\n        df = ns.read_json(source, **kwds)\n        if any(tp.is_nested() for tp in df.schema.dtypes()):\n            return df\n        buf = BytesIO()\n        df.write_csv(buf)\n        if kwds:\n            SHARED_KWDS = {\"schema\", \"schema_overrides\", \"infer_schema_length\"}\n            kwds = {k: v for k, v in kwds.items() if k in SHARED_KWDS}\n        return ns.read_csv(buf, try_parse_dates=True, **kwds)\n\n    return fn\n\n\ndef _pl_read_json_roundtrip_to_arrow(ns: ModuleType, /) -> Callable[..., pa.Table]:\n    eager = _pl_read_json_roundtrip(ns)\n\n    @wraps(ns.read_json)\n    def fn(source: Path | IOBase, /, **kwds: Any) -> pa.Table:\n        return eager(source).to_arrow()\n\n    return fn\n\n\ndef _stdlib_read_json(source: Path | Any, /) -> Any:\n    import json\n\n    if not isinstance(source, Path):\n        return json.load(source)\n    else:\n        with Path(source).open(encoding=\"utf-8\") as f:\n            return json.load(f)\n\n\ndef _stdlib_read_json_to_arrow(source: Path | Any, /, **kwds: Any) -> pa.Table:\n    import pyarrow as pa\n\n    rows: list[dict[str, Any]] = _stdlib_read_json(source)\n    try:\n        return pa.Table.from_pylist(rows, **kwds)\n    except TypeError:\n        import csv\n        import io\n\n        from pyarrow import csv as pa_csv\n\n        with io.StringIO() as f:\n            writer = csv.DictWriter(f, rows[0].keys(), dialect=csv.unix_dialect)\n            writer.writeheader()\n            writer.writerows(rows)\n            with io.BytesIO(f.getvalue().encode()) as f2:\n                return pa_csv.read_csv(f2)\n"
  },
  {
    "path": "altair/datasets/_typing.py",
    "content": "# The contents of this file are automatically written by\n# tools/datasets.__init__.py. Do not modify directly.\n\nfrom __future__ import annotations\n\nimport sys\nfrom typing import Literal, TypeAlias\n\nif sys.version_info >= (3, 15):\n    from typing import TypedDict\nelse:\n    from typing_extensions import TypedDict\n\nif sys.version_info >= (3, 11):\n    from typing import LiteralString\nelse:\n    from typing_extensions import LiteralString\n\n\n__all__ = [\"Dataset\", \"Extension\", \"Metadata\"]\n\nDataset: TypeAlias = Literal[\n    \"airports\",\n    \"annual_precip\",\n    \"anscombe\",\n    \"barley\",\n    \"birdstrikes\",\n    \"budget\",\n    \"budgets\",\n    \"burtin\",\n    \"cars\",\n    \"co2_concentration\",\n    \"countries\",\n    \"crimea\",\n    \"disasters\",\n    \"driving\",\n    \"earthquakes\",\n    \"ffox\",\n    \"flare\",\n    \"flare_dependencies\",\n    \"flights_10k\",\n    \"flights_200k_arrow\",\n    \"flights_200k_json\",\n    \"flights_20k\",\n    \"flights_2k\",\n    \"flights_3m\",\n    \"flights_5k\",\n    \"flights_airport\",\n    \"football\",\n    \"gapminder\",\n    \"gapminder_health_income\",\n    \"gimp\",\n    \"github\",\n    \"global_temp\",\n    \"icon_7zip\",\n    \"income\",\n    \"iowa_electricity\",\n    \"jobs\",\n    \"la_riots\",\n    \"london_boroughs\",\n    \"london_centroids\",\n    \"london_tube_lines\",\n    \"lookup_groups\",\n    \"lookup_people\",\n    \"miserables\",\n    \"monarchs\",\n    \"movies\",\n    \"normal_2d\",\n    \"obesity\",\n    \"ohlc\",\n    \"penguins\",\n    \"platformer_terrain\",\n    \"political_contributions\",\n    \"population\",\n    \"population_engineers_hurricanes\",\n    \"seattle_weather\",\n    \"seattle_weather_hourly_normals\",\n    \"sp500\",\n    \"sp500_2000\",\n    \"species\",\n    \"stocks\",\n    \"udistrict\",\n    \"unemployment\",\n    \"unemployment_across_industries\",\n    \"uniform_2d\",\n    \"us_10m\",\n    \"us_employment\",\n    \"us_state_capitals\",\n    \"volcano\",\n    \"weather\",\n    \"weekly_weather\",\n    \"wheat\",\n    \"windvectors\",\n    \"world_110m\",\n    \"zipcodes\",\n]\nExtension: TypeAlias = Literal[\".arrow\", \".csv\", \".json\", \".parquet\", \".png\", \".tsv\"]\n\n\nclass Metadata(TypedDict, total=False):\n    \"\"\"\n    Full schema for ``metadata.parquet``.\n\n    Parameters\n    ----------\n    dataset_name\n        Name of the dataset from the resource name field.\n    suffix\n        File extension/`Path.suffix`_.\n    file_name\n        Equivalent to `Path.name`_.\n    bytes\n        File size in *bytes*.\n    is_image\n        Only accessible via url.\n    is_tabular\n        Can be read as tabular data.\n    is_geo\n        `GeoJSON`_ format.\n    is_topo\n        `TopoJSON`_ format.\n    is_spatial\n        Any geospatial format. Only natively supported by ``polars``.\n    is_json\n        Not supported natively by ``pyarrow``.\n    has_schema\n        Data types available for improved ``pandas`` parsing.\n    sha\n        Unique hash for the dataset.\n\n        .. note::\n            E.g. if the dataset did *not* change between ``v1.0.0``-``v2.0.0``;\n\n            then this value would remain stable.\n    url\n        Remote url used to access dataset.\n\n    .. _Path.stem:\n        https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.stem\n    .. _Path.name:\n        https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.name\n    .. _Path.suffix:\n        https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.suffix\n    .. _GeoJSON:\n        https://en.wikipedia.org/wiki/GeoJSON\n    .. _TopoJSON:\n        https://en.wikipedia.org/wiki/GeoJSON#TopoJSON\n\n\n    Examples\n    --------\n    ``Metadata`` keywords form constraints to filter a table like the below sample:\n\n    ```\n    shape: (73, 13)\n    ┌────────────────┬────────┬────────────────┬───┬───────────────┬───────────────┐\n    │ dataset_name   ┆ suffix ┆ file_name      ┆ … ┆ sha           ┆ url           │\n    │ ---            ┆ ---    ┆ ---            ┆   ┆ ---           ┆ ---           │\n    │ str            ┆ str    ┆ str            ┆   ┆ str           ┆ str           │\n    ╞════════════════╪════════╪════════════════╪═══╪═══════════════╪═══════════════╡\n    │ airports       ┆ .csv   ┆ airports.csv   ┆ … ┆ 608ba6d51fa70 ┆ https://cdn.j │\n    │                ┆        ┆                ┆   ┆ 584c3fa1d31e… ┆ sdelivr.net/… │\n    │ annual_precip  ┆ .json  ┆ annual-precip. ┆ … ┆ 719e73406cfc0 ┆ https://cdn.j │\n    │                ┆        ┆ json           ┆   ┆ 8f16dda65151… ┆ sdelivr.net/… │\n    │ anscombe       ┆ .json  ┆ anscombe.json  ┆ … ┆ 11ae97090b626 ┆ https://cdn.j │\n    │                ┆        ┆                ┆   ┆ 3bdf0c866115… ┆ sdelivr.net/… │\n    │ barley         ┆ .json  ┆ barley.json    ┆ … ┆ 8dc50de2509b6 ┆ https://cdn.j │\n    │                ┆        ┆                ┆   ┆ e197ce95c24c… ┆ sdelivr.net/… │\n    │ birdstrikes    ┆ .csv   ┆ birdstrikes.cs ┆ … ┆ 1b8b190c9bc02 ┆ https://cdn.j │\n    │                ┆        ┆ v              ┆   ┆ ef7bcbfe5a8a… ┆ sdelivr.net/… │\n    │ …              ┆ …      ┆ …              ┆ … ┆ …             ┆ …             │\n    │ weekly_weather ┆ .json  ┆ weekly-weather ┆ … ┆ bd42a3e2403e7 ┆ https://cdn.j │\n    │                ┆        ┆ .json          ┆   ┆ ccd6baaa89f9… ┆ sdelivr.net/… │\n    │ wheat          ┆ .json  ┆ wheat.json     ┆ … ┆ cde46b43fc82f ┆ https://cdn.j │\n    │                ┆        ┆                ┆   ┆ 4c3c2a37ddcf… ┆ sdelivr.net/… │\n    │ windvectors    ┆ .csv   ┆ windvectors.cs ┆ … ┆ ed686b0ba613a ┆ https://cdn.j │\n    │                ┆        ┆ v              ┆   ┆ bd59d09fcd94… ┆ sdelivr.net/… │\n    │ world_110m     ┆ .json  ┆ world-110m.jso ┆ … ┆ a1ce852de6f27 ┆ https://cdn.j │\n    │                ┆        ┆ n              ┆   ┆ 13c94c0c2840… ┆ sdelivr.net/… │\n    │ zipcodes       ┆ .csv   ┆ zipcodes.csv   ┆ … ┆ d3df33e12be0d ┆ https://cdn.j │\n    │                ┆        ┆                ┆   ┆ 0544c95f1bd4… ┆ sdelivr.net/… │\n    └────────────────┴────────┴────────────────┴───┴───────────────┴───────────────┘\n    ```\n    \"\"\"\n\n    dataset_name: Dataset | LiteralString\n    suffix: Extension\n    file_name: str\n    bytes: int\n    is_image: bool\n    is_tabular: bool\n    is_geo: bool\n    is_topo: bool\n    is_spatial: bool\n    is_json: bool\n    has_schema: bool\n    sha: str\n    url: str\n\n\nFlFieldStr: TypeAlias = Literal[\n    \"integer\",\n    \"number\",\n    \"boolean\",\n    \"string\",\n    \"object\",\n    \"array\",\n    \"date\",\n    \"datetime\",\n    \"time\",\n    \"duration\",\n]\n\"\"\"\nString representation of `frictionless`_ `Field Types`_.\n\n.. _frictionless:\n    https://github.com/frictionlessdata/frictionless-py\n.. _Field Types:\n    https://datapackage.org/standard/table-schema/#field-types\n\"\"\"\n"
  },
  {
    "path": "altair/expr/__init__.py",
    "content": "# The contents of this file are automatically written by\n# tools/generate_schema_wrapper.py. Do not modify directly.\n\n\"\"\"Tools for creating transform & filter expressions with a python syntax.\"\"\"\n\nfrom __future__ import annotations\n\nimport sys\nfrom typing import TYPE_CHECKING, Any\n\nfrom altair.expr.core import ConstExpression, FunctionExpression\nfrom altair.vegalite.v6.schema.core import ExprRef as _ExprRef\n\nif sys.version_info >= (3, 12):\n    from typing import override\nelse:\n    from typing_extensions import override\n\nif TYPE_CHECKING:\n    from altair.expr.core import Expression, IntoExpression\n\n\nclass _ExprMeta(type):\n    \"\"\"\n    Metaclass for :class:`expr`.\n\n    Currently providing read-only class properties, representing JavaScript constants.\n    \"\"\"\n\n    @property\n    def NaN(cls) -> Expression:\n        \"\"\"Not a number (same as JavaScript literal NaN).\"\"\"\n        return ConstExpression(\"NaN\")\n\n    @property\n    def LN10(cls) -> Expression:\n        \"\"\"The natural log of 10 (alias to Math.LN10).\"\"\"\n        return ConstExpression(\"LN10\")\n\n    @property\n    def E(cls) -> Expression:\n        \"\"\"The transcendental number e (alias to Math.E).\"\"\"\n        return ConstExpression(\"E\")\n\n    @property\n    def LOG10E(cls) -> Expression:\n        \"\"\"The base 10 logarithm e (alias to Math.LOG10E).\"\"\"\n        return ConstExpression(\"LOG10E\")\n\n    @property\n    def LOG2E(cls) -> Expression:\n        \"\"\"The base 2 logarithm of e (alias to Math.LOG2E).\"\"\"\n        return ConstExpression(\"LOG2E\")\n\n    @property\n    def SQRT1_2(cls) -> Expression:\n        \"\"\"The square root of 0.5 (alias to Math.SQRT1_2).\"\"\"\n        return ConstExpression(\"SQRT1_2\")\n\n    @property\n    def LN2(cls) -> Expression:\n        \"\"\"The natural log of 2 (alias to Math.LN2).\"\"\"\n        return ConstExpression(\"LN2\")\n\n    @property\n    def SQRT2(cls) -> Expression:\n        \"\"\"The square root of 2 (alias to Math.SQRT1_2).\"\"\"\n        return ConstExpression(\"SQRT2\")\n\n    @property\n    def PI(cls) -> Expression:\n        \"\"\"The transcendental number pi (alias to Math.PI).\"\"\"\n        return ConstExpression(\"PI\")\n\n\nclass expr(_ExprRef, metaclass=_ExprMeta):\n    \"\"\"\n    Utility providing *constants* and *classmethods* to construct expressions.\n\n    `Expressions`_ can be used to write basic formulas that enable custom interactions.\n\n    Alternatively, an `inline expression`_ may be defined via :class:`expr()`.\n\n    Parameters\n    ----------\n    expr: str\n        A `vega expression`_ string.\n\n    Returns\n    -------\n    ``ExprRef``\n\n    .. _Expressions:\n        https://altair-viz.github.io/user_guide/interactions/expressions.html\n    .. _inline expression:\n       https://altair-viz.github.io/user_guide/interactions/expressions.html#inline-expressions\n    .. _vega expression:\n       https://vega.github.io/vega/docs/expressions/\n\n    Examples\n    --------\n    >>> import altair as alt\n\n    >>> bind_range = alt.binding_range(min=100, max=300, name=\"Slider value:  \")\n    >>> param_width = alt.param(bind=bind_range, name=\"param_width\")\n    >>> param_color = alt.param(\n    ...     expr=alt.expr.if_(param_width < 200, \"red\", \"black\"),\n    ...     name=\"param_color\",\n    ... )\n    >>> y = alt.Y(\"yval\").axis(titleColor=param_color)\n\n    >>> y\n    Y({\n      axis: {'titleColor': Parameter('param_color', VariableParameter({\n        expr: if((param_width < 200),'red','black'),\n        name: 'param_color'\n      }))},\n      shorthand: 'yval'\n    })\n\n    .. _Number.isNaN:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNan\n    .. _Number.isFinite:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite\n    .. _Math.abs:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/abs\n    .. _Math.acos:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/acos\n    .. _Math.asin:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/asin\n    .. _Math.atan:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan\n    .. _Math.atan2:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2\n    .. _Math.ceil:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil\n    .. _Math.cos:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cos\n    .. _Math.exp:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/exp\n    .. _Math.floor:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor\n    .. _Math.hypot:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot\n    .. _Math.log:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log\n    .. _Math.max:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max\n    .. _Math.min:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min\n    .. _Math.pow:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow\n    .. _Math.random:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random\n    .. _Math.round:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\n    .. _Math.sin:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sin\n    .. _Math.sqrt:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sqrt\n    .. _Math.tan:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/tan\n    .. _normal (Gaussian) probability distribution:\n       https://en.wikipedia.org/wiki/Normal_distribution\n    .. _cumulative distribution function:\n       https://en.wikipedia.org/wiki/Cumulative_distribution_function\n    .. _probability density function:\n       https://en.wikipedia.org/wiki/Probability_density_function\n    .. _log-normal probability distribution:\n       https://en.wikipedia.org/wiki/Log-normal_distribution\n    .. _continuous uniform probability distribution:\n       https://en.wikipedia.org/wiki/Continuous_uniform_distribution\n    .. _*unit*:\n       https://vega.github.io/vega/docs/api/time/#time-units\n    .. _ascending from Vega Utils:\n       https://vega.github.io/vega/docs/api/util/#ascending\n    .. _JavaScript's String.replace:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace\n    .. _Base64:\n       https://developer.mozilla.org/en-US/docs/Glossary/Base64\n    .. _ASCII:\n       https://developer.mozilla.org/en-US/docs/Glossary/ASCII\n    .. _Window.btoa():\n       https://developer.mozilla.org/en-US/docs/Web/API/Window/btoa\n    .. _Window.atob():\n       https://developer.mozilla.org/en-US/docs/Web/API/Window/atob\n    .. _d3-format specifier:\n       https://github.com/d3/d3-format/\n    .. _*units*:\n       https://vega.github.io/vega/docs/api/time/#time-units\n    .. _timeUnitSpecifier API documentation:\n       https://vega.github.io/vega/docs/api/time/#timeUnitSpecifier\n    .. _timeFormat:\n       https://vega.github.io/vega/docs/expressions/#timeFormat\n    .. _utcFormat:\n       https://vega.github.io/vega/docs/expressions/#utcFormat\n    .. _d3-time-format specifier:\n       https://github.com/d3/d3-time-format/\n    .. _TimeMultiFormat object:\n       https://vega.github.io/vega/docs/types/#TimeMultiFormat\n    .. _UTC:\n       https://en.wikipedia.org/wiki/Coordinated_Universal_Time\n    .. _JavaScript's RegExp:\n       https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\n    .. _RGB:\n       https://en.wikipedia.org/wiki/RGB_color_model\n    .. _d3-color's rgb function:\n       https://github.com/d3/d3-color#rgb\n    .. _HSL:\n       https://en.wikipedia.org/wiki/HSL_and_HSV\n    .. _d3-color's hsl function:\n       https://github.com/d3/d3-color#hsl\n    .. _CIE LAB:\n       https://en.wikipedia.org/wiki/Lab_color_space#CIELAB\n    .. _d3-color's lab function:\n       https://github.com/d3/d3-color#lab\n    .. _HCL:\n       https://en.wikipedia.org/wiki/Lab_color_space#CIELAB\n    .. _d3-color's hcl function:\n       https://github.com/d3/d3-color#hcl\n    .. _W3C Web Content Accessibility Guidelines:\n       https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef\n    .. _continuous color scheme:\n       https://vega.github.io/vega/docs/schemes\n    .. _geoArea:\n       https://github.com/d3/d3-geo#geoArea\n    .. _path.area:\n       https://github.com/d3/d3-geo#path_area\n    .. _geoBounds:\n       https://github.com/d3/d3-geo#geoBounds\n    .. _path.bounds:\n       https://github.com/d3/d3-geo#path_bounds\n    .. _geoCentroid:\n       https://github.com/d3/d3-geo#geoCentroid\n    .. _path.centroid:\n       https://github.com/d3/d3-geo#path_centroid\n    .. _window.screen:\n       https://developer.mozilla.org/en-US/docs/Web/API/Window/screen\n    \"\"\"\n\n    @override\n    def __new__(cls: type[_ExprRef], expr: str) -> _ExprRef:  # type: ignore[misc]\n        return _ExprRef(expr=expr)\n\n    @classmethod\n    def isArray(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"Returns true if ``value`` is an array, false otherwise.\"\"\"\n        return FunctionExpression(\"isArray\", (value,))\n\n    @classmethod\n    def isBoolean(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"Returns true if ``value`` is a boolean (``true`` or ``false``), false otherwise.\"\"\"\n        return FunctionExpression(\"isBoolean\", (value,))\n\n    @classmethod\n    def isDate(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns true if ``value`` is a Date object, false otherwise.\n\n        This method will return false for timestamp numbers or date-formatted strings; it recognizes\n        Date objects only.\n        \"\"\"\n        return FunctionExpression(\"isDate\", (value,))\n\n    @classmethod\n    def isDefined(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns true if ``value`` is a defined value, false if ``value`` equals ``undefined``.\n\n        This method will return true for ``null`` and ``NaN`` values.\n        \"\"\"\n        return FunctionExpression(\"isDefined\", (value,))\n\n    @classmethod\n    def isNumber(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns true if ``value`` is a number, false otherwise.\n\n        ``NaN`` and ``Infinity`` are considered numbers.\n        \"\"\"\n        return FunctionExpression(\"isNumber\", (value,))\n\n    @classmethod\n    def isObject(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"Returns true if ``value`` is an object (including arrays and Dates), false otherwise.\"\"\"\n        return FunctionExpression(\"isObject\", (value,))\n\n    @classmethod\n    def isRegExp(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"Returns true if ``value`` is a RegExp (regular expression) object, false otherwise.\"\"\"\n        return FunctionExpression(\"isRegExp\", (value,))\n\n    @classmethod\n    def isString(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"Returns true if ``value`` is a string, false otherwise.\"\"\"\n        return FunctionExpression(\"isString\", (value,))\n\n    @classmethod\n    def isValid(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"Returns true if ``value`` is not ``null``, ``undefined``, or ``NaN``, false otherwise.\"\"\"\n        return FunctionExpression(\"isValid\", (value,))\n\n    @classmethod\n    def toBoolean(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Coerces the input ``value`` to a string.\n\n        Null values and empty strings are mapped to ``null``.\n        \"\"\"\n        return FunctionExpression(\"toBoolean\", (value,))\n\n    @classmethod\n    def toDate(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Coerces the input ``value`` to a Date instance.\n\n        Null values and empty strings are mapped to ``null``. If an optional *parser* function is\n        provided, it is used to perform date parsing, otherwise ``Date.parse`` is used. Be aware\n        that ``Date.parse`` has different implementations across browsers!\n        \"\"\"\n        return FunctionExpression(\"toDate\", (value,))\n\n    @classmethod\n    def toNumber(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Coerces the input ``value`` to a number.\n\n        Null values and empty strings are mapped to ``null``.\n        \"\"\"\n        return FunctionExpression(\"toNumber\", (value,))\n\n    @classmethod\n    def toString(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Coerces the input ``value`` to a string.\n\n        Null values and empty strings are mapped to ``null``.\n        \"\"\"\n        return FunctionExpression(\"toString\", (value,))\n\n    @classmethod\n    def if_(\n        cls,\n        test: IntoExpression,\n        thenValue: IntoExpression,\n        elseValue: IntoExpression,\n        /,\n    ) -> Expression:\n        \"\"\"\n        If ``test`` is truthy, returns ``thenValue``.\n\n        Otherwise, returns ``elseValue``. The *if* function is equivalent to the ternary operator\n        ``a ? b : c``.\n        \"\"\"\n        return FunctionExpression(\"if\", (test, thenValue, elseValue))\n\n    @classmethod\n    def isNaN(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns true if ``value`` is not a number.\n\n        Same as JavaScript's `Number.isNaN`_.\n\n        .. _Number.isNaN:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNan\n        \"\"\"\n        return FunctionExpression(\"isNaN\", (value,))\n\n    @classmethod\n    def isFinite(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns true if ``value`` is a finite number.\n\n        Same as JavaScript's `Number.isFinite`_.\n\n        .. _Number.isFinite:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite\n        \"\"\"\n        return FunctionExpression(\"isFinite\", (value,))\n\n    @classmethod\n    def abs(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns the absolute value of ``value``.\n\n        Same as JavaScript's `Math.abs`_.\n\n        .. _Math.abs:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/abs\n        \"\"\"\n        return FunctionExpression(\"abs\", (value,))\n\n    @classmethod\n    def acos(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Trigonometric arccosine.\n\n        Same as JavaScript's `Math.acos`_.\n\n        .. _Math.acos:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/acos\n        \"\"\"\n        return FunctionExpression(\"acos\", (value,))\n\n    @classmethod\n    def asin(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Trigonometric arcsine.\n\n        Same as JavaScript's `Math.asin`_.\n\n        .. _Math.asin:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/asin\n        \"\"\"\n        return FunctionExpression(\"asin\", (value,))\n\n    @classmethod\n    def atan(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Trigonometric arctangent.\n\n        Same as JavaScript's `Math.atan`_.\n\n        .. _Math.atan:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan\n        \"\"\"\n        return FunctionExpression(\"atan\", (value,))\n\n    @classmethod\n    def atan2(cls, dy: IntoExpression, dx: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns the arctangent of *dy / dx*.\n\n        Same as JavaScript's `Math.atan2`_.\n\n        .. _Math.atan2:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2\n        \"\"\"\n        return FunctionExpression(\"atan2\", (dy, dx))\n\n    @classmethod\n    def ceil(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Rounds ``value`` to the nearest integer of equal or greater value.\n\n        Same as JavaScript's `Math.ceil`_.\n\n        .. _Math.ceil:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/ceil\n        \"\"\"\n        return FunctionExpression(\"ceil\", (value,))\n\n    @classmethod\n    def clamp(\n        cls, value: IntoExpression, min: IntoExpression, max: IntoExpression, /\n    ) -> Expression:\n        \"\"\"Restricts ``value`` to be between the specified ``min`` and ``max``.\"\"\"\n        return FunctionExpression(\"clamp\", (value, min, max))\n\n    @classmethod\n    def cos(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Trigonometric cosine.\n\n        Same as JavaScript's `Math.cos`_.\n\n        .. _Math.cos:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cos\n        \"\"\"\n        return FunctionExpression(\"cos\", (value,))\n\n    @classmethod\n    def exp(cls, exponent: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns the value of *e* raised to the provided ``exponent``.\n\n        Same as JavaScript's `Math.exp`_.\n\n        .. _Math.exp:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/exp\n        \"\"\"\n        return FunctionExpression(\"exp\", (exponent,))\n\n    @classmethod\n    def floor(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Rounds ``value`` to the nearest integer of equal or lower value.\n\n        Same as JavaScript's `Math.floor`_.\n\n        .. _Math.floor:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor\n        \"\"\"\n        return FunctionExpression(\"floor\", (value,))\n\n    @classmethod\n    def hypot(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns the square root of the sum of squares of its arguments.\n\n        Same as JavaScript's `Math.hypot`_.\n\n        .. _Math.hypot:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot\n        \"\"\"\n        return FunctionExpression(\"hypot\", (value,))\n\n    @classmethod\n    def log(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns the natural logarithm of ``value``.\n\n        Same as JavaScript's `Math.log`_.\n\n        .. _Math.log:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log\n        \"\"\"\n        return FunctionExpression(\"log\", (value,))\n\n    @classmethod\n    def max(\n        cls, value1: IntoExpression, value2: IntoExpression, *args: Any\n    ) -> Expression:\n        \"\"\"\n        Returns the maximum argument value.\n\n        Same as JavaScript's `Math.max`_.\n\n        .. _Math.max:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max\n        \"\"\"\n        return FunctionExpression(\"max\", (value1, value2, *args))\n\n    @classmethod\n    def min(\n        cls, value1: IntoExpression, value2: IntoExpression, *args: Any\n    ) -> Expression:\n        \"\"\"\n        Returns the minimum argument value.\n\n        Same as JavaScript's `Math.min`_.\n\n        .. _Math.min:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min\n        \"\"\"\n        return FunctionExpression(\"min\", (value1, value2, *args))\n\n    @classmethod\n    def pow(cls, value: IntoExpression, exponent: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns ``value`` raised to the given ``exponent``.\n\n        Same as JavaScript's `Math.pow`_.\n\n        .. _Math.pow:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow\n        \"\"\"\n        return FunctionExpression(\"pow\", (value, exponent))\n\n    @classmethod\n    def random(cls) -> Expression:\n        \"\"\"\n        Returns a pseudo-random number in the range [0,1).\n\n        Same as JavaScript's `Math.random`_.\n\n        .. _Math.random:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random\n        \"\"\"\n        return FunctionExpression(\"random\", ())\n\n    @classmethod\n    def round(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Rounds ``value`` to the nearest integer.\n\n        Same as JavaScript's `Math.round`_.\n\n        .. _Math.round:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\n        \"\"\"\n        return FunctionExpression(\"round\", (value,))\n\n    @classmethod\n    def sin(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Trigonometric sine.\n\n        Same as JavaScript's `Math.sin`_.\n\n        .. _Math.sin:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sin\n        \"\"\"\n        return FunctionExpression(\"sin\", (value,))\n\n    @classmethod\n    def sqrt(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Square root function.\n\n        Same as JavaScript's `Math.sqrt`_.\n\n        .. _Math.sqrt:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sqrt\n        \"\"\"\n        return FunctionExpression(\"sqrt\", (value,))\n\n    @classmethod\n    def tan(cls, value: IntoExpression, /) -> Expression:\n        \"\"\"\n        Trigonometric tangent.\n\n        Same as JavaScript's `Math.tan`_.\n\n        .. _Math.tan:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/tan\n        \"\"\"\n        return FunctionExpression(\"tan\", (value,))\n\n    @classmethod\n    def sampleNormal(\n        cls, mean: IntoExpression = None, stdev: IntoExpression = None, /\n    ) -> Expression:\n        \"\"\"\n        Returns a sample from a univariate `normal (Gaussian) probability distribution`_ with specified ``mean`` and standard deviation ``stdev``.\n\n        If unspecified, the mean defaults to ``0`` and the standard deviation defaults to ``1``.\n\n        .. _normal (Gaussian) probability distribution:\n            https://en.wikipedia.org/wiki/Normal_distribution\n        \"\"\"\n        return FunctionExpression(\"sampleNormal\", (mean, stdev))\n\n    @classmethod\n    def cumulativeNormal(\n        cls,\n        value: IntoExpression,\n        mean: IntoExpression = None,\n        stdev: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns the value of the `cumulative distribution function`_ at the given input domain ``value`` for a normal distribution with specified ``mean`` and standard deviation ``stdev``.\n\n        If unspecified, the mean defaults to ``0`` and the standard deviation defaults to ``1``.\n\n        .. _cumulative distribution function:\n            https://en.wikipedia.org/wiki/Cumulative_distribution_function\n        \"\"\"\n        return FunctionExpression(\"cumulativeNormal\", (value, mean, stdev))\n\n    @classmethod\n    def densityNormal(\n        cls,\n        value: IntoExpression,\n        mean: IntoExpression = None,\n        stdev: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns the value of the `probability density function`_ at the given input domain ``value``, for a normal distribution with specified ``mean`` and standard deviation ``stdev``.\n\n        If unspecified, the mean defaults to ``0`` and the standard deviation defaults to ``1``.\n\n        .. _probability density function:\n            https://en.wikipedia.org/wiki/Probability_density_function\n        \"\"\"\n        return FunctionExpression(\"densityNormal\", (value, mean, stdev))\n\n    @classmethod\n    def quantileNormal(\n        cls,\n        probability: IntoExpression,\n        mean: IntoExpression = None,\n        stdev: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns the quantile value (the inverse of the `cumulative distribution function`_) for the given input ``probability``, for a normal distribution with specified ``mean`` and standard deviation ``stdev``.\n\n        If unspecified, the mean defaults to ``0`` and the standard deviation defaults to ``1``.\n\n        .. _cumulative distribution function:\n            https://en.wikipedia.org/wiki/Cumulative_distribution_function\n        \"\"\"\n        return FunctionExpression(\"quantileNormal\", (probability, mean, stdev))\n\n    @classmethod\n    def sampleLogNormal(\n        cls, mean: IntoExpression = None, stdev: IntoExpression = None, /\n    ) -> Expression:\n        \"\"\"\n        Returns a sample from a univariate `log-normal probability distribution`_ with specified log ``mean`` and log standard deviation ``stdev``.\n\n        If unspecified, the log mean defaults to ``0`` and the log standard deviation defaults to\n        ``1``.\n\n        .. _log-normal probability distribution:\n            https://en.wikipedia.org/wiki/Log-normal_distribution\n        \"\"\"\n        return FunctionExpression(\"sampleLogNormal\", (mean, stdev))\n\n    @classmethod\n    def cumulativeLogNormal(\n        cls,\n        value: IntoExpression,\n        mean: IntoExpression = None,\n        stdev: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns the value of the `cumulative distribution function`_ at the given input domain ``value`` for a log-normal distribution with specified log ``mean`` and log standard deviation ``stdev``.\n\n        If unspecified, the log mean defaults to ``0`` and the log standard deviation defaults to\n        ``1``.\n\n        .. _cumulative distribution function:\n            https://en.wikipedia.org/wiki/Cumulative_distribution_function\n        \"\"\"\n        return FunctionExpression(\"cumulativeLogNormal\", (value, mean, stdev))\n\n    @classmethod\n    def densityLogNormal(\n        cls,\n        value: IntoExpression,\n        mean: IntoExpression = None,\n        stdev: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns the value of the `probability density function`_ at the given input domain ``value``, for a log-normal distribution with specified log ``mean`` and log standard deviation ``stdev``.\n\n        If unspecified, the log mean defaults to ``0`` and the log standard deviation defaults to\n        ``1``.\n\n        .. _probability density function:\n            https://en.wikipedia.org/wiki/Probability_density_function\n        \"\"\"\n        return FunctionExpression(\"densityLogNormal\", (value, mean, stdev))\n\n    @classmethod\n    def quantileLogNormal(\n        cls,\n        probability: IntoExpression,\n        mean: IntoExpression = None,\n        stdev: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns the quantile value (the inverse of the `cumulative distribution function`_) for the given input ``probability``, for a log-normal distribution with specified log ``mean`` and log standard deviation ``stdev``.\n\n        If unspecified, the log mean defaults to ``0`` and the log standard deviation defaults to\n        ``1``.\n\n        .. _cumulative distribution function:\n            https://en.wikipedia.org/wiki/Cumulative_distribution_function\n        \"\"\"\n        return FunctionExpression(\"quantileLogNormal\", (probability, mean, stdev))\n\n    @classmethod\n    def sampleUniform(\n        cls, min: IntoExpression = None, max: IntoExpression = None, /\n    ) -> Expression:\n        \"\"\"\n        Returns a sample from a univariate `continuous uniform probability distribution`_ over the interval [``min``, ``max``).\n\n        If unspecified, ``min`` defaults to ``0`` and ``max`` defaults to ``1``. If only one\n        argument is provided, it is interpreted as the ``max`` value.\n\n        .. _continuous uniform probability distribution:\n            https://en.wikipedia.org/wiki/Continuous_uniform_distribution\n        \"\"\"\n        return FunctionExpression(\"sampleUniform\", (min, max))\n\n    @classmethod\n    def cumulativeUniform(\n        cls,\n        value: IntoExpression,\n        min: IntoExpression = None,\n        max: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns the value of the `cumulative distribution function`_ at the given input domain ``value`` for a uniform distribution over the interval [``min``, ``max``).\n\n        If unspecified, ``min`` defaults to ``0`` and ``max`` defaults to ``1``. If only one\n        argument is provided, it is interpreted as the ``max`` value.\n\n        .. _cumulative distribution function:\n            https://en.wikipedia.org/wiki/Cumulative_distribution_function\n        \"\"\"\n        return FunctionExpression(\"cumulativeUniform\", (value, min, max))\n\n    @classmethod\n    def densityUniform(\n        cls,\n        value: IntoExpression,\n        min: IntoExpression = None,\n        max: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns the value of the `probability density function`_ at the given input domain ``value``,  for a uniform distribution over the interval [``min``, ``max``).\n\n        If unspecified, ``min`` defaults to ``0`` and ``max`` defaults to ``1``. If only one\n        argument is provided, it is interpreted as the ``max`` value.\n\n        .. _probability density function:\n            https://en.wikipedia.org/wiki/Probability_density_function\n        \"\"\"\n        return FunctionExpression(\"densityUniform\", (value, min, max))\n\n    @classmethod\n    def quantileUniform(\n        cls,\n        probability: IntoExpression,\n        min: IntoExpression = None,\n        max: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns the quantile value (the inverse of the `cumulative distribution function`_) for the given input ``probability``,  for a uniform distribution over the interval [``min``, ``max``).\n\n        If unspecified, ``min`` defaults to ``0`` and ``max`` defaults to ``1``. If only one\n        argument is provided, it is interpreted as the ``max`` value.\n\n        .. _cumulative distribution function:\n            https://en.wikipedia.org/wiki/Cumulative_distribution_function\n        \"\"\"\n        return FunctionExpression(\"quantileUniform\", (probability, min, max))\n\n    @classmethod\n    def now(cls) -> Expression:\n        \"\"\"Returns the timestamp for the current time.\"\"\"\n        return FunctionExpression(\"now\", ())\n\n    @classmethod\n    def datetime(\n        cls,\n        year: IntoExpression,\n        month: IntoExpression,\n        day: IntoExpression = None,\n        hour: IntoExpression = None,\n        min: IntoExpression = None,\n        sec: IntoExpression = None,\n        millisec: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns a new ``Date`` instance.\n\n        The ``month`` is 0-based, such that ``1`` represents February.\n        \"\"\"\n        return FunctionExpression(\n            \"datetime\", (year, month, day, hour, min, sec, millisec)\n        )\n\n    @classmethod\n    def date(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the day of the month for the given ``datetime`` value, in local time.\"\"\"\n        return FunctionExpression(\"date\", (datetime,))\n\n    @classmethod\n    def day(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the day of the week for the given ``datetime`` value, in local time.\"\"\"\n        return FunctionExpression(\"day\", (datetime,))\n\n    @classmethod\n    def dayofyear(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the one-based day of the year for the given ``datetime`` value, in local time.\"\"\"\n        return FunctionExpression(\"dayofyear\", (datetime,))\n\n    @classmethod\n    def year(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the year for the given ``datetime`` value, in local time.\"\"\"\n        return FunctionExpression(\"year\", (datetime,))\n\n    @classmethod\n    def quarter(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the quarter of the year (0-3) for the given ``datetime`` value, in local time.\"\"\"\n        return FunctionExpression(\"quarter\", (datetime,))\n\n    @classmethod\n    def month(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the (zero-based) month for the given ``datetime`` value, in local time.\"\"\"\n        return FunctionExpression(\"month\", (datetime,))\n\n    @classmethod\n    def week(cls, date: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns the week number of the year for the given *datetime*, in local time.\n\n        This function assumes Sunday-based weeks. Days before the first Sunday of the year are\n        considered to be in week 0, the first Sunday of the year is the start of week 1, the second\n        Sunday week 2, *etc.*.\n        \"\"\"\n        return FunctionExpression(\"week\", (date,))\n\n    @classmethod\n    def hours(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the hours component for the given ``datetime`` value, in local time.\"\"\"\n        return FunctionExpression(\"hours\", (datetime,))\n\n    @classmethod\n    def minutes(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the minutes component for the given ``datetime`` value, in local time.\"\"\"\n        return FunctionExpression(\"minutes\", (datetime,))\n\n    @classmethod\n    def seconds(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the seconds component for the given ``datetime`` value, in local time.\"\"\"\n        return FunctionExpression(\"seconds\", (datetime,))\n\n    @classmethod\n    def milliseconds(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the milliseconds component for the given ``datetime`` value, in local time.\"\"\"\n        return FunctionExpression(\"milliseconds\", (datetime,))\n\n    @classmethod\n    def time(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the epoch-based timestamp for the given ``datetime`` value.\"\"\"\n        return FunctionExpression(\"time\", (datetime,))\n\n    @classmethod\n    def timezoneoffset(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the timezone offset from the local timezone to UTC for the given ``datetime`` value.\"\"\"\n        return FunctionExpression(\"timezoneoffset\", (datetime,))\n\n    @classmethod\n    def timeOffset(\n        cls, unit: IntoExpression, date: IntoExpression, step: IntoExpression = None, /\n    ) -> Expression:\n        \"\"\"\n        Returns a new ``Date`` instance that offsets the given ``date`` by the specified time `*unit*`_ in the local timezone.\n\n        The optional ``step`` argument indicates the number of time unit steps to offset by (default\n        1).\n\n        .. _*unit*:\n            https://vega.github.io/vega/docs/api/time/#time-units\n        \"\"\"\n        return FunctionExpression(\"timeOffset\", (unit, date, step))\n\n    @classmethod\n    def timeSequence(\n        cls,\n        unit: IntoExpression,\n        start: IntoExpression,\n        stop: IntoExpression,\n        step: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns an array of ``Date`` instances from ``start`` (inclusive) to ``stop`` (exclusive), with each entry separated by the given time `*unit*`_ in the local timezone.\n\n        The optional ``step`` argument indicates the number of time unit steps to take between each\n        sequence entry (default 1).\n\n        .. _*unit*:\n            https://vega.github.io/vega/docs/api/time/#time-units\n        \"\"\"\n        return FunctionExpression(\"timeSequence\", (unit, start, stop, step))\n\n    @classmethod\n    def utc(\n        cls,\n        year: IntoExpression,\n        month: IntoExpression,\n        day: IntoExpression = None,\n        hour: IntoExpression = None,\n        min: IntoExpression = None,\n        sec: IntoExpression = None,\n        millisec: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns a timestamp for the given UTC date.\n\n        The ``month`` is 0-based, such that ``1`` represents February.\n        \"\"\"\n        return FunctionExpression(\"utc\", (year, month, day, hour, min, sec, millisec))\n\n    @classmethod\n    def utcdate(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the day of the month for the given ``datetime`` value, in UTC time.\"\"\"\n        return FunctionExpression(\"utcdate\", (datetime,))\n\n    @classmethod\n    def utcday(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the day of the week for the given ``datetime`` value, in UTC time.\"\"\"\n        return FunctionExpression(\"utcday\", (datetime,))\n\n    @classmethod\n    def utcdayofyear(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the one-based day of the year for the given ``datetime`` value, in UTC time.\"\"\"\n        return FunctionExpression(\"utcdayofyear\", (datetime,))\n\n    @classmethod\n    def utcyear(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the year for the given ``datetime`` value, in UTC time.\"\"\"\n        return FunctionExpression(\"utcyear\", (datetime,))\n\n    @classmethod\n    def utcquarter(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the quarter of the year (0-3) for the given ``datetime`` value, in UTC time.\"\"\"\n        return FunctionExpression(\"utcquarter\", (datetime,))\n\n    @classmethod\n    def utcmonth(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the (zero-based) month for the given ``datetime`` value, in UTC time.\"\"\"\n        return FunctionExpression(\"utcmonth\", (datetime,))\n\n    @classmethod\n    def utcweek(cls, date: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns the week number of the year for the given *datetime*, in UTC time.\n\n        This function assumes Sunday-based weeks. Days before the first Sunday of the year are\n        considered to be in week 0, the first Sunday of the year is the start of week 1, the second\n        Sunday week 2, *etc.*.\n        \"\"\"\n        return FunctionExpression(\"utcweek\", (date,))\n\n    @classmethod\n    def utchours(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the hours component for the given ``datetime`` value, in UTC time.\"\"\"\n        return FunctionExpression(\"utchours\", (datetime,))\n\n    @classmethod\n    def utcminutes(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the minutes component for the given ``datetime`` value, in UTC time.\"\"\"\n        return FunctionExpression(\"utcminutes\", (datetime,))\n\n    @classmethod\n    def utcseconds(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the seconds component for the given ``datetime`` value, in UTC time.\"\"\"\n        return FunctionExpression(\"utcseconds\", (datetime,))\n\n    @classmethod\n    def utcmilliseconds(cls, datetime: IntoExpression, /) -> Expression:\n        \"\"\"Returns the milliseconds component for the given ``datetime`` value, in UTC time.\"\"\"\n        return FunctionExpression(\"utcmilliseconds\", (datetime,))\n\n    @classmethod\n    def utcOffset(\n        cls, unit: IntoExpression, date: IntoExpression, step: IntoExpression = None, /\n    ) -> Expression:\n        \"\"\"\n        Returns a new ``Date`` instance that offsets the given ``date`` by the specified time `*unit*`_ in UTC time.\n\n        The optional ``step`` argument indicates the number of time unit steps to offset by (default\n        1).\n\n        .. _*unit*:\n            https://vega.github.io/vega/docs/api/time/#time-units\n        \"\"\"\n        return FunctionExpression(\"utcOffset\", (unit, date, step))\n\n    @classmethod\n    def utcSequence(\n        cls,\n        unit: IntoExpression,\n        start: IntoExpression,\n        stop: IntoExpression,\n        step: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns an array of ``Date`` instances from ``start`` (inclusive) to ``stop`` (exclusive), with each entry separated by the given time `*unit*`_ in UTC time.\n\n        The optional ``step`` argument indicates the number of time unit steps to take between each\n        sequence entry (default 1).\n\n        .. _*unit*:\n            https://vega.github.io/vega/docs/api/time/#time-units\n        \"\"\"\n        return FunctionExpression(\"utcSequence\", (unit, start, stop, step))\n\n    @classmethod\n    def extent(cls, array: IntoExpression, /) -> Expression:\n        \"\"\"Returns a new *[min, max]* array with the minimum and maximum values of the input array, ignoring ``null``, ``undefined``, and ``NaN`` values.\"\"\"\n        return FunctionExpression(\"extent\", (array,))\n\n    @classmethod\n    def clampRange(\n        cls, range: IntoExpression, min: IntoExpression, max: IntoExpression, /\n    ) -> Expression:\n        \"\"\"\n        Clamps a two-element ``range`` array in a span-preserving manner.\n\n        If the span of the input ``range`` is less than *(max - min)* and an endpoint exceeds either\n        the ``min`` or ``max`` value, the range is translated such that the span is preserved and\n        one endpoint touches the boundary of the *[min, max]* range. If the span exceeds *(max -\n        min)*, the range *[min, max]* is returned.\n        \"\"\"\n        return FunctionExpression(\"clampRange\", (range, min, max))\n\n    @classmethod\n    def indexof(cls, array: IntoExpression, value: IntoExpression, /) -> Expression:\n        \"\"\"Returns the first index of ``value`` in the input ``array``.\"\"\"\n        return FunctionExpression(\"indexof\", (array, value))\n\n    @classmethod\n    def inrange(cls, value: IntoExpression, range: IntoExpression, /) -> Expression:\n        \"\"\"Tests whether ``value`` lies within (or is equal to either) the first and last values of the ``range`` array.\"\"\"\n        return FunctionExpression(\"inrange\", (value, range))\n\n    @classmethod\n    def join(\n        cls, array: IntoExpression, separator: IntoExpression = None, /\n    ) -> Expression:\n        \"\"\"Returns a new string by concatenating all of the elements of the input ``array``, separated by commas or a specified ``separator`` string.\"\"\"\n        return FunctionExpression(\"join\", (array, separator))\n\n    @classmethod\n    def lastindexof(cls, array: IntoExpression, value: IntoExpression, /) -> Expression:\n        \"\"\"Returns the last index of ``value`` in the input ``array``.\"\"\"\n        return FunctionExpression(\"lastindexof\", (array, value))\n\n    @classmethod\n    def length(cls, array: IntoExpression, /) -> Expression:\n        \"\"\"Returns the length of the input ``array``.\"\"\"\n        return FunctionExpression(\"length\", (array,))\n\n    @classmethod\n    def lerp(cls, array: IntoExpression, fraction: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns the linearly interpolated value between the first and last entries in the ``array`` for the provided interpolation ``fraction`` (typically between 0 and 1).\n\n        For example, ``alt.expr.lerp([0, 50], 0.5)`` returns 25.\n        \"\"\"\n        return FunctionExpression(\"lerp\", (array, fraction))\n\n    @classmethod\n    def peek(cls, array: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns the last element in the input ``array``.\n\n        Similar to the built-in ``Array.pop`` method, except that it does not remove the last\n        element. This method is a convenient shorthand for ``array[array.length - 1]``.\n        \"\"\"\n        return FunctionExpression(\"peek\", (array,))\n\n    @classmethod\n    def pluck(cls, array: IntoExpression, field: IntoExpression, /) -> Expression:\n        \"\"\"\n        Retrieves the value for the specified ``field`` from a given ``array`` of objects.\n\n        The input ``field`` string may include nested properties (e.g., ``foo.bar.bz``).\n        \"\"\"\n        return FunctionExpression(\"pluck\", (array, field))\n\n    @classmethod\n    def reverse(cls, array: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns a new array with elements in a reverse order of the input ``array``.\n\n        The first array element becomes the last, and the last array element becomes the first.\n        \"\"\"\n        return FunctionExpression(\"reverse\", (array,))\n\n    @classmethod\n    def sequence(cls, *args: Any) -> Expression:\n        \"\"\"\n        Returns an array containing an arithmetic sequence of numbers.\n\n        If ``step`` is omitted, it defaults to 1. If ``start`` is omitted, it defaults to 0. The\n        ``stop`` value is exclusive; it is not included in the result. If ``step`` is positive, the\n        last element is the largest *start + i * step* less than ``stop``; if ``step`` is negative,\n        the last element is the smallest *start + i * step* greater than ``stop``. If the returned\n        array would contain an infinite number of values, an empty range is returned. The arguments\n        are not required to be integers.\n        \"\"\"\n        return FunctionExpression(\"sequence\", args)\n\n    @classmethod\n    def slice(\n        cls, array: IntoExpression, start: IntoExpression, end: IntoExpression = None, /\n    ) -> Expression:\n        \"\"\"\n        Returns a section of ``array`` between the ``start`` and ``end`` indices.\n\n        If the ``end`` argument is negative, it is treated as an offset from the end of the array\n        (*alt.expr.length(array) + end*).\n        \"\"\"\n        return FunctionExpression(\"slice\", (array, start, end))\n\n    @classmethod\n    def sort(cls, array: IntoExpression, /) -> Expression:\n        \"\"\"\n        Sorts the array in natural order using `ascending from Vega Utils`_.\n\n        .. _ascending from Vega Utils:\n            https://vega.github.io/vega/docs/api/util/#ascending\n        \"\"\"\n        return FunctionExpression(\"sort\", (array,))\n\n    @classmethod\n    def span(cls, array: IntoExpression, /) -> Expression:\n        \"\"\"Returns the span of ``array``: the difference between the last and first elements, or *array[array.length-1] - array[0]*.\"\"\"\n        return FunctionExpression(\"span\", (array,))\n\n    @classmethod\n    def lower(cls, string: IntoExpression, /) -> Expression:\n        \"\"\"Transforms ``string`` to lower-case letters.\"\"\"\n        return FunctionExpression(\"lower\", (string,))\n\n    @classmethod\n    def pad(\n        cls,\n        string: IntoExpression,\n        length: IntoExpression,\n        character: IntoExpression = None,\n        align: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Pads a ``string`` value with repeated instances of a ``character`` up to a specified ``length``.\n\n        If ``character`` is not specified, a space (' ') is used. By default, padding is added to\n        the end of a string. An optional ``align`` parameter specifies if padding should be added to\n        the ``'left'`` (beginning), ``'center'``, or ``'right'`` (end) of the input string.\n        \"\"\"\n        return FunctionExpression(\"pad\", (string, length, character, align))\n\n    @classmethod\n    def parseFloat(cls, string: IntoExpression, /) -> Expression:\n        \"\"\"\n        Parses the input ``string`` to a floating-point value.\n\n        Same as JavaScript's ``parseFloat``.\n        \"\"\"\n        return FunctionExpression(\"parseFloat\", (string,))\n\n    @classmethod\n    def parseInt(cls, string: IntoExpression, /) -> Expression:\n        \"\"\"\n        Parses the input ``string`` to an integer value.\n\n        Same as JavaScript's ``parseInt``.\n        \"\"\"\n        return FunctionExpression(\"parseInt\", (string,))\n\n    @classmethod\n    def replace(\n        cls,\n        string: IntoExpression,\n        pattern: IntoExpression,\n        replacement: IntoExpression,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns a new string with some or all matches of ``pattern`` replaced by a ``replacement`` string.\n\n        The ``pattern`` can be a string or a regular expression. If ``pattern`` is a string, only\n        the first instance will be replaced. Same as `JavaScript's String.replace`_.\n\n        .. _JavaScript's String.replace:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace\n        \"\"\"\n        return FunctionExpression(\"replace\", (string, pattern, replacement))\n\n    @classmethod\n    def substring(\n        cls,\n        string: IntoExpression,\n        start: IntoExpression,\n        end: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"Returns a section of ``string`` between the ``start`` and ``end`` indices.\"\"\"\n        return FunctionExpression(\"substring\", (string, start, end))\n\n    @classmethod\n    def trim(cls, string: IntoExpression, /) -> Expression:\n        \"\"\"Returns a trimmed string with preceding and trailing whitespace removed.\"\"\"\n        return FunctionExpression(\"trim\", (string,))\n\n    @classmethod\n    def truncate(\n        cls,\n        string: IntoExpression,\n        length: IntoExpression,\n        align: IntoExpression = None,\n        ellipsis: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Truncates an input ``string`` to a target ``length``.\n\n        The optional ``align`` argument indicates what part of the string should be truncated:\n        ``'left'`` (the beginning), ``'center'``, or ``'right'`` (the end). By default, the\n        ``'right'`` end of the string is truncated. The optional ``ellipsis`` argument indicates the\n        string to use to indicate truncated content; by default the ellipsis character ``…``\n        (``\\u2026``) is used.\n        \"\"\"\n        return FunctionExpression(\"truncate\", (string, length, align, ellipsis))\n\n    @classmethod\n    def upper(cls, string: IntoExpression, /) -> Expression:\n        \"\"\"Transforms ``string`` to upper-case letters.\"\"\"\n        return FunctionExpression(\"upper\", (string,))\n\n    @classmethod\n    def btoa(cls, string: IntoExpression, /) -> Expression:\n        \"\"\"\n        Creates a `Base64`_-encoded `ASCII`_ string.\n\n        Same as JavaScript's `Window.alt.expr.btoa()`_.\n\n        .. _Base64:\n            https://developer.mozilla.org/en-US/docs/Glossary/Base64\n        .. _ASCII:\n            https://developer.mozilla.org/en-US/docs/Glossary/ASCII\n        .. _Window.alt.expr.btoa():\n            https://developer.mozilla.org/en-US/docs/Web/API/Window/btoa\n        \"\"\"\n        return FunctionExpression(\"btoa\", (string,))\n\n    @classmethod\n    def atob(cls, string: IntoExpression, /) -> Expression:\n        \"\"\"\n        Decodes an `ASCII`_ string that was encoded with `Base64`_.\n\n        Same as JavaScript's `Window.alt.expr.atob()`_.\n\n        .. _ASCII:\n            https://developer.mozilla.org/en-US/docs/Glossary/ASCII\n        .. _Base64:\n            https://developer.mozilla.org/en-US/docs/Glossary/Base64\n        .. _Window.alt.expr.atob():\n            https://developer.mozilla.org/en-US/docs/Web/API/Window/atob\n        \"\"\"\n        return FunctionExpression(\"atob\", (string,))\n\n    @classmethod\n    def merge(\n        cls, object1: IntoExpression, object2: IntoExpression = None, *args: Any\n    ) -> Expression:\n        \"\"\"\n        Merges the input objects ``object1``, ``object2``, etc into a new output object.\n\n        Inputs are visited in sequential order, such that key values from later arguments can\n        overwrite those from earlier arguments. Example: ``alt.expr.merge({a:1, b:2}, {a:3}) ->\n        {a:3, b:2}``.\n        \"\"\"\n        return FunctionExpression(\"merge\", (object1, object2, *args))\n\n    @classmethod\n    def dayFormat(cls, day: IntoExpression, /) -> Expression:\n        \"\"\"\n        Formats a (0-6) *weekday* number as a full week day name, according to the current locale.\n\n        For example: ``alt.expr.dayFormat(0) -> \"Sunday\"``.\n        \"\"\"\n        return FunctionExpression(\"dayFormat\", (day,))\n\n    @classmethod\n    def dayAbbrevFormat(cls, day: IntoExpression, /) -> Expression:\n        \"\"\"\n        Formats a (0-6) *weekday* number as an abbreviated week day name, according to the current locale.\n\n        For example: ``alt.expr.dayAbbrevFormat(0) -> \"Sun\"``.\n        \"\"\"\n        return FunctionExpression(\"dayAbbrevFormat\", (day,))\n\n    @classmethod\n    def format(cls, value: IntoExpression, specifier: IntoExpression, /) -> Expression:\n        \"\"\"\n        Formats a numeric ``value`` as a string.\n\n        The ``specifier`` must be a valid `d3-format specifier`_ (e.g., ``alt.expr.format(value,\n        ',.2f')``. Null values are formatted as ``\"null\"``.\n\n        .. _d3-format specifier:\n            https://github.com/d3/d3-format/\n        \"\"\"\n        return FunctionExpression(\"format\", (value, specifier))\n\n    @classmethod\n    def monthFormat(cls, month: IntoExpression, /) -> Expression:\n        \"\"\"\n        Formats a (zero-based) ``month`` number as a full month name, according to the current locale.\n\n        For example: ``alt.expr.monthFormat(0) -> \"January\"``.\n        \"\"\"\n        return FunctionExpression(\"monthFormat\", (month,))\n\n    @classmethod\n    def monthAbbrevFormat(cls, month: IntoExpression, /) -> Expression:\n        \"\"\"\n        Formats a (zero-based) ``month`` number as an abbreviated month name, according to the current locale.\n\n        For example: ``alt.expr.monthAbbrevFormat(0) -> \"Jan\"``.\n        \"\"\"\n        return FunctionExpression(\"monthAbbrevFormat\", (month,))\n\n    @classmethod\n    def timeUnitSpecifier(\n        cls, units: IntoExpression, specifiers: IntoExpression = None, /\n    ) -> Expression:\n        \"\"\"\n        Returns a time format specifier string for the given time `*units*`_.\n\n        The optional ``specifiers`` object provides a set of specifier sub-strings for customizing\n        the format; for more, see the `timeUnitSpecifier API documentation`_. The resulting\n        specifier string can then be used as input to the `timeFormat`_ or `utcFormat`_ functions,\n        or as the *format* parameter of an axis or legend. For example: ``alt.expr.timeFormat(date,\n        alt.expr.timeUnitSpecifier('year'))`` or ``alt.expr.timeFormat(date,\n        alt.expr.timeUnitSpecifier(['hours', 'minutes']))``.\n\n        .. _*units*:\n            https://vega.github.io/vega/docs/api/time/#time-units\n        .. _timeUnitSpecifier API documentation:\n            https://vega.github.io/vega/docs/api/time/#timeUnitSpecifier\n        .. _timeFormat:\n            https://vega.github.io/vega/docs/expressions/#timeFormat\n        .. _utcFormat:\n            https://vega.github.io/vega/docs/expressions/#utcFormat\n        \"\"\"\n        return FunctionExpression(\"timeUnitSpecifier\", (units, specifiers))\n\n    @classmethod\n    def timeFormat(\n        cls, value: IntoExpression, specifier: IntoExpression, /\n    ) -> Expression:\n        \"\"\"\n        Formats a datetime ``value`` (either a ``Date`` object or timestamp) as a string, according to the local time.\n\n        The ``specifier`` must be a valid `d3-time-format specifier`_ or `TimeMultiFormat object`_.\n        For example: ``alt.expr.timeFormat(timestamp, '%A')``. Null values are formatted as\n        ``\"null\"``.\n\n        .. _d3-time-format specifier:\n            https://github.com/d3/d3-time-format/\n        .. _TimeMultiFormat object:\n            https://vega.github.io/vega/docs/types/#TimeMultiFormat\n        \"\"\"\n        return FunctionExpression(\"timeFormat\", (value, specifier))\n\n    @classmethod\n    def timeParse(\n        cls, string: IntoExpression, specifier: IntoExpression, /\n    ) -> Expression:\n        \"\"\"\n        Parses a ``string`` value to a Date object, according to the local time.\n\n        The ``specifier`` must be a valid `d3-time-format specifier`_. For example:\n        ``alt.expr.timeParse('June 30, 2015', '%B %d, %Y')``.\n\n        .. _d3-time-format specifier:\n            https://github.com/d3/d3-time-format/\n        \"\"\"\n        return FunctionExpression(\"timeParse\", (string, specifier))\n\n    @classmethod\n    def utcFormat(\n        cls, value: IntoExpression, specifier: IntoExpression, /\n    ) -> Expression:\n        \"\"\"\n        Formats a datetime ``value`` (either a ``Date`` object or timestamp) as a string, according to `UTC`_ time.\n\n        The ``specifier`` must be a valid `d3-time-format specifier`_ or `TimeMultiFormat object`_.\n        For example: ``alt.expr.utcFormat(timestamp, '%A')``. Null values are formatted as\n        ``\"null\"``.\n\n        .. _UTC:\n            https://en.wikipedia.org/wiki/Coordinated_Universal_Time\n        .. _d3-time-format specifier:\n            https://github.com/d3/d3-time-format/\n        .. _TimeMultiFormat object:\n            https://vega.github.io/vega/docs/types/#TimeMultiFormat\n        \"\"\"\n        return FunctionExpression(\"utcFormat\", (value, specifier))\n\n    @classmethod\n    def utcParse(\n        cls, value: IntoExpression, specifier: IntoExpression, /\n    ) -> Expression:\n        \"\"\"\n        Parses a *string* value to a Date object, according to `UTC`_ time.\n\n        The ``specifier`` must be a valid `d3-time-format specifier`_. For example:\n        ``alt.expr.utcParse('June 30, 2015', '%B %d, %Y')``.\n\n        .. _UTC:\n            https://en.wikipedia.org/wiki/Coordinated_Universal_Time\n        .. _d3-time-format specifier:\n            https://github.com/d3/d3-time-format/\n        \"\"\"\n        return FunctionExpression(\"utcParse\", (value, specifier))\n\n    @classmethod\n    def regexp(\n        cls, pattern: IntoExpression, flags: IntoExpression = None, /\n    ) -> Expression:\n        \"\"\"\n        Creates a regular expression instance from an input ``pattern`` string and optional ``flags``.\n\n        Same as `JavaScript's RegExp`_.\n\n        .. _JavaScript's RegExp:\n            https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\n        \"\"\"\n        return FunctionExpression(\"regexp\", (pattern, flags))\n\n    @classmethod\n    def test(\n        cls, regexp: IntoExpression, string: IntoExpression = None, /\n    ) -> Expression:\n        r\"\"\"\n        Evaluates a regular expression ``regexp`` against the input ``string``, returning ``true`` if the string matches the pattern, ``false`` otherwise.\n\n        For example: ``alt.expr.test(/\\\\d{3}/, \"32-21-9483\") -> true``.\n        \"\"\"\n        return FunctionExpression(\"test\", (regexp, string))\n\n    @classmethod\n    def rgb(cls, *args: Any) -> Expression:\n        \"\"\"\n        Constructs a new `RGB`_ color.\n\n        If ``r``, ``g`` and ``b`` are specified, these represent the channel values of the returned\n        color; an ``opacity`` may also be specified. If a CSS Color Module Level 3 *specifier*\n        string is specified, it is parsed and then converted to the RGB color space. Uses\n        `d3-color's rgb function`_.\n\n        .. _RGB:\n            https://en.wikipedia.org/wiki/RGB_color_model\n        .. _d3-color's rgb function:\n            https://github.com/d3/d3-color#rgb\n        \"\"\"\n        return FunctionExpression(\"rgb\", args)\n\n    @classmethod\n    def hsl(cls, *args: Any) -> Expression:\n        \"\"\"\n        Constructs a new `HSL`_ color.\n\n        If ``h``, ``s`` and ``l`` are specified, these represent the channel values of the returned\n        color; an ``opacity`` may also be specified. If a CSS Color Module Level 3 *specifier*\n        string is specified, it is parsed and then converted to the HSL color space. Uses\n        `d3-color's hsl function`_.\n\n        .. _HSL:\n            https://en.wikipedia.org/wiki/HSL_and_HSV\n        .. _d3-color's hsl function:\n            https://github.com/d3/d3-color#hsl\n        \"\"\"\n        return FunctionExpression(\"hsl\", args)\n\n    @classmethod\n    def lab(cls, *args: Any) -> Expression:\n        \"\"\"\n        Constructs a new `CIE LAB`_ color.\n\n        If ``l``, ``a`` and ``b`` are specified, these represent the channel values of the returned\n        color; an ``opacity`` may also be specified. If a CSS Color Module Level 3 *specifier*\n        string is specified, it is parsed and then converted to the LAB color space. Uses\n        `d3-color's lab function`_.\n\n        .. _CIE LAB:\n            https://en.wikipedia.org/wiki/Lab_color_space#CIELAB\n        .. _d3-color's lab function:\n            https://github.com/d3/d3-color#lab\n        \"\"\"\n        return FunctionExpression(\"lab\", args)\n\n    @classmethod\n    def hcl(cls, *args: Any) -> Expression:\n        \"\"\"\n        Constructs a new `HCL`_ (hue, chroma, luminance) color.\n\n        If ``h``, ``c`` and ``l`` are specified, these represent the channel values of the returned\n        color; an ``opacity`` may also be specified. If a CSS Color Module Level 3 *specifier*\n        string is specified, it is parsed and then converted to the HCL color space. Uses\n        `d3-color's hcl function`_.\n\n        .. _HCL:\n            https://en.wikipedia.org/wiki/Lab_color_space#CIELAB\n        .. _d3-color's hcl function:\n            https://github.com/d3/d3-color#hcl\n        \"\"\"\n        return FunctionExpression(\"hcl\", args)\n\n    @classmethod\n    def luminance(cls, specifier: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns the luminance for the given color ``specifier`` (compatible with `d3-color's rgb function`_).\n\n        The luminance is calculated according to the `W3C Web Content Accessibility Guidelines`_.\n\n        .. _d3-color's rgb function:\n            https://github.com/d3/d3-color#rgb\n        .. _W3C Web Content Accessibility Guidelines:\n            https://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n        \"\"\"\n        return FunctionExpression(\"luminance\", (specifier,))\n\n    @classmethod\n    def contrast(\n        cls, specifier1: IntoExpression, specifier2: IntoExpression, /\n    ) -> Expression:\n        \"\"\"\n        Returns the contrast ratio between the input color specifiers as a float between 1 and 21.\n\n        The contrast is calculated according to the `W3C Web Content Accessibility Guidelines`_.\n\n        .. _W3C Web Content Accessibility Guidelines:\n            https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef\n        \"\"\"\n        return FunctionExpression(\"contrast\", (specifier1, specifier2))\n\n    @classmethod\n    def item(cls) -> Expression:\n        \"\"\"Returns the current scenegraph item that is the target of the event.\"\"\"\n        return FunctionExpression(\"item\", ())\n\n    @classmethod\n    def group(cls, name: IntoExpression = None, /) -> Expression:\n        \"\"\"\n        Returns the scenegraph group mark item in which the current event has occurred.\n\n        If no arguments are provided, the immediate parent group is returned. If a group name is\n        provided, the matching ancestor group item is returned.\n        \"\"\"\n        return FunctionExpression(\"group\", (name,))\n\n    @classmethod\n    def xy(cls, item: IntoExpression = None, /) -> Expression:\n        \"\"\"\n        Returns the x- and y-coordinates for the current event as a two-element array.\n\n        If no arguments are provided, the top-level coordinate space of the view is used. If a\n        scenegraph ``item`` (or string group name) is provided, the coordinate space of the group\n        item is used.\n        \"\"\"\n        return FunctionExpression(\"xy\", (item,))\n\n    @classmethod\n    def x(cls, item: IntoExpression = None, /) -> Expression:\n        \"\"\"\n        Returns the x coordinate for the current event.\n\n        If no arguments are provided, the top-level coordinate space of the view is used. If a\n        scenegraph ``item`` (or string group name) is provided, the coordinate space of the group\n        item is used.\n        \"\"\"\n        return FunctionExpression(\"x\", (item,))\n\n    @classmethod\n    def y(cls, item: IntoExpression = None, /) -> Expression:\n        \"\"\"\n        Returns the y coordinate for the current event.\n\n        If no arguments are provided, the top-level coordinate space of the view is used. If a\n        scenegraph ``item`` (or string group name) is provided, the coordinate space of the group\n        item is used.\n        \"\"\"\n        return FunctionExpression(\"y\", (item,))\n\n    @classmethod\n    def pinchDistance(cls, event: IntoExpression, /) -> Expression:\n        \"\"\"Returns the pixel distance between the first two touch points of a multi-touch event.\"\"\"\n        return FunctionExpression(\"pinchDistance\", (event,))\n\n    @classmethod\n    def pinchAngle(cls, event: IntoExpression, /) -> Expression:\n        \"\"\"Returns the angle of the line connecting the first two touch points of a multi-touch event.\"\"\"\n        return FunctionExpression(\"pinchAngle\", (event,))\n\n    @classmethod\n    def inScope(cls, item: IntoExpression, /) -> Expression:\n        \"\"\"Returns true if the given scenegraph ``item`` is a descendant of the group mark in which the event handler was defined, false otherwise.\"\"\"\n        return FunctionExpression(\"inScope\", (item,))\n\n    @classmethod\n    def data(cls, name: IntoExpression, /) -> Expression:\n        \"\"\"\n        Returns the array of data objects for the Vega data set with the given ``name``.\n\n        If the data set is not found, returns an empty array.\n        \"\"\"\n        return FunctionExpression(\"data\", (name,))\n\n    @classmethod\n    def indata(\n        cls, name: IntoExpression, field: IntoExpression, value: IntoExpression, /\n    ) -> Expression:\n        \"\"\"\n        Tests if the data set with a given ``name`` contains a datum with a ``field`` value that matches the input ``value``.\n\n        For example: ``alt.expr.indata('table', 'category', value)``.\n        \"\"\"\n        return FunctionExpression(\"indata\", (name, field, value))\n\n    @classmethod\n    def scale(\n        cls,\n        name: IntoExpression,\n        value: IntoExpression,\n        group: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Applies the named scale transform (or projection) to the specified ``value``.\n\n        The optional ``group`` argument takes a scenegraph group mark item to indicate the specific\n        scope in which to look up the scale or projection.\n        \"\"\"\n        return FunctionExpression(\"scale\", (name, value, group))\n\n    @classmethod\n    def invert(\n        cls,\n        name: IntoExpression,\n        value: IntoExpression,\n        group: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Inverts the named scale transform (or projection) for the specified ``value``.\n\n        The optional ``group`` argument takes a scenegraph group mark item to indicate the specific\n        scope in which to look up the scale or projection.\n        \"\"\"\n        return FunctionExpression(\"invert\", (name, value, group))\n\n    @classmethod\n    def copy(cls, name: IntoExpression, group: IntoExpression = None, /) -> Expression:  # type: ignore[override]\n        \"\"\"\n        Returns a copy (a new cloned instance) of the named scale transform of projection, or ``undefined`` if no scale or projection is found.\n\n        The optional ``group`` argument takes a scenegraph group mark item to indicate the specific\n        scope in which to look up the scale or projection.\n        \"\"\"\n        return FunctionExpression(\"copy\", (name, group))\n\n    @classmethod\n    def domain(\n        cls, name: IntoExpression, group: IntoExpression = None, /\n    ) -> Expression:\n        \"\"\"\n        Returns the scale domain array for the named scale transform, or an empty array if the scale is not found.\n\n        The optional ``group`` argument takes a scenegraph group mark item to indicate the specific\n        scope in which to look up the scale.\n        \"\"\"\n        return FunctionExpression(\"domain\", (name, group))\n\n    @classmethod\n    def range(cls, name: IntoExpression, group: IntoExpression = None, /) -> Expression:\n        \"\"\"\n        Returns the scale range array for the named scale transform, or an empty array if the scale is not found.\n\n        The optional ``group`` argument takes a scenegraph group mark item to indicate the specific\n        scope in which to look up the scale.\n        \"\"\"\n        return FunctionExpression(\"range\", (name, group))\n\n    @classmethod\n    def bandwidth(\n        cls, name: IntoExpression, group: IntoExpression = None, /\n    ) -> Expression:\n        \"\"\"\n        Returns the current band width for the named band scale transform, or zero if the scale is not found or is not a band scale.\n\n        The optional ``group`` argument takes a scenegraph group mark item to indicate the specific\n        scope in which to look up the scale.\n        \"\"\"\n        return FunctionExpression(\"bandwidth\", (name, group))\n\n    @classmethod\n    def bandspace(\n        cls,\n        count: IntoExpression,\n        paddingInner: IntoExpression = None,\n        paddingOuter: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns the number of steps needed within a band scale, based on the ``count`` of domain elements and the inner and outer padding values.\n\n        While normally calculated within the scale itself, this function can be helpful for\n        determining the size of a chart's layout.\n        \"\"\"\n        return FunctionExpression(\"bandspace\", (count, paddingInner, paddingOuter))\n\n    @classmethod\n    def gradient(\n        cls,\n        scale: IntoExpression,\n        p0: IntoExpression,\n        p1: IntoExpression,\n        count: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns a linear color gradient for the ``scale`` (whose range must be a `continuous color scheme`_) and starting and ending points ``p0`` and ``p1``, each an *[x, y]* array.\n\n        The points ``p0`` and ``p1`` should be expressed in normalized coordinates in the domain [0,\n        1], relative to the bounds of the item being colored. If unspecified, ``p0`` defaults to\n        ``[0, 0]`` and ``p1`` defaults to ``[1, 0]``, for a horizontal gradient that spans the full\n        bounds of an item. The optional ``count`` argument indicates a desired target number of\n        sample points to take from the color scale.\n\n        .. _continuous color scheme:\n            https://vega.github.io/vega/docs/schemes\n        \"\"\"\n        return FunctionExpression(\"gradient\", (scale, p0, p1, count))\n\n    @classmethod\n    def panLinear(cls, domain: IntoExpression, delta: IntoExpression, /) -> Expression:\n        \"\"\"\n        Given a linear scale ``domain`` array with numeric or datetime values, returns a new two-element domain array that is the result of panning the domain by a fractional ``delta``.\n\n        The ``delta`` value represents fractional units of the scale range; for example, ``0.5``\n        indicates panning the scale domain to the right by half the scale range.\n        \"\"\"\n        return FunctionExpression(\"panLinear\", (domain, delta))\n\n    @classmethod\n    def panLog(cls, domain: IntoExpression, delta: IntoExpression, /) -> Expression:\n        \"\"\"\n        Given a log scale ``domain`` array with numeric or datetime values, returns a new two-element domain array that is the result of panning the domain by a fractional ``delta``.\n\n        The ``delta`` value represents fractional units of the scale range; for example, ``0.5``\n        indicates panning the scale domain to the right by half the scale range.\n        \"\"\"\n        return FunctionExpression(\"panLog\", (domain, delta))\n\n    @classmethod\n    def panPow(\n        cls, domain: IntoExpression, delta: IntoExpression, exponent: IntoExpression, /\n    ) -> Expression:\n        \"\"\"\n        Given a power scale ``domain`` array with numeric or datetime values and the given ``exponent``, returns a new two-element domain array that is the result of panning the domain by a fractional ``delta``.\n\n        The ``delta`` value represents fractional units of the scale range; for example, ``0.5``\n        indicates panning the scale domain to the right by half the scale range.\n        \"\"\"\n        return FunctionExpression(\"panPow\", (domain, delta, exponent))\n\n    @classmethod\n    def panSymlog(\n        cls, domain: IntoExpression, delta: IntoExpression, constant: IntoExpression, /\n    ) -> Expression:\n        \"\"\"\n        Given a symmetric log scale ``domain`` array with numeric or datetime values parameterized by the given ``constant``, returns a new two-element domain array that is the result of panning the domain by a fractional ``delta``.\n\n        The ``delta`` value represents fractional units of the scale range; for example, ``0.5``\n        indicates panning the scale domain to the right by half the scale range.\n        \"\"\"\n        return FunctionExpression(\"panSymlog\", (domain, delta, constant))\n\n    @classmethod\n    def zoomLinear(\n        cls,\n        domain: IntoExpression,\n        anchor: IntoExpression,\n        scaleFactor: IntoExpression,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Given a linear scale ``domain`` array with numeric or datetime values, returns a new two-element domain array that is the result of zooming the domain by a ``scaleFactor``, centered at the provided fractional ``anchor``.\n\n        The ``anchor`` value represents the zoom position in terms of fractional units of the scale\n        range; for example, ``0.5`` indicates a zoom centered on the mid-point of the scale range.\n        \"\"\"\n        return FunctionExpression(\"zoomLinear\", (domain, anchor, scaleFactor))\n\n    @classmethod\n    def zoomLog(\n        cls,\n        domain: IntoExpression,\n        anchor: IntoExpression,\n        scaleFactor: IntoExpression,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Given a log scale ``domain`` array with numeric or datetime values, returns a new two-element domain array that is the result of zooming the domain by a ``scaleFactor``, centered at the provided fractional ``anchor``.\n\n        The ``anchor`` value represents the zoom position in terms of fractional units of the scale\n        range; for example, ``0.5`` indicates a zoom centered on the mid-point of the scale range.\n        \"\"\"\n        return FunctionExpression(\"zoomLog\", (domain, anchor, scaleFactor))\n\n    @classmethod\n    def zoomPow(\n        cls,\n        domain: IntoExpression,\n        anchor: IntoExpression,\n        scaleFactor: IntoExpression,\n        exponent: IntoExpression,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Given a power scale ``domain`` array with numeric or datetime values and the given ``exponent``, returns a new two-element domain array that is the result of zooming the domain by a ``scaleFactor``, centered at the provided fractional ``anchor``.\n\n        The ``anchor`` value represents the zoom position in terms of fractional units of the scale\n        range; for example, ``0.5`` indicates a zoom centered on the mid-point of the scale range.\n        \"\"\"\n        return FunctionExpression(\"zoomPow\", (domain, anchor, scaleFactor, exponent))\n\n    @classmethod\n    def zoomSymlog(\n        cls,\n        domain: IntoExpression,\n        anchor: IntoExpression,\n        scaleFactor: IntoExpression,\n        constant: IntoExpression,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Given a symmetric log scale ``domain`` array with numeric or datetime values parameterized by the given ``constant``, returns a new two-element domain array that is the result of zooming the domain by a ``scaleFactor``, centered at the provided fractional ``anchor``.\n\n        The ``anchor`` value represents the zoom position in terms of fractional units of the scale\n        range; for example, ``0.5`` indicates a zoom centered on the mid-point of the scale range.\n        \"\"\"\n        return FunctionExpression(\"zoomSymlog\", (domain, anchor, scaleFactor, constant))\n\n    @classmethod\n    def geoArea(\n        cls,\n        projection: IntoExpression,\n        feature: IntoExpression,\n        group: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns the projected planar area (typically in square pixels) of a GeoJSON ``feature`` according to the named ``projection``.\n\n        If the ``projection`` argument is ``null``, computes the spherical area in steradians using\n        unprojected longitude, latitude coordinates. The optional ``group`` argument takes a\n        scenegraph group mark item to indicate the specific scope in which to look up the\n        projection. Uses d3-geo's `geoArea`_ and `path.area`_ methods.\n\n        .. _geoArea:\n            https://github.com/d3/d3-geo#geoArea\n        .. _path.area:\n            https://github.com/d3/d3-geo#path_area\n        \"\"\"\n        return FunctionExpression(\"geoArea\", (projection, feature, group))\n\n    @classmethod\n    def geoBounds(\n        cls,\n        projection: IntoExpression,\n        feature: IntoExpression,\n        group: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns the projected planar bounding box (typically in pixels) for the specified GeoJSON ``feature``, according to the named ``projection``.\n\n        The bounding box is represented by a two-dimensional array: [[*x₀*, *y₀*], [*x₁*, *y₁*]],\n        where *x₀* is the minimum x-coordinate, *y₀* is the minimum y-coordinate, *x₁* is the\n        maximum x-coordinate, and *y₁* is the maximum y-coordinate. If the ``projection`` argument\n        is ``null``, computes the spherical bounding box using unprojected longitude, latitude\n        coordinates. The optional ``group`` argument takes a scenegraph group mark item to indicate\n        the specific scope in which to look up the projection. Uses d3-geo's `geoBounds`_ and\n        `path.bounds`_ methods.\n\n        .. _geoBounds:\n            https://github.com/d3/d3-geo#geoBounds\n        .. _path.bounds:\n            https://github.com/d3/d3-geo#path_bounds\n        \"\"\"\n        return FunctionExpression(\"geoBounds\", (projection, feature, group))\n\n    @classmethod\n    def geoCentroid(\n        cls,\n        projection: IntoExpression,\n        feature: IntoExpression,\n        group: IntoExpression = None,\n        /,\n    ) -> Expression:\n        \"\"\"\n        Returns the projected planar centroid (typically in pixels) for the specified GeoJSON ``feature``, according to the named ``projection``.\n\n        If the ``projection`` argument is ``null``, computes the spherical centroid using\n        unprojected longitude, latitude coordinates. The optional ``group`` argument takes a\n        scenegraph group mark item to indicate the specific scope in which to look up the\n        projection. Uses d3-geo's `geoCentroid`_ and `path.centroid`_ methods.\n\n        .. _geoCentroid:\n            https://github.com/d3/d3-geo#geoCentroid\n        .. _path.centroid:\n            https://github.com/d3/d3-geo#path_centroid\n        \"\"\"\n        return FunctionExpression(\"geoCentroid\", (projection, feature, group))\n\n    @classmethod\n    def geoScale(\n        cls, projection: IntoExpression, group: IntoExpression = None, /\n    ) -> Expression:\n        \"\"\"\n        Returns the scale value for the named ``projection``.\n\n        The optional ``group`` argument takes a scenegraph group mark item to indicate the specific\n        scope in which to look up the projection.\n        \"\"\"\n        return FunctionExpression(\"geoScale\", (projection, group))\n\n    @classmethod\n    def treePath(\n        cls, name: IntoExpression, source: IntoExpression, target: IntoExpression, /\n    ) -> Expression:\n        \"\"\"\n        For the hierarchy data set with the given ``name``, returns the shortest path through from the ``source`` node id to the ``target`` node id.\n\n        The path starts at the ``source`` node, ascends to the least common ancestor of the\n        ``source`` node and the ``target`` node, and then descends to the ``target`` node.\n        \"\"\"\n        return FunctionExpression(\"treePath\", (name, source, target))\n\n    @classmethod\n    def treeAncestors(cls, name: IntoExpression, node: IntoExpression, /) -> Expression:\n        \"\"\"For the hierarchy data set with the given ``name``, returns the array of ancestors nodes, starting with the input ``node``, then followed by each parent up to the root.\"\"\"\n        return FunctionExpression(\"treeAncestors\", (name, node))\n\n    @classmethod\n    def containerSize(cls) -> Expression:\n        \"\"\"\n        Returns the current CSS box size (``[el.clientWidth, el.clientHeight]``) of the parent DOM element that contains the Vega view.\n\n        If there is no container element, returns ``[undefined, undefined]``.\n        \"\"\"\n        return FunctionExpression(\"containerSize\", ())\n\n    @classmethod\n    def screen(cls) -> Expression:\n        \"\"\"\n        Returns the `window.screen`_ object, or ``{}`` if Vega is not running in a browser environment.\n\n        .. _window.screen:\n            https://developer.mozilla.org/en-US/docs/Web/API/Window/screen\n        \"\"\"\n        return FunctionExpression(\"screen\", ())\n\n    @classmethod\n    def windowSize(cls) -> Expression:\n        \"\"\"Returns the current window size (``[window.innerWidth, window.innerHeight]``) or ``[undefined, undefined]`` if Vega is not running in a browser environment.\"\"\"\n        return FunctionExpression(\"windowSize\", ())\n\n    @classmethod\n    def warn(\n        cls, value1: IntoExpression, value2: IntoExpression = None, *args: Any\n    ) -> Expression:\n        \"\"\"\n        Logs a warning message and returns the last argument.\n\n        For the message to appear in the console, the visualization view must have the appropriate\n        logging level set.\n        \"\"\"\n        return FunctionExpression(\"warn\", (value1, value2, *args))\n\n    @classmethod\n    def info(\n        cls, value1: IntoExpression, value2: IntoExpression = None, *args: Any\n    ) -> Expression:\n        \"\"\"\n        Logs an informative message and returns the last argument.\n\n        For the message to appear in the console, the visualization view must have the appropriate\n        logging level set.\n        \"\"\"\n        return FunctionExpression(\"info\", (value1, value2, *args))\n\n    @classmethod\n    def debug(\n        cls, value1: IntoExpression, value2: IntoExpression = None, *args: Any\n    ) -> Expression:\n        \"\"\"\n        Logs a debugging message and returns the last argument.\n\n        For the message to appear in the console, the visualization view must have the appropriate\n        logging level set.\n        \"\"\"\n        return FunctionExpression(\"debug\", (value1, value2, *args))\n\n\n_ExprType = expr\n# NOTE: Compatibility alias for previous type of `alt.expr`.\n# `_ExprType` was not referenced in any internal imports/tests.\n"
  },
  {
    "path": "altair/expr/consts.py",
    "content": "from __future__ import annotations\n\nCONST_LISTING = {\n    \"NaN\": \"not a number (same as JavaScript literal NaN)\",\n    \"LN10\": \"the natural log of 10 (alias to Math.LN10)\",\n    \"E\": \"the transcendental number e (alias to Math.E)\",\n    \"LOG10E\": \"the base 10 logarithm e (alias to Math.LOG10E)\",\n    \"LOG2E\": \"the base 2 logarithm of e (alias to Math.LOG2E)\",\n    \"SQRT1_2\": \"the square root of 0.5 (alias to Math.SQRT1_2)\",\n    \"LN2\": \"the natural log of 2 (alias to Math.LN2)\",\n    \"SQRT2\": \"the square root of 2 (alias to Math.SQRT1_2)\",\n    \"PI\": \"the transcendental number pi (alias to Math.PI)\",\n}\n"
  },
  {
    "path": "altair/expr/core.py",
    "content": "from __future__ import annotations\n\nimport datetime as dt\nimport sys\nfrom typing import TYPE_CHECKING, Any, Literal, Union\n\nfrom altair.utils import SchemaBase\n\nif TYPE_CHECKING:\n    from typing import TypeAlias\n\n    from altair.vegalite.v6.schema._typing import Map, PrimitiveValue_T\n\n\nclass DatumType:\n    \"\"\"An object to assist in building Vega-Lite Expressions.\"\"\"\n\n    def __repr__(self) -> str:\n        return \"datum\"\n\n    def __getattr__(self, attr) -> GetAttrExpression:\n        if attr.startswith(\"__\") and attr.endswith(\"__\"):\n            raise AttributeError(attr)\n        return GetAttrExpression(\"datum\", attr)\n\n    def __getitem__(self, attr) -> GetItemExpression:\n        return GetItemExpression(\"datum\", attr)\n\n    def __call__(self, datum, **kwargs) -> dict[str, Any]:\n        \"\"\"Specify a datum for use in an encoding.\"\"\"\n        return dict(datum=datum, **kwargs)\n\n\ndatum = DatumType()\n\n\ndef _js_repr(val) -> str:\n    \"\"\"Return a javascript-safe string representation of val.\"\"\"\n    if val is True:\n        return \"true\"\n    elif val is False:\n        return \"false\"\n    elif val is None:\n        return \"null\"\n    elif isinstance(val, OperatorMixin):\n        return val._to_expr()\n    elif isinstance(val, dt.date):\n        return _from_date_datetime(val)\n    elif _is_numpy_generic(val):\n        return repr(val.item())\n    else:\n        return repr(val)\n\n\ndef _from_date_datetime(obj: dt.date | dt.datetime, /) -> str:\n    \"\"\"\n    Parse native `datetime.(date|datetime)` into a `datetime expression`_ string.\n\n    **Month is 0-based**\n\n    .. _datetime expression:\n        https://vega.github.io/vega/docs/expressions/#datetime\n    \"\"\"\n    fn_name: Literal[\"datetime\", \"utc\"] = \"datetime\"\n    args: tuple[int, ...] = obj.year, obj.month - 1, obj.day\n    if isinstance(obj, dt.datetime):\n        if tzinfo := obj.tzinfo:\n            if tzinfo is dt.timezone.utc:\n                fn_name = \"utc\"\n            else:\n                msg = (\n                    f\"Unsupported timezone {tzinfo!r}.\\n\"\n                    \"Only `'UTC'` or naive (local) datetimes are permitted.\\n\"\n                    \"See https://altair-viz.github.io/user_guide/generated/core/altair.DateTime.html\"\n                )\n                raise TypeError(msg)\n        us = obj.microsecond\n        ms = us if us == 0 else us // 1_000\n        args = *args, obj.hour, obj.minute, obj.second, ms\n    return FunctionExpression(fn_name, args)._to_expr()\n\n\ndef _is_numpy_generic(obj: Any) -> bool:\n    \"\"\"\n    Check if an object is a numpy generic (scalar) type.\n\n    This function can be used without importing numpy when it is not available.\n    \"\"\"\n    return (np := sys.modules.get(\"numpy\")) is not None and isinstance(obj, np.generic)\n\n\n# Designed to work with Expression and VariableParameter\nclass OperatorMixin:\n    def _to_expr(self) -> str:\n        return repr(self)\n\n    def _from_expr(self, expr) -> Any:\n        return expr\n\n    def __add__(self, other):\n        comp_value = BinaryExpression(\"+\", self, other)\n        return self._from_expr(comp_value)\n\n    def __radd__(self, other):\n        comp_value = BinaryExpression(\"+\", other, self)\n        return self._from_expr(comp_value)\n\n    def __sub__(self, other):\n        comp_value = BinaryExpression(\"-\", self, other)\n        return self._from_expr(comp_value)\n\n    def __rsub__(self, other):\n        comp_value = BinaryExpression(\"-\", other, self)\n        return self._from_expr(comp_value)\n\n    def __mul__(self, other):\n        comp_value = BinaryExpression(\"*\", self, other)\n        return self._from_expr(comp_value)\n\n    def __rmul__(self, other):\n        comp_value = BinaryExpression(\"*\", other, self)\n        return self._from_expr(comp_value)\n\n    def __truediv__(self, other):\n        comp_value = BinaryExpression(\"/\", self, other)\n        return self._from_expr(comp_value)\n\n    def __rtruediv__(self, other):\n        comp_value = BinaryExpression(\"/\", other, self)\n        return self._from_expr(comp_value)\n\n    __div__ = __truediv__\n\n    __rdiv__ = __rtruediv__\n\n    def __mod__(self, other):\n        comp_value = BinaryExpression(\"%\", self, other)\n        return self._from_expr(comp_value)\n\n    def __rmod__(self, other):\n        comp_value = BinaryExpression(\"%\", other, self)\n        return self._from_expr(comp_value)\n\n    def __pow__(self, other):\n        # \"**\" Javascript operator is not supported in all browsers\n        comp_value = FunctionExpression(\"pow\", (self, other))\n        return self._from_expr(comp_value)\n\n    def __rpow__(self, other):\n        # \"**\" Javascript operator is not supported in all browsers\n        comp_value = FunctionExpression(\"pow\", (other, self))\n        return self._from_expr(comp_value)\n\n    def __neg__(self):\n        comp_value = UnaryExpression(\"-\", self)\n        return self._from_expr(comp_value)\n\n    def __pos__(self):\n        comp_value = UnaryExpression(\"+\", self)\n        return self._from_expr(comp_value)\n\n    # comparison operators\n\n    def __eq__(self, other):\n        comp_value = BinaryExpression(\"===\", self, other)\n        return self._from_expr(comp_value)\n\n    def __ne__(self, other):\n        comp_value = BinaryExpression(\"!==\", self, other)\n        return self._from_expr(comp_value)\n\n    def __gt__(self, other):\n        comp_value = BinaryExpression(\">\", self, other)\n        return self._from_expr(comp_value)\n\n    def __lt__(self, other):\n        comp_value = BinaryExpression(\"<\", self, other)\n        return self._from_expr(comp_value)\n\n    def __ge__(self, other):\n        comp_value = BinaryExpression(\">=\", self, other)\n        return self._from_expr(comp_value)\n\n    def __le__(self, other):\n        comp_value = BinaryExpression(\"<=\", self, other)\n        return self._from_expr(comp_value)\n\n    def __abs__(self):\n        comp_value = FunctionExpression(\"abs\", (self,))\n        return self._from_expr(comp_value)\n\n    # logical operators\n\n    def __and__(self, other):\n        comp_value = BinaryExpression(\"&&\", self, other)\n        return self._from_expr(comp_value)\n\n    def __rand__(self, other):\n        comp_value = BinaryExpression(\"&&\", other, self)\n        return self._from_expr(comp_value)\n\n    def __or__(self, other):\n        comp_value = BinaryExpression(\"||\", self, other)\n        return self._from_expr(comp_value)\n\n    def __ror__(self, other):\n        comp_value = BinaryExpression(\"||\", other, self)\n        return self._from_expr(comp_value)\n\n    def __invert__(self):\n        comp_value = UnaryExpression(\"!\", self)\n        return self._from_expr(comp_value)\n\n\nclass Expression(OperatorMixin, SchemaBase):\n    \"\"\"\n    Expression.\n\n    Base object for enabling build-up of Javascript expressions using\n    a Python syntax. Calling ``repr(obj)`` will return a Javascript\n    representation of the object and the operations it encodes.\n    \"\"\"\n\n    _schema = {\"type\": \"string\"}\n\n    def to_dict(self, *args, **kwargs):\n        return repr(self)\n\n    def __setattr__(self, attr, val) -> None:\n        # We don't need the setattr magic defined in SchemaBase\n        return object.__setattr__(self, attr, val)\n\n    # item access\n    def __getitem__(self, val):\n        return GetItemExpression(self, val)\n\n\nclass UnaryExpression(Expression):\n    def __init__(self, op, val) -> None:\n        super().__init__(op=op, val=val)\n\n    def __repr__(self):\n        return f\"({self.op}{_js_repr(self.val)})\"\n\n\nclass BinaryExpression(Expression):\n    def __init__(self, op, lhs, rhs) -> None:\n        super().__init__(op=op, lhs=lhs, rhs=rhs)\n\n    def __repr__(self):\n        return f\"({_js_repr(self.lhs)} {self.op} {_js_repr(self.rhs)})\"\n\n\nclass FunctionExpression(Expression):\n    def __init__(self, name, args) -> None:\n        super().__init__(name=name, args=args)\n\n    def __repr__(self):\n        args = \",\".join(_js_repr(arg) for arg in self.args)\n        return f\"{self.name}({args})\"\n\n\nclass ConstExpression(Expression):\n    def __init__(self, name) -> None:\n        super().__init__(name=name)\n\n    def __repr__(self) -> str:\n        return str(self.name)\n\n\nclass GetAttrExpression(Expression):\n    def __init__(self, group, name) -> None:\n        super().__init__(group=group, name=name)\n\n    def __repr__(self):\n        return f\"{self.group}.{self.name}\"\n\n\nclass GetItemExpression(Expression):\n    def __init__(self, group, name) -> None:\n        super().__init__(group=group, name=name)\n\n    def __repr__(self) -> str:\n        return f\"{self.group}[{self.name!r}]\"\n\n\nIntoExpression: TypeAlias = Union[\n    \"PrimitiveValue_T\", dt.date, dt.datetime, OperatorMixin, \"Map\"\n]\n"
  },
  {
    "path": "altair/expr/funcs.py",
    "content": "from __future__ import annotations\n\nFUNCTION_LISTING = {\n    \"isArray\": r\"Returns true if _value_ is an array, false otherwise.\",\n    \"isBoolean\": r\"Returns true if _value_ is a boolean (`true` or `false`), false otherwise.\",\n    \"isDate\": r\"Returns true if _value_ is a Date object, false otherwise. This method will return false for timestamp numbers or date-formatted strings; it recognizes Date objects only.\",\n    \"isDefined\": r\"Returns true if _value_ is a defined value, false if _value_ equals `undefined`. This method will return true for `null` and `NaN` values.\",\n    \"isNumber\": r\"Returns true if _value_ is a number, false otherwise. `NaN` and `Infinity` are considered numbers.\",\n    \"isObject\": r\"Returns true if _value_ is an object (including arrays and Dates), false otherwise.\",\n    \"isRegExp\": r\"Returns true if _value_ is a RegExp (regular expression) object, false otherwise.\",\n    \"isString\": r\"Returns true if _value_ is a string, false otherwise.\",\n    \"isValid\": r\"Returns true if _value_ is not `null`, `undefined`, or `NaN`, false otherwise.\",\n    \"toBoolean\": r\"Coerces the input _value_ to a string. Null values and empty strings are mapped to `null`.\",\n    \"toDate\": r\"Coerces the input _value_ to a Date instance. Null values and empty strings are mapped to `null`. If an optional _parser_ function is provided, it is used to perform date parsing, otherwise `Date.parse` is used. Be aware that `Date.parse` has different implementations across browsers!\",\n    \"toNumber\": r\"Coerces the input _value_ to a number. Null values and empty strings are mapped to `null`.\",\n    \"toString\": r\"Coerces the input _value_ to a string. Null values and empty strings are mapped to `null`.\",\n    \"if\": r\"If _test_ is truthy, returns _thenValue_. Otherwise, returns _elseValue_. The _if_ function is equivalent to the ternary operator `a ? b : c`.\",\n    \"isNaN\": r\"Returns true if _value_ is not a number. Same as JavaScript's `isNaN`.\",\n    \"isFinite\": r\"Returns true if _value_ is a finite number. Same as JavaScript's `isFinite`.\",\n    \"abs\": r\"Returns the absolute value of _value_. Same as JavaScript's `Math.abs`.\",\n    \"acos\": r\"Trigonometric arccosine. Same as JavaScript's `Math.acos`.\",\n    \"asin\": r\"Trigonometric arcsine. Same as JavaScript's `Math.asin`.\",\n    \"atan\": r\"Trigonometric arctangent. Same as JavaScript's `Math.atan`.\",\n    \"atan2\": r\"Returns the arctangent of _dy / dx_. Same as JavaScript's `Math.atan2`.\",\n    \"ceil\": r\"Rounds _value_ to the nearest integer of equal or greater value. Same as JavaScript's `Math.ceil`.\",\n    \"clamp\": r\"Restricts _value_ to be between the specified _min_ and _max_.\",\n    \"cos\": r\"Trigonometric cosine. Same as JavaScript's `Math.cos`.\",\n    \"exp\": r\"Returns the value of _e_ raised to the provided _exponent_. Same as JavaScript's `Math.exp`.\",\n    \"floor\": r\"Rounds _value_ to the nearest integer of equal or lower value. Same as JavaScript's `Math.floor`.\",\n    \"hypot\": r\"Returns the square root of the sum of squares of its arguments. Same as JavaScript's `Math.hypot`.\",\n    \"log\": r\"Returns the natural logarithm of _value_. Same as JavaScript's `Math.log`.\",\n    \"max\": r\"Returns the maximum argument value. Same as JavaScript's `Math.max`.\",\n    \"min\": r\"Returns the minimum argument value. Same as JavaScript's `Math.min`.\",\n    \"pow\": r\"Returns _value_ raised to the given _exponent_. Same as JavaScript's `Math.pow`.\",\n    \"random\": r\"Returns a pseudo-random number in the range [0,1). Same as JavaScript's `Math.random`.\",\n    \"round\": r\"Rounds _value_ to the nearest integer. Same as JavaScript's `Math.round`.\",\n    \"sin\": r\"Trigonometric sine. Same as JavaScript's `Math.sin`.\",\n    \"sqrt\": r\"Square root function. Same as JavaScript's `Math.sqrt`.\",\n    \"tan\": r\"Trigonometric tangent. Same as JavaScript's `Math.tan`.\",\n    \"sampleNormal\": r\"Returns a sample from a univariate [normal (Gaussian) probability distribution](https://en.wikipedia.org/wiki/Normal_distribution) with specified _mean_ and standard deviation _stdev_. If unspecified, the mean defaults to `0` and the standard deviation defaults to `1`.\",\n    \"cumulativeNormal\": r\"Returns the value of the [cumulative distribution function](https://en.wikipedia.org/wiki/Cumulative_distribution_function) at the given input domain _value_ for a normal distribution with specified _mean_ and standard deviation _stdev_. If unspecified, the mean defaults to `0` and the standard deviation defaults to `1`.\",\n    \"densityNormal\": r\"Returns the value of the [probability density function](https://en.wikipedia.org/wiki/Probability_density_function) at the given input domain _value_, for a normal distribution with specified _mean_ and standard deviation _stdev_. If unspecified, the mean defaults to `0` and the standard deviation defaults to `1`.\",\n    \"quantileNormal\": r\"Returns the quantile value (the inverse of the [cumulative distribution function](https://en.wikipedia.org/wiki/Cumulative_distribution_function)) for the given input _probability_, for a normal distribution with specified _mean_ and standard deviation _stdev_. If unspecified, the mean defaults to `0` and the standard deviation defaults to `1`.\",\n    \"sampleLogNormal\": r\"Returns a sample from a univariate [log-normal probability distribution](https://en.wikipedia.org/wiki/Log-normal_distribution) with specified log _mean_ and log standard deviation _stdev_. If unspecified, the log mean defaults to `0` and the log standard deviation defaults to `1`.\",\n    \"cumulativeLogNormal\": r\"Returns the value of the [cumulative distribution function](https://en.wikipedia.org/wiki/Cumulative_distribution_function) at the given input domain _value_ for a log-normal distribution with specified log _mean_ and log standard deviation _stdev_. If unspecified, the log mean defaults to `0` and the log standard deviation defaults to `1`.\",\n    \"densityLogNormal\": r\"Returns the value of the [probability density function](https://en.wikipedia.org/wiki/Probability_density_function) at the given input domain _value_, for a log-normal distribution with specified log _mean_ and log standard deviation _stdev_. If unspecified, the log mean defaults to `0` and the log standard deviation defaults to `1`.\",\n    \"quantileLogNormal\": r\"Returns the quantile value (the inverse of the [cumulative distribution function](https://en.wikipedia.org/wiki/Cumulative_distribution_function)) for the given input _probability_, for a log-normal distribution with specified log _mean_ and log standard deviation _stdev_. If unspecified, the log mean defaults to `0` and the log standard deviation defaults to `1`.\",\n    \"sampleUniform\": r\"Returns a sample from a univariate [continuous uniform probability distribution](https://en.wikipedia.org/wiki/Uniform_distribution_(continuous)) over the interval [_min_, _max_). If unspecified, _min_ defaults to `0` and _max_ defaults to `1`. If only one argument is provided, it is interpreted as the _max_ value.\",\n    \"cumulativeUniform\": r\"Returns the value of the [cumulative distribution function](https://en.wikipedia.org/wiki/Cumulative_distribution_function) at the given input domain _value_ for a uniform distribution over the interval [_min_, _max_). If unspecified, _min_ defaults to `0` and _max_ defaults to `1`. If only one argument is provided, it is interpreted as the _max_ value.\",\n    \"densityUniform\": r\"Returns the value of the [probability density function](https://en.wikipedia.org/wiki/Probability_density_function) at the given input domain _value_,  for a uniform distribution over the interval [_min_, _max_). If unspecified, _min_ defaults to `0` and _max_ defaults to `1`. If only one argument is provided, it is interpreted as the _max_ value.\",\n    \"quantileUniform\": r\"Returns the quantile value (the inverse of the [cumulative distribution function](https://en.wikipedia.org/wiki/Cumulative_distribution_function)) for the given input _probability_,  for a uniform distribution over the interval [_min_, _max_). If unspecified, _min_ defaults to `0` and _max_ defaults to `1`. If only one argument is provided, it is interpreted as the _max_ value.\",\n    \"now\": r\"Returns the timestamp for the current time.\",\n    \"datetime\": r\"Returns a new `Date` instance. The _month_ is 0-based, such that `1` represents February.\",\n    \"date\": r\"Returns the day of the month for the given _datetime_ value, in local time.\",\n    \"day\": r\"Returns the day of the week for the given _datetime_ value, in local time.\",\n    \"dayofyear\": r\"Returns the one-based day of the year for the given _datetime_ value, in local time.\",\n    \"year\": r\"Returns the year for the given _datetime_ value, in local time.\",\n    \"quarter\": r\"Returns the quarter of the year (0-3) for the given _datetime_ value, in local time.\",\n    \"month\": r\"Returns the (zero-based) month for the given _datetime_ value, in local time.\",\n    \"week\": r\"Returns the week number of the year for the given _datetime_, in local time. This function assumes Sunday-based weeks. Days before the first Sunday of the year are considered to be in week 0, the first Sunday of the year is the start of week 1, the second Sunday week 2, _etc._.\",\n    \"hours\": r\"Returns the hours component for the given _datetime_ value, in local time.\",\n    \"minutes\": r\"Returns the minutes component for the given _datetime_ value, in local time.\",\n    \"seconds\": r\"Returns the seconds component for the given _datetime_ value, in local time.\",\n    \"milliseconds\": r\"Returns the milliseconds component for the given _datetime_ value, in local time.\",\n    \"time\": r\"Returns the epoch-based timestamp for the given _datetime_ value.\",\n    \"timezoneoffset\": r\"Returns the timezone offset from the local timezone to UTC for the given _datetime_ value.\",\n    \"timeOffset\": r\"Returns a new `Date` instance that offsets the given _date_ by the specified time [_unit_](../api/time/#time-units) in the local timezone. The optional _step_ argument indicates the number of time unit steps to offset by (default 1).\",\n    \"timeSequence\": r\"Returns an array of `Date` instances from _start_ (inclusive) to _stop_ (exclusive), with each entry separated by the given time [_unit_](../api/time/#time-units) in the local timezone. The optional _step_ argument indicates the number of time unit steps to take between each sequence entry (default 1).\",\n    \"utc\": r\"Returns a timestamp for the given UTC date. The _month_ is 0-based, such that `1` represents February.\",\n    \"utcdate\": r\"Returns the day of the month for the given _datetime_ value, in UTC time.\",\n    \"utcday\": r\"Returns the day of the week for the given _datetime_ value, in UTC time.\",\n    \"utcdayofyear\": r\"Returns the one-based day of the year for the given _datetime_ value, in UTC time.\",\n    \"utcyear\": r\"Returns the year for the given _datetime_ value, in UTC time.\",\n    \"utcquarter\": r\"Returns the quarter of the year (0-3) for the given _datetime_ value, in UTC time.\",\n    \"utcmonth\": r\"Returns the (zero-based) month for the given _datetime_ value, in UTC time.\",\n    \"utcweek\": r\"Returns the week number of the year for the given _datetime_, in UTC time. This function assumes Sunday-based weeks. Days before the first Sunday of the year are considered to be in week 0, the first Sunday of the year is the start of week 1, the second Sunday week 2, _etc._.\",\n    \"utchours\": r\"Returns the hours component for the given _datetime_ value, in UTC time.\",\n    \"utcminutes\": r\"Returns the minutes component for the given _datetime_ value, in UTC time.\",\n    \"utcseconds\": r\"Returns the seconds component for the given _datetime_ value, in UTC time.\",\n    \"utcmilliseconds\": r\"Returns the milliseconds component for the given _datetime_ value, in UTC time.\",\n    \"utcOffset\": r\"Returns a new `Date` instance that offsets the given _date_ by the specified time [_unit_](../api/time/#time-units) in UTC time. The optional _step_ argument indicates the number of time unit steps to offset by (default 1).\",\n    \"utcSequence\": r\"Returns an array of `Date` instances from _start_ (inclusive) to _stop_ (exclusive), with each entry separated by the given time [_unit_](../api/time/#time-units) in UTC time. The optional _step_ argument indicates the number of time unit steps to take between each sequence entry (default 1).\",\n    \"extent\": r\"Returns a new _[min, max]_ array with the minimum and maximum values of the input array, ignoring `null`, `undefined`, and `NaN` values.\",\n    \"clampRange\": r\"Clamps a two-element _range_ array in a span-preserving manner. If the span of the input _range_ is less than _(max - min)_ and an endpoint exceeds either the _min_ or _max_ value, the range is translated such that the span is preserved and one endpoint touches the boundary of the _[min, max]_ range. If the span exceeds _(max - min)_, the range _[min, max]_ is returned.\",\n    \"indexof\": r\"Returns the first index of _value_ in the input _array_, or the first index of _substring_ in the input _string_..\",\n    \"inrange\": r\"Tests whether _value_ lies within (or is equal to either) the first and last values of the _range_ array.\",\n    \"join\": r\"Returns a new string by concatenating all of the elements of the input _array_, separated by commas or a specified _separator_ string.\",\n    \"lastindexof\": r\"Returns the last index of _value_ in the input _array_, or the last index of _substring_ in the input _string_..\",\n    \"length\": r\"Returns the length of the input _array_, or the length of the input _string_.\",\n    \"lerp\": r\"Returns the linearly interpolated value between the first and last entries in the _array_ for the provided interpolation _fraction_ (typically between 0 and 1). For example, `lerp([0, 50], 0.5)` returns 25.\",\n    \"peek\": r\"Returns the last element in the input _array_. Similar to the built-in `Array.pop` method, except that it does not remove the last element. This method is a convenient shorthand for `array[array.length - 1]`.\",\n    \"pluck\": r\"Retrieves the value for the specified *field* from a given *array* of objects. The input *field* string may include nested properties (e.g., `foo.bar.bz`).\",\n    \"reverse\": r\"Returns a new array with elements in a reverse order of the input _array_. The first array element becomes the last, and the last array element becomes the first.\",\n    \"sequence\": r\"Returns an array containing an arithmetic sequence of numbers. If _step_ is omitted, it defaults to 1. If _start_ is omitted, it defaults to 0. The _stop_ value is exclusive; it is not included in the result. If _step_ is positive, the last element is the largest _start + i * step_ less than _stop_; if _step_ is negative, the last element is the smallest _start + i * step_ greater than _stop_. If the returned array would contain an infinite number of values, an empty range is returned. The arguments are not required to be integers.\",\n    \"slice\": r\"Returns a section of _array_ between the _start_ and _end_ indices. If the _end_ argument is negative, it is treated as an offset from the end of the array (_length(array) + end_).\",\n    \"span\": r\"Returns the span of _array_: the difference between the last and first elements, or _array[array.length-1] - array[0]_. Or if input is a string: a section of _string_ between the _start_ and _end_ indices. If the _end_ argument is negative, it is treated as an offset from the end of the string (_length(string) + end_)..\",\n    \"lower\": r\"Transforms _string_ to lower-case letters.\",\n    \"pad\": r\"Pads a _string_ value with repeated instances of a _character_ up to a specified _length_. If _character_ is not specified, a space (' ') is used. By default, padding is added to the end of a string. An optional _align_ parameter specifies if padding should be added to the `'left'` (beginning), `'center'`, or `'right'` (end) of the input string.\",\n    \"parseFloat\": r\"Parses the input _string_ to a floating-point value. Same as JavaScript's `parseFloat`.\",\n    \"parseInt\": r\"Parses the input _string_ to an integer value. Same as JavaScript's `parseInt`.\",\n    \"replace\": r\"Returns a new string with some or all matches of _pattern_ replaced by a _replacement_ string. The _pattern_ can be a string or a regular expression. If _pattern_ is a string, only the first instance will be replaced. Same as [JavaScript's String.replace](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace).\",\n    \"split\": r\"Returns an array of tokens created by splitting the input _string_ according to a provided _separator_ pattern. The result can optionally be constrained to return at most _limit_ tokens.\",\n    \"substring\": r\"Returns a section of _string_ between the _start_ and _end_ indices.\",\n    \"trim\": r\"Returns a trimmed string with preceding and trailing whitespace removed.\",\n    \"truncate\": r\"Truncates an input _string_ to a target _length_. The optional _align_ argument indicates what part of the string should be truncated: `'left'` (the beginning), `'center'`, or `'right'` (the end). By default, the `'right'` end of the string is truncated. The optional _ellipsis_ argument indicates the string to use to indicate truncated content; by default the ellipsis character `...` (`\\\\u2026`) is used.\",\n    \"upper\": r\"Transforms _string_ to upper-case letters.\",\n    \"merge\": r\"Merges the input objects _object1_, _object2_, etc into a new output object. Inputs are visited in sequential order, such that key values from later arguments can overwrite those from earlier arguments. Example: `merge({a:1, b:2}, {a:3}) -> {a:3, b:2}`.\",\n    \"dayFormat\": r\"Formats a (0-6) _weekday_ number as a full week day name, according to the current locale. For example: `dayFormat(0) -> \\\"Sunday\\\"`.\",\n    \"dayAbbrevFormat\": r\"Formats a (0-6) _weekday_ number as an abbreviated week day name, according to the current locale. For example: `dayAbbrevFormat(0) -> \\\"Sun\\\"`.\",\n    \"format\": r\"Formats a numeric _value_ as a string. The _specifier_ must be a valid [d3-format specifier](https://github.com/d3/d3-format/) (e.g., `format(value, ',.2f')`.\",\n    \"monthFormat\": r\"Formats a (zero-based) _month_ number as a full month name, according to the current locale. For example: `monthFormat(0) -> \\\"January\\\"`.\",\n    \"monthAbbrevFormat\": r\"Formats a (zero-based) _month_ number as an abbreviated month name, according to the current locale. For example: `monthAbbrevFormat(0) -> \\\"Jan\\\"`.\",\n    \"timeUnitSpecifier\": r\"Returns a time format specifier string for the given time [_units_](../api/time/#time-units). The optional _specifiers_ object provides a set of specifier sub-strings for customizing the format; for more, see the [timeUnitSpecifier API documentation](../api/time/#timeUnitSpecifier). The resulting specifier string can then be used as input to the [timeFormat](#timeFormat) or [utcFormat](#utcFormat) functions, or as the _format_ parameter of an axis or legend. For example: `timeFormat(date, timeUnitSpecifier('year'))` or `timeFormat(date, timeUnitSpecifier(['hours', 'minutes']))`.\",\n    \"timeFormat\": r\"Formats a datetime _value_ (either a `Date` object or timestamp) as a string, according to the local time. The _specifier_ must be a valid [d3-time-format specifier](https://github.com/d3/d3-time-format/). For example: `timeFormat(timestamp, '%A')`.\",\n    \"timeParse\": r\"Parses a _string_ value to a Date object, according to the local time. The _specifier_ must be a valid [d3-time-format specifier](https://github.com/d3/d3-time-format/). For example: `timeParse('June 30, 2015', '%B %d, %Y')`.\",\n    \"utcFormat\": r\"Formats a datetime _value_ (either a `Date` object or timestamp) as a string, according to [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) time. The _specifier_ must be a valid [d3-time-format specifier](https://github.com/d3/d3-time-format/). For example: `utcFormat(timestamp, '%A')`.\",\n    \"utcParse\": r\"Parses a _string_ value to a Date object, according to [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) time. The _specifier_ must be a valid [d3-time-format specifier](https://github.com/d3/d3-time-format/). For example: `utcParse('June 30, 2015', '%B %d, %Y')`.\",\n    \"regexp\": r\"Creates a regular expression instance from an input _pattern_ string and optional _flags_. Same as [JavaScript's `RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp).\",\n    \"test\": r\"Evaluates a regular expression _regexp_ against the input _string_, returning `true` if the string matches the pattern, `false` otherwise. For example: `test(/\\\\d{3}/, \\\"32-21-9483\\\") -> true`.\",\n    \"rgb\": r\"Constructs a new [RGB](https://en.wikipedia.org/wiki/RGB_color_model) color. If _r_, _g_ and _b_ are specified, these represent the channel values of the returned color; an _opacity_ may also be specified. If a CSS Color Module Level 3 _specifier_ string is specified, it is parsed and then converted to the RGB color space. Uses [d3-color's rgb function](https://github.com/d3/d3-color#rgb).\",\n    \"hsl\": r\"Constructs a new [HSL](https://en.wikipedia.org/wiki/HSL_and_HSV) color. If _h_, _s_ and _l_ are specified, these represent the channel values of the returned color; an _opacity_ may also be specified. If a CSS Color Module Level 3 _specifier_ string is specified, it is parsed and then converted to the HSL color space. Uses [d3-color's hsl function](https://github.com/d3/d3-color#hsl).\",\n    \"lab\": r\"Constructs a new [CIE LAB](https://en.wikipedia.org/wiki/Lab_color_space#CIELAB) color. If _l_, _a_ and _b_ are specified, these represent the channel values of the returned color; an _opacity_ may also be specified. If a CSS Color Module Level 3 _specifier_ string is specified, it is parsed and then converted to the LAB color space. Uses [d3-color's lab function](https://github.com/d3/d3-color#lab).\",\n    \"hcl\": r\"Constructs a new [HCL](https://en.wikipedia.org/wiki/Lab_color_space#CIELAB) (hue, chroma, luminance) color. If _h_, _c_ and _l_ are specified, these represent the channel values of the returned color; an _opacity_ may also be specified. If a CSS Color Module Level 3 _specifier_ string is specified, it is parsed and then converted to the HCL color space. Uses [d3-color's hcl function](https://github.com/d3/d3-color#hcl).\",\n    \"luminance\": r\"Returns the luminance for the given color _specifier_ (compatible with [d3-color's rgb function](https://github.com/d3/d3-color#rgb)). The luminance is calculated according to the [W3C Web Content Accessibility Guidelines](https://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef).\",\n    \"contrast\": r\"Returns the contrast ratio between the input color specifiers as a float between 1 and 21. The contrast is calculated according to the [W3C Web Content Accessibility Guidelines](https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef).\",\n    \"item\": r\"Returns the current scenegraph item that is the target of the event.\",\n    \"group\": r\"Returns the scenegraph group mark item in which the current event has occurred. If no arguments are provided, the immediate parent group is returned. If a group name is provided, the matching ancestor group item is returned.\",\n    \"xy\": r\"Returns the x- and y-coordinates for the current event as a two-element array. If no arguments are provided, the top-level coordinate space of the view is used. If a scenegraph _item_ (or string group name) is provided, the coordinate space of the group item is used.\",\n    \"x\": r\"Returns the x coordinate for the current event. If no arguments are provided, the top-level coordinate space of the view is used. If a scenegraph _item_ (or string group name) is provided, the coordinate space of the group item is used.\",\n    \"y\": r\"Returns the y coordinate for the current event. If no arguments are provided, the top-level coordinate space of the view is used. If a scenegraph _item_ (or string group name) is provided, the coordinate space of the group item is used.\",\n    \"pinchDistance\": r\"Returns the pixel distance between the first two touch points of a multi-touch event.\",\n    \"pinchAngle\": r\"Returns the angle of the line connecting the first two touch points of a multi-touch event.\",\n    \"inScope\": r\"Returns true if the given scenegraph _item_ is a descendant of the group mark in which the event handler was defined, false otherwise.\",\n    \"data\": r\"Returns the array of data objects for the Vega data set with the given _name_. If the data set is not found, returns an empty array.\",\n    \"indata\": r\"Tests if the data set with a given _name_ contains a datum with a _field_ value that matches the input _value_. For example: `indata('table', 'category', value)`.\",\n    \"scale\": r\"Applies the named scale transform (or projection) to the specified _value_. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale or projection.\",\n    \"invert\": r\"Inverts the named scale transform (or projection) for the specified _value_. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale or projection.\",\n    \"copy\": r\"Returns a copy (a new cloned instance) of the named scale transform of projection, or `undefined` if no scale or projection is found. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale or projection.\",\n    \"domain\": r\"Returns the scale domain array for the named scale transform, or an empty array if the scale is not found. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale.\",\n    \"range\": r\"Returns the scale range array for the named scale transform, or an empty array if the scale is not found. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale.\",\n    \"bandwidth\": r\"Returns the current band width for the named band scale transform, or zero if the scale is not found or is not a band scale. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the scale.\",\n    \"bandspace\": r\"Returns the number of steps needed within a band scale, based on the _count_ of domain elements and the inner and outer padding values. While normally calculated within the scale itself, this function can be helpful for determining the size of a chart's layout.\",\n    \"gradient\": r\"Returns a linear color gradient for the _scale_ (whose range must be a [continuous color scheme](../schemes)) and starting and ending points _p0_ and _p1_, each an _[x, y]_ array. The points _p0_ and _p1_ should be expressed in normalized coordinates in the domain [0, 1], relative to the bounds of the item being colored. If unspecified, _p0_ defaults to `[0, 0]` and _p1_ defaults to `[1, 0]`, for a horizontal gradient that spans the full bounds of an item. The optional _count_ argument indicates a desired target number of sample points to take from the color scale.\",\n    \"panLinear\": r\"Given a linear scale _domain_ array with numeric or datetime values, returns a new two-element domain array that is the result of panning the domain by a fractional _delta_. The _delta_ value represents fractional units of the scale range; for example, `0.5` indicates panning the scale domain to the right by half the scale range.\",\n    \"panLog\": r\"Given a log scale _domain_ array with numeric or datetime values, returns a new two-element domain array that is the result of panning the domain by a fractional _delta_. The _delta_ value represents fractional units of the scale range; for example, `0.5` indicates panning the scale domain to the right by half the scale range.\",\n    \"panPow\": r\"Given a power scale _domain_ array with numeric or datetime values and the given _exponent_, returns a new two-element domain array that is the result of panning the domain by a fractional _delta_. The _delta_ value represents fractional units of the scale range; for example, `0.5` indicates panning the scale domain to the right by half the scale range.\",\n    \"panSymlog\": r\"Given a symmetric log scale _domain_ array with numeric or datetime values parameterized by the given _constant_, returns a new two-element domain array that is the result of panning the domain by a fractional _delta_. The _delta_ value represents fractional units of the scale range; for example, `0.5` indicates panning the scale domain to the right by half the scale range.\",\n    \"zoomLinear\": r\"Given a linear scale _domain_ array with numeric or datetime values, returns a new two-element domain array that is the result of zooming the domain by a _scaleFactor_, centered at the provided fractional _anchor_. The _anchor_ value represents the zoom position in terms of fractional units of the scale range; for example, `0.5` indicates a zoom centered on the mid-point of the scale range.\",\n    \"zoomLog\": r\"Given a log scale _domain_ array with numeric or datetime values, returns a new two-element domain array that is the result of zooming the domain by a _scaleFactor_, centered at the provided fractional _anchor_. The _anchor_ value represents the zoom position in terms of fractional units of the scale range; for example, `0.5` indicates a zoom centered on the mid-point of the scale range.\",\n    \"zoomPow\": r\"Given a power scale _domain_ array with numeric or datetime values and the given _exponent_, returns a new two-element domain array that is the result of zooming the domain by a _scaleFactor_, centered at the provided fractional _anchor_. The _anchor_ value represents the zoom position in terms of fractional units of the scale range; for example, `0.5` indicates a zoom centered on the mid-point of the scale range.\",\n    \"zoomSymlog\": r\"Given a symmetric log scale _domain_ array with numeric or datetime values parameterized by the given _constant_, returns a new two-element domain array that is the result of zooming the domain by a _scaleFactor_, centered at the provided fractional _anchor_. The _anchor_ value represents the zoom position in terms of fractional units of the scale range; for example, `0.5` indicates a zoom centered on the mid-point of the scale range.\",\n    \"geoArea\": r\"Returns the projected planar area (typically in square pixels) of a GeoJSON _feature_ according to the named _projection_. If the _projection_ argument is `null`, computes the spherical area in steradians using unprojected longitude, latitude coordinates. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the projection. Uses d3-geo's [geoArea](https://github.com/d3/d3-geo#geoArea) and [path.area](https://github.com/d3/d3-geo#path_area) methods.\",\n    \"geoBounds\": r\"Returns the projected planar bounding box (typically in pixels) for the specified GeoJSON _feature_, according to the named _projection_. The bounding box is represented by a two-dimensional array: [[_x0_, _y0_], [_x1_, _y1_]], where _x0_ is the minimum x-coordinate, _y0_ is the minimum y-coordinate, _x1_ is the maximum x-coordinate, and _y1_ is the maximum y-coordinate. If the _projection_ argument is `null`, computes the spherical bounding box using unprojected longitude, latitude coordinates. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the projection. Uses d3-geo's [geoBounds](https://github.com/d3/d3-geo#geoBounds) and [path.bounds](https://github.com/d3/d3-geo#path_bounds) methods.\",\n    \"geoCentroid\": r\"Returns the projected planar centroid (typically in pixels) for the specified GeoJSON _feature_, according to the named _projection_. If the _projection_ argument is `null`, computes the spherical centroid using unprojected longitude, latitude coordinates. The optional _group_ argument takes a scenegraph group mark item to indicate the specific scope in which to look up the projection. Uses d3-geo's [geoCentroid](https://github.com/d3/d3-geo#geoCentroid) and [path.centroid](https://github.com/d3/d3-geo#path_centroid) methods.\",\n    \"treePath\": r\"For the hierarchy data set with the given _name_, returns the shortest path through from the _source_ node id to the _target_ node id. The path starts at the _source_ node, ascends to the least common ancestor of the _source_ node and the _target_ node, and then descends to the _target_ node.\",\n    \"treeAncestors\": r\"For the hierarchy data set with the given _name_, returns the array of ancestors nodes, starting with the input _node_, then followed by each parent up to the root.\",\n    \"containerSize\": r\"Returns the current CSS box size (`[el.clientWidth, el.clientHeight]`) of the parent DOM element that contains the Vega view. If there is no container element, returns `[undefined, undefined]`.\",\n    \"screen\": r\"Returns the [`window.screen`](https://developer.mozilla.org/en-US/docs/Web/API/Window/screen) object, or `{}` if Vega is not running in a browser environment.\",\n    \"windowSize\": r\"Returns the current window size (`[window.innerWidth, window.innerHeight]`) or `[undefined, undefined]` if Vega is not running in a browser environment.\",\n    \"warn\": r\"Logs a warning message and returns the last argument. For the message to appear in the console, the visualization view must have the appropriate logging level set.\",\n    \"info\": r\"Logs an informative message and returns the last argument. For the message to appear in the console, the visualization view must have the appropriate logging level set.\",\n    \"debug\": r\"Logs a debugging message and returns the last argument. For the message to appear in the console, the visualization view must have the appropriate logging level set.\",\n}\n\n\n# This maps vega expression function names to the Python name\nNAME_MAP = {\"if\": \"if_\"}\n"
  },
  {
    "path": "altair/jupyter/__init__.py",
    "content": "try:\n    import anywidget  # noqa: F401\nexcept ImportError:\n    # When anywidget isn't available, create stand-in JupyterChart class\n    # that raises an informative import error on construction. This\n    # way we can make JupyterChart available in the altair namespace\n    # when anywidget is not installed\n    class JupyterChart:\n        def __init__(self, *args, **kwargs):\n            msg = (\n                \"The Altair JupyterChart requires the anywidget \\n\"\n                \"Python package which may be installed using pip with\\n\"\n                \"    pip install anywidget\\n\"\n                \"or using conda with\\n\"\n                \"    conda install -c conda-forge anywidget\\n\"\n                \"Afterwards, you will need to restart your Python kernel.\"\n            )\n            raise ImportError(msg)\n\nelse:\n    from .jupyter_chart import JupyterChart  # noqa: F401\n"
  },
  {
    "path": "altair/jupyter/js/README.md",
    "content": "# JupyterChart\nThis directory contains the JavaScript portion of the Altair `JupyterChart`. The `JupyterChart` is based on the [AnyWidget](https://anywidget.dev/) project.\n"
  },
  {
    "path": "altair/jupyter/js/index.js",
    "content": "import vegaEmbed from \"https://esm.sh/vega-embed@v7?deps=vega@6&deps=vega-lite@6.1.0\";\nimport lodashDebounce from \"https://esm.sh/lodash-es@4.17.21/debounce\";\n\n// Note: For offline support, the import lines above are removed and the remaining script\n// is bundled using vl-convert's javascript_bundle function. See the documentation of\n// the javascript_bundle function for details on the available imports and their names.\n// If an additional import is required in the future, it will need to be added to vl-convert\n// in order to preserve offline support.\nasync function render({ model, el }) {\n    let finalize;\n\n    function showError(error){\n        el.innerHTML = (\n            '<div style=\"color:red;\">'\n            + '<p>JavaScript Error: ' + error.message + '</p>'\n            + \"<p>This usually means there's a typo in your chart specification. \"\n            + \"See the javascript console for the full traceback.</p>\"\n            + '</div>'\n        );\n    }\n\n    const reembed = async () => {\n        if (finalize != null) {\n          finalize();\n        }\n\n        model.set(\"local_tz\", Intl.DateTimeFormat().resolvedOptions().timeZone);\n\n        let spec = structuredClone(model.get(\"spec\"));\n        if (spec == null) {\n            // Remove any existing chart and return\n            while (el.firstChild) {\n                el.removeChild(el.lastChild);\n            }\n            model.save_changes();\n            return;\n        }\n        let embedOptions = structuredClone(model.get(\"embed_options\")) ?? undefined;\n\n        let api;\n        try {\n            api = await vegaEmbed(el, spec, embedOptions);\n        } catch (error) {\n            showError(error)\n            return;\n        }\n\n        finalize = api.finalize;\n\n        // Debounce config\n        const wait = model.get(\"debounce_wait\") ?? 10;\n        const debounceOpts = {leading: false, trailing: true};\n        if (model.get(\"max_wait\") ?? true) {\n            debounceOpts[\"maxWait\"] = wait;\n        }\n\n        const initialSelections = {};\n        for (const selectionName of Object.keys(model.get(\"_vl_selections\"))) {\n            const storeName = `${selectionName}_store`;\n            const selectionHandler = (_, value) => {\n                const newSelections = cleanJson(model.get(\"_vl_selections\") ?? {});\n                const store = cleanJson(api.view.data(storeName) ?? []);\n\n                newSelections[selectionName] = {value, store};\n                model.set(\"_vl_selections\", newSelections);\n                model.save_changes();\n            };\n            api.view.addSignalListener(selectionName, lodashDebounce(selectionHandler, wait, debounceOpts));\n\n            initialSelections[selectionName] = {\n                value: cleanJson(api.view.signal(selectionName) ?? {}),\n                store: cleanJson(api.view.data(storeName) ?? [])\n            }\n        }\n        model.set(\"_vl_selections\", initialSelections);\n\n        const initialParams = {};\n        for (const paramName of Object.keys(model.get(\"_params\"))) {\n            const paramHandler = (_, value) => {\n                const newParams = JSON.parse(JSON.stringify(model.get(\"_params\"))) || {};\n                newParams[paramName] = value;\n                model.set(\"_params\", newParams);\n                model.save_changes();\n            };\n            api.view.addSignalListener(paramName, lodashDebounce(paramHandler, wait, debounceOpts));\n\n            initialParams[paramName] = api.view.signal(paramName) ?? null\n        }\n        model.set(\"_params\", initialParams);\n        model.save_changes();\n\n        // Param change callback\n        model.on('change:_params', async (new_params) => {\n            for (const [param, value] of Object.entries(new_params.changed ? new_params.changed._params : new_params)) {\n                api.view.signal(param, value);\n            }\n            await api.view.runAsync();\n        });\n\n        // Add signal/data listeners\n        for (const watch of model.get(\"_js_watch_plan\") ?? []) {\n            if (watch.namespace === \"data\") {\n                const dataHandler = (_, value) => {\n                    model.set(\"_js_to_py_updates\", [{\n                        namespace: \"data\",\n                        name: watch.name,\n                        scope: watch.scope,\n                        value: cleanJson(value)\n                    }]);\n                    model.save_changes();\n                };\n                addDataListener(api.view, watch.name, watch.scope, lodashDebounce(dataHandler, wait, debounceOpts))\n\n            } else if (watch.namespace === \"signal\") {\n                const signalHandler = (_, value) => {\n                    model.set(\"_js_to_py_updates\", [{\n                        namespace: \"signal\",\n                        name: watch.name,\n                        scope: watch.scope,\n                        value: cleanJson(value)\n                    }]);\n                    model.save_changes();\n                };\n\n                addSignalListener(api.view, watch.name, watch.scope, lodashDebounce(signalHandler, wait, debounceOpts))\n            }\n        }\n\n        // Add signal/data updaters\n        model.on('change:_py_to_js_updates', async (updates) => {\n            const py_to_js_updates = updates.changed ? updates.changed._py_to_js_updates : updates;\n            for (const update of py_to_js_updates ?? []) {\n                if (update.namespace === \"signal\") {\n                    setSignalValue(api.view, update.name, update.scope, update.value);\n                } else if (update.namespace === \"data\") {\n                    setDataValue(api.view, update.name, update.scope, update.value);\n                }\n            }\n            await api.view.runAsync();\n        });\n    }\n\n    model.on('change:spec', reembed);\n    model.on('change:embed_options', reembed);\n    model.on('change:debounce_wait', reembed);\n    model.on('change:max_wait', reembed);\n    await reembed();\n}\n\nfunction cleanJson(data) {\n    return JSON.parse(JSON.stringify(data))\n}\n\nfunction getNestedRuntime(view, scope) {\n    var runtime = view._runtime;\n    for (const index of scope) {\n        runtime = runtime.subcontext[index];\n    }\n    return runtime\n}\n\nfunction lookupSignalOp(view, name, scope) {\n    let parent_runtime = getNestedRuntime(view, scope);\n    return parent_runtime.signals[name] ?? null;\n}\n\nfunction dataRef(view, name, scope) {\n    let parent_runtime = getNestedRuntime(view, scope);\n    return parent_runtime.data[name];\n}\n\nexport function setSignalValue(view, name, scope, value) {\n    let signal_op = lookupSignalOp(view, name, scope);\n    view.update(signal_op, value);\n}\n\nexport function setDataValue(view, name, scope, value) {\n    let dataset = dataRef(view, name, scope);\n    let changeset = view.changeset().remove(() => true).insert(value)\n    dataset.modified = true;\n    view.pulse(dataset.input, changeset);\n}\n\nexport function addSignalListener(view, name, scope, handler) {\n    let signal_op = lookupSignalOp(view, name, scope);\n    return addOperatorListener(\n        view,\n        name,\n        signal_op,\n        handler,\n    );\n}\n\nexport function addDataListener(view, name, scope, handler) {\n    let dataset = dataRef(view, name, scope).values;\n    return addOperatorListener(\n        view,\n        name,\n        dataset,\n        handler,\n    );\n}\n\n// Private helpers from Vega for dealing with nested signals/data\nfunction findOperatorHandler(op, handler) {\n    const h = (op._targets || [])\n        .filter(op => op._update && op._update.handler === handler);\n    return h.length ? h[0] : null;\n}\n\nfunction addOperatorListener(view, name, op, handler) {\n    let h = findOperatorHandler(op, handler);\n    if (!h) {\n        h = trap(view, () => handler(name, op.value));\n        h.handler = handler;\n        view.on(op, null, h);\n    }\n    return view;\n}\n\nfunction trap(view, fn) {\n    return !fn ? null : function() {\n        try {\n            fn.apply(this, arguments);\n        } catch (error) {\n            view.error(error);\n        }\n    };\n}\n\nexport default { render }\n"
  },
  {
    "path": "altair/jupyter/jupyter_chart.py",
    "content": "from __future__ import annotations\n\nimport json\nimport pathlib\nfrom typing import Any\n\nimport anywidget\nimport traitlets\n\nimport altair as alt\nfrom altair import TopLevelSpec\nfrom altair.utils._vegafusion_data import (\n    compile_to_vegafusion_chart_state,\n    using_vegafusion,\n)\nfrom altair.utils.selection import IndexSelection, IntervalSelection, PointSelection\n\n_here = pathlib.Path(__file__).parent\n\n\nclass Params(traitlets.HasTraits):\n    \"\"\"Traitlet class storing a JupyterChart's params.\"\"\"\n\n    def __init__(self, trait_values):\n        super().__init__()\n\n        for key, value in trait_values.items():\n            if isinstance(value, (int, float)):\n                traitlet_type = traitlets.Float()\n            elif isinstance(value, str):\n                traitlet_type = traitlets.Unicode()\n            elif isinstance(value, list):\n                traitlet_type = traitlets.List()\n            elif isinstance(value, dict):\n                traitlet_type = traitlets.Dict()\n            else:\n                traitlet_type = traitlets.Any()\n\n            # Add the new trait.\n            self.add_traits(**{key: traitlet_type})\n\n            # Set the trait's value.\n            setattr(self, key, value)\n\n    def __repr__(self):\n        return f\"Params({self.trait_values()})\"\n\n\nclass Selections(traitlets.HasTraits):\n    \"\"\"Traitlet class storing a JupyterChart's selections.\"\"\"\n\n    def __init__(self, trait_values):\n        super().__init__()\n\n        for key, value in trait_values.items():\n            if isinstance(value, IndexSelection):\n                traitlet_type = traitlets.Instance(IndexSelection)\n            elif isinstance(value, PointSelection):\n                traitlet_type = traitlets.Instance(PointSelection)\n            elif isinstance(value, IntervalSelection):\n                traitlet_type = traitlets.Instance(IntervalSelection)\n            else:\n                msg = f\"Unexpected selection type: {type(value)}\"\n                raise ValueError(msg)\n\n            # Add the new trait.\n            self.add_traits(**{key: traitlet_type})\n\n            # Set the trait's value.\n            setattr(self, key, value)\n\n            # Make read-only\n            self.observe(self._make_read_only, names=key)\n\n    def __repr__(self):\n        return f\"Selections({self.trait_values()})\"\n\n    def _make_read_only(self, change):\n        \"\"\"Work around to make traits read-only, but still allow us to change them internally.\"\"\"\n        if change[\"name\"] in self.traits() and change[\"old\"] != change[\"new\"]:\n            self._set_value(change[\"name\"], change[\"old\"])\n        msg = (\n            \"Selections may not be set from Python.\\n\"\n            f\"Attempted to set select: {change['name']}\"\n        )\n        raise ValueError(msg)\n\n    def _set_value(self, key, value):\n        self.unobserve(self._make_read_only, names=key)\n        setattr(self, key, value)\n        self.observe(self._make_read_only, names=key)\n\n\ndef load_js_src() -> str:\n    return (_here / \"js\" / \"index.js\").read_text()\n\n\nclass JupyterChart(anywidget.AnyWidget):\n    _esm = load_js_src()\n    _css = r\"\"\"\n    .vega-embed {\n        /* Make sure action menu isn't cut off */\n        overflow: visible;\n    }\n    \"\"\"\n\n    # Public traitlets\n    chart = traitlets.Instance(TopLevelSpec, allow_none=True)\n    spec = traitlets.Dict(allow_none=True).tag(sync=True)\n    debounce_wait = traitlets.Float(default_value=10).tag(sync=True)\n    max_wait = traitlets.Bool(default_value=True).tag(sync=True)\n    local_tz = traitlets.Unicode(default_value=None, allow_none=True).tag(sync=True)\n    debug = traitlets.Bool(default_value=False)\n    embed_options = traitlets.Dict(default_value=None, allow_none=True).tag(sync=True)\n\n    # Internal selection traitlets\n    _selection_types = traitlets.Dict()\n    _vl_selections = traitlets.Dict().tag(sync=True)\n\n    # Internal param traitlets\n    _params = traitlets.Dict().tag(sync=True)\n\n    # Internal comm traitlets for VegaFusion support\n    _chart_state = traitlets.Any(allow_none=True)\n    _js_watch_plan = traitlets.Any(allow_none=True).tag(sync=True)\n    _js_to_py_updates = traitlets.Any(allow_none=True).tag(sync=True)\n    _py_to_js_updates = traitlets.Any(allow_none=True).tag(sync=True)\n\n    # Track whether charts are configured for offline use\n    _is_offline = False\n\n    @classmethod\n    def enable_offline(cls, offline: bool = True):\n        \"\"\"\n        Configure JupyterChart's offline behavior.\n\n        Parameters\n        ----------\n        offline: bool\n            If True, configure JupyterChart to operate in offline mode where JavaScript\n            dependencies are loaded from vl-convert.\n            If False, configure it to operate in online mode where JavaScript dependencies\n            are loaded from CDN dynamically. This is the default behavior.\n        \"\"\"\n        from altair.utils._importers import import_vl_convert, vl_version_for_vl_convert\n\n        if offline:\n            if cls._is_offline:\n                # Already offline\n                return\n\n            vlc = import_vl_convert()\n\n            src_lines = load_js_src().split(\"\\n\")\n\n            # Remove leading lines with only whitespace, comments, or imports\n            while src_lines and (\n                len(src_lines[0].strip()) == 0\n                or src_lines[0].startswith(\"import\")\n                or src_lines[0].startswith(\"//\")\n            ):\n                src_lines.pop(0)\n\n            src = \"\\n\".join(src_lines)\n\n            # vl-convert's javascript_bundle function creates a self-contained JavaScript bundle\n            # for JavaScript snippets that import from a small set of dependencies that\n            # vl-convert includes. To see the available imports and their imported names, run\n            #       import vl_convert as vlc\n            #       help(vlc.javascript_bundle)\n            bundled_src = vlc.javascript_bundle(\n                src, vl_version=vl_version_for_vl_convert()\n            )\n            cls._esm = bundled_src\n            cls._is_offline = True\n        else:\n            cls._esm = load_js_src()\n            cls._is_offline = False\n\n    def __init__(\n        self,\n        chart: TopLevelSpec,\n        debounce_wait: int = 10,\n        max_wait: bool = True,\n        debug: bool = False,\n        embed_options: dict | None = None,\n        **kwargs: Any,\n    ):\n        \"\"\"\n        Jupyter Widget for displaying and updating Altair Charts, and retrieving selection and parameter values.\n\n        Parameters\n        ----------\n        chart: Chart\n            Altair Chart instance\n        debounce_wait: int\n             Debouncing wait time in milliseconds. Updates will be sent from the client to the kernel\n             after debounce_wait milliseconds of no chart interactions.\n        max_wait: bool\n             If True (default), updates will be sent from the client to the kernel every debounce_wait\n             milliseconds even if there are ongoing chart interactions. If False, updates will not be\n             sent until chart interactions have completed.\n        debug: bool\n             If True, debug messages will be printed\n        embed_options: dict\n             Options to pass to vega-embed.\n             See https://github.com/vega/vega-embed?tab=readme-ov-file#options\n        \"\"\"\n        self.params = Params({})\n        self.selections = Selections({})\n        super().__init__(\n            chart=chart,\n            debounce_wait=debounce_wait,\n            max_wait=max_wait,\n            debug=debug,\n            embed_options=embed_options,\n            **kwargs,\n        )\n\n    @traitlets.observe(\"chart\")\n    def _on_change_chart(self, change):  # noqa: C901\n        \"\"\"Updates the JupyterChart's internal state when the wrapped Chart instance changes.\"\"\"\n        new_chart = change.new\n        selection_watches = []\n        selection_types = {}\n        initial_params = {}\n        initial_vl_selections = {}\n        empty_selections = {}\n\n        if new_chart is None:\n            with self.hold_sync():\n                self.spec = None\n                self._selection_types = selection_types\n                self._vl_selections = initial_vl_selections\n                self._params = initial_params\n            return\n\n        params = getattr(new_chart, \"params\", [])\n\n        if params is not alt.Undefined:\n            for param in new_chart.params:\n                if isinstance(param.name, alt.ParameterName):\n                    clean_name = param.name.to_json().strip('\"')\n                else:\n                    clean_name = param.name\n\n                select = getattr(param, \"select\", alt.Undefined)\n\n                if select != alt.Undefined:\n                    if not isinstance(select, dict):\n                        select = select.to_dict()\n\n                    select_type = select[\"type\"]\n                    if select_type == \"point\":\n                        if not (\n                            select.get(\"fields\", None) or select.get(\"encodings\", None)\n                        ):\n                            # Point selection with no associated fields or encodings specified.\n                            # This is an index-based selection\n                            selection_types[clean_name] = \"index\"\n                            empty_selections[clean_name] = IndexSelection(\n                                name=clean_name, value=[], store=[]\n                            )\n                        else:\n                            selection_types[clean_name] = \"point\"\n                            empty_selections[clean_name] = PointSelection(\n                                name=clean_name, value=[], store=[]\n                            )\n                    elif select_type == \"interval\":\n                        selection_types[clean_name] = \"interval\"\n                        empty_selections[clean_name] = IntervalSelection(\n                            name=clean_name, value={}, store=[]\n                        )\n                    else:\n                        msg = f\"Unexpected selection type {select.type}\"\n                        raise ValueError(msg)\n                    selection_watches.append(clean_name)\n                    initial_vl_selections[clean_name] = {\"value\": None, \"store\": []}\n                else:\n                    clean_value = param.value if param.value != alt.Undefined else None\n                    initial_params[clean_name] = clean_value\n\n        # Handle the params generated by transforms\n        for param_name in collect_transform_params(new_chart):\n            initial_params[param_name] = None\n\n        # Setup params\n        self.params = Params(initial_params)\n\n        def on_param_traitlet_changed(param_change):\n            new_params = dict(self._params)\n            new_params[param_change[\"name\"]] = param_change[\"new\"]\n            self._params = new_params\n\n        self.params.observe(on_param_traitlet_changed)\n\n        # Setup selections\n        self.selections = Selections(empty_selections)\n\n        # Update properties all together\n        with self.hold_sync():\n            if using_vegafusion():\n                if self.local_tz is None:\n                    self.spec = None\n\n                    def on_local_tz_change(change):\n                        self._init_with_vegafusion(change[\"new\"])\n\n                    self.observe(on_local_tz_change, [\"local_tz\"])\n                else:\n                    self._init_with_vegafusion(self.local_tz)\n            else:\n                self.spec = new_chart.to_dict()\n            self._selection_types = selection_types\n            self._vl_selections = initial_vl_selections\n            self._params = initial_params\n\n    def _init_with_vegafusion(self, local_tz: str):\n        if self.chart is not None:\n            vegalite_spec = self.chart.to_dict(context={\"pre_transform\": False})\n            with self.hold_sync():\n                self._chart_state = compile_to_vegafusion_chart_state(\n                    vegalite_spec, local_tz\n                )\n                self._js_watch_plan = self._chart_state.get_watch_plan()[\n                    \"client_to_server\"\n                ]\n                self.spec = self._chart_state.get_transformed_spec()\n\n                # Callback to update chart state and send updates back to client\n                def on_js_to_py_updates(change):\n                    if self.debug:\n                        updates_str = json.dumps(change[\"new\"], indent=2)\n                        print(\n                            f\"JavaScript to Python VegaFusion updates:\\n {updates_str}\"\n                        )\n                    updates = self._chart_state.update(change[\"new\"])\n                    if self.debug:\n                        updates_str = json.dumps(updates, indent=2)\n                        print(\n                            f\"Python to JavaScript VegaFusion updates:\\n {updates_str}\"\n                        )\n                    self._py_to_js_updates = updates\n\n                self.observe(on_js_to_py_updates, [\"_js_to_py_updates\"])\n\n    @traitlets.observe(\"_params\")\n    def _on_change_params(self, change):\n        for param_name, value in change.new.items():\n            setattr(self.params, param_name, value)\n\n    @traitlets.observe(\"_vl_selections\")\n    def _on_change_selections(self, change):\n        \"\"\"Updates the JupyterChart's public selections traitlet in response to changes that the JavaScript logic makes to the internal _selections traitlet.\"\"\"\n        for selection_name, selection_dict in change.new.items():\n            value = selection_dict[\"value\"]\n            store = selection_dict[\"store\"]\n            selection_type = self._selection_types[selection_name]\n            if selection_type == \"index\":\n                self.selections._set_value(\n                    selection_name,\n                    IndexSelection.from_vega(selection_name, signal=value, store=store),\n                )\n            elif selection_type == \"point\":\n                self.selections._set_value(\n                    selection_name,\n                    PointSelection.from_vega(selection_name, signal=value, store=store),\n                )\n            elif selection_type == \"interval\":\n                self.selections._set_value(\n                    selection_name,\n                    IntervalSelection.from_vega(\n                        selection_name, signal=value, store=store\n                    ),\n                )\n\n\ndef collect_transform_params(chart: TopLevelSpec) -> set[str]:\n    \"\"\"\n    Collect the names of params that are defined by transforms.\n\n    Parameters\n    ----------\n    chart: Chart from which to extract transform params\n\n    Returns\n    -------\n    set of param names\n    \"\"\"\n    transform_params = set()\n\n    # Handle recursive case\n    for prop in (\"layer\", \"concat\", \"hconcat\", \"vconcat\"):\n        for child in getattr(chart, prop, []):\n            transform_params.update(collect_transform_params(child))\n\n    # Handle chart's own transforms\n    transforms = getattr(chart, \"transform\", [])\n    transforms = transforms if transforms != alt.Undefined else []\n    for tx in transforms:\n        if hasattr(tx, \"param\"):\n            transform_params.add(tx.param)\n\n    return transform_params\n"
  },
  {
    "path": "altair/py.typed",
    "content": ""
  },
  {
    "path": "altair/theme.py",
    "content": "\"\"\"Customizing chart configuration defaults.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any\nfrom typing import overload as _overload\n\nfrom altair.vegalite.v6.schema._config import (\n    AreaConfigKwds,\n    AutoSizeParamsKwds,\n    AxisConfigKwds,\n    AxisResolveMapKwds,\n    BarConfigKwds,\n    BindCheckboxKwds,\n    BindDirectKwds,\n    BindInputKwds,\n    BindRadioSelectKwds,\n    BindRangeKwds,\n    BoxPlotConfigKwds,\n    BrushConfigKwds,\n    CompositionConfigKwds,\n    ConfigKwds,\n    DateTimeKwds,\n    DerivedStreamKwds,\n    ErrorBandConfigKwds,\n    ErrorBarConfigKwds,\n    FeatureGeometryGeoJsonPropertiesKwds,\n    FormatConfigKwds,\n    GeoJsonFeatureCollectionKwds,\n    GeoJsonFeatureKwds,\n    GeometryCollectionKwds,\n    GradientStopKwds,\n    HeaderConfigKwds,\n    IntervalSelectionConfigKwds,\n    IntervalSelectionConfigWithoutTypeKwds,\n    LegendConfigKwds,\n    LegendResolveMapKwds,\n    LegendStreamBindingKwds,\n    LinearGradientKwds,\n    LineConfigKwds,\n    LineStringKwds,\n    LocaleKwds,\n    MarkConfigKwds,\n    MergedStreamKwds,\n    MultiLineStringKwds,\n    MultiPointKwds,\n    MultiPolygonKwds,\n    NumberLocaleKwds,\n    OverlayMarkDefKwds,\n    PaddingKwds,\n    PointKwds,\n    PointSelectionConfigKwds,\n    PointSelectionConfigWithoutTypeKwds,\n    PolygonKwds,\n    ProjectionConfigKwds,\n    ProjectionKwds,\n    RadialGradientKwds,\n    RangeConfigKwds,\n    RectConfigKwds,\n    ResolveKwds,\n    RowColKwds,\n    ScaleConfigKwds,\n    ScaleInvalidDataConfigKwds,\n    ScaleResolveMapKwds,\n    SelectionConfigKwds,\n    StepKwds,\n    StyleConfigIndexKwds,\n    ThemeConfig,\n    TickConfigKwds,\n    TimeIntervalStepKwds,\n    TimeLocaleKwds,\n    TitleConfigKwds,\n    TitleParamsKwds,\n    TooltipContentKwds,\n    TopLevelSelectionParameterKwds,\n    VariableParameterKwds,\n    ViewBackgroundKwds,\n    ViewConfigKwds,\n)\nfrom altair.vegalite.v6.theme import themes as _themes\n\nif TYPE_CHECKING:\n    import sys\n    from collections.abc import Callable\n    from typing import Any, Literal\n\n    if sys.version_info >= (3, 11):\n        from typing import LiteralString\n    else:\n        from typing_extensions import LiteralString\n    from altair.utils.plugin_registry import Plugin\n\n\n__all__ = [\n    \"AreaConfigKwds\",\n    \"AutoSizeParamsKwds\",\n    \"AxisConfigKwds\",\n    \"AxisResolveMapKwds\",\n    \"BarConfigKwds\",\n    \"BindCheckboxKwds\",\n    \"BindDirectKwds\",\n    \"BindInputKwds\",\n    \"BindRadioSelectKwds\",\n    \"BindRangeKwds\",\n    \"BoxPlotConfigKwds\",\n    \"BrushConfigKwds\",\n    \"CompositionConfigKwds\",\n    \"ConfigKwds\",\n    \"DateTimeKwds\",\n    \"DerivedStreamKwds\",\n    \"ErrorBandConfigKwds\",\n    \"ErrorBarConfigKwds\",\n    \"FeatureGeometryGeoJsonPropertiesKwds\",\n    \"FormatConfigKwds\",\n    \"GeoJsonFeatureCollectionKwds\",\n    \"GeoJsonFeatureKwds\",\n    \"GeometryCollectionKwds\",\n    \"GradientStopKwds\",\n    \"HeaderConfigKwds\",\n    \"IntervalSelectionConfigKwds\",\n    \"IntervalSelectionConfigWithoutTypeKwds\",\n    \"LegendConfigKwds\",\n    \"LegendResolveMapKwds\",\n    \"LegendStreamBindingKwds\",\n    \"LineConfigKwds\",\n    \"LineStringKwds\",\n    \"LinearGradientKwds\",\n    \"LocaleKwds\",\n    \"MarkConfigKwds\",\n    \"MergedStreamKwds\",\n    \"MultiLineStringKwds\",\n    \"MultiPointKwds\",\n    \"MultiPolygonKwds\",\n    \"NumberLocaleKwds\",\n    \"OverlayMarkDefKwds\",\n    \"PaddingKwds\",\n    \"PointKwds\",\n    \"PointSelectionConfigKwds\",\n    \"PointSelectionConfigWithoutTypeKwds\",\n    \"PolygonKwds\",\n    \"ProjectionConfigKwds\",\n    \"ProjectionKwds\",\n    \"RadialGradientKwds\",\n    \"RangeConfigKwds\",\n    \"RectConfigKwds\",\n    \"ResolveKwds\",\n    \"RowColKwds\",\n    \"ScaleConfigKwds\",\n    \"ScaleInvalidDataConfigKwds\",\n    \"ScaleResolveMapKwds\",\n    \"SelectionConfigKwds\",\n    \"StepKwds\",\n    \"StyleConfigIndexKwds\",\n    \"ThemeConfig\",\n    \"TickConfigKwds\",\n    \"TimeIntervalStepKwds\",\n    \"TimeLocaleKwds\",\n    \"TitleConfigKwds\",\n    \"TitleParamsKwds\",\n    \"TooltipContentKwds\",\n    \"TopLevelSelectionParameterKwds\",\n    \"VariableParameterKwds\",\n    \"ViewBackgroundKwds\",\n    \"ViewConfigKwds\",\n    \"active\",\n    \"enable\",\n    \"get\",\n    \"names\",\n    \"options\",\n    \"register\",\n    \"unregister\",\n]\n\n\ndef register(\n    name: LiteralString, *, enable: bool\n) -> Callable[[Plugin[ThemeConfig]], Plugin[ThemeConfig]]:\n    \"\"\"\n    Decorator for registering a theme function.\n\n    Parameters\n    ----------\n    name\n        Unique name assigned in registry.\n    enable\n        Auto-enable the wrapped theme.\n\n    Examples\n    --------\n    Register and enable a theme::\n\n        import altair as alt\n        from altair import theme\n\n\n        @theme.register(\"param_font_size\", enable=True)\n        def custom_theme() -> theme.ThemeConfig:\n            sizes = 12, 14, 16, 18, 20\n            return {\n                \"autosize\": {\"contains\": \"content\", \"resize\": True},\n                \"background\": \"#F3F2F1\",\n                \"config\": {\n                    \"axisX\": {\"labelFontSize\": sizes[1], \"titleFontSize\": sizes[1]},\n                    \"axisY\": {\"labelFontSize\": sizes[1], \"titleFontSize\": sizes[1]},\n                    \"font\": \"'Lato', 'Segoe UI', Tahoma, Verdana, sans-serif\",\n                    \"headerColumn\": {\"labelFontSize\": sizes[1]},\n                    \"headerFacet\": {\"labelFontSize\": sizes[1]},\n                    \"headerRow\": {\"labelFontSize\": sizes[1]},\n                    \"legend\": {\"labelFontSize\": sizes[0], \"titleFontSize\": sizes[1]},\n                    \"text\": {\"fontSize\": sizes[0]},\n                    \"title\": {\"fontSize\": sizes[-1]},\n                },\n                \"height\": {\"step\": 28},\n                \"width\": 350,\n            }\n\n    We can then see the ``name`` parameter displayed when checking::\n\n        theme.active\n        \"param_font_size\"\n\n    Until another theme has been enabled, all charts will use defaults set in ``custom_theme()``::\n\n        from altair.datasets import data\n\n        source = data.stocks()\n        lines = (\n            alt.Chart(source, title=alt.Title(\"Stocks\"))\n            .mark_line()\n            .encode(x=\"date:T\", y=\"price:Q\", color=\"symbol:N\")\n        )\n        lines.interactive(bind_y=False)\n\n    \"\"\"\n\n    # HACK: See for `LiteralString` requirement in `name`\n    # https://github.com/vega/altair/pull/3526#discussion_r1743350127\n    def decorate(func: Plugin[ThemeConfig], /) -> Plugin[ThemeConfig]:\n        _register(name, func)\n        if enable:\n            _themes.enable(name)\n        return func\n\n    return decorate\n\n\ndef unregister(name: LiteralString) -> Plugin[ThemeConfig]:\n    \"\"\"\n    Remove and return a previously registered theme.\n\n    Parameters\n    ----------\n    name\n        Unique name assigned during ``alt.theme.register``.\n\n    Raises\n    ------\n    TypeError\n        When ``name`` has not been registered.\n    \"\"\"\n    plugin = _register(name, None)\n    if plugin is None:\n        msg = (\n            f\"Found no theme named {name!r} in registry.\\n\"\n            f\"Registered themes:\\n\"\n            f\"{names()!r}\"\n        )\n        raise TypeError(msg)\n    else:\n        return plugin\n\n\nenable = _themes.enable\nget = _themes.get\nnames = _themes.names\nactive: str\n\"\"\"Return the name of the currently active theme.\"\"\"\noptions: dict[str, Any]\n\"\"\"Return the current themes options dictionary.\"\"\"\n\n\ndef __dir__() -> list[str]:\n    return __all__\n\n\n@_overload\ndef __getattr__(name: Literal[\"active\"]) -> str: ...  # type: ignore[misc]\n@_overload\ndef __getattr__(name: Literal[\"options\"]) -> dict[str, Any]: ...  # type: ignore[misc]\ndef __getattr__(name: str) -> Any:\n    if name == \"active\":\n        return _themes.active\n    elif name == \"options\":\n        return _themes.options\n    else:\n        msg = f\"module {__name__!r} has no attribute {name!r}\"\n        raise AttributeError(msg)\n\n\ndef _register(\n    name: LiteralString, fn: Plugin[ThemeConfig] | None, /\n) -> Plugin[ThemeConfig] | None:\n    if fn is None:\n        return _themes._plugins.pop(name, None)\n    elif _themes.plugin_type(fn):\n        _themes._plugins[name] = fn\n        return fn\n    else:\n        msg = f\"{type(fn).__name__!r} is not a callable theme\\n\\n{fn!r}\"\n        raise TypeError(msg)\n"
  },
  {
    "path": "altair/typing/__init__.py",
    "content": "\"\"\"Public types to ease integrating with `altair`.\"\"\"\n\nfrom __future__ import annotations\n\n__all__ = [\n    \"ChannelAngle\",\n    \"ChannelColor\",\n    \"ChannelColumn\",\n    \"ChannelDescription\",\n    \"ChannelDetail\",\n    \"ChannelFacet\",\n    \"ChannelFill\",\n    \"ChannelFillOpacity\",\n    \"ChannelHref\",\n    \"ChannelKey\",\n    \"ChannelLatitude\",\n    \"ChannelLatitude2\",\n    \"ChannelLongitude\",\n    \"ChannelLongitude2\",\n    \"ChannelOpacity\",\n    \"ChannelOrder\",\n    \"ChannelRadius\",\n    \"ChannelRadius2\",\n    \"ChannelRow\",\n    \"ChannelShape\",\n    \"ChannelSize\",\n    \"ChannelStroke\",\n    \"ChannelStrokeDash\",\n    \"ChannelStrokeOpacity\",\n    \"ChannelStrokeWidth\",\n    \"ChannelText\",\n    \"ChannelTheta\",\n    \"ChannelTheta2\",\n    \"ChannelTooltip\",\n    \"ChannelUrl\",\n    \"ChannelX\",\n    \"ChannelX2\",\n    \"ChannelXError\",\n    \"ChannelXError2\",\n    \"ChannelXOffset\",\n    \"ChannelY\",\n    \"ChannelY2\",\n    \"ChannelYError\",\n    \"ChannelYError2\",\n    \"ChannelYOffset\",\n    \"ChartType\",\n    \"EncodeKwds\",\n    \"Optional\",\n    \"is_chart_type\",\n]\n\nfrom altair.utils.schemapi import Optional\nfrom altair.vegalite.v6.api import ChartType, is_chart_type\nfrom altair.vegalite.v6.schema.channels import (\n    ChannelAngle,\n    ChannelColor,\n    ChannelColumn,\n    ChannelDescription,\n    ChannelDetail,\n    ChannelFacet,\n    ChannelFill,\n    ChannelFillOpacity,\n    ChannelHref,\n    ChannelKey,\n    ChannelLatitude,\n    ChannelLatitude2,\n    ChannelLongitude,\n    ChannelLongitude2,\n    ChannelOpacity,\n    ChannelOrder,\n    ChannelRadius,\n    ChannelRadius2,\n    ChannelRow,\n    ChannelShape,\n    ChannelSize,\n    ChannelStroke,\n    ChannelStrokeDash,\n    ChannelStrokeOpacity,\n    ChannelStrokeWidth,\n    ChannelText,\n    ChannelTheta,\n    ChannelTheta2,\n    ChannelTooltip,\n    ChannelUrl,\n    ChannelX,\n    ChannelX2,\n    ChannelXError,\n    ChannelXError2,\n    ChannelXOffset,\n    ChannelY,\n    ChannelY2,\n    ChannelYError,\n    ChannelYError2,\n    ChannelYOffset,\n    EncodeKwds,\n)\n"
  },
  {
    "path": "altair/utils/__init__.py",
    "content": "from .core import (\n    SHORTHAND_KEYS,\n    display_traceback,\n    infer_encoding_types,\n    infer_vegalite_type_for_pandas,\n    parse_shorthand,\n    sanitize_narwhals_dataframe,\n    sanitize_pandas_dataframe,\n    update_nested,\n    use_signature,\n    use_signature_func,\n)\nfrom .deprecation import AltairDeprecationWarning, deprecated, deprecated_warn\nfrom .html import spec_to_html\nfrom .plugin_registry import PluginRegistry\nfrom .schemapi import (\n    VERSIONS,\n    Optional,\n    SchemaBase,\n    SchemaLike,\n    Undefined,\n    is_undefined,\n)\n\n__all__ = (\n    \"SHORTHAND_KEYS\",\n    \"VERSIONS\",\n    \"AltairDeprecationWarning\",\n    \"Optional\",\n    \"PluginRegistry\",\n    \"SchemaBase\",\n    \"SchemaLike\",\n    \"Undefined\",\n    \"deprecated\",\n    \"deprecated_warn\",\n    \"display_traceback\",\n    \"infer_encoding_types\",\n    \"infer_vegalite_type_for_pandas\",\n    \"is_undefined\",\n    \"parse_shorthand\",\n    \"sanitize_narwhals_dataframe\",\n    \"sanitize_pandas_dataframe\",\n    \"spec_to_html\",\n    \"update_nested\",\n    \"use_signature\",\n    \"use_signature_func\",\n)\n"
  },
  {
    "path": "altair/utils/_dfi_types.py",
    "content": "# DataFrame Interchange Protocol Types\n# Copied from https://data-apis.org/dataframe-protocol/latest/API.html,\n# changed ABCs to Protocols, and subset the type hints to only those that are\n# relevant for Altair.\n#\n# These classes are only for use in type signatures\nfrom __future__ import annotations\n\nimport enum\nfrom typing import TYPE_CHECKING, Any, Protocol\n\nif TYPE_CHECKING:\n    from collections.abc import Iterable\n\n\nclass DtypeKind(enum.IntEnum):\n    \"\"\"\n    Integer enum for data types.\n\n    Attributes\n    ----------\n    INT : int\n        Matches to signed integer data type.\n    UINT : int\n        Matches to unsigned integer data type.\n    FLOAT : int\n        Matches to floating point data type.\n    BOOL : int\n        Matches to boolean data type.\n    STRING : int\n        Matches to string data type (UTF-8 encoded).\n    DATETIME : int\n        Matches to datetime data type.\n    CATEGORICAL : int\n        Matches to categorical data type.\n    \"\"\"\n\n    INT = 0\n    UINT = 1\n    FLOAT = 2\n    BOOL = 20\n    STRING = 21  # UTF-8\n    DATETIME = 22\n    CATEGORICAL = 23\n\n\n# Type hint of first element would actually be DtypeKind but can't use that\n# as other libraries won't use an instance of our own Enum in this module but have\n# their own. Type checkers will raise an error on that even though the enums\n# are identical.\nclass Column(Protocol):\n    @property\n    def dtype(self) -> tuple[Any, int, str, str]:\n        \"\"\"\n        Dtype description as a tuple ``(kind, bit-width, format string, endianness)``.\n\n        Bit-width : the number of bits as an integer\n        Format string : data type description format string in Apache Arrow C\n                        Data Interface format.\n        Endianness : current only native endianness (``=``) is supported\n\n        Notes\n        -----\n            - Kind specifiers are aligned with DLPack where possible (hence the\n              jump to 20, leave enough room for future extension)\n            - Masks must be specified as boolean with either bit width 1 (for bit\n              masks) or 8 (for byte masks).\n            - Dtype width in bits was preferred over bytes\n            - Endianness isn't too useful, but included now in case in the future\n              we need to support non-native endianness\n            - Went with Apache Arrow format strings over NumPy format strings\n              because they're more complete from a dataframe perspective\n            - Format strings are mostly useful for datetime specification, and\n              for categoricals.\n            - For categoricals, the format string describes the type of the\n              categorical in the data buffer. In case of a separate encoding of\n              the categorical (e.g. an integer to string mapping), this can\n              be derived from ``self.describe_categorical``.\n            - Data types not included: complex, Arrow-style null, binary, decimal,\n              and nested (list, struct, map, union) dtypes.\n        \"\"\"\n        ...\n\n    # Have to use a generic Any return type as not all libraries who implement\n    # the dataframe interchange protocol implement the TypedDict that is usually\n    # returned here in the same way. As TypedDicts are invariant, even a slight change\n    # will lead to an error by a type checker. See PR in which this code was added\n    # for details.\n    @property\n    def describe_categorical(self) -> Any:\n        \"\"\"\n        If the dtype is categorical, there are two options.\n\n        - There are only values in the data buffer.\n        - There is a separate non-categorical Column encoding categorical values.\n\n        Raises TypeError if the dtype is not categorical\n\n        Returns the dictionary with description on how to interpret the data buffer:\n            - \"is_ordered\" : bool, whether the ordering of dictionary indices is\n                             semantically meaningful.\n            - \"is_dictionary\" : bool, whether a mapping of\n                                categorical values to other objects exists\n            - \"categories\" : Column representing the (implicit) mapping of indices to\n                             category values (e.g. an array of cat1, cat2, ...).\n                             None if not a dictionary-style categorical.\n\n        TBD: are there any other in-memory representations that are needed?\n        \"\"\"\n        ...\n\n\nclass DataFrame(Protocol):\n    \"\"\"\n    A data frame class, with only the methods required by the interchange protocol defined.\n\n    A \"data frame\" represents an ordered collection of named columns.\n    A column's \"name\" must be a unique string.\n    Columns may be accessed by name or by position.\n\n    This could be a public data frame class, or an object with the methods and\n    attributes defined on this DataFrame class could be returned from the\n    ``__dataframe__`` method of a public data frame class in a library adhering\n    to the dataframe interchange protocol specification.\n    \"\"\"\n\n    def __dataframe__(\n        self, nan_as_null: bool = False, allow_copy: bool = True\n    ) -> DataFrame:\n        \"\"\"\n        Construct a new exchange object, potentially changing the parameters.\n\n        ``nan_as_null`` is a keyword intended for the consumer to tell the\n        producer to overwrite null values in the data with ``NaN``.\n        It is intended for cases where the consumer does not support the bit\n        mask or byte mask that is the producer's native representation.\n        ``allow_copy`` is a keyword that defines whether or not the library is\n        allowed to make a copy of the data. For example, copying data would be\n        necessary if a library supports strided buffers, given that this protocol\n        specifies contiguous buffers.\n        \"\"\"\n        ...\n\n    def column_names(self) -> Iterable[str]:\n        \"\"\"Return an iterator yielding the column names.\"\"\"\n        ...\n\n    def get_column_by_name(self, name: str) -> Column:\n        \"\"\"Return the column whose name is the indicated name.\"\"\"\n        ...\n\n    def get_chunks(self, n_chunks: int | None = None) -> Iterable[DataFrame]:\n        \"\"\"\n        Return an iterator yielding the chunks.\n\n        By default (None), yields the chunks that the data is stored as by the\n        producer. If given, ``n_chunks`` must be a multiple of\n        ``self.num_chunks()``, meaning the producer must subdivide each chunk\n        before yielding it.\n\n        Note that the producer must ensure that all columns are chunked the\n        same way.\n        \"\"\"\n        ...\n"
  },
  {
    "path": "altair/utils/_importers.py",
    "content": "from __future__ import annotations\n\nfrom importlib.metadata import version as importlib_version\nfrom typing import TYPE_CHECKING\n\nfrom packaging.version import Version\n\nfrom altair.utils.schemapi import VERSIONS\n\nif TYPE_CHECKING:\n    from types import ModuleType\n\n\ndef import_vegafusion() -> ModuleType:\n    min_version = VERSIONS[\"vegafusion\"]\n    try:\n        version = importlib_version(\"vegafusion\")\n        if Version(version) < Version(min_version):\n            msg = (\n                f\"The vegafusion package must be version {min_version} or greater. \"\n                f\"Found version {version}\"\n            )\n            raise RuntimeError(msg)\n        import vegafusion as vf\n\n        return vf\n    except ImportError as err:\n        msg = (\n            'The \"vegafusion\" data transformer and chart.transformed_data feature requires\\n'\n            f\"version {min_version} or greater of the 'vegafusion' package.\\n\"\n            \"This can be installed with pip using:\\n\"\n            f'    pip install \"vegafusion>={min_version}\"\\n'\n            \"or conda:\\n\"\n            f'    conda install -c conda-forge \"vegafusion>={min_version}\"\\n\\n'\n            f\"ImportError: {err.args[0]}\"\n        )\n        raise ImportError(msg) from err\n\n\ndef import_vl_convert() -> ModuleType:\n    min_version = VERSIONS[\"vl-convert-python\"]\n    try:\n        version = importlib_version(\"vl-convert-python\")\n        if Version(version) < Version(min_version):\n            msg = (\n                f\"The vl-convert-python package must be version {min_version} or greater. \"\n                f\"Found version {version}\"\n            )\n            raise RuntimeError(msg)\n        import vl_convert as vlc\n\n        return vlc\n    except ImportError as err:\n        msg = (\n            f\"The vl-convert Vega-Lite compiler and file export feature requires\\n\"\n            f\"version {min_version} or greater of the 'vl-convert-python' package. \\n\"\n            f\"This can be installed with pip using:\\n\"\n            f'   pip install \"vl-convert-python>={min_version}\"\\n'\n            \"or conda:\\n\"\n            f'   conda install -c conda-forge \"vl-convert-python>={min_version}\"\\n\\n'\n            f\"ImportError: {err.args[0]}\"\n        )\n        raise ImportError(msg) from err\n\n\ndef vl_version_for_vl_convert() -> str:\n    from altair.vegalite import SCHEMA_VERSION\n\n    # Compute VlConvert's vl_version string (of the form 'v5_2')\n    # from SCHEMA_VERSION (of the form 'v5.2.0')\n    return \"_\".join(SCHEMA_VERSION.split(\".\")[:2])\n\n\ndef import_pyarrow_interchange() -> ModuleType:\n    min_version = \"11.0.0\"\n    try:\n        version = importlib_version(\"pyarrow\")\n\n        if Version(version) < Version(min_version):\n            msg = (\n                f\"The pyarrow package must be version {min_version} or greater. \"\n                f\"Found version {version}\"\n            )\n            raise RuntimeError(msg)\n        import pyarrow.interchange as pi\n\n        return pi\n    except ImportError as err:\n        msg = (\n            f\"Usage of the DataFrame Interchange Protocol requires\\n\"\n            f\"version {min_version} or greater of the pyarrow package. \\n\"\n            f\"This can be installed with pip using:\\n\"\n            f'   pip install \"pyarrow>={min_version}\"\\n'\n            \"or conda:\\n\"\n            f'   conda install -c conda-forge \"pyarrow>={min_version}\"\\n\\n'\n            f\"ImportError: {err.args[0]}\"\n        )\n        raise ImportError(msg) from err\n\n\ndef pyarrow_available() -> bool:\n    try:\n        import_pyarrow_interchange()\n        return True\n    except (ImportError, RuntimeError):\n        return False\n"
  },
  {
    "path": "altair/utils/_show.py",
    "content": "from __future__ import annotations\n\nimport webbrowser\nfrom http.server import BaseHTTPRequestHandler, HTTPServer\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from collections.abc import Iterable\n\n\ndef open_html_in_browser(\n    html: str | bytes,\n    using: str | Iterable[str] | None = None,\n    port: int | None = None,\n) -> None:\n    \"\"\"\n    Display an html document in a web browser without creating a temp file.\n\n    Instantiates a simple http server and uses the webbrowser module to\n    open the server's URL\n\n    Parameters\n    ----------\n    html: str\n        HTML string to display\n    using: str or iterable of str\n        Name of the web browser to open (e.g. \"chrome\", \"firefox\", etc.).\n        If an iterable, choose the first browser available on the system.\n        If none, choose the system default browser.\n    port: int\n        Port to use. Defaults to a random port\n    \"\"\"\n    # Encode html to bytes\n    html_bytes = html.encode(\"utf8\") if isinstance(html, str) else html\n\n    browser = None\n\n    if using is None:\n        browser = webbrowser.get(None)\n    else:\n        # normalize using to an iterable\n        if isinstance(using, str):\n            using = [using]\n\n        for browser_key in using:\n            try:\n                browser = webbrowser.get(browser_key)\n                if browser is not None:\n                    break\n            except webbrowser.Error:\n                pass\n\n        if browser is None:\n            raise ValueError(\"Failed to locate a browser with name in \" + str(using))\n\n    class OneShotRequestHandler(BaseHTTPRequestHandler):\n        def do_GET(self) -> None:\n            self.send_response(200)\n            self.send_header(\"Content-type\", \"text/html\")\n            self.end_headers()\n\n            bufferSize = 1024 * 1024\n            for i in range(0, len(html_bytes), bufferSize):\n                self.wfile.write(html_bytes[i : i + bufferSize])\n\n        def log_message(self, format, *args):\n            # Silence stderr logging\n            pass\n\n    # Use specified port if provided, otherwise choose a random port (port value of 0)\n    server = HTTPServer(\n        (\"127.0.0.1\", port if port is not None else 0), OneShotRequestHandler\n    )\n    browser.open(f\"http://127.0.0.1:{server.server_port}\")\n    server.handle_request()\n"
  },
  {
    "path": "altair/utils/_transformed_data.py",
    "content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any, overload\n\nfrom altair import (\n    Chart,\n    ConcatChart,\n    ConcatSpecGenericSpec,\n    FacetChart,\n    FacetedUnitSpec,\n    FacetSpec,\n    HConcatChart,\n    HConcatSpecGenericSpec,\n    LayerChart,\n    LayerSpec,\n    NonNormalizedSpec,\n    TopLevelConcatSpec,\n    TopLevelFacetSpec,\n    TopLevelHConcatSpec,\n    TopLevelLayerSpec,\n    TopLevelUnitSpec,\n    TopLevelVConcatSpec,\n    UnitSpec,\n    UnitSpecWithFrame,\n    VConcatChart,\n    VConcatSpecGenericSpec,\n    data_transformers,\n)\nfrom altair.utils._vegafusion_data import get_inline_tables, import_vegafusion\nfrom altair.utils.schemapi import Undefined\n\nif TYPE_CHECKING:\n    from collections.abc import Iterable\n    from typing import TypeAlias\n\n    from altair.typing import ChartType\n    from altair.utils.core import DataFrameLike\n\nScope: TypeAlias = tuple[int, ...]\nFacetMapping: TypeAlias = dict[tuple[str, Scope], tuple[str, Scope]]\n\n\n# For the transformed_data functionality, the chart classes in the values\n# can be considered equivalent to the chart class in the key.\n_chart_class_mapping = {\n    Chart: (\n        Chart,\n        TopLevelUnitSpec,\n        FacetedUnitSpec,\n        UnitSpec,\n        UnitSpecWithFrame,\n        NonNormalizedSpec,\n    ),\n    LayerChart: (LayerChart, TopLevelLayerSpec, LayerSpec),\n    ConcatChart: (ConcatChart, TopLevelConcatSpec, ConcatSpecGenericSpec),\n    HConcatChart: (HConcatChart, TopLevelHConcatSpec, HConcatSpecGenericSpec),\n    VConcatChart: (VConcatChart, TopLevelVConcatSpec, VConcatSpecGenericSpec),\n    FacetChart: (FacetChart, TopLevelFacetSpec, FacetSpec),\n}\n\n\n@overload\ndef transformed_data(\n    chart: Chart | FacetChart,\n    row_limit: int | None = None,\n    exclude: Iterable[str] | None = None,\n) -> DataFrameLike | None: ...\n\n\n@overload\ndef transformed_data(\n    chart: LayerChart | HConcatChart | VConcatChart | ConcatChart,\n    row_limit: int | None = None,\n    exclude: Iterable[str] | None = None,\n) -> list[DataFrameLike]: ...\n\n\ndef transformed_data(chart, row_limit=None, exclude=None):\n    \"\"\"\n    Evaluate a Chart's transforms.\n\n    Evaluate the data transforms associated with a Chart and return the\n    transformed data as one or more DataFrames\n\n    Parameters\n    ----------\n    chart : Chart, FacetChart, LayerChart, HConcatChart, VConcatChart, or ConcatChart\n        Altair chart to evaluate transforms on\n    row_limit : int (optional)\n        Maximum number of rows to return for each DataFrame. None (default) for unlimited\n    exclude : iterable of str\n        Set of the names of charts to exclude\n\n    Returns\n    -------\n    DataFrame or list of DataFrames or None\n        If input chart is a Chart or Facet Chart, returns a DataFrame of the\n        transformed data. Otherwise, returns a list of DataFrames of the\n        transformed data\n    \"\"\"\n    vf = import_vegafusion()\n    # Add mark if none is specified to satisfy Vega-Lite\n    if isinstance(chart, Chart) and chart.mark == Undefined:\n        chart = chart.mark_point()\n\n    # Deep copy chart so that we can rename marks without affecting caller\n    chart = chart.copy(deep=True)\n\n    # Ensure that all views are named so that we can look them up in the\n    # resulting Vega specification\n    chart_names = name_views(chart, 0, exclude=exclude)\n\n    # Compile to Vega and extract inline DataFrames\n    with data_transformers.enable(\"vegafusion\"):\n        vega_spec = chart.to_dict(format=\"vega\", context={\"pre_transform\": False})\n        inline_datasets = get_inline_tables(vega_spec)\n\n    # Build mapping from mark names to vega datasets\n    facet_mapping = get_facet_mapping(vega_spec)\n    dataset_mapping = get_datasets_for_view_names(vega_spec, chart_names, facet_mapping)\n\n    # Build a list of vega dataset names that corresponds to the order\n    # of the chart components\n    dataset_names = []\n    for chart_name in chart_names:\n        if chart_name in dataset_mapping:\n            dataset_names.append(dataset_mapping[chart_name])\n        else:\n            msg = \"Failed to locate all datasets\"\n            raise ValueError(msg)\n\n    # Extract transformed datasets with VegaFusion\n    datasets, _ = vf.runtime.pre_transform_datasets(\n        vega_spec,\n        dataset_names,\n        row_limit=row_limit,\n        inline_datasets=inline_datasets,\n    )\n\n    if isinstance(chart, (Chart, FacetChart)):\n        # Return DataFrame (or None if it was excluded) if input was a simple Chart\n        if not datasets:\n            return None\n        else:\n            return datasets[0]\n    else:\n        # Otherwise return the list of DataFrames\n        return datasets\n\n\n# The equivalent classes from _chart_class_mapping should also be added\n# to the type hints below for `chart` as the function would also work for them.\n# However, this was not possible so far as mypy then complains about\n# \"Overloaded function signatures 1 and 2 overlap with incompatible return types [misc]\"\n# This might be due to the complex type hierarchy of the chart classes.\n# See also https://github.com/python/mypy/issues/5119\n# and https://github.com/python/mypy/issues/4020 which show that mypy might not have\n# a very consistent behavior for overloaded functions.\n# The same error appeared when trying it with Protocols for the concat and layer charts.\n# This function is only used internally and so we accept this inconsistency for now.\ndef _assign_chart_name(chart: ChartType) -> None:\n    \"\"\"Assign a name to a chart if it doesn't have one.\"\"\"\n    if chart.name in {None, Undefined}:\n        # Use hash-based naming for Altair Chart objects\n        if hasattr(chart, \"_get_view_hash_name\"):\n            chart.name = chart._get_view_hash_name()\n        else:\n            # For Vega-Lite schema objects (UnitSpec, FacetedUnitSpec, etc.),\n            # use simple naming since these are already unique by design\n            chart_type = chart.__class__.__name__.lower()\n            # Clean up the type name for readability\n            chart_type = (\n                chart_type.replace(\"spec\", \"\")\n                .replace(\"generic\", \"\")\n                .replace(\"concat\", \"\")\n            )\n            chart_type = chart_type.removesuffix(\"_\")\n            # Use object ID for uniqueness - these objects are already unique\n            chart.name = f\"view_{chart_type}_{id(chart):x}\"\n\n\ndef _get_subcharts(chart: ChartType) -> list[Any]:\n    \"\"\"Get the subcharts for a composite chart.\"\"\"\n    if isinstance(chart, _chart_class_mapping[LayerChart]):\n        return chart.layer\n    elif isinstance(chart, _chart_class_mapping[HConcatChart]):\n        return chart.hconcat\n    elif isinstance(chart, _chart_class_mapping[VConcatChart]):\n        return chart.vconcat\n    elif isinstance(chart, _chart_class_mapping[ConcatChart]):\n        return chart.concat\n    else:\n        msg = (\n            \"transformed_data accepts an instance of \"\n            \"Chart, FacetChart, LayerChart, HConcatChart, VConcatChart, or ConcatChart\\n\"\n            f\"Received value of type: {type(chart)}\"\n        )\n        raise ValueError(msg)\n\n\ndef name_views(\n    chart: ChartType, i: int = 0, exclude: Iterable[str] | None = None\n) -> list[str]:\n    \"\"\"\n    Name unnamed chart views.\n\n    Name unnamed charts views so that we can look them up later in\n    the compiled Vega spec.\n\n    Note: This function mutates the input chart by applying names to\n    unnamed views.\n\n    Parameters\n    ----------\n    chart : Chart, FacetChart, LayerChart, HConcatChart, VConcatChart, or ConcatChart\n        Altair chart to apply names to\n    i : int (default 0)\n        Starting chart index\n    exclude : iterable of str\n        Names of charts to exclude\n\n    Returns\n    -------\n    list of str\n        List of the names of the charts and subcharts\n    \"\"\"\n    exclude = set(exclude) if exclude is not None else set()\n\n    # Handle simple charts (Chart and FacetChart)\n    if isinstance(\n        chart, (_chart_class_mapping[Chart], _chart_class_mapping[FacetChart])\n    ):\n        if chart.name not in exclude:\n            _assign_chart_name(chart)\n            return [chart.name]\n        return []\n\n    # Handle composite charts\n    subcharts = _get_subcharts(chart)\n    chart_names: list[str] = []\n    for subchart in subcharts:\n        for name in name_views(subchart, i=i + len(chart_names), exclude=exclude):\n            chart_names.append(name)\n    return chart_names\n\n\ndef get_group_mark_for_scope(\n    vega_spec: dict[str, Any], scope: Scope\n) -> dict[str, Any] | None:\n    \"\"\"\n    Get the group mark at a particular scope.\n\n    Parameters\n    ----------\n    vega_spec : dict\n        Top-level Vega specification dictionary\n    scope : tuple of int\n        Scope tuple. If empty, the original Vega specification is returned.\n        Otherwise, the nested group mark at the scope specified is returned.\n\n    Returns\n    -------\n    dict or None\n        Top-level Vega spec (if scope is empty)\n        or group mark (if scope is non-empty)\n        or None (if group mark at scope does not exist)\n\n    Examples\n    --------\n    >>> spec = {\n    ...     \"marks\": [\n    ...         {\"type\": \"group\", \"marks\": [{\"type\": \"symbol\"}]},\n    ...         {\"type\": \"group\", \"marks\": [{\"type\": \"rect\"}]},\n    ...     ]\n    ... }\n    >>> get_group_mark_for_scope(spec, (1,))\n    {'type': 'group', 'marks': [{'type': 'rect'}]}\n    \"\"\"\n    group = vega_spec\n\n    # Find group at scope\n    for scope_value in scope:\n        group_index = 0\n        child_group = None\n        for mark in group.get(\"marks\", []):\n            if mark.get(\"type\") == \"group\":\n                if group_index == scope_value:\n                    child_group = mark\n                    break\n                group_index += 1\n        if child_group is None:\n            return None\n        group = child_group\n\n    return group\n\n\ndef get_datasets_for_scope(vega_spec: dict[str, Any], scope: Scope) -> list[str]:\n    \"\"\"\n    Get the names of the datasets that are defined at a given scope.\n\n    Parameters\n    ----------\n    vega_spec : dict\n        Top-level Vega specification\n    scope : tuple of int\n        Scope tuple. If empty, the names of top-level datasets are returned\n        Otherwise, the names of the datasets defined in the nested group mark\n        at the specified scope are returned.\n\n    Returns\n    -------\n    list of str\n        List of the names of the datasets defined at the specified scope\n\n    Examples\n    --------\n    >>> spec = {\n    ...     \"data\": [{\"name\": \"data1\"}],\n    ...     \"marks\": [\n    ...         {\n    ...             \"type\": \"group\",\n    ...             \"data\": [{\"name\": \"data2\"}],\n    ...             \"marks\": [{\"type\": \"symbol\"}],\n    ...         },\n    ...         {\n    ...             \"type\": \"group\",\n    ...             \"data\": [\n    ...                 {\"name\": \"data3\"},\n    ...                 {\"name\": \"data4\"},\n    ...             ],\n    ...             \"marks\": [{\"type\": \"rect\"}],\n    ...         },\n    ...     ],\n    ... }\n\n    >>> get_datasets_for_scope(spec, ())\n    ['data1']\n\n    >>> get_datasets_for_scope(spec, (0,))\n    ['data2']\n\n    >>> get_datasets_for_scope(spec, (1,))\n    ['data3', 'data4']\n\n    Returns empty when no group mark exists at scope\n    >>> get_datasets_for_scope(spec, (1, 3))\n    []\n    \"\"\"\n    group = get_group_mark_for_scope(vega_spec, scope) or {}\n\n    # get datasets from group\n    datasets = []\n    for dataset in group.get(\"data\", []):\n        datasets.append(dataset[\"name\"])\n\n    # Add facet dataset\n    facet_dataset = group.get(\"from\", {}).get(\"facet\", {}).get(\"name\", None)\n    if facet_dataset:\n        datasets.append(facet_dataset)\n    return datasets\n\n\ndef get_definition_scope_for_data_reference(\n    vega_spec: dict[str, Any], data_name: str, usage_scope: Scope\n) -> Scope | None:\n    \"\"\"\n    Return the scope that a dataset is defined at, for a given usage scope.\n\n    Parameters\n    ----------\n    vega_spec: dict\n        Top-level Vega specification\n    data_name: str\n        The name of a dataset reference\n    usage_scope: tuple of int\n        The scope that the dataset is referenced in\n\n    Returns\n    -------\n    tuple of int\n        The scope where the referenced dataset is defined,\n        or None if no such dataset is found\n\n    Examples\n    --------\n    >>> spec = {\n    ...     \"data\": [{\"name\": \"data1\"}],\n    ...     \"marks\": [\n    ...         {\n    ...             \"type\": \"group\",\n    ...             \"data\": [{\"name\": \"data2\"}],\n    ...             \"marks\": [\n    ...                 {\n    ...                     \"type\": \"symbol\",\n    ...                     \"encode\": {\n    ...                         \"update\": {\n    ...                             \"x\": {\"field\": \"x\", \"data\": \"data1\"},\n    ...                             \"y\": {\"field\": \"y\", \"data\": \"data2\"},\n    ...                         }\n    ...                     },\n    ...                 }\n    ...             ],\n    ...         }\n    ...     ],\n    ... }\n\n    data1 is referenced at scope [0] and defined at scope []\n    >>> get_definition_scope_for_data_reference(spec, \"data1\", (0,))\n    ()\n\n    data2 is referenced at scope [0] and defined at scope [0]\n    >>> get_definition_scope_for_data_reference(spec, \"data2\", (0,))\n    (0,)\n\n    If data2 is not visible at scope [] (the top level),\n    because it's defined in scope [0]\n    >>> repr(get_definition_scope_for_data_reference(spec, \"data2\", ()))\n    'None'\n    \"\"\"\n    for i in reversed(range(len(usage_scope) + 1)):\n        scope = usage_scope[:i]\n        datasets = get_datasets_for_scope(vega_spec, scope)\n        if data_name in datasets:\n            return scope\n    return None\n\n\ndef get_facet_mapping(group: dict[str, Any], scope: Scope = ()) -> FacetMapping:\n    \"\"\"\n    Create mapping from facet definitions to source datasets.\n\n    Parameters\n    ----------\n    group : dict\n        Top-level Vega spec or nested group mark\n    scope : tuple of int\n        Scope of the group dictionary within a top-level Vega spec\n\n    Returns\n    -------\n    dict\n        Dictionary from (facet_name, facet_scope) to (dataset_name, dataset_scope)\n\n    Examples\n    --------\n    >>> spec = {\n    ...     \"data\": [{\"name\": \"data1\"}],\n    ...     \"marks\": [\n    ...         {\n    ...             \"type\": \"group\",\n    ...             \"from\": {\n    ...                 \"facet\": {\n    ...                     \"name\": \"facet1\",\n    ...                     \"data\": \"data1\",\n    ...                     \"groupby\": [\"colA\"],\n    ...                 }\n    ...             },\n    ...         }\n    ...     ],\n    ... }\n    >>> get_facet_mapping(spec)\n    {('facet1', (0,)): ('data1', ())}\n    \"\"\"\n    facet_mapping = {}\n    group_index = 0\n    mark_group = get_group_mark_for_scope(group, scope) or {}\n    for mark in mark_group.get(\"marks\", []):\n        if mark.get(\"type\", None) == \"group\":\n            # Get facet for this group\n            group_scope = (*scope, group_index)\n            facet = mark.get(\"from\", {}).get(\"facet\", None)\n            if facet is not None:\n                facet_name = facet.get(\"name\", None)\n                facet_data = facet.get(\"data\", None)\n                if facet_name is not None and facet_data is not None:\n                    definition_scope = get_definition_scope_for_data_reference(\n                        group, facet_data, scope\n                    )\n                    if definition_scope is not None:\n                        facet_mapping[facet_name, group_scope] = (\n                            facet_data,\n                            definition_scope,\n                        )\n\n            # Handle children recursively\n            child_mapping = get_facet_mapping(group, scope=group_scope)\n            facet_mapping.update(child_mapping)\n            group_index += 1\n\n    return facet_mapping\n\n\ndef get_from_facet_mapping(\n    scoped_dataset: tuple[str, Scope], facet_mapping: FacetMapping\n) -> tuple[str, Scope]:\n    \"\"\"\n    Apply facet mapping to a scoped dataset.\n\n    Parameters\n    ----------\n    scoped_dataset : (str, tuple of int)\n        A dataset name and scope tuple\n    facet_mapping : dict from (str, tuple of int) to (str, tuple of int)\n        The facet mapping produced by get_facet_mapping\n\n    Returns\n    -------\n    (str, tuple of int)\n        Dataset name and scope tuple that has been mapped as many times as possible\n\n    Examples\n    --------\n    Facet mapping as produced by get_facet_mapping\n    >>> facet_mapping = {\n    ...     (\"facet1\", (0,)): (\"data1\", ()),\n    ...     (\"facet2\", (0, 1)): (\"facet1\", (0,)),\n    ... }\n    >>> get_from_facet_mapping((\"facet2\", (0, 1)), facet_mapping)\n    ('data1', ())\n    \"\"\"\n    while scoped_dataset in facet_mapping:\n        scoped_dataset = facet_mapping[scoped_dataset]\n    return scoped_dataset\n\n\ndef get_datasets_for_view_names(\n    group: dict[str, Any],\n    vl_chart_names: list[str],\n    facet_mapping: FacetMapping,\n    scope: Scope = (),\n) -> dict[str, tuple[str, Scope]]:\n    \"\"\"\n    Get the Vega datasets that correspond to the provided Altair view names.\n\n    Parameters\n    ----------\n    group : dict\n        Top-level Vega spec or nested group mark\n    vl_chart_names : list of str\n        List of the Vega-Lite\n    facet_mapping : dict from (str, tuple of int) to (str, tuple of int)\n        The facet mapping produced by get_facet_mapping\n    scope : tuple of int\n        Scope of the group dictionary within a top-level Vega spec\n\n    Returns\n    -------\n    dict from str to (str, tuple of int)\n        Dict from Altair view names to scoped datasets\n    \"\"\"\n    datasets = {}\n    group_index = 0\n    mark_group = get_group_mark_for_scope(group, scope) or {}\n    for mark in mark_group.get(\"marks\", []):\n        for vl_chart_name in vl_chart_names:\n            if mark.get(\"name\", \"\") == f\"{vl_chart_name}_cell\":\n                data_name = mark.get(\"from\", {}).get(\"facet\", None).get(\"data\", None)\n                scoped_data_name = (data_name, scope)\n                datasets[vl_chart_name] = get_from_facet_mapping(\n                    scoped_data_name, facet_mapping\n                )\n                break\n\n        name = mark.get(\"name\", \"\")\n        if mark.get(\"type\", \"\") == \"group\":\n            group_data_names = get_datasets_for_view_names(\n                group, vl_chart_names, facet_mapping, scope=(*scope, group_index)\n            )\n            for k, v in group_data_names.items():\n                datasets.setdefault(k, v)\n            group_index += 1\n        else:\n            for vl_chart_name in vl_chart_names:\n                if name.startswith(vl_chart_name) and name.endswith(\"_marks\"):\n                    data_name = mark.get(\"from\", {}).get(\"data\", None)\n                    scoped_data = get_definition_scope_for_data_reference(\n                        group, data_name, scope\n                    )\n                    if scoped_data is not None:\n                        datasets[vl_chart_name] = get_from_facet_mapping(\n                            (data_name, scoped_data), facet_mapping\n                        )\n                        break\n\n    return datasets\n"
  },
  {
    "path": "altair/utils/_vegafusion_data.py",
    "content": "from __future__ import annotations\n\nimport uuid\nfrom importlib.metadata import version as importlib_version\nfrom typing import TYPE_CHECKING, Any, Final, TypedDict, overload\nfrom weakref import WeakValueDictionary\n\nfrom narwhals.stable.v1.dependencies import is_into_dataframe\nfrom packaging.version import Version\n\nfrom altair.utils._importers import import_vegafusion\nfrom altair.utils.core import DataFrameLike\nfrom altair.utils.data import (\n    DataType,\n    MaxRowsError,\n    SupportsGeoInterface,\n    ToValuesReturnType,\n)\nfrom altair.vegalite.data import default_data_transformer\n\nif TYPE_CHECKING:\n    import sys\n    from collections.abc import Callable, MutableMapping\n\n    from narwhals.stable.v1.typing import IntoDataFrame\n\n    from vegafusion.runtime import ChartState\n\n    if sys.version_info >= (3, 13):\n        from typing import TypeIs\n    else:\n        from typing_extensions import TypeIs\n\n# Temporary storage for dataframes that have been extracted\n# from charts by the vegafusion data transformer. Use a WeakValueDictionary\n# rather than a dict so that the Python interpreter is free to garbage\n# collect the stored DataFrames.\nextracted_inline_tables: MutableMapping[str, DataFrameLike] = WeakValueDictionary()\n\n# Special URL prefix that VegaFusion uses to denote that a\n# dataset in a Vega spec corresponds to an entry in the `inline_datasets`\n# kwarg of vf.runtime.pre_transform_spec().\nVEGAFUSION_PREFIX: Final = \"vegafusion+dataset://\"\n\n\ntry:\n    VEGAFUSION_VERSION: Version | None = Version(importlib_version(\"vegafusion\"))\nexcept ImportError:\n    VEGAFUSION_VERSION = None\n\n\nif VEGAFUSION_VERSION and Version(\"2.0.0a0\") <= VEGAFUSION_VERSION:\n\n    def is_supported_by_vf(data: Any) -> TypeIs[DataFrameLike]:\n        # Test whether VegaFusion supports the data type\n        # VegaFusion v2 support narwhals-compatible DataFrames\n        return isinstance(data, DataFrameLike) or is_into_dataframe(data)\n\nelse:\n\n    def is_supported_by_vf(data: Any) -> TypeIs[DataFrameLike]:\n        return isinstance(data, DataFrameLike)\n\n\nclass _ToVegaFusionReturnUrlDict(TypedDict):\n    url: str\n\n\n_VegaFusionReturnType = _ToVegaFusionReturnUrlDict | ToValuesReturnType\n\n\n@overload\ndef vegafusion_data_transformer(\n    data: None = ..., max_rows: int = ...\n) -> Callable[..., Any]: ...\n\n\n@overload\ndef vegafusion_data_transformer(\n    data: DataFrameLike, max_rows: int = ...\n) -> ToValuesReturnType: ...\n\n\n@overload\ndef vegafusion_data_transformer(\n    data: dict | IntoDataFrame | SupportsGeoInterface, max_rows: int = ...\n) -> _VegaFusionReturnType: ...\n\n\ndef vegafusion_data_transformer(\n    data: DataType | None = None, max_rows: int = 100000\n) -> Callable[..., Any] | _VegaFusionReturnType:\n    \"\"\"VegaFusion Data Transformer.\"\"\"\n    if data is None:\n        return vegafusion_data_transformer\n\n    if is_supported_by_vf(data) and not isinstance(data, SupportsGeoInterface):\n        table_name = f\"table_{uuid.uuid4()}\".replace(\"-\", \"_\")\n        extracted_inline_tables[table_name] = data\n        return {\"url\": VEGAFUSION_PREFIX + table_name}\n    else:\n        # Use default transformer for geo interface objects\n        # # (e.g. a geopandas GeoDataFrame)\n        # Or if we don't recognize data type\n        return default_data_transformer(data)\n\n\ndef get_inline_table_names(vega_spec: dict[str, Any]) -> set[str]:\n    \"\"\"\n    Get a set of the inline datasets names in the provided Vega spec.\n\n    Inline datasets are encoded as URLs that start with the table://\n    prefix.\n\n    Parameters\n    ----------\n    vega_spec: dict\n        A Vega specification dict\n\n    Returns\n    -------\n    set of str\n        Set of the names of the inline datasets that are referenced\n        in the specification.\n\n    Examples\n    --------\n    >>> spec = {\n    ...     \"data\": [\n    ...         {\"name\": \"foo\", \"url\": \"https://path/to/file.csv\"},\n    ...         {\"name\": \"bar\", \"url\": \"vegafusion+dataset://inline_dataset_123\"},\n    ...     ]\n    ... }\n    >>> get_inline_table_names(spec)\n    {'inline_dataset_123'}\n    \"\"\"\n    table_names = set()\n\n    # Process datasets\n    for data in vega_spec.get(\"data\", []):\n        url = data.get(\"url\", \"\")\n        if url.startswith(VEGAFUSION_PREFIX):\n            name = url[len(VEGAFUSION_PREFIX) :]\n            table_names.add(name)\n\n    # Recursively process child marks, which may have their own datasets\n    for mark in vega_spec.get(\"marks\", []):\n        table_names.update(get_inline_table_names(mark))\n\n    return table_names\n\n\ndef get_inline_tables(vega_spec: dict[str, Any]) -> dict[str, DataFrameLike]:\n    \"\"\"\n    Get the inline tables referenced by a Vega specification.\n\n    Note: This function should only be called on a Vega spec that corresponds\n    to a chart that was processed by the vegafusion_data_transformer.\n    Furthermore, this function may only be called once per spec because\n    the returned dataframes are deleted from internal storage.\n\n    Parameters\n    ----------\n    vega_spec: dict\n        A Vega specification dict\n\n    Returns\n    -------\n    dict from str to dataframe\n        dict from inline dataset name to dataframe object\n    \"\"\"\n    inline_names = get_inline_table_names(vega_spec)\n    # exclude named dataset that was provided by the user,\n    # or dataframes that have been deleted.\n    table_names = inline_names.intersection(extracted_inline_tables)\n    return {k: extracted_inline_tables.pop(k) for k in table_names}\n\n\ndef compile_to_vegafusion_chart_state(\n    vegalite_spec: dict[str, Any], local_tz: str\n) -> ChartState:\n    \"\"\"\n    Compile a Vega-Lite spec to a VegaFusion ChartState.\n\n    Note: This function should only be called on a Vega-Lite spec\n    that was generated with the \"vegafusion\" data transformer enabled.\n    In particular, this spec may contain references to extract datasets\n    using table:// prefixed URLs.\n\n    Parameters\n    ----------\n    vegalite_spec: dict\n        A Vega-Lite spec that was generated from an Altair chart with\n        the \"vegafusion\" data transformer enabled\n    local_tz: str\n        Local timezone name (e.g. 'America/New_York')\n\n    Returns\n    -------\n    ChartState\n        A VegaFusion ChartState object\n    \"\"\"\n    # Local import to avoid circular ImportError\n    from altair import data_transformers, vegalite_compilers\n\n    vf = import_vegafusion()\n\n    # Compile Vega-Lite spec to Vega\n    compiler = vegalite_compilers.get()\n    if compiler is None:\n        msg = \"No active vega-lite compiler plugin found\"\n        raise ValueError(msg)\n\n    vega_spec = compiler(vegalite_spec)\n\n    # Retrieve dict of inline tables referenced by the spec\n    inline_tables = get_inline_tables(vega_spec)\n\n    # Pre-evaluate transforms in vega spec with vegafusion\n    row_limit = data_transformers.options.get(\"max_rows\", None)\n\n    chart_state = vf.runtime.new_chart_state(\n        vega_spec,\n        local_tz=local_tz,\n        inline_datasets=inline_tables,\n        row_limit=row_limit,\n    )\n\n    # Check from row limit warning and convert to MaxRowsError\n    handle_row_limit_exceeded(row_limit, chart_state.get_warnings())\n\n    return chart_state\n\n\ndef compile_with_vegafusion(vegalite_spec: dict[str, Any]) -> dict[str, Any]:\n    \"\"\"\n    Compile a Vega-Lite spec to Vega and pre-transform with VegaFusion.\n\n    Note: This function should only be called on a Vega-Lite spec\n    that was generated with the \"vegafusion\" data transformer enabled.\n    In particular, this spec may contain references to extract datasets\n    using table:// prefixed URLs.\n\n    Parameters\n    ----------\n    vegalite_spec: dict\n        A Vega-Lite spec that was generated from an Altair chart with\n        the \"vegafusion\" data transformer enabled\n\n    Returns\n    -------\n    dict\n        A Vega spec that has been pre-transformed by VegaFusion\n    \"\"\"\n    # Local import to avoid circular ImportError\n    from altair import data_transformers, vegalite_compilers\n\n    vf = import_vegafusion()\n\n    # Compile Vega-Lite spec to Vega\n    compiler = vegalite_compilers.get()\n    if compiler is None:\n        msg = \"No active vega-lite compiler plugin found\"\n        raise ValueError(msg)\n\n    vega_spec = compiler(vegalite_spec)\n\n    # Retrieve dict of inline tables referenced by the spec\n    inline_tables = get_inline_tables(vega_spec)\n\n    # Pre-evaluate transforms in vega spec with vegafusion\n    row_limit = data_transformers.options.get(\"max_rows\", None)\n    transformed_vega_spec, warnings = vf.runtime.pre_transform_spec(\n        vega_spec,\n        vf.get_local_tz(),\n        inline_datasets=inline_tables,\n        row_limit=row_limit,\n    )\n\n    # Check from row limit warning and convert to MaxRowsError\n    handle_row_limit_exceeded(row_limit, warnings)\n\n    return transformed_vega_spec\n\n\ndef handle_row_limit_exceeded(row_limit: int | None, warnings: list):\n    for warning in warnings:\n        if warning.get(\"type\") == \"RowLimitExceeded\":\n            msg = (\n                \"The number of dataset rows after filtering and aggregation exceeds\\n\"\n                f\"the current limit of {row_limit}. Try adding an aggregation to reduce\\n\"\n                \"the size of the dataset that must be loaded into the browser. Or, disable\\n\"\n                \"the limit by calling alt.data_transformers.disable_max_rows(). Note that\\n\"\n                \"disabling this limit may cause the browser to freeze or crash.\"\n            )\n            raise MaxRowsError(msg)\n\n\ndef using_vegafusion() -> bool:\n    \"\"\"Check whether the vegafusion data transformer is enabled.\"\"\"\n    # Local import to avoid circular ImportError\n    from altair import data_transformers\n\n    return data_transformers.active == \"vegafusion\"\n"
  },
  {
    "path": "altair/utils/compiler.py",
    "content": "from collections.abc import Callable\nfrom typing import Any\n\nfrom altair.utils import PluginRegistry\n\n# ==============================================================================\n# Vega-Lite to Vega compiler registry\n# ==============================================================================\nVegaLiteCompilerType = Callable[[dict[str, Any]], dict[str, Any]]\n\n\nclass VegaLiteCompilerRegistry(PluginRegistry[VegaLiteCompilerType, dict[str, Any]]):\n    pass\n"
  },
  {
    "path": "altair/utils/core.py",
    "content": "\"\"\"Utility routines.\"\"\"\n\nfrom __future__ import annotations\n\nimport itertools\nimport json\nimport re\nimport sys\nimport traceback\nimport warnings\nfrom collections.abc import Callable, Iterator, Mapping, MutableMapping\nfrom copy import deepcopy\nfrom itertools import groupby\nfrom operator import itemgetter\nfrom typing import (\n    TYPE_CHECKING,\n    Any,\n    Concatenate,\n    Literal,\n    ParamSpec,\n    TypeVar,\n    cast,\n    overload,\n)\n\nimport jsonschema\nimport narwhals.stable.v1 as nw\nfrom narwhals.stable.v1.dependencies import is_pandas_dataframe, is_polars_dataframe\nfrom narwhals.stable.v1.typing import IntoDataFrame\n\nfrom altair.utils.schemapi import SchemaBase, SchemaLike, Undefined\n\nif sys.version_info >= (3, 12):\n    from typing import Protocol, TypeAliasType, runtime_checkable\nelse:\n    from typing_extensions import Protocol, TypeAliasType, runtime_checkable\n\nif TYPE_CHECKING:\n    import pandas as pd\n    from narwhals.stable.v1.typing import IntoExpr\n\n    from altair.utils._dfi_types import DataFrame as DfiDataFrame\n    from altair.vegalite.v6.schema._typing import StandardType_T as InferredVegaLiteType\n\n    _PandasDataFrameT = TypeVar(\"_PandasDataFrameT\", bound=\"pd.DataFrame\")\n\nTIntoDataFrame = TypeVar(\"TIntoDataFrame\", bound=IntoDataFrame)\nT = TypeVar(\"T\")\nP = ParamSpec(\"P\")\nR = TypeVar(\"R\")\n\nWrapsFunc = TypeAliasType(\"WrapsFunc\", Callable[..., R], type_params=(R,))\nWrappedFunc = TypeAliasType(\"WrappedFunc\", Callable[P, R], type_params=(P, R))\n# NOTE: Requires stringized form to avoid `< (3, 11)` issues\n# See: https://github.com/vega/altair/actions/runs/10667859416/job/29567290871?pr=3565\nWrapsMethod = TypeAliasType(\n    \"WrapsMethod\", \"Callable[Concatenate[T, ...], R]\", type_params=(T, R)\n)\nWrappedMethod = TypeAliasType(\n    \"WrappedMethod\", Callable[Concatenate[T, P], R], type_params=(T, P, R)\n)\n\n\n@runtime_checkable\nclass DataFrameLike(Protocol):\n    def __dataframe__(\n        self, nan_as_null: bool = False, allow_copy: bool = True\n    ) -> DfiDataFrame: ...\n\n\nTYPECODE_MAP = {\n    \"ordinal\": \"O\",\n    \"nominal\": \"N\",\n    \"quantitative\": \"Q\",\n    \"temporal\": \"T\",\n    \"geojson\": \"G\",\n}\n\nINV_TYPECODE_MAP = {v: k for k, v in TYPECODE_MAP.items()}\n\n\n# aggregates from vega-lite version 4.6.0\nAGGREGATES = [\n    \"argmax\",\n    \"argmin\",\n    \"average\",\n    \"count\",\n    \"distinct\",\n    \"max\",\n    \"mean\",\n    \"median\",\n    \"min\",\n    \"missing\",\n    \"product\",\n    \"q1\",\n    \"q3\",\n    \"ci0\",\n    \"ci1\",\n    \"stderr\",\n    \"stdev\",\n    \"stdevp\",\n    \"sum\",\n    \"valid\",\n    \"values\",\n    \"variance\",\n    \"variancep\",\n    \"exponential\",\n    \"exponentialb\",\n]\n\n# window aggregates from vega-lite version 4.6.0\nWINDOW_AGGREGATES = [\n    \"row_number\",\n    \"rank\",\n    \"dense_rank\",\n    \"percent_rank\",\n    \"cume_dist\",\n    \"ntile\",\n    \"lag\",\n    \"lead\",\n    \"first_value\",\n    \"last_value\",\n    \"nth_value\",\n]\n\n# timeUnits from vega-lite version 4.17.0\nTIMEUNITS = [\n    \"year\",\n    \"quarter\",\n    \"month\",\n    \"week\",\n    \"day\",\n    \"dayofyear\",\n    \"date\",\n    \"hours\",\n    \"minutes\",\n    \"seconds\",\n    \"milliseconds\",\n    \"yearquarter\",\n    \"yearquartermonth\",\n    \"yearmonth\",\n    \"yearmonthdate\",\n    \"yearmonthdatehours\",\n    \"yearmonthdatehoursminutes\",\n    \"yearmonthdatehoursminutesseconds\",\n    \"yearweek\",\n    \"yearweekday\",\n    \"yearweekdayhours\",\n    \"yearweekdayhoursminutes\",\n    \"yearweekdayhoursminutesseconds\",\n    \"yeardayofyear\",\n    \"quartermonth\",\n    \"monthdate\",\n    \"monthdatehours\",\n    \"monthdatehoursminutes\",\n    \"monthdatehoursminutesseconds\",\n    \"weekday\",\n    \"weeksdayhours\",\n    \"weekdayhours\",\n    \"weekdayhoursminutes\",\n    \"weekdayhoursminutesseconds\",\n    \"dayhours\",\n    \"dayhoursminutes\",\n    \"dayhoursminutesseconds\",\n    \"hoursminutes\",\n    \"hoursminutesseconds\",\n    \"minutesseconds\",\n    \"secondsmilliseconds\",\n    \"utcyear\",\n    \"utcquarter\",\n    \"utcmonth\",\n    \"utcweek\",\n    \"utcday\",\n    \"utcdayofyear\",\n    \"utcdate\",\n    \"utchours\",\n    \"utcminutes\",\n    \"utcseconds\",\n    \"utcmilliseconds\",\n    \"utcyearquarter\",\n    \"utcyearquartermonth\",\n    \"utcyearmonth\",\n    \"utcyearmonthdate\",\n    \"utcyearmonthdatehours\",\n    \"utcyearmonthdatehoursminutes\",\n    \"utcyearmonthdatehoursminutesseconds\",\n    \"utcyearweek\",\n    \"utcyearweekday\",\n    \"utcyearweekdayhours\",\n    \"utcyearweekdayhoursminutes\",\n    \"utcyearweekdayhoursminutesseconds\",\n    \"utcyeardayofyear\",\n    \"utcquartermonth\",\n    \"utcmonthdate\",\n    \"utcmonthdatehours\",\n    \"utcmonthdatehoursminutes\",\n    \"utcmonthdatehoursminutesseconds\",\n    \"utcweekday\",\n    \"utcweekdayhours\",\n    \"utcweekdayhoursminutes\",\n    \"utcweekdayhoursminutesseconds\",\n    \"utcdayhours\",\n    \"utcdayhoursminutes\",\n    \"utcdayhoursminutesseconds\",\n    \"utchoursminutes\",\n    \"utchoursminutesseconds\",\n    \"utcminutesseconds\",\n    \"utcsecondsmilliseconds\",\n]\n\nVALID_TYPECODES = list(itertools.chain(iter(TYPECODE_MAP), iter(INV_TYPECODE_MAP)))\n\nSHORTHAND_UNITS = {\n    \"field\": \"(?P<field>.*)\",\n    \"type\": \"(?P<type>{})\".format(\"|\".join(VALID_TYPECODES)),\n    \"agg_count\": \"(?P<aggregate>count)\",\n    \"op_count\": \"(?P<op>count)\",\n    \"aggregate\": \"(?P<aggregate>{})\".format(\"|\".join(AGGREGATES)),\n    \"window_op\": \"(?P<op>{})\".format(\"|\".join(AGGREGATES + WINDOW_AGGREGATES)),\n    \"timeUnit\": \"(?P<timeUnit>{})\".format(\"|\".join(TIMEUNITS)),\n}\n\nSHORTHAND_KEYS: frozenset[Literal[\"field\", \"aggregate\", \"type\", \"timeUnit\"]] = (\n    frozenset((\"field\", \"aggregate\", \"type\", \"timeUnit\"))\n)\n\n\ndef infer_vegalite_type_for_pandas(\n    data: Any,\n) -> InferredVegaLiteType | tuple[InferredVegaLiteType, list[Any]]:\n    \"\"\"\n    From an array-like input, infer the correct vega typecode.\n\n    ('ordinal', 'nominal', 'quantitative', or 'temporal').\n\n    Parameters\n    ----------\n    data: Any\n    \"\"\"\n    # This is safe to import here, as this function is only called on pandas input.\n    from pandas.api.types import infer_dtype\n\n    typ = infer_dtype(data, skipna=False)\n\n    if typ in {\n        \"floating\",\n        \"mixed-integer-float\",\n        \"integer\",\n        \"mixed-integer\",\n        \"complex\",\n    }:\n        return \"quantitative\"\n    elif typ == \"categorical\" and hasattr(data, \"cat\") and data.cat.ordered:\n        return (\"ordinal\", data.cat.categories.tolist())\n    elif typ in {\"string\", \"bytes\", \"categorical\", \"boolean\", \"mixed\", \"unicode\"}:\n        return \"nominal\"\n    elif typ in {\n        \"datetime\",\n        \"datetime64\",\n        \"timedelta\",\n        \"timedelta64\",\n        \"date\",\n        \"time\",\n        \"period\",\n    }:\n        return \"temporal\"\n    else:\n        warnings.warn(\n            f\"I don't know how to infer vegalite type from '{typ}'.  \"\n            \"Defaulting to nominal.\",\n            stacklevel=1,\n        )\n        return \"nominal\"\n\n\ndef merge_props_geom(feat: dict[str, Any]) -> dict[str, Any]:\n    \"\"\"\n    Merge properties with geometry.\n\n    * Overwrites 'type' and 'geometry' entries if existing.\n    \"\"\"\n    geom = {k: feat[k] for k in (\"type\", \"geometry\")}\n    try:\n        feat[\"properties\"].update(geom)\n        props_geom = feat[\"properties\"]\n    except (AttributeError, KeyError):\n        # AttributeError when 'properties' equals None\n        # KeyError when 'properties' is non-existing\n        props_geom = geom\n\n    return props_geom\n\n\ndef sanitize_geo_interface(geo: MutableMapping[Any, Any]) -> dict[str, Any]:\n    \"\"\"\n    Sanitize a geo_interface to prepare it for serialization.\n\n    * Make a copy\n    * Convert type array or _Array to list\n    * Convert tuples to lists (using json.loads/dumps)\n    * Merge properties with geometry\n    \"\"\"\n    geo = deepcopy(geo)\n\n    # convert type _Array or array to list\n    for key in geo:\n        if str(type(geo[key]).__name__).startswith((\"_Array\", \"array\")):\n            geo[key] = geo[key].tolist()\n\n    # convert (nested) tuples to lists\n    geo_dct: dict = json.loads(json.dumps(geo))\n\n    # sanitize features\n    if geo_dct[\"type\"] == \"FeatureCollection\":\n        geo_dct = geo_dct[\"features\"]\n        if len(geo_dct) > 0:\n            for idx, feat in enumerate(geo_dct):\n                geo_dct[idx] = merge_props_geom(feat)\n    elif geo_dct[\"type\"] == \"Feature\":\n        geo_dct = merge_props_geom(geo_dct)\n    else:\n        geo_dct = {\"type\": \"Feature\", \"geometry\": geo_dct}\n\n    return geo_dct\n\n\ndef numpy_is_subtype(dtype: Any, subtype: Any) -> bool:\n    # This is only called on `numpy` inputs, so it's safe to import it here.\n    import numpy as np\n\n    try:\n        return cast(\"bool\", np.issubdtype(dtype, subtype))\n    except (NotImplementedError, TypeError):\n        return False\n\n\ndef sanitize_pandas_dataframe(df: _PandasDataFrameT) -> _PandasDataFrameT:  # noqa: C901\n    \"\"\"\n    Sanitize a DataFrame to prepare it for serialization.\n\n    * Make a copy\n    * Convert RangeIndex columns to strings\n    * Raise ValueError if column names are not strings\n    * Raise ValueError if it has a hierarchical index.\n    * Convert categoricals to strings.\n    * Convert np.bool_ dtypes to Python bool objects\n    * Convert np.int dtypes to Python int objects\n    * Convert floats to objects and replace NaNs/infs with None.\n    * Convert DateTime dtypes into appropriate string representations\n    * Convert Nullable integers to objects and replace NaN with None\n    * Convert Nullable boolean to objects and replace NaN with None\n    * convert dedicated string column to objects and replace NaN with None\n    * Raise a ValueError for TimeDelta dtypes\n    \"\"\"\n    # This is safe to import here, as this function is only called on pandas input.\n    # NumPy is a required dependency of pandas so is also safe to import.\n    import numpy as np\n    import pandas as pd\n\n    df = cast(\"_PandasDataFrameT\", df.copy())\n\n    if isinstance(df.columns, pd.RangeIndex):\n        df.columns = df.columns.astype(str)\n\n    for col_name in df.columns:\n        if not isinstance(col_name, str):\n            msg = (\n                f\"Dataframe contains invalid column name: {col_name!r}. \"\n                \"Column names must be strings\"\n            )\n            raise ValueError(msg)\n\n    if isinstance(df.index, pd.MultiIndex):\n        msg = \"Hierarchical indices not supported\"\n        raise ValueError(msg)\n    if isinstance(df.columns, pd.MultiIndex):\n        msg = \"Hierarchical indices not supported\"\n        raise ValueError(msg)\n\n    def to_list_if_array(val):\n        if isinstance(val, np.ndarray):\n            return val.tolist()\n        else:\n            return val\n\n    for dtype_item in df.dtypes.items():\n        # We know that the column names are strings from the isinstance check\n        # further above but mypy thinks it is of type Hashable and therefore does not\n        # let us assign it to the col_name variable which is already of type str.\n        col_name = cast(\"str\", dtype_item[0])\n        dtype = dtype_item[1]\n        dtype_name = str(dtype)\n        if dtype_name == \"category\":\n            # Work around bug in to_json for categorical types in older versions\n            # of pandas as they do not properly convert NaN values to null in to_json.\n            # We can probably remove this part once we require pandas >= 1.0\n            col = df[col_name].astype(object)\n            df[col_name] = col.where(col.notnull(), None)\n        elif dtype_name in (\"string\", \"str\"):\n            # dedicated string datatype (since 1.0)\n            # https://pandas.pydata.org/pandas-docs/version/1.0.0/whatsnew/v1.0.0.html#dedicated-string-data-type\n            col = df[col_name].astype(object)\n            df[col_name] = col.where(col.notnull(), None)\n        elif dtype_name == \"bool\":\n            # convert numpy bools to objects; np.bool is not JSON serializable\n            df[col_name] = df[col_name].astype(object)\n        elif dtype_name == \"boolean\":\n            # dedicated boolean datatype (since 1.0)\n            # https://pandas.io/docs/user_guide/boolean.html\n            col = df[col_name].astype(object)\n            df[col_name] = col.where(col.notnull(), None)\n        elif dtype_name.startswith((\"datetime\", \"timestamp\")):\n            # Convert datetimes to strings. This needs to be a full ISO string\n            # with time, which is why we cannot use ``col.astype(str)``.\n            # This is because Javascript parses date-only times in UTC, but\n            # parses full ISO-8601 dates as local time, and dates in Vega and\n            # Vega-Lite are displayed in local time by default.\n            # (see https://github.com/vega/altair/issues/1027)\n            df[col_name] = (\n                df[col_name].apply(lambda x: x.isoformat()).replace(\"NaT\", \"\")\n            )\n        elif dtype_name.startswith(\"timedelta\"):\n            msg = (\n                f'Field \"{col_name}\" has type \"{dtype}\" which is '\n                \"not supported by Altair. Please convert to \"\n                \"either a timestamp or a numerical value.\"\n                \"\"\n            )\n            raise ValueError(msg)\n        elif dtype_name.startswith(\"geometry\"):\n            # geopandas >=0.6.1 uses the dtype geometry. Continue here\n            # otherwise it will give an error on np.issubdtype(dtype, np.integer)\n            continue\n        elif (\n            dtype_name\n            in {\n                \"Int8\",\n                \"Int16\",\n                \"Int32\",\n                \"Int64\",\n                \"UInt8\",\n                \"UInt16\",\n                \"UInt32\",\n                \"UInt64\",\n                \"Float32\",\n                \"Float64\",\n            }\n        ):  # nullable integer datatypes (since 24.0) and nullable float datatypes (since 1.2.0)\n            # https://pandas.pydata.org/pandas-docs/version/0.25/whatsnew/v0.24.0.html#optional-integer-na-support\n            col = df[col_name].astype(object)\n            df[col_name] = col.where(col.notnull(), None)\n        elif numpy_is_subtype(dtype, np.integer):\n            # convert integers to objects; np.int is not JSON serializable\n            df[col_name] = df[col_name].astype(object)\n        elif numpy_is_subtype(dtype, np.floating):\n            # For floats, convert to Python float: np.float is not JSON serializable\n            # Also convert NaN/inf values to null, as they are not JSON serializable\n            col = df[col_name]\n            bad_values = col.isnull() | np.isinf(col)\n            df[col_name] = col.astype(object).where(~bad_values, None)\n        elif dtype == object:  # noqa: E721\n            # Convert numpy arrays saved as objects to lists\n            # Arrays are not JSON serializable\n            col = df[col_name].astype(object).apply(to_list_if_array)\n            df[col_name] = col.where(col.notnull(), None)\n    return df\n\n\ndef sanitize_narwhals_dataframe(\n    data: nw.DataFrame[TIntoDataFrame],\n) -> nw.DataFrame[TIntoDataFrame]:\n    \"\"\"Sanitize narwhals.DataFrame for JSON serialization.\"\"\"\n    schema = data.schema\n    columns: list[IntoExpr] = []\n    # See https://github.com/vega/altair/issues/1027 for why this is necessary.\n    local_iso_fmt_string = \"%Y-%m-%dT%H:%M:%S\"\n    is_polars = is_polars_dataframe(data.to_native())\n    for name, dtype in schema.items():\n        if dtype == nw.Date and is_polars:\n            # Polars doesn't allow formatting `Date` with time directives.\n            # The date -> datetime cast is extremely fast compared with `to_string`\n            columns.append(\n                nw.col(name).cast(nw.Datetime).dt.to_string(local_iso_fmt_string)\n            )\n        elif dtype == nw.Date:\n            columns.append(nw.col(name).dt.to_string(local_iso_fmt_string))\n        elif dtype == nw.Datetime:\n            # Preserve timezone information when present so Vega-Lite can disambiguate\n            # repeated local times during DST transitions.\n            fmt = f\"{local_iso_fmt_string}%.f\"\n            if getattr(dtype, \"time_zone\", None) is not None:\n                fmt = f\"{fmt}%z\"\n            columns.append(nw.col(name).dt.to_string(fmt))\n        elif dtype == nw.Duration:\n            msg = (\n                f'Field \"{name}\" has type \"{dtype}\" which is '\n                \"not supported by Altair. Please convert to \"\n                \"either a timestamp or a numerical value.\"\n                \"\"\n            )\n            raise ValueError(msg)\n        else:\n            columns.append(name)\n    return data.select(columns)\n\n\ndef to_eager_narwhals_dataframe(data: IntoDataFrame) -> nw.DataFrame[Any]:\n    \"\"\"\n    Wrap `data` in `narwhals.DataFrame`.\n\n    If `data` is not supported by Narwhals, but it is convertible\n    to a PyArrow table, then first convert to a PyArrow Table,\n    and then wrap in `narwhals.DataFrame`.\n    \"\"\"\n    data_nw = nw.from_native(data, eager_or_interchange_only=True)\n    if nw.get_level(data_nw) == \"interchange\":\n        # If Narwhals' support for `data`'s class is only metadata-level, then we\n        # use the interchange protocol to convert to a PyArrow Table.\n        from altair.utils.data import arrow_table_from_dfi_dataframe\n\n        pa_table = arrow_table_from_dfi_dataframe(data)  # type: ignore[arg-type]\n        data_nw = nw.from_native(pa_table, eager_only=True)\n    return data_nw\n\n\ndef parse_shorthand(  # noqa: C901\n    shorthand: dict[str, Any] | str,\n    data: IntoDataFrame | None = None,\n    parse_aggregates: bool = True,\n    parse_window_ops: bool = False,\n    parse_timeunits: bool = True,\n    parse_types: bool = True,\n) -> dict[str, Any]:\n    \"\"\"\n    General tool to parse shorthand values.\n\n    These are of the form:\n\n    - \"col_name\"\n    - \"col_name:O\"\n    - \"average(col_name)\"\n    - \"average(col_name):O\"\n\n    Optionally, a dataframe may be supplied, from which the type\n    will be inferred if not specified in the shorthand.\n\n    Parameters\n    ----------\n    shorthand : dict or string\n        The shorthand representation to be parsed\n    data : DataFrame, optional\n        If specified and of type DataFrame, then use these values to infer the\n        column type if not provided by the shorthand.\n    parse_aggregates : boolean\n        If True (default), then parse aggregate functions within the shorthand.\n    parse_window_ops : boolean\n        If True then parse window operations within the shorthand (default:False)\n    parse_timeunits : boolean\n        If True (default), then parse timeUnits from within the shorthand\n    parse_types : boolean\n        If True (default), then parse typecodes within the shorthand\n\n    Returns\n    -------\n    attrs : dict\n        a dictionary of attributes extracted from the shorthand\n\n    Examples\n    --------\n    >>> import pandas as pd\n    >>> data = pd.DataFrame({\"foo\": [\"A\", \"B\", \"A\", \"B\"], \"bar\": [1, 2, 3, 4]})\n\n    >>> parse_shorthand(\"name\") == {\"field\": \"name\"}\n    True\n\n    >>> parse_shorthand(\"name:Q\") == {\"field\": \"name\", \"type\": \"quantitative\"}\n    True\n\n    >>> parse_shorthand(\"average(col)\") == {\"aggregate\": \"average\", \"field\": \"col\"}\n    True\n\n    >>> parse_shorthand(\"foo:O\") == {\"field\": \"foo\", \"type\": \"ordinal\"}\n    True\n\n    >>> parse_shorthand(\"min(foo):Q\") == {\n    ...     \"aggregate\": \"min\",\n    ...     \"field\": \"foo\",\n    ...     \"type\": \"quantitative\",\n    ... }\n    True\n\n    >>> parse_shorthand(\"month(col)\") == {\n    ...     \"field\": \"col\",\n    ...     \"timeUnit\": \"month\",\n    ...     \"type\": \"temporal\",\n    ... }\n    True\n\n    >>> parse_shorthand(\"year(col):O\") == {\n    ...     \"field\": \"col\",\n    ...     \"timeUnit\": \"year\",\n    ...     \"type\": \"ordinal\",\n    ... }\n    True\n\n    >>> parse_shorthand(\"foo\", data) == {\"field\": \"foo\", \"type\": \"nominal\"}\n    True\n\n    >>> parse_shorthand(\"bar\", data) == {\"field\": \"bar\", \"type\": \"quantitative\"}\n    True\n\n    >>> parse_shorthand(\"bar:O\", data) == {\"field\": \"bar\", \"type\": \"ordinal\"}\n    True\n\n    >>> parse_shorthand(\"sum(bar)\", data) == {\n    ...     \"aggregate\": \"sum\",\n    ...     \"field\": \"bar\",\n    ...     \"type\": \"quantitative\",\n    ... }\n    True\n\n    >>> parse_shorthand(\"count()\", data) == {\n    ...     \"aggregate\": \"count\",\n    ...     \"type\": \"quantitative\",\n    ... }\n    True\n    \"\"\"\n    from altair.utils.data import is_data_type\n\n    if not shorthand:\n        return {}\n\n    patterns = []\n\n    if parse_aggregates:\n        patterns.extend([r\"{agg_count}\\(\\)\"])\n        patterns.extend([r\"{aggregate}\\({field}\\)\"])\n    if parse_window_ops:\n        patterns.extend([r\"{op_count}\\(\\)\"])\n        patterns.extend([r\"{window_op}\\({field}\\)\"])\n    if parse_timeunits:\n        patterns.extend([r\"{timeUnit}\\({field}\\)\"])\n\n    patterns.extend([r\"{field}\"])\n\n    if parse_types:\n        patterns = list(itertools.chain(*((p + \":{type}\", p) for p in patterns)))\n\n    regexps = (\n        re.compile(r\"\\A\" + p.format(**SHORTHAND_UNITS) + r\"\\Z\", re.DOTALL)\n        for p in patterns\n    )\n\n    # find matches depending on valid fields passed\n    if isinstance(shorthand, dict):\n        attrs = shorthand\n    else:\n        attrs = next(\n            exp.match(shorthand).groupdict()  # type: ignore[union-attr]\n            for exp in regexps\n            if exp.match(shorthand) is not None\n        )\n\n    # Handle short form of the type expression\n    if \"type\" in attrs:\n        attrs[\"type\"] = INV_TYPECODE_MAP.get(attrs[\"type\"], attrs[\"type\"])\n\n    # counts are quantitative by default\n    if attrs == {\"aggregate\": \"count\"}:\n        attrs[\"type\"] = \"quantitative\"\n\n    # times are temporal by default\n    if \"timeUnit\" in attrs and \"type\" not in attrs:\n        attrs[\"type\"] = \"temporal\"\n\n    # if data is specified and type is not, infer type from data\n    if \"type\" not in attrs and is_data_type(data):\n        unescaped_field = attrs[\"field\"].replace(\"\\\\\", \"\")\n        data_nw = nw.from_native(data, eager_or_interchange_only=True)\n        schema = data_nw.schema\n        if unescaped_field in schema:\n            column = data_nw[unescaped_field]\n            if schema[unescaped_field] in {\n                nw.Object,\n                nw.Unknown,\n            } and is_pandas_dataframe(data_nw.to_native()):\n                attrs[\"type\"] = infer_vegalite_type_for_pandas(column.to_native())\n            else:\n                attrs[\"type\"] = infer_vegalite_type_for_narwhals(column)\n            if isinstance(attrs[\"type\"], tuple):\n                attrs[\"sort\"] = attrs[\"type\"][1]\n                attrs[\"type\"] = attrs[\"type\"][0]\n\n    # If an unescaped colon is still present, it's often due to an incorrect data type specification\n    # but could also be due to using a column name with \":\" in it.\n    if (\n        \"field\" in attrs\n        and \":\" in attrs[\"field\"]\n        and attrs[\"field\"][attrs[\"field\"].rfind(\":\") - 1] != \"\\\\\"\n    ):\n        raise ValueError(\n            '\"{}\" '.format(attrs[\"field\"].split(\":\")[-1])\n            + \"is not one of the valid encoding data types: {}.\".format(\n                \", \".join(TYPECODE_MAP.values())\n            )\n            + \"\\nFor more details, see https://altair-viz.github.io/user_guide/encodings/index.html#encoding-data-types. \"\n            + \"If you are trying to use a column name that contains a colon, \"\n            + 'prefix it with a backslash; for example \"column\\\\:name\" instead of \"column:name\".'\n        )\n    return attrs\n\n\ndef infer_vegalite_type_for_narwhals(\n    column: nw.Series,\n) -> InferredVegaLiteType | tuple[InferredVegaLiteType, list]:\n    dtype = column.dtype\n    if (\n        nw.is_ordered_categorical(column)\n        and not (categories := column.cat.get_categories()).is_empty()\n    ):\n        return \"ordinal\", categories.to_list()\n    if dtype == nw.String or dtype == nw.Categorical or dtype == nw.Boolean:  # noqa: PLR1714\n        return \"nominal\"\n    elif dtype.is_numeric():\n        return \"quantitative\"\n    elif dtype == nw.Datetime or dtype == nw.Date:  # noqa: PLR1714\n        # We use `== nw.Datetime` to check for any kind of Datetime, regardless of time\n        # unit and time zone. Prefer this over `dtype in {nw.Datetime, nw.Date}`,\n        # see https://narwhals-dev.github.io/narwhals/backcompat.\n        return \"temporal\"\n    else:\n        msg = f\"Unexpected DtypeKind: {dtype}\"\n        raise ValueError(msg)\n\n\ndef _wrap_and_copy_doc(tp: Callable[..., Any], cb: Callable[..., Any]) -> None:\n    \"\"\"\n    Raises when no doc was found.\n\n    Notes\n    -----\n    - Reference to ``tp`` is stored in ``cb.__wrapped__``.\n    - The doc for ``cb`` will have a ``.rst`` link added, referring  to ``tp``.\n    \"\"\"\n    cb.__wrapped__ = getattr(tp, \"__init__\", tp)  # type: ignore[attr-defined]\n\n    if doc_in := tp.__doc__:\n        line_1 = f\"{cb.__doc__ or f'Refer to :class:`{tp.__name__}`'}\\n\"\n        cb.__doc__ = \"\".join((line_1, *doc_in.splitlines(keepends=True)[1:]))\n    else:\n        msg = f\"Found no doc for {tp!r}\"\n        raise AttributeError(msg)\n\n\nclass _MethodSignatureCopier(Protocol[P]):\n    def __call__(self, cb: WrapsMethod[T, R], /) -> WrappedMethod[T, P, R]: ...\n\n\ndef use_signature(tp: Callable[P, Any], /) -> _MethodSignatureCopier[P]:\n    \"\"\"\n    Use the signature and doc of ``tp`` for the decorated method ``cb``.\n\n    Returns\n    -------\n    A decorator that copies the doc and static typing signature from ``tp`` to ``cb``.\n    \"\"\"\n\n    def decorate(cb: WrapsMethod[T, R], /) -> WrappedMethod[T, P, R]:\n        _wrap_and_copy_doc(tp, cb)\n        return cb\n\n    return decorate\n\n\nclass _FunctionSignatureCopier(Protocol[P]):\n    def __call__(self, cb: Callable[..., R], /) -> Callable[P, R]: ...\n\n\ndef use_signature_func(tp: Callable[P, Any], /) -> _FunctionSignatureCopier[P]:\n    \"\"\"\n    Use the signature and doc of ``tp`` for the decorated function ``cb``.\n\n    Returns\n    -------\n    A decorator that copies the doc and static typing signature from ``tp`` to ``cb``.\n    \"\"\"\n\n    def decorate(fn: Callable[..., R], /) -> Callable[P, R]:\n        _wrap_and_copy_doc(tp, fn)\n        return fn\n\n    return decorate\n\n\n@overload\ndef update_nested(\n    original: MutableMapping[Any, Any],\n    update: Mapping[Any, Any],\n    copy: Literal[False] = ...,\n) -> MutableMapping[Any, Any]: ...\n@overload\ndef update_nested(\n    original: Mapping[Any, Any],\n    update: Mapping[Any, Any],\n    copy: Literal[True],\n) -> MutableMapping[Any, Any]: ...\ndef update_nested(\n    original: Any,\n    update: Mapping[Any, Any],\n    copy: bool = False,\n) -> MutableMapping[Any, Any]:\n    \"\"\"\n    Update nested dictionaries.\n\n    Parameters\n    ----------\n    original : MutableMapping\n        the original (nested) dictionary, which will be updated in-place\n    update : Mapping\n        the nested dictionary of updates\n    copy : bool, default False\n        if True, then copy the original dictionary rather than modifying it\n\n    Returns\n    -------\n    original : MutableMapping\n        a reference to the (modified) original dict\n\n    Examples\n    --------\n    >>> original = {\"x\": {\"b\": 2, \"c\": 4}}\n    >>> update = {\"x\": {\"b\": 5, \"d\": 6}, \"y\": 40}\n    >>> update_nested(original, update)  # doctest: +SKIP\n    {'x': {'b': 5, 'c': 4, 'd': 6}, 'y': 40}\n    >>> original  # doctest: +SKIP\n    {'x': {'b': 5, 'c': 4, 'd': 6}, 'y': 40}\n    \"\"\"\n    if copy:\n        original = deepcopy(original)\n    for key, val in update.items():\n        if isinstance(val, Mapping):\n            orig_val = original.get(key, {})\n            if isinstance(orig_val, MutableMapping):\n                original[key] = update_nested(orig_val, val)\n            else:\n                original[key] = val\n        else:\n            original[key] = val\n    return original\n\n\ndef display_traceback(in_ipython: bool = True):\n    exc_info = sys.exc_info()\n\n    if in_ipython:\n        from IPython.core.getipython import get_ipython\n\n        ip = get_ipython()\n    else:\n        ip = None\n\n    if ip is not None:\n        ip.showtraceback(exc_info)\n    else:\n        traceback.print_exception(*exc_info)\n\n\n_ChannelType = Literal[\"field\", \"datum\", \"value\"]\n_CHANNEL_CACHE: _ChannelCache\n\"\"\"Singleton `_ChannelCache` instance.\n\nInitialized on first use.\n\"\"\"\n\n\nclass _ChannelCache:\n    channel_to_name: dict[type[SchemaBase], str]\n    name_to_channel: dict[str, dict[_ChannelType, type[SchemaBase]]]\n\n    @classmethod\n    def from_cache(cls) -> _ChannelCache:\n        global _CHANNEL_CACHE\n        try:\n            cached = _CHANNEL_CACHE\n        except NameError:\n            cached = cls.__new__(cls)\n            cached.channel_to_name = _init_channel_to_name()  # pyright: ignore[reportAttributeAccessIssue]\n            cached.name_to_channel = _invert_group_channels(cached.channel_to_name)\n            _CHANNEL_CACHE = cached\n        return _CHANNEL_CACHE\n\n    def get_encoding(self, tp: type[Any], /) -> str:\n        if encoding := self.channel_to_name.get(tp):\n            return encoding\n        msg = f\"positional of type {type(tp).__name__!r}\"\n        raise NotImplementedError(msg)\n\n    def _wrap_in_channel(self, obj: Any, encoding: str, /):\n        if isinstance(obj, SchemaBase):\n            return obj\n        elif isinstance(obj, str):\n            obj = {\"shorthand\": obj}\n        elif isinstance(obj, (list, tuple)):\n            return [self._wrap_in_channel(el, encoding) for el in obj]\n        elif isinstance(obj, SchemaLike):\n            obj = obj.to_dict()\n        if channel := self.name_to_channel.get(encoding):\n            tp = channel[\"value\" if \"value\" in obj else \"field\"]\n            try:\n                # Don't force validation here; some objects won't be valid until\n                # they're created in the context of a chart.\n                return tp.from_dict(obj, validate=False)\n            except jsonschema.ValidationError:\n                # our attempts at finding the correct class have failed\n                return obj\n        else:\n            warnings.warn(f\"Unrecognized encoding channel {encoding!r}\", stacklevel=1)\n            return obj\n\n    def infer_encoding_types(self, kwargs: dict[str, Any], /):\n        return {\n            encoding: self._wrap_in_channel(obj, encoding)\n            for encoding, obj in kwargs.items()\n            if obj is not Undefined\n        }\n\n\ndef _init_channel_to_name():\n    \"\"\"\n    Construct a dictionary of channel type to encoding name.\n\n    Note\n    ----\n    The return type is not expressible using annotations, but is used\n    internally by `mypy`/`pyright` and avoids the need for type ignores.\n\n    Returns\n    -------\n        mapping: dict[type[`<subclass of FieldChannelMixin and SchemaBase>`] | type[`<subclass of ValueChannelMixin and SchemaBase>`] | type[`<subclass of DatumChannelMixin and SchemaBase>`], str]\n    \"\"\"\n    from altair.vegalite.v6.schema import channels as ch\n\n    mixins = ch.FieldChannelMixin, ch.ValueChannelMixin, ch.DatumChannelMixin\n\n    return {\n        c: c._encoding_name\n        for c in ch.__dict__.values()\n        if isinstance(c, type) and issubclass(c, mixins) and issubclass(c, SchemaBase)\n    }\n\n\ndef _invert_group_channels(\n    m: dict[type[SchemaBase], str], /\n) -> dict[str, dict[_ChannelType, type[SchemaBase]]]:\n    \"\"\"Grouped inverted index for `_ChannelCache.channel_to_name`.\"\"\"\n\n    def _reduce(it: Iterator[tuple[type[Any], str]]) -> Any:\n        \"\"\"\n        Returns a 1-2 item dict, per channel.\n\n        Never includes `datum`, as it is never utilized in `wrap_in_channel`.\n        \"\"\"\n        item: dict[Any, type[SchemaBase]] = {}\n        for tp, _ in it:\n            name = tp.__name__\n            if name.endswith(\"Datum\"):\n                continue\n            elif name.endswith(\"Value\"):\n                sub_key = \"value\"\n            else:\n                sub_key = \"field\"\n            item[sub_key] = tp\n        return item\n\n    grouper = groupby(m.items(), itemgetter(1))\n    return {k: _reduce(chans) for k, chans in grouper}\n\n\ndef infer_encoding_types(args: tuple[Any, ...], kwargs: dict[str, Any]):\n    \"\"\"\n    Infer typed keyword arguments for args and kwargs.\n\n    Parameters\n    ----------\n    args : Sequence\n        Sequence of function args\n    kwargs : MutableMapping\n        Dict of function kwargs\n\n    Returns\n    -------\n    kwargs : dict\n        All args and kwargs in a single dict, with keys and types\n        based on the channels mapping.\n    \"\"\"\n    cache = _ChannelCache.from_cache()\n    # First use the mapping to convert args to kwargs based on their types.\n    for arg in args:\n        el = next(iter(arg), None) if isinstance(arg, (list, tuple)) else arg\n        encoding = cache.get_encoding(type(el))\n        if encoding not in kwargs:\n            kwargs[encoding] = arg\n        else:\n            msg = f\"encoding {encoding!r} specified twice.\"\n            raise ValueError(msg)\n\n    return cache.infer_encoding_types(kwargs)\n"
  },
  {
    "path": "altair/utils/data.py",
    "content": "from __future__ import annotations\n\nimport hashlib\nimport json\nimport random\nimport sys\nfrom collections.abc import Callable, MutableMapping, Sequence\nfrom functools import partial\nfrom pathlib import Path\nfrom typing import (\n    TYPE_CHECKING,\n    Any,\n    Concatenate,\n    Literal,\n    ParamSpec,\n    TypedDict,\n    TypeVar,\n    overload,\n)\n\nimport narwhals.stable.v1 as nw\nfrom narwhals.stable.v1.dependencies import is_pandas_dataframe\nfrom narwhals.stable.v1.typing import IntoDataFrame\n\nfrom ._importers import import_pyarrow_interchange\nfrom .core import (\n    DataFrameLike,\n    sanitize_geo_interface,\n    sanitize_narwhals_dataframe,\n    sanitize_pandas_dataframe,\n    to_eager_narwhals_dataframe,\n)\nfrom .plugin_registry import PluginRegistry\n\nif sys.version_info >= (3, 13):\n    from typing import Protocol, runtime_checkable\nelse:\n    from typing_extensions import Protocol, runtime_checkable\n\nif TYPE_CHECKING:\n    if sys.version_info >= (3, 13):\n        from typing import TypeIs\n    else:\n        from typing_extensions import TypeIs\n\n    from typing import TypeAlias\n\n    import pandas as pd\n    import pyarrow as pa\n\n\n@runtime_checkable\nclass SupportsGeoInterface(Protocol):\n    __geo_interface__: MutableMapping\n\n\nDataType: TypeAlias = (\n    dict[Any, Any] | IntoDataFrame | SupportsGeoInterface | DataFrameLike\n)\n\nTDataType = TypeVar(\"TDataType\", bound=DataType)\nTIntoDataFrame = TypeVar(\"TIntoDataFrame\", bound=IntoDataFrame)\n\nVegaLiteDataDict: TypeAlias = dict[str, str | dict[Any, Any] | list[dict[Any, Any]]]\nToValuesReturnType: TypeAlias = dict[str, dict[Any, Any] | list[dict[Any, Any]]]\nSampleReturnType = IntoDataFrame | dict[str, Sequence] | None\n\n\ndef is_data_type(obj: Any) -> TypeIs[DataType]:\n    return isinstance(obj, (dict, SupportsGeoInterface)) or isinstance(\n        nw.from_native(obj, eager_or_interchange_only=True, pass_through=True),\n        nw.DataFrame,\n    )\n\n\n# ==============================================================================\n# Data transformer registry\n#\n# A data transformer is a callable that takes a supported data type and returns\n# a transformed dictionary version of it which is compatible with the VegaLite schema.\n# The dict objects will be the Data portion of the VegaLite schema.\n#\n# Renderers only deal with the dict form of a\n# VegaLite spec, after the Data model has been put into a schema compliant\n# form.\n# ==============================================================================\n\nP = ParamSpec(\"P\")\n# NOTE: `Any` required due to the complexity of existing signatures imported in `altair.vegalite.v6.data.py`\nR = TypeVar(\"R\", VegaLiteDataDict, Any)\nDataTransformerType = Callable[Concatenate[DataType, P], R]\n\n\nclass DataTransformerRegistry(PluginRegistry[DataTransformerType, R]):\n    _global_settings = {\"consolidate_datasets\": True}\n\n    @property\n    def consolidate_datasets(self) -> bool:\n        return self._global_settings[\"consolidate_datasets\"]\n\n    @consolidate_datasets.setter\n    def consolidate_datasets(self, value: bool) -> None:\n        self._global_settings[\"consolidate_datasets\"] = value\n\n\n# ==============================================================================\nclass MaxRowsError(Exception):\n    \"\"\"Raised when a data model has too many rows.\"\"\"\n\n    def __init__(self, message: str, /) -> None:\n        self.message = message\n        super().__init__(self.message)\n\n    @classmethod\n    def from_limit_rows(cls, user_rows: int, max_rows: int, /) -> MaxRowsError:\n        msg = (\n            f\"The number of rows in your dataset ({user_rows}) is greater \"\n            f\"than the maximum allowed ({max_rows}).\\n\\n\"\n            \"Try enabling the VegaFusion data transformer which \"\n            \"raises this limit by pre-evaluating data\\n\"\n            \"transformations in Python.\\n\"\n            \"    >> import altair as alt\\n\"\n            '    >> alt.data_transformers.enable(\"vegafusion\")\\n\\n'\n            \"Or, see https://altair-viz.github.io/user_guide/large_datasets.html \"\n            \"for additional information\\n\"\n            \"on how to plot large datasets.\"\n        )\n        return cls(msg)\n\n\n@overload\ndef limit_rows(data: None = ..., max_rows: int | None = ...) -> partial: ...\n@overload\ndef limit_rows(data: DataType, max_rows: int | None = ...) -> DataType: ...\ndef limit_rows(\n    data: DataType | None = None, max_rows: int | None = 5000\n) -> partial | DataType:\n    \"\"\"\n    Raise MaxRowsError if the data model has more than max_rows.\n\n    If max_rows is None, then do not perform any check.\n    \"\"\"\n    if data is None:\n        return partial(limit_rows, max_rows=max_rows)\n    check_data_type(data)\n\n    if isinstance(data, SupportsGeoInterface):\n        if data.__geo_interface__[\"type\"] == \"FeatureCollection\":\n            values = data.__geo_interface__[\"features\"]\n        else:\n            values = data.__geo_interface__\n    elif isinstance(data, dict):\n        if \"values\" in data:\n            values = data[\"values\"]\n        else:\n            return data\n    else:\n        data = to_eager_narwhals_dataframe(data)\n        values = data\n\n    n = len(values)\n    if max_rows is not None and n > max_rows:\n        raise MaxRowsError.from_limit_rows(n, max_rows)\n\n    return data\n\n\n@overload\ndef sample(\n    data: None = ..., n: int | None = ..., frac: float | None = ...\n) -> partial: ...\n@overload\ndef sample(\n    data: TIntoDataFrame, n: int | None = ..., frac: float | None = ...\n) -> TIntoDataFrame: ...\n@overload\ndef sample(\n    data: DataType, n: int | None = ..., frac: float | None = ...\n) -> SampleReturnType: ...\ndef sample(\n    data: DataType | None = None,\n    n: int | None = None,\n    frac: float | None = None,\n) -> partial | SampleReturnType:\n    \"\"\"Reduce the size of the data model by sampling without replacement.\"\"\"\n    if data is None:\n        return partial(sample, n=n, frac=frac)\n    check_data_type(data)\n    if is_pandas_dataframe(data):\n        return data.sample(n=n, frac=frac)\n    elif isinstance(data, dict):\n        if \"values\" in data:\n            values = data[\"values\"]\n            if not n:\n                if frac is None:\n                    msg = \"frac cannot be None if n is None and data is a dictionary\"\n                    raise ValueError(msg)\n                n = int(frac * len(values))\n            values = random.sample(values, n)\n            return {\"values\": values}\n        else:\n            # Maybe this should raise an error or return something useful?\n            return None\n    data = nw.from_native(data, eager_only=True)\n    if not n:\n        if frac is None:\n            msg = \"frac cannot be None if n is None with this data input type\"\n            raise ValueError(msg)\n        n = int(frac * len(data))\n    indices = random.sample(range(len(data)), n)\n    return data[indices].to_native()\n\n\n_FormatType = Literal[\"csv\", \"json\"]\n\n\nclass _FormatDict(TypedDict):\n    type: _FormatType\n\n\nclass _ToFormatReturnUrlDict(TypedDict):\n    url: str\n    format: _FormatDict\n\n\n@overload\ndef to_json(\n    data: None = ...,\n    prefix: str = ...,\n    extension: str = ...,\n    filename: str = ...,\n    urlpath: str = ...,\n) -> partial: ...\n\n\n@overload\ndef to_json(\n    data: DataType,\n    prefix: str = ...,\n    extension: str = ...,\n    filename: str = ...,\n    urlpath: str = ...,\n) -> _ToFormatReturnUrlDict: ...\n\n\ndef to_json(\n    data: DataType | None = None,\n    prefix: str = \"altair-data\",\n    extension: str = \"json\",\n    filename: str = \"{prefix}-{hash}.{extension}\",\n    urlpath: str = \"\",\n) -> partial | _ToFormatReturnUrlDict:\n    \"\"\"Write the data model to a .json file and return a url based data model.\"\"\"\n    kwds = _to_text_kwds(prefix, extension, filename, urlpath)\n    if data is None:\n        return partial(to_json, **kwds)\n    else:\n        data_str = _data_to_json_string(data)\n        return _to_text(data_str, **kwds, format=_FormatDict(type=\"json\"))\n\n\n@overload\ndef to_csv(\n    data: None = ...,\n    prefix: str = ...,\n    extension: str = ...,\n    filename: str = ...,\n    urlpath: str = ...,\n) -> partial: ...\n\n\n@overload\ndef to_csv(\n    data: dict | pd.DataFrame | DataFrameLike,\n    prefix: str = ...,\n    extension: str = ...,\n    filename: str = ...,\n    urlpath: str = ...,\n) -> _ToFormatReturnUrlDict: ...\n\n\ndef to_csv(\n    data: dict | pd.DataFrame | DataFrameLike | None = None,\n    prefix: str = \"altair-data\",\n    extension: str = \"csv\",\n    filename: str = \"{prefix}-{hash}.{extension}\",\n    urlpath: str = \"\",\n) -> partial | _ToFormatReturnUrlDict:\n    \"\"\"Write the data model to a .csv file and return a url based data model.\"\"\"\n    kwds = _to_text_kwds(prefix, extension, filename, urlpath)\n    if data is None:\n        return partial(to_csv, **kwds)\n    else:\n        data_str = _data_to_csv_string(data)\n        return _to_text(data_str, **kwds, format=_FormatDict(type=\"csv\"))\n\n\ndef _to_text(\n    data: str,\n    prefix: str,\n    extension: str,\n    filename: str,\n    urlpath: str,\n    format: _FormatDict,\n) -> _ToFormatReturnUrlDict:\n    data_hash = _compute_data_hash(data)\n    filename = filename.format(prefix=prefix, hash=data_hash, extension=extension)\n    Path(filename).write_text(data, encoding=\"utf-8\")\n    url = str(Path(urlpath, filename))\n    return _ToFormatReturnUrlDict({\"url\": url, \"format\": format})\n\n\ndef _to_text_kwds(prefix: str, extension: str, filename: str, urlpath: str, /) -> dict[str, str]:  # fmt: skip\n    return {\"prefix\": prefix, \"extension\": extension, \"filename\": filename, \"urlpath\": urlpath}  # fmt: skip\n\n\ndef to_values(data: DataType) -> ToValuesReturnType:\n    \"\"\"Replace a DataFrame by a data model with values.\"\"\"\n    check_data_type(data)\n    # `pass_through=True` passes `data` through as-is if it is not a Narwhals object.\n    data_native = nw.to_native(data, pass_through=True)\n    if isinstance(data_native, SupportsGeoInterface):\n        return {\"values\": _from_geo_interface(data_native)}\n    elif is_pandas_dataframe(data_native):\n        data_native = sanitize_pandas_dataframe(data_native)\n        return {\"values\": data_native.to_dict(orient=\"records\")}\n    elif isinstance(data_native, dict):\n        if \"values\" not in data_native:\n            msg = \"values expected in data dict, but not present.\"\n            raise KeyError(msg)\n        return data_native\n    elif isinstance(data, nw.DataFrame):\n        data = sanitize_narwhals_dataframe(data)\n        return {\"values\": data.rows(named=True)}\n    else:\n        # Should never reach this state as tested by check_data_type\n        msg = f\"Unrecognized data type: {type(data)}\"\n        raise ValueError(msg)\n\n\ndef check_data_type(data: DataType) -> None:\n    if not is_data_type(data):\n        msg = f\"Expected dict, DataFrame or a __geo_interface__ attribute, got: {type(data)}\"\n        raise TypeError(msg)\n\n\n# ==============================================================================\n# Private utilities\n# ==============================================================================\ndef _compute_data_hash(data_str: str) -> str:\n    return hashlib.sha256(data_str.encode()).hexdigest()[:32]\n\n\ndef _from_geo_interface(data: SupportsGeoInterface) -> dict[str, Any]:\n    \"\"\"\n    Sanitize a ``__geo_interface__`` w/ pre-sanitize step for ``pandas`` if needed.\n\n    Introduces an intersection type::\n\n        geo: <subclass of SupportsGeoInterface and DataFrame> | SupportsGeoInterface\n    \"\"\"\n    geo = sanitize_pandas_dataframe(data) if is_pandas_dataframe(data) else data\n    return sanitize_geo_interface(geo.__geo_interface__)\n\n\ndef _data_to_json_string(data: DataType) -> str:\n    \"\"\"Return a JSON string representation of the input data.\"\"\"\n    check_data_type(data)\n    if isinstance(data, SupportsGeoInterface):\n        return json.dumps(_from_geo_interface(data))\n    elif is_pandas_dataframe(data):\n        data = sanitize_pandas_dataframe(data)\n        return data.to_json(orient=\"records\", double_precision=15)\n    elif isinstance(data, dict):\n        if \"values\" not in data:\n            msg = \"values expected in data dict, but not present.\"\n            raise KeyError(msg)\n        return json.dumps(data[\"values\"], sort_keys=True)\n    try:\n        data_nw = nw.from_native(data, eager_only=True)\n    except TypeError as exc:\n        msg = \"to_json only works with data expressed as a DataFrame or as a dict\"\n        raise NotImplementedError(msg) from exc\n    data_nw = sanitize_narwhals_dataframe(data_nw)\n    return json.dumps(data_nw.rows(named=True))\n\n\ndef _data_to_csv_string(data: DataType) -> str:\n    \"\"\"Return a CSV string representation of the input data.\"\"\"\n    check_data_type(data)\n    if isinstance(data, SupportsGeoInterface):\n        msg = (\n            f\"to_csv does not yet work with data that \"\n            f\"is of type {type(SupportsGeoInterface).__name__!r}.\\n\"\n            f\"See https://github.com/vega/altair/issues/3441\"\n        )\n        raise NotImplementedError(msg)\n    elif is_pandas_dataframe(data):\n        data = sanitize_pandas_dataframe(data)\n        return data.to_csv(index=False)\n    elif isinstance(data, dict):\n        if \"values\" not in data:\n            msg = \"values expected in data dict, but not present\"\n            raise KeyError(msg)\n        try:\n            import pandas as pd\n        except ImportError as exc:\n            msg = \"pandas is required to convert a dict to a CSV string\"\n            raise ImportError(msg) from exc\n        return pd.DataFrame.from_dict(data[\"values\"]).to_csv(index=False)\n    try:\n        data_nw = nw.from_native(data, eager_only=True)\n    except TypeError as exc:\n        msg = \"to_csv only works with data expressed as a DataFrame or as a dict\"\n        raise NotImplementedError(msg) from exc\n    return data_nw.write_csv()\n\n\ndef arrow_table_from_dfi_dataframe(dfi_df: DataFrameLike) -> pa.Table:\n    \"\"\"Convert a DataFrame Interchange Protocol compatible object to an Arrow Table.\"\"\"\n    import pyarrow as pa\n\n    # First check if the dataframe object has a method to convert to arrow.\n    # Give this preference over the pyarrow from_dataframe function since the object\n    # has more control over the conversion, and may have broader compatibility.\n    # This is the case for Polars, which supports Date32 columns in direct conversion\n    # while pyarrow does not yet support this type in from_dataframe\n    for convert_method_name in (\"arrow\", \"to_arrow\", \"to_arrow_table\", \"to_pyarrow\"):\n        convert_method = getattr(dfi_df, convert_method_name, None)\n        if callable(convert_method):\n            result = convert_method()\n            if isinstance(result, pa.Table):\n                return result\n\n    pi = import_pyarrow_interchange()\n    return pi.from_dataframe(dfi_df)\n"
  },
  {
    "path": "altair/utils/deprecation.py",
    "content": "from __future__ import annotations\n\nimport sys\nimport threading\nimport warnings\nfrom typing import TYPE_CHECKING, Literal\n\nif sys.version_info >= (3, 13):\n    from warnings import deprecated as _deprecated\nelse:\n    from typing_extensions import deprecated as _deprecated\n\n\nif TYPE_CHECKING:\n    if sys.version_info >= (3, 11):\n        from typing import LiteralString\n    else:\n        from typing_extensions import LiteralString\n\n__all__ = [\n    \"AltairDeprecationWarning\",\n    \"deprecated\",\n    \"deprecated_static_only\",\n    \"deprecated_warn\",\n]\n\n\nclass AltairDeprecationWarning(DeprecationWarning): ...\n\n\ndef _format_message(\n    version: LiteralString,\n    alternative: LiteralString | None,\n    message: LiteralString | None,\n    /,\n) -> LiteralString:\n    output = f\"\\nDeprecated since `altair={version}`.\"\n    if alternative:\n        output = f\"{output} Use {alternative} instead.\"\n    return f\"{output}\\n{message}\" if message else output\n\n\n# NOTE: Annotating the return type breaks `pyright` detecting [reportDeprecated]\n# NOTE: `LiteralString` requirement is introduced by stubs\ndef deprecated(\n    *,\n    version: LiteralString,\n    alternative: LiteralString | None = None,\n    message: LiteralString | None = None,\n    category: type[AltairDeprecationWarning] | None = AltairDeprecationWarning,\n    stacklevel: int = 1,\n):  # te.deprecated\n    \"\"\"\n    Indicate that a class, function or overload is deprecated.\n\n    When this decorator is applied to an object, the type checker\n    will generate a diagnostic on usage of the deprecated object.\n\n    Parameters\n    ----------\n    version\n        ``altair`` version the deprecation first appeared.\n    alternative\n        Suggested replacement class/method/function.\n    message\n        Additional message appended to ``version``, ``alternative``.\n    category\n        If the *category* is ``None``, no warning is emitted at runtime.\n    stacklevel\n        The *stacklevel* determines where the\n        warning is emitted. If it is ``1`` (the default), the warning\n        is emitted at the direct caller of the deprecated object; if it\n        is higher, it is emitted further up the stack.\n        Static type checker behavior is not affected by the *category*\n        and *stacklevel* arguments.\n\n    References\n    ----------\n    [PEP 702](https://peps.python.org/pep-0702/)\n    \"\"\"\n    msg = _format_message(version, alternative, message)\n    return _deprecated(msg, category=category, stacklevel=stacklevel)\n\n\ndef deprecated_warn(\n    message: LiteralString,\n    *,\n    version: LiteralString,\n    alternative: LiteralString | None = None,\n    category: type[AltairDeprecationWarning] = AltairDeprecationWarning,\n    stacklevel: int = 2,\n    action: Literal[\"once\"] | None = None,\n) -> None:\n    \"\"\"\n    Indicate that the current code path is deprecated.\n\n    This should be used for non-trivial cases *only*. ``@deprecated`` should\n    always be preferred as it is recognized by static type checkers.\n\n    Parameters\n    ----------\n    message\n        Explanation of the deprecated behaviour.\n\n        .. note::\n            Unlike ``@deprecated``, this is *not* optional.\n\n    version\n        ``altair`` version the deprecation first appeared.\n    alternative\n        Suggested replacement argument/method/function.\n    category\n        The runtime warning type emitted.\n    stacklevel\n        How far up the call stack to make this warning appear.\n        A value of ``2`` attributes the warning to the caller\n        of the code calling ``deprecated_warn()``.\n\n    References\n    ----------\n    [warnings.warn](https://docs.python.org/3/library/warnings.html#warnings.warn)\n    \"\"\"\n    msg = _format_message(version, alternative, message)\n    if action is None:\n        warnings.warn(msg, category=category, stacklevel=stacklevel)\n    elif action == \"once\":\n        _warn_once(msg, category=category, stacklevel=stacklevel)\n    else:\n        raise NotImplementedError(action)\n\n\ndeprecated_static_only = _deprecated\n\"\"\"\nUsing this decorator **exactly as described**, ensures ``message`` is displayed to a static type checker.\n\n**BE CAREFUL USING THIS**.\n\nSee screenshots in `comment`_ for motivation.\n\nEvery use should look like::\n\n    @deprecated_static_only(\n        \"Deprecated since `altair=5.5.0`. Use altair.other instead.\",\n        category=None,\n    )\n    def old_function(*args): ...\n\nIf a runtime warning is desired, use `@alt.utils.deprecated` instead.\n\nParameters\n----------\nmessage : LiteralString\n    - **Not** a variable\n    - **Not** use placeholders\n    - **Not** use concatenation\n    - **Do not use anything that could be considered dynamic**\n\ncategory : None\n    You **need** to explicitly pass ``None``\n\n.. _comment:\n    https://github.com/vega/altair/pull/3618#issuecomment-2423991968\n---\n\"\"\"\n\n\nclass _WarningsMonitor:\n    def __init__(self) -> None:\n        self._warned: dict[LiteralString, Literal[True]] = {}\n        self._lock = threading.Lock()\n\n    def __contains__(self, key: LiteralString, /) -> bool:\n        with self._lock:\n            return key in self._warned\n\n    def hit(self, key: LiteralString, /) -> None:\n        with self._lock:\n            self._warned[key] = True\n\n    def clear(self) -> None:\n        with self._lock:\n            self._warned.clear()\n\n\n_warnings_monitor = _WarningsMonitor()\n\n\ndef _warn_once(\n    msg: LiteralString, /, *, category: type[AltairDeprecationWarning], stacklevel: int\n) -> None:\n    global _warnings_monitor\n    if msg in _warnings_monitor:\n        return\n    else:\n        _warnings_monitor.hit(msg)\n        warnings.warn(msg, category=category, stacklevel=stacklevel + 1)\n"
  },
  {
    "path": "altair/utils/display.py",
    "content": "from __future__ import annotations\n\nimport json\nimport pkgutil\nimport textwrap\nimport uuid\nfrom collections.abc import Callable\nfrom typing import TYPE_CHECKING, Any\n\nfrom ._vegafusion_data import compile_with_vegafusion, using_vegafusion\nfrom .mimebundle import spec_to_mimebundle\nfrom .plugin_registry import PluginEnabler, PluginRegistry\nfrom .schemapi import validate_jsonschema\n\nif TYPE_CHECKING:\n    from typing import TypeAlias\n\n# ==============================================================================\n# Renderer registry\n# ==============================================================================\n# MimeBundleType needs to be the same as what are acceptable return values\n# for _repr_mimebundle_,\n# see https://ipython.readthedocs.io/en/stable/config/integrating.html#MyObject._repr_mimebundle_\nMimeBundleDataType: TypeAlias = dict[str, Any]\nMimeBundleMetaDataType: TypeAlias = dict[str, Any]\nMimeBundleType: TypeAlias = (\n    MimeBundleDataType | tuple[MimeBundleDataType, MimeBundleMetaDataType]\n)\nRendererType: TypeAlias = Callable[..., MimeBundleType]\n# Subtype of MimeBundleType as more specific in the values of the dictionaries\n\nDefaultRendererReturnType: TypeAlias = tuple[\n    dict[str, str | dict[str, Any]], dict[str, dict[str, Any]]\n]\n\n\nclass RendererRegistry(PluginRegistry[RendererType, MimeBundleType]):\n    entrypoint_err_messages = {\n        \"notebook\": textwrap.dedent(\n            \"\"\"\n            To use the 'notebook' renderer, you must install the vega package\n            and the associated Jupyter extension.\n            See https://altair-viz.github.io/getting_started/installation.html\n            for more information.\n            \"\"\"\n        ),\n    }\n\n    def set_embed_options(\n        self,\n        defaultStyle: bool | str | None = None,\n        renderer: str | None = None,\n        width: int | None = None,\n        height: int | None = None,\n        padding: int | None = None,\n        scaleFactor: float | None = None,\n        actions: bool | dict[str, bool] | None = None,\n        format_locale: str | dict | None = None,\n        time_format_locale: str | dict | None = None,\n        **kwargs,\n    ) -> PluginEnabler:\n        \"\"\"\n        Set options for embeddings of Vega & Vega-Lite charts.\n\n        Options are fully documented at https://github.com/vega/vega-embed.\n        Similar to the `enable()` method, this can be used as either\n        a persistent global switch, or as a temporary local setting using\n        a context manager (i.e. a `with` statement).\n\n        Parameters\n        ----------\n        defaultStyle : bool or string\n            Specify a default stylesheet for embed actions.\n        renderer : string\n            The renderer to use for the view. One of \"canvas\" (default) or \"svg\"\n        width : integer\n            The view width in pixels\n        height : integer\n            The view height in pixels\n        padding : integer\n            The view padding in pixels\n        scaleFactor : number\n            The number by which to multiply the width and height (default 1)\n            of an exported PNG or SVG image.\n        actions : bool or dict\n            Determines if action links (\"Export as PNG/SVG\", \"View Source\",\n            \"View Vega\" (only for Vega-Lite), \"Open in Vega Editor\") are\n            included with the embedded view. If the value is true, all action\n            links will be shown and none if the value is false. This property\n            can take a key-value mapping object that maps keys (export, source,\n            compiled, editor) to boolean values for determining if\n            each action link should be shown.\n        format_locale : str or dict\n            d3-format locale name or dictionary. Defaults to \"en-US\" for United States English.\n            See https://github.com/d3/d3-format/tree/main/locale for available names and example\n            definitions.\n        time_format_locale : str or dict\n            d3-time-format locale name or dictionary. Defaults to \"en-US\" for United States English.\n            See https://github.com/d3/d3-time-format/tree/main/locale for available names and example\n            definitions.\n        **kwargs :\n            Additional options are passed directly to embed options.\n        \"\"\"\n        options: dict[str, bool | str | float | dict[str, bool] | None] = {\n            \"defaultStyle\": defaultStyle,\n            \"renderer\": renderer,\n            \"width\": width,\n            \"height\": height,\n            \"padding\": padding,\n            \"scaleFactor\": scaleFactor,\n            \"actions\": actions,\n            \"formatLocale\": format_locale,\n            \"timeFormatLocale\": time_format_locale,\n        }\n        kwargs.update({key: val for key, val in options.items() if val is not None})\n        return self.enable(None, embed_options=kwargs)\n\n\n# ==============================================================================\n# VegaLite v1/v2 renderer logic\n# ==============================================================================\n\n\nclass Displayable:\n    \"\"\"\n    A base display class for VegaLite v1/v2.\n\n    This class takes a VegaLite v1/v2 spec and does the following:\n\n    1. Optionally validates the spec against a schema.\n    2. Uses the RendererPlugin to grab a renderer and call it when the\n       IPython/Jupyter display method (_repr_mimebundle_) is called.\n\n    The spec passed to this class must be fully schema compliant and already\n    have the data portion of the spec fully processed and ready to serialize.\n    In practice, this means, the data portion of the spec should have been passed\n    through appropriate data model transformers.\n    \"\"\"\n\n    renderers: RendererRegistry | None = None\n    schema_path = (\"altair\", \"\")\n\n    def __init__(self, spec: dict[str, Any], validate: bool = False) -> None:\n        self.spec = spec\n        self.validate = validate\n        self._validate()\n\n    def _validate(self) -> None:\n        \"\"\"Validate the spec against the schema.\"\"\"\n        data = pkgutil.get_data(*self.schema_path)\n        assert data is not None\n        schema_dict: dict[str, Any] = json.loads(data.decode(\"utf-8\"))\n        validate_jsonschema(\n            self.spec,\n            schema_dict,\n        )\n\n    def _repr_mimebundle_(\n        self, include: Any = None, exclude: Any = None\n    ) -> MimeBundleType:\n        \"\"\"Return a MIME bundle for display in Jupyter frontends.\"\"\"\n        if self.renderers is not None:\n            renderer_func = self.renderers.get()\n            assert renderer_func is not None\n            return renderer_func(self.spec)\n        else:\n            return {}\n\n\ndef default_renderer_base(\n    spec: dict[str, Any], mime_type: str, str_repr: str, **options\n) -> DefaultRendererReturnType:\n    \"\"\"\n    A default renderer for Vega or VegaLite that works for modern frontends.\n\n    This renderer works with modern frontends (JupyterLab, nteract) that know\n    how to render the custom VegaLite MIME type listed above.\n    \"\"\"\n    # Local import to avoid circular ImportError\n    from altair.vegalite.v6.display import VEGA_MIME_TYPE, VEGALITE_MIME_TYPE\n\n    assert isinstance(spec, dict)\n    bundle: dict[str, str | dict] = {}\n    metadata: dict[str, dict[str, Any]] = {}\n\n    if using_vegafusion():\n        spec = compile_with_vegafusion(spec)\n\n        # Swap mimetype from Vega-Lite to Vega.\n        # If mimetype was JSON, leave it alone\n        if mime_type == VEGALITE_MIME_TYPE:\n            mime_type = VEGA_MIME_TYPE\n\n    bundle[mime_type] = spec\n    bundle[\"text/plain\"] = str_repr\n    if options:\n        metadata[mime_type] = options\n    return bundle, metadata\n\n\ndef json_renderer_base(\n    spec: dict[str, Any], str_repr: str, **options\n) -> DefaultRendererReturnType:\n    \"\"\"\n    A renderer that returns a MIME type of application/json.\n\n    In JupyterLab/nteract this is rendered as a nice JSON tree.\n    \"\"\"\n    return default_renderer_base(\n        spec, mime_type=\"application/json\", str_repr=str_repr, **options\n    )\n\n\nclass HTMLRenderer:\n    \"\"\"Object to render charts as HTML, with a unique output div each time.\"\"\"\n\n    def __init__(self, output_div: str = \"altair-viz-{}\", **kwargs) -> None:\n        self._output_div = output_div\n        self.kwargs = kwargs\n\n    @property\n    def output_div(self) -> str:\n        return self._output_div.format(uuid.uuid4().hex)\n\n    def __call__(self, spec: dict[str, Any], **metadata) -> dict[str, str]:\n        kwargs = self.kwargs.copy()\n        kwargs.update(**metadata, output_div=self.output_div)\n        return spec_to_mimebundle(spec, format=\"html\", **kwargs)\n"
  },
  {
    "path": "altair/utils/execeval.py",
    "content": "from __future__ import annotations\n\nimport ast\nimport sys\nfrom typing import TYPE_CHECKING, Any, Literal, overload\n\nif TYPE_CHECKING:\n    from collections.abc import Callable\n    from os import PathLike\n\n    if sys.version_info >= (3, 11):\n        from typing import Self\n    else:\n        from typing_extensions import Self\n\n\nclass _CatchDisplay:\n    \"\"\"Class to temporarily catch sys.displayhook.\"\"\"\n\n    def __init__(self) -> None:\n        self.output: Any | None = None\n\n    def __enter__(self) -> Self:\n        self.old_hook: Callable[[object], Any] = sys.displayhook\n        sys.displayhook = self\n        return self\n\n    def __exit__(self, type, value, traceback) -> Literal[False]:\n        sys.displayhook = self.old_hook\n        # Returning False will cause exceptions to propagate\n        return False\n\n    def __call__(self, output: Any) -> None:\n        self.output = output\n\n\n@overload\ndef eval_block(\n    code: str | Any,\n    namespace: dict[str, Any] | None = ...,\n    filename: str | bytes | PathLike[Any] = ...,\n    *,\n    strict: Literal[False] = ...,\n) -> Any | None: ...\n@overload\ndef eval_block(\n    code: str | Any,\n    namespace: dict[str, Any] | None = ...,\n    filename: str | bytes | PathLike[Any] = ...,\n    *,\n    strict: Literal[True],\n) -> Any: ...\ndef eval_block(\n    code: str | Any,\n    namespace: dict[str, Any] | None = None,\n    filename: str | bytes | PathLike[Any] = \"<string>\",\n    *,\n    strict: bool = False,\n) -> Any | None:\n    \"\"\"\n    Execute a multi-line block of code in the given namespace.\n\n    If the final statement in the code is an expression, return\n    the result of the expression.\n\n    If ``strict``, raise a ``TypeError`` when the return value would be ``None``.\n    \"\"\"\n    tree = ast.parse(code, filename=\"<ast>\", mode=\"exec\")\n    if namespace is None:\n        namespace = {}\n    catch_display = _CatchDisplay()\n\n    if isinstance(tree.body[-1], ast.Expr):\n        to_exec, to_eval = tree.body[:-1], tree.body[-1:]\n    else:\n        to_exec, to_eval = tree.body, []\n\n    for node in to_exec:\n        compiled = compile(ast.Module([node], []), filename=filename, mode=\"exec\")\n        exec(compiled, namespace)\n\n    with catch_display:\n        for node in to_eval:\n            compiled = compile(\n                ast.Interactive([node]), filename=filename, mode=\"single\"\n            )\n            exec(compiled, namespace)\n\n    if strict:\n        output = catch_display.output\n        if output is None:\n            msg = f\"Expected a non-None value but got {output!r}\"\n            raise TypeError(msg)\n        else:\n            return output\n    else:\n        return catch_display.output\n"
  },
  {
    "path": "altair/utils/html.py",
    "content": "from __future__ import annotations\n\nimport json\nfrom typing import Any, Literal\n\nimport jinja2\n\nfrom altair.utils._importers import import_vl_convert, vl_version_for_vl_convert\n\nTemplateName = Literal[\"standard\", \"universal\", \"inline\", \"olli\"]\nRenderMode = Literal[\"vega\", \"vega-lite\"]\n\nHTML_TEMPLATE = jinja2.Template(\n    \"\"\"\n{%- if fullhtml -%}\n<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"UTF-8\">\n{%- endif %}\n  <style>\n    #{{ output_div }}.vega-embed {\n      width: 100%;\n      display: flex;\n    }\n\n    #{{ output_div }}.vega-embed details,\n    #{{ output_div }}.vega-embed details summary {\n      position: relative;\n    }\n  </style>\n{%- if not requirejs %}\n  <script type=\"text/javascript\" src=\"{{ base_url }}/vega@{{ vega_version }}\"></script>\n  {%- if mode == 'vega-lite' %}\n  <script type=\"text/javascript\" src=\"{{ base_url }}/vega-lite@{{ vegalite_version }}\"></script>\n  {%- endif %}\n  <script type=\"text/javascript\" src=\"{{ base_url }}/vega-embed@{{ vegaembed_version }}\"></script>\n{%- endif %}\n{%- if fullhtml %}\n{%- if requirejs %}\n<script type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js\"></script>\n<script>\nrequirejs.config({\n    \"paths\": {\n        \"vega\": \"{{ base_url }}/vega@{{ vega_version }}?noext\",\n        \"vega-lib\": \"{{ base_url }}/vega-lib?noext\",\n        \"vega-lite\": \"{{ base_url }}/vega-lite@{{ vegalite_version }}?noext\",\n        \"vega-embed\": \"{{ base_url }}/vega-embed@{{ vegaembed_version }}?noext\",\n    }\n});\n</script>\n{%- endif %}\n</head>\n<body>\n{%- endif %}\n  <div id=\"{{ output_div }}\"></div>\n  <script>\n    {%- if requirejs and not fullhtml %}\n    requirejs.config({\n        \"paths\": {\n            \"vega\": \"{{ base_url }}/vega@{{ vega_version }}?noext\",\n            \"vega-lib\": \"{{ base_url }}/vega-lib?noext\",\n            \"vega-lite\": \"{{ base_url }}/vega-lite@{{ vegalite_version }}?noext\",\n            \"vega-embed\": \"{{ base_url }}/vega-embed@{{ vegaembed_version }}?noext\",\n        }\n    });\n    {% endif %}\n    {% if requirejs -%}\n    require(['vega-embed'],\n    {%- else -%}\n    (\n    {%- endif -%}\n    function(vegaEmbed) {\n      var spec = {{ spec }};\n      var embedOpt = {{ embed_options }};\n\n      function showError(el, error){\n          el.innerHTML = ('<div style=\"color:red;\">'\n                          + '<p>JavaScript Error: ' + error.message + '</p>'\n                          + \"<p>This usually means there's a typo in your chart specification. \"\n                          + \"See the javascript console for the full traceback.</p>\"\n                          + '</div>');\n          throw error;\n      }\n      const el = document.getElementById('{{ output_div }}');\n      vegaEmbed(\"#{{ output_div }}\", spec, embedOpt)\n        .catch(error => showError(el, error));\n    }){% if not requirejs %}(vegaEmbed){% endif %};\n\n  </script>\n{%- if fullhtml %}\n</body>\n</html>\n{%- endif %}\n\"\"\"\n)\n\n\nHTML_TEMPLATE_UNIVERSAL = jinja2.Template(\n    \"\"\"\n<style>\n  #{{ output_div }}.vega-embed {\n    width: 100%;\n    display: flex;\n  }\n\n  #{{ output_div }}.vega-embed details,\n  #{{ output_div }}.vega-embed details summary {\n    position: relative;\n  }\n</style>\n<div id=\"{{ output_div }}\"></div>\n<script type=\"text/javascript\">\n  var VEGA_DEBUG = (typeof VEGA_DEBUG == \"undefined\") ? {} : VEGA_DEBUG;\n  (function(spec, embedOpt){\n    let outputDiv = document.currentScript.previousElementSibling;\n    if (outputDiv.id !== \"{{ output_div }}\") {\n      outputDiv = document.getElementById(\"{{ output_div }}\");\n    }\n\n    const paths = {\n      \"vega\": \"{{ base_url }}/vega@{{ vega_version }}?noext\",\n      \"vega-lib\": \"{{ base_url }}/vega-lib?noext\",\n      \"vega-lite\": \"{{ base_url }}/vega-lite@{{ vegalite_version }}?noext\",\n      \"vega-embed\": \"{{ base_url }}/vega-embed@{{ vegaembed_version }}?noext\",\n    };\n\n    function maybeLoadScript(lib, version) {\n      var key = `${lib.replace(\"-\", \"\")}_version`;\n      return (VEGA_DEBUG[key] == version) ?\n        Promise.resolve(paths[lib]) :\n        new Promise(function(resolve, reject) {\n          var s = document.createElement('script');\n          document.getElementsByTagName(\"head\")[0].appendChild(s);\n          s.async = true;\n          s.onload = () => {\n            VEGA_DEBUG[key] = version;\n            return resolve(paths[lib]);\n          };\n          s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n          s.src = paths[lib];\n        });\n    }\n\n    function showError(err) {\n      outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n      throw err;\n    }\n\n    function displayChart(vegaEmbed) {\n      vegaEmbed(outputDiv, spec, embedOpt)\n        .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n    }\n\n    if(typeof define === \"function\" && define.amd) {\n      requirejs.config({paths});\n      let deps = [\"vega-embed\"];\n      require(deps, displayChart, err => showError(`Error loading script: ${err.message}`));\n    } else {\n      maybeLoadScript(\"vega\", \"{{vega_version}}\")\n        .then(() => maybeLoadScript(\"vega-lite\", \"{{vegalite_version}}\"))\n        .then(() => maybeLoadScript(\"vega-embed\", \"{{vegaembed_version}}\"))\n        .catch(showError)\n        .then(() => displayChart(vegaEmbed));\n    }\n  })({{ spec }}, {{ embed_options }});\n</script>\n\"\"\"\n)\n\n\n# This is like the HTML_TEMPLATE template, but includes vega javascript inline\n# so that the resulting file is not dependent on external resources. This was\n# ported over from altair_saver.\n#\n# implies requirejs=False and full_html=True\nINLINE_HTML_TEMPLATE = jinja2.Template(\n    \"\"\"\\\n<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"UTF-8\">\n  <style>\n    #{{ output_div }}.vega-embed {\n      width: 100%;\n      display: flex;\n    }\n\n    #{{ output_div }}.vega-embed details,\n    #{{ output_div }}.vega-embed details summary {\n      position: relative;\n    }\n  </style>\n  <script type=\"text/javascript\">\n    // vega-embed.js bundle with Vega-Lite version v{{ vegalite_version }}\n    {{ vegaembed_script }}\n  </script>\n</head>\n<body>\n<div class=\"vega-visualization\" id=\"{{ output_div }}\"></div>\n<script type=\"text/javascript\">\n  const spec = {{ spec }};\n  const embedOpt = {{ embed_options }};\n  vegaEmbed('#{{ output_div }}', spec, embedOpt).catch(console.error);\n</script>\n</body>\n</html>\n\"\"\"\n)\n\n\nHTML_TEMPLATE_OLLI = jinja2.Template(\n    \"\"\"\n<style>\n  #{{ output_div }}.vega-embed {\n    width: 100%;\n    display: flex;\n  }\n\n  #{{ output_div }}.vega-embed details,\n  #{{ output_div }}.vega-embed details summary {\n    position: relative;\n  }\n</style>\n<div id=\"{{ output_div }}\"></div>\n<script type=\"text/javascript\">\n  var VEGA_DEBUG = (typeof VEGA_DEBUG == \"undefined\") ? {} : VEGA_DEBUG;\n  (function(spec, embedOpt){\n    let outputDiv = document.currentScript.previousElementSibling;\n    if (outputDiv.id !== \"{{ output_div }}\") {\n      outputDiv = document.getElementById(\"{{ output_div }}\");\n    }\n    const olliDiv = document.createElement(\"div\");\n    const vegaDiv = document.createElement(\"div\");\n    outputDiv.appendChild(vegaDiv);\n    outputDiv.appendChild(olliDiv);\n    outputDiv = vegaDiv;\n\n    const paths = {\n      \"vega\": \"{{ base_url }}/vega@{{ vega_version }}?noext\",\n      \"vega-lib\": \"{{ base_url }}/vega-lib?noext\",\n      \"vega-lite\": \"{{ base_url }}/vega-lite@{{ vegalite_version }}?noext\",\n      \"vega-embed\": \"{{ base_url }}/vega-embed@{{ vegaembed_version }}?noext\",\n      \"olli\": \"{{ base_url }}/olli@{{ olli_version }}?noext\",\n      \"olli-adapters\": \"{{ base_url }}/olli-adapters@{{ olli_adapters_version }}?noext\",\n    };\n\n    function maybeLoadScript(lib, version) {\n      var key = `${lib.replace(\"-\", \"\")}_version`;\n      return (VEGA_DEBUG[key] == version) ?\n        Promise.resolve(paths[lib]) :\n        new Promise(function(resolve, reject) {\n          var s = document.createElement('script');\n          document.getElementsByTagName(\"head\")[0].appendChild(s);\n          s.async = true;\n          s.onload = () => {\n            VEGA_DEBUG[key] = version;\n            return resolve(paths[lib]);\n          };\n          s.onerror = () => reject(`Error loading script: ${paths[lib]}`);\n          s.src = paths[lib];\n        });\n    }\n\n    function showError(err) {\n      outputDiv.innerHTML = `<div class=\"error\" style=\"color:red;\">${err}</div>`;\n      throw err;\n    }\n\n    function displayChart(vegaEmbed, olli, olliAdapters) {\n      vegaEmbed(outputDiv, spec, embedOpt)\n        .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));\n      olliAdapters.VegaLiteAdapter(spec).then(olliVisSpec => {\n        const olliFunc = typeof olli === 'function' ? olli : olli.olli;\n        const olliRender = olliFunc(olliVisSpec);\n        olliDiv.append(olliRender);\n      });\n    }\n\n    if(typeof define === \"function\" && define.amd) {\n      requirejs.config({paths});\n      let deps = [\"vega-embed\", \"olli\", \"olli-adapters\"];\n      require(deps, displayChart, err => showError(`Error loading script: ${err.message}`));\n    } else {\n      maybeLoadScript(\"vega\", \"{{vega_version}}\")\n        .then(() => maybeLoadScript(\"vega-lite\", \"{{vegalite_version}}\"))\n        .then(() => maybeLoadScript(\"vega-embed\", \"{{vegaembed_version}}\"))\n        .then(() => maybeLoadScript(\"olli\", \"{{olli_version}}\"))\n        .then(() => maybeLoadScript(\"olli-adapters\", \"{{olli_adapters_version}}\"))\n        .catch(showError)\n        .then(() => displayChart(vegaEmbed, olli, OlliAdapters));\n    }\n  })({{ spec }}, {{ embed_options }});\n</script>\n\"\"\"\n)\n\n\nTEMPLATES: dict[TemplateName, jinja2.Template] = {\n    \"standard\": HTML_TEMPLATE,\n    \"universal\": HTML_TEMPLATE_UNIVERSAL,\n    \"inline\": INLINE_HTML_TEMPLATE,\n    \"olli\": HTML_TEMPLATE_OLLI,\n}\n\n\ndef spec_to_html(\n    spec: dict[str, Any],\n    mode: RenderMode,\n    vega_version: str | None,\n    vegaembed_version: str | None,\n    vegalite_version: str | None = None,\n    base_url: str = \"https://cdn.jsdelivr.net/npm\",\n    output_div: str = \"vis\",\n    embed_options: dict[str, Any] | None = None,\n    json_kwds: dict[str, Any] | None = None,\n    fullhtml: bool = True,\n    requirejs: bool = False,\n    template: jinja2.Template | TemplateName = \"standard\",\n) -> str:\n    \"\"\"\n    Embed a Vega/Vega-Lite spec into an HTML page.\n\n    Parameters\n    ----------\n    spec : dict\n        a dictionary representing a vega-lite plot spec.\n    mode : string {'vega' | 'vega-lite'}\n        The rendering mode. This value is overridden by embed_options['mode'],\n        if it is present.\n    vega_version : string\n        For html output, the version of vega.js to use.\n    vegalite_version : string\n        For html output, the version of vegalite.js to use.\n    vegaembed_version : string\n        For html output, the version of vegaembed.js to use.\n    base_url : string (optional)\n        The base url from which to load the javascript libraries.\n    output_div : string (optional)\n        The id of the div element where the plot will be shown.\n    embed_options : dict (optional)\n        Dictionary of options to pass to the vega-embed script. Default\n        entry is {'mode': mode}.\n    json_kwds : dict (optional)\n        Dictionary of keywords to pass to json.dumps().\n    fullhtml : boolean (optional)\n        If True (default) then return a full html page. If False, then return\n        an HTML snippet that can be embedded into an HTML page.\n    requirejs : boolean (optional)\n        If False (default) then load libraries from base_url using <script>\n        tags. If True, then load libraries using requirejs\n    template : jinja2.Template or string (optional)\n        Specify the template to use (default = 'standard'). If template is a\n        string, it must be one of {'universal', 'standard', 'inline'}. Otherwise, it\n        can be a jinja2.Template object containing a custom template.\n\n    Returns\n    -------\n    output : string\n        an HTML string for rendering the chart.\n    \"\"\"\n    embed_options = embed_options or {}\n    json_kwds = json_kwds or {}\n\n    mode = embed_options.setdefault(\"mode\", mode)\n\n    if mode not in {\"vega\", \"vega-lite\"}:\n        msg = \"mode must be either 'vega' or 'vega-lite'\"\n        raise ValueError(msg)\n\n    if vega_version is None:\n        msg = \"must specify vega_version\"\n        raise ValueError(msg)\n\n    if vegaembed_version is None:\n        msg = \"must specify vegaembed_version\"\n        raise ValueError(msg)\n\n    if mode == \"vega-lite\" and vegalite_version is None:\n        msg = \"must specify vega-lite version for mode='vega-lite'\"\n        raise ValueError(msg)\n\n    render_kwargs = {}\n    if template == \"inline\":\n        vlc = import_vl_convert()\n        vl_version = vl_version_for_vl_convert()\n        render_kwargs[\"vegaembed_script\"] = vlc.javascript_bundle(vl_version=vl_version)\n    elif template == \"olli\":\n        OLLI_VERSION = \"2\"\n        OLLI_ADAPTERS_VERSION = \"2\"\n        render_kwargs[\"olli_version\"] = OLLI_VERSION\n        render_kwargs[\"olli_adapters_version\"] = OLLI_ADAPTERS_VERSION\n\n    jinja_template = TEMPLATES.get(template, template)  # type: ignore[arg-type]\n    if not hasattr(jinja_template, \"render\"):\n        msg = f\"Invalid template: {jinja_template}\"\n        raise ValueError(msg)\n\n    return jinja_template.render(\n        spec=json.dumps(spec, **json_kwds),\n        embed_options=json.dumps(embed_options),\n        mode=mode,\n        vega_version=vega_version,\n        vegalite_version=vegalite_version,\n        vegaembed_version=vegaembed_version,\n        base_url=base_url,\n        output_div=output_div,\n        fullhtml=fullhtml,\n        requirejs=requirejs,\n        **render_kwargs,\n    )\n"
  },
  {
    "path": "altair/utils/mimebundle.py",
    "content": "from __future__ import annotations\n\nimport struct\nfrom typing import TYPE_CHECKING, Any, Literal, cast, overload\n\nfrom ._importers import import_vl_convert, vl_version_for_vl_convert\nfrom .html import spec_to_html\n\nif TYPE_CHECKING:\n    from typing import TypeAlias\n\nMimeBundleFormat: TypeAlias = Literal[\n    \"html\", \"json\", \"png\", \"svg\", \"pdf\", \"vega\", \"vega-lite\"\n]\n\n\n@overload\ndef spec_to_mimebundle(\n    spec: dict[str, Any],\n    format: Literal[\"json\", \"vega-lite\"],\n    mode: Literal[\"vega-lite\"] | None = ...,\n    vega_version: str | None = ...,\n    vegaembed_version: str | None = ...,\n    vegalite_version: str | None = ...,\n    embed_options: dict[str, Any] | None = ...,\n    engine: Literal[\"vl-convert\"] | None = ...,\n    **kwargs,\n) -> dict[str, dict[str, Any]]: ...\n@overload\ndef spec_to_mimebundle(\n    spec: dict[str, Any],\n    format: Literal[\"html\"],\n    mode: Literal[\"vega-lite\"] | None = ...,\n    vega_version: str | None = ...,\n    vegaembed_version: str | None = ...,\n    vegalite_version: str | None = ...,\n    embed_options: dict[str, Any] | None = ...,\n    engine: Literal[\"vl-convert\"] | None = ...,\n    **kwargs,\n) -> dict[str, str]: ...\n@overload\ndef spec_to_mimebundle(\n    spec: dict[str, Any],\n    format: Literal[\"pdf\", \"svg\", \"vega\"],\n    mode: Literal[\"vega-lite\"] | None = ...,\n    vega_version: str | None = ...,\n    vegaembed_version: str | None = ...,\n    vegalite_version: str | None = ...,\n    embed_options: dict[str, Any] | None = ...,\n    engine: Literal[\"vl-convert\"] | None = ...,\n    **kwargs,\n) -> dict[str, Any]: ...\n@overload\ndef spec_to_mimebundle(\n    spec: dict[str, Any],\n    format: Literal[\"png\"],\n    mode: Literal[\"vega-lite\"] | None = ...,\n    vega_version: str | None = ...,\n    vegaembed_version: str | None = ...,\n    vegalite_version: str | None = ...,\n    embed_options: dict[str, Any] | None = ...,\n    engine: Literal[\"vl-convert\"] | None = ...,\n    **kwargs,\n) -> tuple[dict[str, Any], dict[str, Any]]: ...\ndef spec_to_mimebundle(\n    spec: dict[str, Any],\n    format: MimeBundleFormat,\n    mode: Literal[\"vega-lite\"] | None = None,\n    vega_version: str | None = None,\n    vegaembed_version: str | None = None,\n    vegalite_version: str | None = None,\n    embed_options: dict[str, Any] | None = None,\n    engine: Literal[\"vl-convert\"] | None = None,\n    **kwargs,\n) -> dict[str, Any] | tuple[dict[str, Any], dict[str, Any]]:\n    \"\"\"\n    Convert a vega-lite specification to a mimebundle.\n\n    The mimebundle type is controlled by the ``format`` argument, which can be\n    one of the following ['html', 'json', 'png', 'svg', 'pdf', 'vega', 'vega-lite']\n\n    Parameters\n    ----------\n    spec : dict\n        a dictionary representing a vega-lite plot spec\n    format : string {'html', 'json', 'png', 'svg', 'pdf', 'vega', 'vega-lite'}\n        the file format to be saved.\n    mode : string {'vega-lite'}\n        The rendering mode.\n    vega_version : string\n        The version of vega.js to use\n    vegaembed_version : string\n        The version of vegaembed.js to use\n    vegalite_version : string\n        The version of vegalite.js to use. Only required if mode=='vega-lite'\n    embed_options : dict (optional)\n        The vegaEmbed options dictionary. Defaults to the embed options set with\n        alt.renderers.set_embed_options().\n        (See https://github.com/vega/vega-embed for details)\n    engine: string {'vl-convert'}\n        the conversion engine to use for 'png', 'svg', 'pdf', and 'vega' formats\n    **kwargs :\n        Additional arguments will be passed to the generating function\n\n    Returns\n    -------\n    output : dict\n        a mime-bundle representing the image\n\n    Note\n    ----\n    The png, svg, pdf, and vega outputs require the vl-convert package\n    \"\"\"\n    # Local import to avoid circular ImportError\n    from altair import renderers\n    from altair.utils.display import compile_with_vegafusion, using_vegafusion\n\n    if mode != \"vega-lite\":\n        msg = \"mode must be 'vega-lite'\"\n        raise ValueError(msg)\n\n    internal_mode: Literal[\"vega-lite\", \"vega\"] = mode\n    if using_vegafusion():\n        spec = compile_with_vegafusion(spec)\n        internal_mode = \"vega\"\n\n    # Default to the embed options set by alt.renderers.set_embed_options\n    if embed_options is None:\n        final_embed_options = renderers.options.get(\"embed_options\", {})\n    else:\n        final_embed_options = embed_options\n\n    embed_options = preprocess_embed_options(final_embed_options)\n\n    if format in {\"png\", \"svg\", \"pdf\", \"vega\"}:\n        return _spec_to_mimebundle_with_engine(\n            spec,\n            cast(\"Literal['png', 'svg', 'pdf', 'vega']\", format),\n            internal_mode,\n            engine=engine,\n            format_locale=embed_options.get(\"formatLocale\", None),\n            time_format_locale=embed_options.get(\"timeFormatLocale\", None),\n            **kwargs,\n        )\n    elif format == \"html\":\n        html = spec_to_html(\n            spec,\n            mode=internal_mode,\n            vega_version=vega_version,\n            vegaembed_version=vegaembed_version,\n            vegalite_version=vegalite_version,\n            embed_options=embed_options,\n            **kwargs,\n        )\n        return {\"text/html\": html}\n    elif format == \"vega-lite\":\n        if vegalite_version is None:\n            msg = \"Must specify vegalite_version\"\n            raise ValueError(msg)\n        return {f\"application/vnd.vegalite.v{vegalite_version[0]}+json\": spec}\n    elif format == \"json\":\n        return {\"application/json\": spec}\n    else:\n        msg = (\n            \"format must be one of \"\n            \"['html', 'json', 'png', 'svg', 'pdf', 'vega', 'vega-lite']\"\n        )\n        raise ValueError(msg)\n\n\ndef _spec_to_mimebundle_with_engine(\n    spec: dict,\n    format: Literal[\"png\", \"svg\", \"pdf\", \"vega\"],\n    mode: Literal[\"vega-lite\", \"vega\"],\n    format_locale: str | dict | None = None,\n    time_format_locale: str | dict | None = None,\n    **kwargs,\n) -> Any:\n    \"\"\"\n    Helper for Vega-Lite to mimebundle conversions that require an engine.\n\n    Parameters\n    ----------\n    spec : dict\n        a dictionary representing a vega-lite plot spec\n    format : string {'png', 'svg', 'pdf', 'vega'}\n        the format of the mimebundle to be returned\n    mode : string {'vega-lite', 'vega'}\n        The rendering mode.\n    engine: string {'vl-convert'}\n        the conversion engine to use\n    format_locale : str or dict\n        d3-format locale name or dictionary. Defaults to \"en-US\" for United States English.\n        See https://github.com/d3/d3-format/tree/main/locale for available names and example\n        definitions.\n    time_format_locale : str or dict\n        d3-time-format locale name or dictionary. Defaults to \"en-US\" for United States English.\n        See https://github.com/d3/d3-time-format/tree/main/locale for available names and example\n        definitions.\n    **kwargs :\n        Additional arguments will be passed to the conversion function\n    \"\"\"\n    # Normalize the engine string (if any) by lower casing\n    # and removing underscores and hyphens\n    engine = kwargs.pop(\"engine\", None)\n    normalized_engine = _validate_normalize_engine(engine, format)\n\n    if normalized_engine == \"vlconvert\":\n        vlc = import_vl_convert()\n        vl_version = vl_version_for_vl_convert()\n        if format == \"vega\":\n            if mode == \"vega\":\n                vg = spec\n            else:\n                vg = vlc.vegalite_to_vega(spec, vl_version=vl_version)\n            return {\"application/vnd.vega.v6+json\": vg}\n        elif format == \"svg\":\n            if mode == \"vega\":\n                svg = vlc.vega_to_svg(\n                    spec,\n                    format_locale=format_locale,\n                    time_format_locale=time_format_locale,\n                )\n            else:\n                svg = vlc.vegalite_to_svg(\n                    spec,\n                    vl_version=vl_version,\n                    format_locale=format_locale,\n                    time_format_locale=time_format_locale,\n                )\n            return {\"image/svg+xml\": svg}\n        elif format == \"png\":\n            scale = kwargs.get(\"scale_factor\", 1)\n            # The default ppi for a PNG file is 72\n            default_ppi = 72\n            ppi = kwargs.get(\"ppi\", default_ppi)\n            if mode == \"vega\":\n                png = vlc.vega_to_png(\n                    spec,\n                    scale=scale,\n                    ppi=ppi,\n                    format_locale=format_locale,\n                    time_format_locale=time_format_locale,\n                )\n            else:\n                png = vlc.vegalite_to_png(\n                    spec,\n                    vl_version=vl_version,\n                    scale=scale,\n                    ppi=ppi,\n                    format_locale=format_locale,\n                    time_format_locale=time_format_locale,\n                )\n            factor = ppi / default_ppi\n            w, h = _pngxy(png)\n            return {\"image/png\": png}, {\n                \"image/png\": {\"width\": w / factor, \"height\": h / factor}\n            }\n        elif format == \"pdf\":\n            scale = kwargs.get(\"scale_factor\", 1)\n            if mode == \"vega\":\n                pdf = vlc.vega_to_pdf(\n                    spec,\n                    scale=scale,\n                    format_locale=format_locale,\n                    time_format_locale=time_format_locale,\n                )\n            else:\n                pdf = vlc.vegalite_to_pdf(\n                    spec,\n                    vl_version=vl_version,\n                    scale=scale,\n                    format_locale=format_locale,\n                    time_format_locale=time_format_locale,\n                )\n            return {\"application/pdf\": pdf}\n        else:\n            # This should be validated above\n            # but raise exception for the sake of future development\n            msg = f\"Unexpected format {format!r}\"\n            raise ValueError(msg)\n    else:\n        # This should be validated above\n        # but raise exception for the sake of future development\n        msg = f\"Unexpected normalized_engine {normalized_engine!r}\"\n        raise ValueError(msg)\n\n\ndef _validate_normalize_engine(\n    engine: Literal[\"vl-convert\"] | None,\n    format: Literal[\"png\", \"svg\", \"pdf\", \"vega\"],\n) -> str:\n    \"\"\"\n    Helper to validate and normalize the user-provided engine.\n\n    engine : {None, 'vl-convert'}\n        the user-provided engine string\n    format : string {'png', 'svg', 'pdf', 'vega'}\n        the format of the mimebundle to be returned\n    \"\"\"\n    # Try to import vl_convert\n    try:\n        vlc = import_vl_convert()\n    except ImportError:\n        vlc = None\n\n    # Normalize engine string by lower casing and removing underscores and hyphens\n    normalized_engine = (\n        None if engine is None else engine.lower().replace(\"-\", \"\").replace(\"_\", \"\")\n    )\n\n    # Validate or infer default value of normalized_engine\n    if normalized_engine == \"vlconvert\":\n        if vlc is None:\n            msg = \"The 'vl-convert' conversion engine requires the vl-convert-python package\"\n            raise ValueError(msg)\n    elif normalized_engine is None:\n        if vlc is not None:\n            normalized_engine = \"vlconvert\"\n        else:\n            msg = (\n                f\"Saving charts in {format!r} format requires the vl-convert-python package: \"\n                \"see https://altair-viz.github.io/user_guide/saving_charts.html#png-svg-and-pdf-format\"\n            )\n            raise ValueError(msg)\n    else:\n        msg = f\"Invalid conversion engine {engine!r}. Expected vl-convert\"\n        raise ValueError(msg)\n    return normalized_engine\n\n\ndef _pngxy(data):\n    \"\"\"\n    Read the (width, height) from a PNG header.\n\n    Taken from IPython.display\n    \"\"\"\n    ihdr = data.index(b\"IHDR\")\n    # next 8 bytes are width/height\n    return struct.unpack(\">ii\", data[ihdr + 4 : ihdr + 12])\n\n\ndef preprocess_embed_options(embed_options: dict) -> dict:\n    \"\"\"\n    Preprocess embed options to a form compatible with Vega Embed.\n\n    Parameters\n    ----------\n    embed_options : dict\n        The embed options dictionary to preprocess.\n\n    Returns\n    -------\n    embed_opts : dict\n        The preprocessed embed options dictionary.\n    \"\"\"\n    embed_options = (embed_options or {}).copy()\n\n    # Convert locale strings to objects compatible with Vega Embed using vl-convert\n    format_locale = embed_options.get(\"formatLocale\", None)\n    if isinstance(format_locale, str):\n        vlc = import_vl_convert()\n        embed_options[\"formatLocale\"] = vlc.get_format_locale(format_locale)\n\n    time_format_locale = embed_options.get(\"timeFormatLocale\", None)\n    if isinstance(time_format_locale, str):\n        vlc = import_vl_convert()\n        embed_options[\"timeFormatLocale\"] = vlc.get_time_format_locale(\n            time_format_locale\n        )\n\n    return embed_options\n"
  },
  {
    "path": "altair/utils/plugin_registry.py",
    "content": "from __future__ import annotations\n\nimport sys\nfrom collections.abc import Callable\nfrom functools import partial\nfrom importlib.metadata import entry_points\nfrom typing import TYPE_CHECKING, Any, Generic, TypeVar, cast\n\nfrom altair.utils.deprecation import deprecated_warn\n\nif sys.version_info >= (3, 13):\n    from typing import TypeIs\nelse:\n    from typing_extensions import TypeIs\nif sys.version_info >= (3, 12):\n    from typing import TypeAliasType\nelse:\n    from typing_extensions import TypeAliasType\n\nif TYPE_CHECKING:\n    from types import TracebackType\n\nT = TypeVar(\"T\")\nR = TypeVar(\"R\")\nPlugin = TypeAliasType(\"Plugin\", Callable[..., R], type_params=(R,))\nPluginT = TypeVar(\"PluginT\", bound=Plugin[Any])\nIsPlugin = Callable[[object], TypeIs[Plugin[Any]]]\n\n\ndef _is_type(tp: type[T], /) -> Callable[[object], TypeIs[type[T]]]:\n    \"\"\"\n    Converts a type to guard function.\n\n    Added for compatibility with original `PluginRegistry` default.\n    \"\"\"\n\n    def func(obj: object, /) -> TypeIs[type[T]]:\n        return isinstance(obj, tp)\n\n    return func\n\n\nclass NoSuchEntryPoint(Exception):\n    def __init__(self, group, name):\n        self.group = group\n        self.name = name\n\n    def __str__(self):\n        return f\"No {self.name!r} entry point found in group {self.group!r}\"\n\n\nclass PluginEnabler(Generic[PluginT, R]):\n    \"\"\"\n    Context manager for enabling plugins.\n\n    This object lets you use enable() as a context manager to\n    temporarily enable a given plugin::\n\n        with plugins.enable(\"name\"):\n            do_something()  # 'name' plugin temporarily enabled\n        # plugins back to original state\n    \"\"\"\n\n    def __init__(\n        self, registry: PluginRegistry[PluginT, R], name: str, **options: Any\n    ) -> None:\n        self.registry: PluginRegistry[PluginT, R] = registry\n        self.name: str = name\n        self.options: dict[str, Any] = options\n        self.original_state: dict[str, Any] = registry._get_state()\n        self.registry._enable(name, **options)\n\n    def __enter__(self) -> PluginEnabler[PluginT, R]:\n        return self\n\n    def __exit__(self, typ: type, value: Exception, traceback: TracebackType) -> None:\n        self.registry._set_state(self.original_state)\n\n    def __repr__(self) -> str:\n        return f\"{type(self.registry).__name__}.enable({self.name!r})\"\n\n\nclass PluginRegistry(Generic[PluginT, R]):\n    \"\"\"\n    A registry for plugins.\n\n    This is a plugin registry that allows plugins to be loaded/registered\n    in two ways:\n\n    1. Through an explicit call to ``.register(name, value)``.\n    2. By looking for other Python packages that are installed and provide\n       a setuptools entry point group.\n\n    When you create an instance of this class, provide the name of the\n    entry point group to use::\n\n        reg = PluginRegister(\"my_entrypoint_group\")\n\n    \"\"\"\n\n    # this is a mapping of name to error message to allow custom error messages\n    # in case an entrypoint is not found\n    entrypoint_err_messages: dict[str, str] = {}\n\n    # global settings is a key-value mapping of settings that are stored globally\n    # in the registry rather than passed to the plugins\n    _global_settings: dict[str, Any] = {}\n\n    def __init__(\n        self, entry_point_group: str = \"\", plugin_type: IsPlugin = callable\n    ) -> None:\n        \"\"\"\n        Create a PluginRegistry for a named entry point group.\n\n        Parameters\n        ----------\n        entry_point_group: str\n            The name of the entry point group.\n        plugin_type\n            A type narrowing function that will optionally be used for runtime\n            type checking loaded plugins.\n\n        References\n        ----------\n        https://typing.readthedocs.io/en/latest/spec/narrowing.html\n        \"\"\"\n        self.entry_point_group: str = entry_point_group\n        self.plugin_type: IsPlugin\n        if plugin_type is not callable and isinstance(plugin_type, type):\n            msg: Any = (\n                f\"Pass a callable `TypeIs` function to `plugin_type` instead.\\n\"\n                f\"{type(self).__name__!r}(plugin_type)\\n\\n\"\n                f\"See also:\\n\"\n                f\"https://typing.readthedocs.io/en/latest/spec/narrowing.html\\n\"\n                f\"https://docs.astral.sh/ruff/rules/assert/\"\n            )\n            deprecated_warn(msg, version=\"5.4.0\")\n            self.plugin_type = cast(\"IsPlugin\", _is_type(plugin_type))\n        else:\n            self.plugin_type = plugin_type\n        self._active: Plugin[R] | None = None\n        self._active_name: str = \"\"\n        self._plugins: dict[str, PluginT] = {}\n        self._options: dict[str, Any] = {}\n        self._global_settings: dict[str, Any] = self.__class__._global_settings.copy()\n\n    def register(self, name: str, value: PluginT | None) -> PluginT | None:\n        \"\"\"\n        Register a plugin by name and value.\n\n        This method is used for explicit registration of a plugin and shouldn't be\n        used to manage entry point managed plugins, which are auto-loaded.\n\n        Parameters\n        ----------\n        name: str\n            The name of the plugin.\n        value: PluginType or None\n            The actual plugin object to register or None to unregister that plugin.\n\n        Returns\n        -------\n        plugin: PluginType or None\n            The plugin that was registered or unregistered.\n        \"\"\"\n        if value is None:\n            return self._plugins.pop(name, None)\n        elif self.plugin_type(value):\n            self._plugins[name] = value\n            return value\n        else:\n            msg = f\"{type(value).__name__!r} is not compatible with {type(self).__name__!r}\"\n            raise TypeError(msg)\n\n    def names(self) -> list[str]:\n        \"\"\"List the names of the registered and entry points plugins.\"\"\"\n        exts = list(self._plugins.keys())\n        e_points = importlib_metadata_get(self.entry_point_group)\n        more_exts = [ep.name for ep in e_points]\n        exts.extend(more_exts)\n        return sorted(set(exts))\n\n    def _get_state(self) -> dict[str, Any]:\n        \"\"\"Return a dictionary representing the current state of the registry.\"\"\"\n        return {\n            \"_active\": self._active,\n            \"_active_name\": self._active_name,\n            \"_plugins\": self._plugins.copy(),\n            \"_options\": self._options.copy(),\n            \"_global_settings\": self._global_settings.copy(),\n        }\n\n    def _set_state(self, state: dict[str, Any]) -> None:\n        \"\"\"Reset the state of the registry.\"\"\"\n        assert set(state.keys()) == {\n            \"_active\",\n            \"_active_name\",\n            \"_plugins\",\n            \"_options\",\n            \"_global_settings\",\n        }\n        for key, val in state.items():\n            setattr(self, key, val)\n\n    def _enable(self, name: str, **options) -> None:\n        if name not in self._plugins:\n            try:\n                (ep,) = (\n                    ep\n                    for ep in importlib_metadata_get(self.entry_point_group)\n                    if ep.name == name\n                )\n            except ValueError as err:\n                if name in self.entrypoint_err_messages:\n                    raise ValueError(self.entrypoint_err_messages[name]) from err\n                else:\n                    raise NoSuchEntryPoint(self.entry_point_group, name) from err\n            value = cast(\"PluginT\", ep.load())\n            self.register(name, value)\n        self._active_name = name\n        self._active = self._plugins[name]\n        for key in set(options.keys()) & set(self._global_settings.keys()):\n            self._global_settings[key] = options.pop(key)\n        self._options = options\n\n    def enable(\n        self, name: str | None = None, **options: Any\n    ) -> PluginEnabler[PluginT, R]:\n        \"\"\"\n        Enable a plugin by name.\n\n        This can be either called directly, or used as a context manager.\n\n        Parameters\n        ----------\n        name : string (optional)\n            The name of the plugin to enable. If not specified, then use the\n            current active name.\n        **options :\n            Any additional parameters will be passed to the plugin as keyword\n            arguments\n\n        Returns\n        -------\n        PluginEnabler:\n            An object that allows enable() to be used as a context manager\n        \"\"\"\n        if name is None:\n            name = self.active\n        return PluginEnabler(self, name, **options)\n\n    @property\n    def active(self) -> str:\n        \"\"\"Return the name of the currently active plugin.\"\"\"\n        return self._active_name\n\n    @property\n    def options(self) -> dict[str, Any]:\n        \"\"\"Return the current options dictionary.\"\"\"\n        return self._options\n\n    def get(self) -> partial[R] | Plugin[R] | None:\n        \"\"\"Return the currently active plugin.\"\"\"\n        if (func := self._active) and self.plugin_type(func):\n            return partial(func, **self._options) if self._options else func\n        elif self._active is not None:\n            msg = (\n                f\"{type(self).__name__!r} requires all plugins to be callable objects, \"\n                f\"but {type(self._active).__name__!r} is not callable.\"\n            )\n            raise TypeError(msg)\n        elif TYPE_CHECKING:\n            # NOTE: The `None` return is implicit, but `mypy` isn't satisfied\n            # - `ruff` will factor out explicit `None` return\n            # - `pyright` has no issue\n            raise NotImplementedError\n\n    def __repr__(self) -> str:\n        return f\"{type(self).__name__}(active={self.active!r}, registered={self.names()!r})\"\n\n\ndef importlib_metadata_get(group):\n    ep = entry_points()\n    # 'select' was introduced in Python 3.10 and 'get' got deprecated\n    # We don't check for Python version here as by checking with hasattr we\n    # also get compatibility with the importlib_metadata package which had a different\n    # deprecation cycle for 'get'\n    if hasattr(ep, \"select\"):\n        return ep.select(group=group)  # pyright: ignore\n    else:\n        return ep.get(group, [])\n"
  },
  {
    "path": "altair/utils/save.py",
    "content": "from __future__ import annotations\n\nimport json\nimport pathlib\nimport warnings\nfrom typing import IO, TYPE_CHECKING, Any, Literal\n\nfrom altair.utils._vegafusion_data import using_vegafusion\nfrom altair.utils.deprecation import deprecated_warn\nfrom altair.vegalite.v6.data import data_transformers\n\nfrom .mimebundle import spec_to_mimebundle\n\nif TYPE_CHECKING:\n    from pathlib import Path\n\n\ndef write_file_or_filename(\n    fp: str | Path | IO[Any],\n    content: str | bytes,\n    mode: str = \"w\",\n    encoding: str | None = None,\n) -> None:\n    \"\"\"Write content to fp, whether fp is a string, a pathlib Path or a file-like object.\"\"\"\n    if isinstance(fp, (str, pathlib.Path)):\n        with pathlib.Path(fp).open(mode=mode, encoding=encoding) as f:\n            f.write(content)\n    else:\n        fp.write(content)\n\n\ndef set_inspect_format_argument(\n    format: str | None, fp: str | Path | IO[Any], inline: bool\n) -> str:\n    \"\"\"Inspect the format argument in the save function.\"\"\"\n    if format is None:\n        if isinstance(fp, (str, pathlib.Path)):\n            format = pathlib.Path(fp).suffix.lstrip(\".\")\n        else:\n            msg = (\n                \"must specify file format: \"\n                \"['png', 'svg', 'pdf', 'html', 'json', 'vega']\"\n            )\n            raise ValueError(msg)\n\n    if format != \"html\" and inline:\n        warnings.warn(\"inline argument ignored for non HTML formats.\", stacklevel=1)\n\n    return format\n\n\ndef set_inspect_mode_argument(\n    mode: Literal[\"vega-lite\"] | None,\n    embed_options: dict[str, Any],\n    spec: dict[str, Any],\n    vegalite_version: str | None,\n) -> Literal[\"vega-lite\"]:\n    \"\"\"Inspect the mode argument in the save function.\"\"\"\n    if mode is None:\n        if \"mode\" in embed_options:\n            mode = embed_options[\"mode\"]\n        elif \"$schema\" in spec:\n            mode = spec[\"$schema\"].split(\"/\")[-2]\n        else:\n            mode = \"vega-lite\"\n\n    if mode != \"vega-lite\":\n        msg = f\"mode must be 'vega-lite', not '{mode}'\"\n        raise ValueError(msg)\n\n    if mode == \"vega-lite\" and vegalite_version is None:\n        msg = \"must specify vega-lite version\"\n        raise ValueError(msg)\n\n    return mode\n\n\ndef _save_mimebundle_format(\n    spec: dict[str, Any],\n    format: Literal[\"html\", \"png\", \"svg\", \"pdf\", \"vega\"],\n    fp: str | Path | IO[Any],\n    inner_mode: Literal[\"vega-lite\"],\n    vega_version: str | None,\n    vegalite_version: str | None,\n    vegaembed_version: str | None,\n    embed_options: dict[str, Any] | None,\n    json_kwds: dict[str, Any],\n    encoding: str,\n    scale_factor: float,\n    engine: Literal[\"vl-convert\"] | None,\n    inline: bool,\n    **kwargs: Any,\n) -> None:\n    \"\"\"Save chart using spec_to_mimebundle for formats that require it.\"\"\"\n    if format == \"html\":\n        if inline:\n            kwargs[\"template\"] = \"inline\"\n        mb_result: dict[str, str] = spec_to_mimebundle(\n            spec=spec,\n            format=format,\n            mode=inner_mode,\n            vega_version=vega_version,\n            vegalite_version=vegalite_version,\n            vegaembed_version=vegaembed_version,\n            embed_options=embed_options,\n            json_kwds=json_kwds,\n            **kwargs,\n        )\n        write_file_or_filename(fp, mb_result[\"text/html\"], mode=\"w\", encoding=encoding)\n    elif format == \"png\":\n        mb_result_png: tuple[dict[str, Any], dict[str, Any]] = spec_to_mimebundle(\n            spec=spec,\n            format=format,\n            mode=inner_mode,\n            vega_version=vega_version,\n            vegalite_version=vegalite_version,\n            vegaembed_version=vegaembed_version,\n            embed_options=embed_options,\n            scale_factor=scale_factor,\n            engine=engine,\n            **kwargs,\n        )\n        write_file_or_filename(fp, mb_result_png[0][\"image/png\"], mode=\"wb\")\n    elif format == \"svg\":\n        mb_result = spec_to_mimebundle(\n            spec=spec,\n            format=format,\n            mode=inner_mode,\n            vega_version=vega_version,\n            vegalite_version=vegalite_version,\n            vegaembed_version=vegaembed_version,\n            embed_options=embed_options,\n            scale_factor=scale_factor,\n            engine=engine,\n            **kwargs,\n        )\n        write_file_or_filename(\n            fp, mb_result[\"image/svg+xml\"], mode=\"w\", encoding=encoding\n        )\n    elif format == \"pdf\":\n        mb_result = spec_to_mimebundle(\n            spec=spec,\n            format=format,\n            mode=inner_mode,\n            vega_version=vega_version,\n            vegalite_version=vegalite_version,\n            vegaembed_version=vegaembed_version,\n            embed_options=embed_options,\n            scale_factor=scale_factor,\n            engine=engine,\n            **kwargs,\n        )\n        write_file_or_filename(fp, mb_result[\"application/pdf\"], mode=\"wb\")\n    else:  # vega\n        mb_result = spec_to_mimebundle(\n            spec=spec,\n            format=format,\n            mode=inner_mode,\n            vega_version=vega_version,\n            vegalite_version=vegalite_version,\n            vegaembed_version=vegaembed_version,\n            embed_options=embed_options,\n            scale_factor=scale_factor,\n            engine=engine,\n            **kwargs,\n        )\n        json_spec = json.dumps(mb_result[\"application/vnd.vega.v6+json\"], **json_kwds)\n        write_file_or_filename(fp, json_spec, mode=\"w\", encoding=encoding)\n\n\ndef save(\n    chart,\n    fp: str | Path | IO[Any],\n    vega_version: str | None,\n    vegaembed_version: str | None,\n    format: Literal[\"json\", \"html\", \"png\", \"svg\", \"pdf\", \"vega\"] | None = None,\n    mode: Literal[\"vega-lite\"] | None = None,\n    vegalite_version: str | None = None,\n    embed_options: dict[str, Any] | None = None,\n    json_kwds: dict[str, Any] | None = None,\n    scale_factor: float = 1,\n    engine: Literal[\"vl-convert\"] | None = None,\n    inline: bool = False,\n    **kwargs,\n) -> None:\n    \"\"\"\n    Save a chart to file in a variety of formats.\n\n    Supported formats are [json, html, png, svg, pdf, vega]\n\n    Parameters\n    ----------\n    chart : alt.Chart\n        the chart instance to save\n    fp : string filename, pathlib.Path or file-like object\n        file to which to write the chart.\n    format : string (optional)\n        the format to write: one of ['json', 'html', 'png', 'svg', 'pdf', 'vega'].\n        If not specified, the format will be determined from the filename.\n    mode : string (optional)\n        Must be 'vega-lite'. If not specified, then infer the mode from\n        the '$schema' property of the spec, or the ``opt`` dictionary.\n        If it's not specified in either of those places, then use 'vega-lite'.\n    vega_version : string (optional)\n        For html output, the version of vega.js to use\n    vegalite_version : string (optional)\n        For html output, the version of vegalite.js to use\n    vegaembed_version : string (optional)\n        For html output, the version of vegaembed.js to use\n    embed_options : dict (optional)\n        The vegaEmbed options dictionary. Default is {}\n        (See https://github.com/vega/vega-embed for details)\n    json_kwds : dict (optional)\n        Additional keyword arguments are passed to the output method\n        associated with the specified format.\n    scale_factor : float (optional)\n        scale_factor to use to change size/resolution of png or svg output\n    engine: string {'vl-convert'}\n        the conversion engine to use for 'png', 'svg', 'pdf', and 'vega' formats\n    inline: bool (optional)\n        If False (default), the required JavaScript libraries are loaded\n        from a CDN location in the resulting html file.\n        If True, the required JavaScript libraries are inlined into the resulting\n        html file so that it will work without an internet connection.\n        The vl-convert-python package is required if True.\n    **kwargs :\n        additional kwargs passed to spec_to_mimebundle.\n    \"\"\"\n    if _ := kwargs.pop(\"webdriver\", None):\n        deprecated_warn(\n            \"The webdriver argument is not relevant for the new vl-convert engine which replaced altair_saver. \"\n            \"The argument will be removed in a future release.\",\n            version=\"5.0.0\",\n        )\n\n    json_kwds = json_kwds or {}\n    encoding = kwargs.get(\"encoding\", \"utf-8\")\n    format = set_inspect_format_argument(format, fp, inline)  # type: ignore\n\n    def perform_save() -> None:\n        spec = chart.to_dict(context={\"pre_transform\": False})\n\n        inner_mode = set_inspect_mode_argument(\n            mode, embed_options or {}, spec, vegalite_version\n        )\n\n        if format == \"json\":\n            json_spec = json.dumps(spec, **json_kwds)\n            write_file_or_filename(fp, json_spec, mode=\"w\", encoding=encoding)\n        elif format in {\"html\", \"png\", \"svg\", \"pdf\", \"vega\"}:\n            _save_mimebundle_format(\n                spec=spec,\n                format=format,\n                fp=fp,\n                inner_mode=inner_mode,\n                vega_version=vega_version,\n                vegalite_version=vegalite_version,\n                vegaembed_version=vegaembed_version,\n                embed_options=embed_options,\n                json_kwds=json_kwds,\n                encoding=encoding,\n                scale_factor=scale_factor,\n                engine=engine,\n                inline=inline,\n                **kwargs,\n            )\n        else:\n            msg = f\"Unsupported format: '{format}'\"\n            raise ValueError(msg)\n\n    if using_vegafusion():\n        # When the vegafusion data transformer is enabled, transforms will be\n        # evaluated during save and the resulting data will be included in the\n        # vega specification that is saved.\n        with data_transformers.disable_max_rows():\n            perform_save()\n    else:\n        # Temporarily turn off any data transformers so that all data is inlined\n        # when calling chart.to_dict. This is relevant for vl-convert which cannot access\n        # local json files which could be created by a json data transformer. Furthermore,\n        # we don't exit the with statement until this function completed due to the issue\n        # described at https://github.com/vega/vl-convert/issues/31\n        with data_transformers.enable(\"default\"), data_transformers.disable_max_rows():\n            perform_save()\n"
  },
  {
    "path": "altair/utils/schemapi.py",
    "content": "# The contents of this file are automatically written by\n# tools/generate_schema_wrapper.py. Do not modify directly.\nfrom __future__ import annotations\n\nimport contextlib\nimport copy\nimport datetime as dt\nimport inspect\nimport json\nimport operator\nimport sys\nimport textwrap\nimport zoneinfo\nfrom collections import defaultdict\nfrom collections.abc import Iterable, Iterator, Mapping, Sequence\nfrom functools import partial\nfrom importlib.metadata import version as importlib_version\nfrom itertools import chain, zip_longest\nfrom math import ceil\nfrom typing import TYPE_CHECKING, Any, Final, Generic, Literal, TypeVar, cast, overload\n\nimport jsonschema\nimport jsonschema.exceptions\nimport jsonschema.validators\nimport narwhals.stable.v1 as nw\nfrom narwhals.stable.v1.dependencies import is_narwhals_series\nfrom packaging.version import Version\n\nif sys.version_info >= (3, 12):\n    from typing import Protocol, TypeAliasType, runtime_checkable\nelse:\n    from typing_extensions import Protocol, TypeAliasType, runtime_checkable\n\nif TYPE_CHECKING:\n    from types import ModuleType\n    from typing import ClassVar, TypeAlias\n\n    from jsonschema.exceptions import ValidationError\n    from referencing import Registry\n\n    from altair.typing import ChartType\n\n    if sys.version_info >= (3, 13):\n        from typing import TypeIs\n    else:\n        from typing_extensions import TypeIs\n\n    if sys.version_info >= (3, 11):\n        from typing import Never, Self\n    else:\n        from typing_extensions import Never, Self\n\n    _OptionalModule: TypeAlias = \"ModuleType | None\"\n\nValidationErrorList: TypeAlias = list[jsonschema.exceptions.ValidationError]\nGroupedValidationErrors: TypeAlias = dict[str, ValidationErrorList]\n\n# This URI is arbitrary and could be anything else. It just cannot be an empty\n# string as we need to reference the schema registered in\n# the referencing.Registry.\n_VEGA_LITE_ROOT_URI: Final = \"urn:vega-lite-schema\"\n\n# Ideally, jsonschema specification would be parsed from the current Vega-Lite\n# schema instead of being hardcoded here as a default value.\n# However, due to circular imports between this module and the altair.vegalite\n# modules, this information is not yet available at this point as altair.vegalite\n# is only partially loaded. The draft version which is used is unlikely to\n# change often so it's ok to keep this. There is also a test which validates\n# that this value is always the same as in the Vega-Lite schema.\n_DEFAULT_JSON_SCHEMA_DRAFT_URL: Final = \"http://json-schema.org/draft-07/schema#\"\n\n\n# If DEBUG_MODE is True, then schema objects are converted to dict and\n# validated at creation time. This slows things down, particularly for\n# larger specs, but leads to much more useful tracebacks for the user.\n# Individual schema classes can override this by setting the\n# class-level _class_is_valid_at_instantiation attribute to False\nDEBUG_MODE: bool = True\n\njsonschema_version_str = importlib_version(\"jsonschema\")\n\n\ndef enable_debug_mode() -> None:\n    global DEBUG_MODE\n    DEBUG_MODE = True\n\n\ndef disable_debug_mode() -> None:\n    global DEBUG_MODE\n    DEBUG_MODE = False\n\n\n@contextlib.contextmanager\ndef debug_mode(arg: bool) -> Iterator[None]:\n    global DEBUG_MODE\n    original = DEBUG_MODE\n    DEBUG_MODE = arg\n    try:\n        yield\n    finally:\n        DEBUG_MODE = original\n\n\n@overload\ndef validate_jsonschema(\n    spec: Any,\n    schema: dict[str, Any],\n    rootschema: dict[str, Any] | None = ...,\n    *,\n    raise_error: Literal[True] = ...,\n) -> Never: ...\n\n\n@overload\ndef validate_jsonschema(\n    spec: Any,\n    schema: dict[str, Any],\n    rootschema: dict[str, Any] | None = ...,\n    *,\n    raise_error: Literal[False],\n) -> jsonschema.exceptions.ValidationError | None: ...\n\n\ndef validate_jsonschema(\n    spec,\n    schema: dict[str, Any],\n    rootschema: dict[str, Any] | None = None,\n    *,\n    raise_error: bool = True,\n) -> jsonschema.exceptions.ValidationError | None:\n    \"\"\"\n    Validates the passed in spec against the schema in the context of the rootschema.\n\n    If any errors are found, they are deduplicated and prioritized\n    and only the most relevant errors are kept. Errors are then either raised\n    or returned, depending on the value of `raise_error`.\n    \"\"\"\n    errors = _get_errors_from_spec(spec, schema, rootschema=rootschema)\n    if errors:\n        leaf_errors = _get_leaves_of_error_tree(errors)\n        grouped_errors = _group_errors_by_json_path(leaf_errors)\n        grouped_errors = _subset_to_most_specific_json_paths(grouped_errors)\n        grouped_errors = _deduplicate_errors(grouped_errors)\n\n        # Nothing special about this first error but we need to choose one\n        # which can be raised\n        main_error: Any = next(iter(grouped_errors.values()))[0]\n        # All errors are then attached as a new attribute to ValidationError so that\n        # they can be used in SchemaValidationError to craft a more helpful\n        # error message. Setting a new attribute like this is not ideal as\n        # it then no longer matches the type ValidationError. It would be better\n        # to refactor this function to never raise but only return errors.\n        main_error._all_errors = grouped_errors\n        if raise_error:\n            raise main_error\n        else:\n            return main_error\n    else:\n        return None\n\n\ndef _get_errors_from_spec(\n    spec: dict[str, Any],\n    schema: dict[str, Any],\n    rootschema: dict[str, Any] | None = None,\n) -> ValidationErrorList:\n    \"\"\"\n    Uses the relevant jsonschema validator to validate the passed in spec against the schema using the rootschema to resolve references.\n\n    The schema and rootschema themselves are not validated but instead considered as valid.\n    \"\"\"\n    # We don't use jsonschema.validate as this would validate the schema itself.\n    # Instead, we pass the schema directly to the validator class. This is done for\n    # two reasons: The schema comes from Vega-Lite and is not based on the user\n    # input, therefore there is no need to validate it in the first place. Furthermore,\n    # the \"uri-reference\" format checker fails for some of the references as URIs in\n    # \"$ref\" are not encoded,\n    # e.g. '#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,\n    # (Gradient|string|null)>' would be a valid $ref in a Vega-Lite schema but\n    # it is not a valid URI reference due to the characters such as '<'.\n\n    json_schema_draft_url = _get_json_schema_draft_url(rootschema or schema)\n    validator_cls = jsonschema.validators.validator_for(\n        {\"$schema\": json_schema_draft_url}\n    )\n    validator_kwargs: dict[str, Any] = {}\n    if hasattr(validator_cls, \"FORMAT_CHECKER\"):\n        validator_kwargs[\"format_checker\"] = validator_cls.FORMAT_CHECKER\n\n    if _use_referencing_library():\n        schema = _prepare_references_in_schema(schema)\n        validator_kwargs[\"registry\"] = _get_referencing_registry(\n            rootschema or schema, json_schema_draft_url\n        )\n\n    else:\n        # No resolver is necessary if the schema is already the full schema\n        validator_kwargs[\"resolver\"] = (\n            jsonschema.RefResolver.from_schema(rootschema)\n            if rootschema is not None\n            else None\n        )\n\n    validator = validator_cls(schema, **validator_kwargs)\n    errors = list(validator.iter_errors(spec))\n    return errors\n\n\ndef _get_json_schema_draft_url(schema: dict[str, Any]) -> str:\n    return schema.get(\"$schema\", _DEFAULT_JSON_SCHEMA_DRAFT_URL)\n\n\ndef _use_referencing_library() -> bool:\n    \"\"\"In version 4.18.0, the jsonschema package deprecated RefResolver in favor of the referencing library.\"\"\"\n    return Version(jsonschema_version_str) >= Version(\"4.18\")\n\n\ndef _prepare_references_in_schema(schema: dict[str, Any]) -> dict[str, Any]:\n    # Create a copy so that $ref is not modified in the original schema in case\n    # that it would still reference a dictionary which might be attached to\n    # an Altair class _schema attribute\n    schema = copy.deepcopy(schema)\n\n    def _prepare_refs(d: dict[str, Any]) -> dict[str, Any]:\n        \"\"\"\n        Add _VEGA_LITE_ROOT_URI in front of all $ref values.\n\n        This function recursively iterates through the whole dictionary.\n\n        $ref values can only be nested in dictionaries or lists\n        as the passed in `d` dictionary comes from the Vega-Lite json schema\n        and in json we only have arrays (-> lists in Python) and objects\n        (-> dictionaries in Python) which we need to iterate through.\n        \"\"\"\n        for key, value in d.items():\n            if key == \"$ref\":\n                d[key] = _VEGA_LITE_ROOT_URI + d[key]\n            elif isinstance(value, dict):\n                d[key] = _prepare_refs(value)\n            elif isinstance(value, list):\n                prepared_values = []\n                for v in value:\n                    if isinstance(v, dict):\n                        v = _prepare_refs(v)\n                    prepared_values.append(v)\n                d[key] = prepared_values\n        return d\n\n    schema = _prepare_refs(schema)\n    return schema\n\n\n# We do not annotate the return value here as the referencing library is not always\n# available and this function is only executed in those cases.\ndef _get_referencing_registry(\n    rootschema: dict[str, Any], json_schema_draft_url: str | None = None\n) -> Registry:\n    # Referencing is a dependency of newer jsonschema versions, starting with the\n    # version that is specified in _use_referencing_library and we therefore\n    # can expect that it is installed if the function returns True.\n    # We ignore 'import' mypy errors which happen when the referencing library\n    # is not installed. That's ok as in these cases this function is not called.\n    # We also have to ignore 'unused-ignore' errors as mypy raises those in case\n    # referencing is installed.\n    import referencing  # type: ignore[import,unused-ignore]\n    import referencing.jsonschema  # type: ignore[import,unused-ignore]\n\n    if json_schema_draft_url is None:\n        json_schema_draft_url = _get_json_schema_draft_url(rootschema)\n\n    specification = referencing.jsonschema.specification_with(json_schema_draft_url)\n    resource = specification.create_resource(rootschema)\n    return referencing.Registry().with_resource(\n        uri=_VEGA_LITE_ROOT_URI, resource=resource\n    )\n\n\ndef _json_path(err: jsonschema.exceptions.ValidationError) -> str:\n    \"\"\"\n    Drop in replacement for the .json_path property of the jsonschema ValidationError class.\n\n    This is not available as property for ValidationError with jsonschema<4.0.1.\n\n    More info, see https://github.com/vega/altair/issues/3038.\n    \"\"\"\n    path = \"$\"\n    for elem in err.absolute_path:\n        if isinstance(elem, int):\n            path += \"[\" + str(elem) + \"]\"\n        else:\n            path += \".\" + elem\n    return path\n\n\ndef _group_errors_by_json_path(\n    errors: ValidationErrorList,\n) -> GroupedValidationErrors:\n    \"\"\"\n    Groups errors by the `json_path` attribute of the jsonschema ValidationError class.\n\n    This attribute contains the path to the offending element within\n    a chart specification and can therefore be considered as an identifier of an\n    'issue' in the chart that needs to be fixed.\n    \"\"\"\n    errors_by_json_path = defaultdict(list)\n    for err in errors:\n        err_key = getattr(err, \"json_path\", _json_path(err))\n        errors_by_json_path[err_key].append(err)\n    return dict(errors_by_json_path)\n\n\ndef _get_leaves_of_error_tree(\n    errors: ValidationErrorList,\n) -> ValidationErrorList:\n    \"\"\"\n    For each error in `errors`, it traverses down the \"error tree\" that is generated by the jsonschema library to find and return all \"leaf\" errors.\n\n    These are errors which have no further errors that caused it and so they are the most specific errors\n    with the most specific error messages.\n    \"\"\"\n    leaves: ValidationErrorList = []\n    for err in errors:\n        if err.context:\n            # This means that the error `err` was caused by errors in subschemas.\n            # The list of errors from the subschemas are available in the property\n            # `context`.\n            leaves.extend(_get_leaves_of_error_tree(err.context))\n        else:\n            leaves.append(err)\n    return leaves\n\n\ndef _subset_to_most_specific_json_paths(\n    errors_by_json_path: GroupedValidationErrors,\n) -> GroupedValidationErrors:\n    \"\"\"\n    Removes key (json path), value (errors) pairs where the json path is fully contained in another json path.\n\n    For example if `errors_by_json_path` has two keys, `$.encoding.X` and `$.encoding.X.tooltip`,\n    then the first one will be removed and only the second one is returned.\n\n    This is done under the assumption that more specific json paths give more helpful error messages to the user.\n    \"\"\"\n    errors_by_json_path_specific: GroupedValidationErrors = {}\n    for json_path, errors in errors_by_json_path.items():\n        if not _contained_at_start_of_one_of_other_values(\n            json_path, list(errors_by_json_path.keys())\n        ):\n            errors_by_json_path_specific[json_path] = errors\n    return errors_by_json_path_specific\n\n\ndef _contained_at_start_of_one_of_other_values(x: str, values: Sequence[str]) -> bool:\n    # Does not count as \"contained at start of other value\" if the values are\n    # the same. These cases should be handled separately\n    return any(value.startswith(x) for value in values if x != value)\n\n\ndef _deduplicate_errors(\n    grouped_errors: GroupedValidationErrors,\n) -> GroupedValidationErrors:\n    \"\"\"\n    Some errors have very similar error messages or are just in general not helpful for a user.\n\n    This function removes as many of these cases as possible and\n    can be extended over time to handle new cases that come up.\n    \"\"\"\n    grouped_errors_deduplicated: GroupedValidationErrors = {}\n    for json_path, element_errors in grouped_errors.items():\n        errors_by_validator = _group_errors_by_validator(element_errors)\n\n        deduplication_functions = {\n            \"enum\": _deduplicate_enum_errors,\n            \"additionalProperties\": _deduplicate_additional_properties_errors,\n        }\n        deduplicated_errors: ValidationErrorList = []\n        for validator, errors in errors_by_validator.items():\n            deduplication_func = deduplication_functions.get(validator)\n            if deduplication_func is not None:\n                errors = deduplication_func(errors)\n            deduplicated_errors.extend(_deduplicate_by_message(errors))\n\n        # Removes any ValidationError \"'value' is a required property\" as these\n        # errors are unlikely to be the relevant ones for the user. They come from\n        # validation against a schema definition where the output of `alt.value`\n        # would be valid. However, if a user uses `alt.value`, the `value` keyword\n        # is included automatically from that function and so it's unlikely\n        # that this was what the user intended if the keyword is not present\n        # in the first place.\n        deduplicated_errors = [\n            err for err in deduplicated_errors if not _is_required_value_error(err)\n        ]\n\n        grouped_errors_deduplicated[json_path] = deduplicated_errors\n    return grouped_errors_deduplicated\n\n\ndef _is_required_value_error(err: jsonschema.exceptions.ValidationError) -> bool:\n    return err.validator == \"required\" and err.validator_value == [\"value\"]\n\n\ndef _group_errors_by_validator(errors: ValidationErrorList) -> GroupedValidationErrors:\n    \"\"\"\n    Groups the errors by the json schema \"validator\" that caused the error.\n\n    For example if the error is that a value is not one of an enumeration in the json schema\n    then the \"validator\" is `\"enum\"`, if the error is due to an unknown property that\n    was set although no additional properties are allowed then \"validator\" is\n    `\"additionalProperties`, etc.\n    \"\"\"\n    errors_by_validator: defaultdict[str, ValidationErrorList] = defaultdict(list)\n    for err in errors:\n        # Ignore mypy error as err.validator as it wrongly sees err.validator\n        # as of type Optional[Validator] instead of str which it is according\n        # to the documentation and all tested cases\n        errors_by_validator[err.validator].append(err)  # type: ignore[index]\n    return dict(errors_by_validator)\n\n\ndef _deduplicate_enum_errors(errors: ValidationErrorList) -> ValidationErrorList:\n    \"\"\"\n    Deduplicate enum errors by removing the errors where the allowed values are a subset of another error.\n\n    For example, if `enum` contains two errors and one has `validator_value` (i.e. accepted values) [\"A\", \"B\"] and the\n    other one [\"A\", \"B\", \"C\"] then the first one is removed and the final\n    `enum` list only contains the error with [\"A\", \"B\", \"C\"].\n    \"\"\"\n    if len(errors) > 1:\n        # Values (and therefore `validator_value`) of an enum are always arrays,\n        # see https://json-schema.org/understanding-json-schema/reference/generic.html#enumerated-values\n        # which is why we can use join below\n        value_strings = [\",\".join(err.validator_value) for err in errors]  # type: ignore\n        longest_enums: ValidationErrorList = []\n        for value_str, err in zip(value_strings, errors, strict=False):\n            if not _contained_at_start_of_one_of_other_values(value_str, value_strings):\n                longest_enums.append(err)\n        errors = longest_enums\n    return errors\n\n\ndef _deduplicate_additional_properties_errors(\n    errors: ValidationErrorList,\n) -> ValidationErrorList:\n    \"\"\"\n    If there are multiple additional property errors it usually means that the offending element was validated against multiple schemas and its parent is a common anyOf validator.\n\n    The error messages produced from these cases are usually\n    very similar and we just take the shortest one. For example,\n    the following 3 errors are raised for the `unknown` channel option in\n    `alt.X(\"variety\", unknown=2)`:\n    - \"Additional properties are not allowed ('unknown' was unexpected)\"\n    - \"Additional properties are not allowed ('field', 'unknown' were unexpected)\"\n    - \"Additional properties are not allowed ('field', 'type', 'unknown' were unexpected)\".\n    \"\"\"\n    if len(errors) > 1:\n        # Test if all parent errors are the same anyOf error and only do\n        # the prioritization in these cases. Can't think of a chart spec where this\n        # would not be the case but still allow for it below to not break anything.\n        parent = errors[0].parent\n        if (\n            parent is not None\n            and parent.validator == \"anyOf\"\n            # Use [1:] as don't have to check for first error as it was used\n            # above to define `parent`\n            and all(err.parent is parent for err in errors[1:])\n        ):\n            errors = [min(errors, key=lambda x: len(x.message))]\n    return errors\n\n\ndef _deduplicate_by_message(errors: ValidationErrorList) -> ValidationErrorList:\n    \"\"\"Deduplicate errors by message. This keeps the original order in case it was chosen intentionally.\"\"\"\n    return list({e.message: e for e in errors}.values())\n\n\ndef _subclasses(cls: type[Any]) -> Iterator[type[Any]]:\n    \"\"\"Breadth-first sequence of all classes which inherit from cls.\"\"\"\n    seen = {cls}\n    current_set = {cls}\n    while current_set:\n        next_set = set()\n        for base in current_set:\n            for sub in base.__subclasses__():\n                if sub not in seen:\n                    yield sub\n                    seen.add(sub)\n                    next_set.add(sub)\n        current_set = next_set\n\n\ndef _from_array_like(obj: Iterable[Any], /) -> list[Any]:\n    # TODO @dangotbanned: Review after available (https://github.com/narwhals-dev/narwhals/pull/2110)\n    # See for what this silences for `narwhals` CI (https://github.com/narwhals-dev/narwhals/pull/2110#issuecomment-2687936504)\n    maybe_ser: Any = nw.from_native(obj, pass_through=True)\n    return maybe_ser.to_list() if is_narwhals_series(maybe_ser) else list(obj)\n\n\ndef _from_date_datetime(obj: dt.date | dt.datetime, /) -> dict[str, Any]:\n    \"\"\"\n    Parse native `datetime.(date|datetime)` into a `DateTime`_ schema.\n\n    .. _DateTime:\n        https://vega.github.io/vega-lite/docs/datetime.html\n    \"\"\"\n    result: dict[str, Any] = {\"year\": obj.year, \"month\": obj.month, \"date\": obj.day}\n    if isinstance(obj, dt.datetime):\n        if obj.time() != dt.time.min:\n            us = obj.microsecond\n            ms = us if us == 0 else us // 1_000\n            result.update(\n                hours=obj.hour, minutes=obj.minute, seconds=obj.second, milliseconds=ms\n            )\n        if tzinfo := obj.tzinfo:\n            if tzinfo in [dt.timezone.utc, zoneinfo.ZoneInfo(\"UTC\")]:\n                result[\"utc\"] = True\n            else:\n                msg = (\n                    f\"Unsupported timezone {tzinfo!r}.\\n\"\n                    \"Only `'UTC'` or naive (local) datetimes are permitted.\\n\"\n                    \"See https://altair-viz.github.io/user_guide/generated/core/altair.DateTime.html\"\n                )\n                raise TypeError(msg)\n    return result\n\n\ndef _todict(obj: Any, context: dict[str, Any] | None, np_opt: Any, pd_opt: Any) -> Any:  # noqa: C901\n    \"\"\"Convert an object to a dict representation.\"\"\"\n    if np_opt is not None:\n        np = np_opt\n        if isinstance(obj, np.ndarray):\n            return [_todict(v, context, np_opt, pd_opt) for v in obj]\n        elif isinstance(obj, np.number):\n            return float(obj)\n        elif isinstance(obj, np.datetime64):\n            result = str(obj)\n            if \"T\" not in result:\n                # See https://github.com/vega/altair/issues/1027 for why this is necessary.\n                result += \"T00:00:00\"\n            return result\n    if isinstance(obj, SchemaBase):\n        return obj.to_dict(validate=False, context=context)\n    elif isinstance(obj, (list, tuple)):\n        return [_todict(v, context, np_opt, pd_opt) for v in obj]\n    elif isinstance(obj, dict):\n        return {\n            k: _todict(v, context, np_opt, pd_opt)\n            for k, v in obj.items()\n            if v is not Undefined\n        }\n    elif isinstance(obj, SchemaLike):\n        return obj.to_dict()\n    elif pd_opt is not None and isinstance(obj, pd_opt.Timestamp):\n        return pd_opt.Timestamp(obj).isoformat()\n    elif _is_iterable(obj, exclude=(str, bytes)):\n        return _todict(_from_array_like(obj), context, np_opt, pd_opt)\n    elif isinstance(obj, dt.date):\n        return _from_date_datetime(obj)\n    else:\n        return obj\n\n\ndef _resolve_references(\n    schema: dict[str, Any], rootschema: dict[str, Any] | None = None\n) -> dict[str, Any]:\n    \"\"\"Resolve schema references until there is no $ref anymore in the top-level of the dictionary.\"\"\"\n    if _use_referencing_library():\n        registry = _get_referencing_registry(rootschema or schema)\n        # Using a different variable name to show that this is not the\n        # jsonschema.RefResolver but instead a Resolver from the referencing\n        # library\n        referencing_resolver = registry.resolver()\n        while \"$ref\" in schema:\n            schema = referencing_resolver.lookup(\n                _VEGA_LITE_ROOT_URI + schema[\"$ref\"]\n            ).contents\n    else:\n        resolver = jsonschema.RefResolver.from_schema(rootschema or schema)\n        while \"$ref\" in schema:\n            with resolver.resolving(schema[\"$ref\"]) as resolved:\n                schema = resolved\n    return schema\n\n\ndef _validator_values(errors: Iterable[ValidationError], /) -> Iterator[str]:\n    \"\"\"Unwrap each error's ``.validator_value``, convince ``mypy`` it stores a string.\"\"\"\n    for err in errors:\n        yield cast(\"str\", err.validator_value)\n\n\ndef _iter_channels(tp: type[Any], spec: Mapping[str, Any], /) -> Iterator[type[Any]]:\n    from altair import vegalite\n\n    for channel_type in (\"datum\", \"value\"):\n        if channel_type in spec:\n            name = f\"{tp.__name__}{channel_type.capitalize()}\"\n            if narrower := getattr(vegalite, name, None):\n                yield narrower\n\n\ndef _is_channel(obj: Any) -> TypeIs[dict[str, Any]]:\n    props = {\"datum\", \"value\"}\n    return (\n        _is_dict(obj)\n        and all(isinstance(k, str) for k in obj)\n        and not (props.isdisjoint(obj))\n    )\n\n\ndef _maybe_channel(tp: type[Any], spec: Any, /) -> type[Any]:\n    \"\"\"\n    Replace a channel type with a `more specific`_ one or passthrough unchanged.\n\n    Parameters\n    ----------\n    tp\n        An imported ``SchemaBase`` class.\n    spec\n        The instance that failed validation.\n\n    .. _more specific:\n        https://github.com/vega/altair/issues/2913#issuecomment-2571762700\n    \"\"\"\n    return next(_iter_channels(tp, spec), tp) if _is_channel(spec) else tp\n\n\nclass SchemaValidationError(jsonschema.ValidationError):\n    _JS_TO_PY: ClassVar[Mapping[str, str]] = {\n        \"boolean\": \"bool\",\n        \"integer\": \"int\",\n        \"number\": \"float\",\n        \"string\": \"str\",\n        \"null\": \"None\",\n        \"object\": \"Mapping[str, Any]\",\n        \"array\": \"Sequence\",\n    }\n\n    def __init__(self, obj: SchemaBase, err: jsonschema.ValidationError) -> None:\n        \"\"\"\n        A wrapper for ``jsonschema.ValidationError`` with friendlier traceback.\n\n        Parameters\n        ----------\n        obj\n            The instance that failed ``self.validate(...)``.\n        err\n            The original ``ValidationError``.\n\n        Notes\n        -----\n        We do not raise `from err` as else the resulting traceback is very long\n        as it contains part of the Vega-Lite schema.\n\n        It would also first show the less helpful `ValidationError` instead of\n        the more user friendly `SchemaValidationError`.\n        \"\"\"\n        super().__init__(**err._contents())\n        self.obj = obj\n        self._errors: GroupedValidationErrors = getattr(\n            err, \"_all_errors\", {getattr(err, \"json_path\", _json_path(err)): [err]}\n        )\n        # This is the message from err\n        self._original_message = self.message\n        self.message = self._get_message()\n\n    def __str__(self) -> str:\n        return self.message\n\n    def _get_message(self) -> str:\n        def indent_second_line_onwards(message: str, indent: int = 4) -> str:\n            modified_lines: list[str] = []\n            for idx, line in enumerate(message.split(\"\\n\")):\n                if idx > 0 and len(line) > 0:\n                    line = \" \" * indent + line\n                modified_lines.append(line)\n            return \"\\n\".join(modified_lines)\n\n        error_messages: list[str] = []\n        # Only show a maximum of 3 errors as else the final message returned by this\n        # method could get very long.\n        for errors in list(self._errors.values())[:3]:\n            error_messages.append(self._get_message_for_errors_group(errors))\n\n        message = \"\"\n        if len(error_messages) > 1:\n            error_messages = [\n                indent_second_line_onwards(f\"Error {error_id}: {m}\")\n                for error_id, m in enumerate(error_messages, start=1)\n            ]\n            message += \"Multiple errors were found.\\n\\n\"\n        message += \"\\n\\n\".join(error_messages)\n        return message\n\n    def _get_message_for_errors_group(\n        self,\n        errors: ValidationErrorList,\n    ) -> str:\n        if errors[0].validator == \"additionalProperties\":\n            # During development, we only found cases where an additionalProperties\n            # error was raised if that was the only error for the offending instance\n            # as identifiable by the json path. Therefore, we just check here the first\n            # error. However, other constellations might exist in which case\n            # this should be adapted so that other error messages are shown as well.\n            message = self._get_additional_properties_error_message(errors[0])\n        else:\n            message = self._get_default_error_message(errors=errors)\n\n        return message.strip()\n\n    def _get_additional_properties_error_message(\n        self,\n        error: jsonschema.exceptions.ValidationError,\n    ) -> str:\n        \"\"\"Output all existing parameters when an unknown parameter is specified.\"\"\"\n        altair_cls = self._get_altair_class_for_error(error)\n        param_dict_keys = inspect.signature(altair_cls).parameters.keys()\n        param_names_table = self._format_params_as_table(param_dict_keys)\n\n        # Error messages for these errors look like this:\n        # \"Additional properties are not allowed ('unknown' was unexpected)\"\n        # Line below extracts \"unknown\" from this string\n        parameter_name = error.message.split(\"('\")[-1].split(\"'\")[0]\n        message = f\"\"\"\\\n`{altair_cls.__name__}` has no parameter named '{parameter_name}'\n\nExisting parameter names are:\n{param_names_table}\nSee the help for `{altair_cls.__name__}` to read the full description of these parameters\"\"\"\n        return message\n\n    def _get_altair_class_for_error(\n        self, error: jsonschema.exceptions.ValidationError\n    ) -> type[SchemaBase]:\n        \"\"\"\n        Try to get the lowest class possible in the chart hierarchy so it can be displayed in the error message.\n\n        This should lead to more informative error messages pointing the user closer to the source of the issue.\n\n        If we did not find a suitable class based on traversing the path so we fall\n        back on the class of the top-level object which created the SchemaValidationError\n        \"\"\"\n        from altair import vegalite\n\n        for prop_name in reversed(error.absolute_path):\n            # Check if str as e.g. first item can be a 0\n            if isinstance(prop_name, str):\n                candidate = prop_name[0].upper() + prop_name[1:]\n                if tp := getattr(vegalite, candidate, None):\n                    return _maybe_channel(tp, self.instance)\n        return type(self.obj)\n\n    @staticmethod\n    def _format_params_as_table(param_dict_keys: Iterable[str]) -> str:\n        \"\"\"Format param names into a table so that they are easier to read.\"\"\"\n        param_names: tuple[str, ...]\n        name_lengths: tuple[int, ...]\n        param_names, name_lengths = zip(\n            *[\n                (name, len(name))\n                for name in param_dict_keys\n                if name not in {\"kwds\", \"self\"}\n            ],\n            strict=False,\n        )\n        # Worst case scenario with the same longest param name in the same\n        # row for all columns\n        max_name_length = max(name_lengths)\n        max_column_width = 80\n        # Output a square table if not too big (since it is easier to read)\n        num_param_names = len(param_names)\n        square_columns = ceil(num_param_names**0.5)\n        columns = min(max_column_width // max_name_length, square_columns)\n\n        # Compute roughly equal column heights to evenly divide the param names\n        def split_into_equal_parts(n: int, p: int) -> list[int]:\n            return [n // p + 1] * (n % p) + [n // p] * (p - n % p)\n\n        column_heights = split_into_equal_parts(num_param_names, columns)\n\n        # Section the param names into columns and compute their widths\n        param_names_columns: list[tuple[str, ...]] = []\n        column_max_widths: list[int] = []\n        last_end_idx: int = 0\n        for ch in column_heights:\n            param_names_columns.append(param_names[last_end_idx : last_end_idx + ch])\n            column_max_widths.append(\n                max(len(param_name) for param_name in param_names_columns[-1])\n            )\n            last_end_idx = ch + last_end_idx\n\n        # Transpose the param name columns into rows to facilitate looping\n        param_names_rows: list[tuple[str, ...]] = []\n        for li in zip_longest(*param_names_columns, fillvalue=\"\"):\n            param_names_rows.append(li)\n        # Build the table as a string by iterating over and formatting the rows\n        param_names_table: str = \"\"\n        for param_names_row in param_names_rows:\n            for num, param_name in enumerate(param_names_row):\n                # Set column width based on the longest param in the column\n                max_name_length_column = column_max_widths[num]\n                column_pad = 3\n                param_names_table += \"{:<{}}\".format(\n                    param_name, max_name_length_column + column_pad\n                )\n                # Insert newlines and spacing after the last element in each row\n                if num == (len(param_names_row) - 1):\n                    param_names_table += \"\\n\"\n        return param_names_table\n\n    def _format_type_reprs(self, errors: Iterable[ValidationError], /) -> str:\n        \"\"\"\n        Translate jsonschema types to how they appear in annotations.\n\n        Adapts parts of:\n        - `tools.schemapi.utils.sort_type_reprs`_\n        - `tools.schemapi.utils.SchemaInfo.to_type_repr`_\n\n        .. _tools.schemapi.utils.sort_type_reprs:\n            https://github.com/vega/altair/blob/48e976ef9388ce08a2e871a0f67ed012b914597a/tools/schemapi/utils.py#L1106-L1146\n        .. _tools.schemapi.utils.SchemaInfo.to_type_repr:\n            https://github.com/vega/altair/blob/48e976ef9388ce08a2e871a0f67ed012b914597a/tools/schemapi/utils.py#L449-L543\n        \"\"\"\n        to_py_types = (\n            self._JS_TO_PY.get(val, val) for val in _validator_values(errors)\n        )\n        it = sorted(to_py_types, key=str.lower)\n        it = sorted(it, key=len)\n        it = sorted(it, key=partial(operator.eq, \"None\"))\n        return f\"of type `{' | '.join(it)}`\"\n\n    def _get_default_error_message(\n        self,\n        errors: ValidationErrorList,\n    ) -> str:\n        bullet_points: list[str] = []\n        errors_by_validator = _group_errors_by_validator(errors)\n        if errs_enum := errors_by_validator.get(\"enum\", None):\n            bullet_points.extend(\n                f\"one of {val}\" for val in _validator_values(errs_enum)\n            )\n        if errs_type := errors_by_validator.get(\"type\", None):\n            bullet_points.append(self._format_type_reprs(errs_type))\n\n        # It should not matter which error is specifically used as they are all\n        # about the same offending instance (i.e. invalid value), so we can just\n        # take the first one\n        error = errors[0]\n        # Add a summary line when parameters are passed an invalid value\n        # For example: \"'asdf' is an invalid value for `stack`\n        message = f\"'{error.instance}' is an invalid value\"\n        if error.absolute_path:\n            message += f\" for `{error.absolute_path[-1]}`\"\n\n        # Add bullet points\n        if len(bullet_points) == 0:\n            message += \".\\n\\n\"\n        elif len(bullet_points) == 1:\n            message += f\". Valid values are {bullet_points[0]}.\\n\\n\"\n        else:\n            # We don't use .capitalize below to make the first letter uppercase\n            # as that makes the rest of the message lowercase\n            bullet_points = [point[0].upper() + point[1:] for point in bullet_points]\n            message += \". Valid values are:\\n\\n\"\n            message += \"\\n\".join([f\"- {point}\" for point in bullet_points])\n            message += \"\\n\\n\"\n\n        # Add unformatted messages of any remaining errors which were not\n        # considered so far. This is not expected to be used but more exists\n        # as a fallback for cases which were not known during development.\n        it = (\n            \"\\n\".join(e.message for e in errors)\n            for validator, errors in errors_by_validator.items()\n            if validator not in {\"enum\", \"type\"}\n        )\n        message += \"\".join(it)\n        return message\n\n\n_JSON_VT_co = TypeVar(\n    \"_JSON_VT_co\",\n    Literal[\"string\"],\n    Literal[\"object\"],\n    Literal[\"array\"],\n    covariant=True,\n)\n\"\"\"\nOne of a subset of JSON Schema `primitive types`_:\n\n    [\"string\", \"object\", \"array\"]\n\n.. _primitive types:\n    https://json-schema.org/draft-07/json-schema-validation#rfc.section.6.1.1\n\"\"\"\n\n_TypeMap = TypeAliasType(\n    \"_TypeMap\", Mapping[Literal[\"type\"], _JSON_VT_co], type_params=(_JSON_VT_co,)\n)\n\"\"\"\nA single item JSON Schema using the `type`_ keyword.\n\nThis may represent **one of**:\n\n    {\"type\": \"string\"}\n    {\"type\": \"object\"}\n    {\"type\": \"array\"}\n\n.. _type:\n    https://json-schema.org/understanding-json-schema/reference/type\n\"\"\"\n\n# NOTE: Type checkers want opposing things:\n# - `mypy`   : Covariant type variable \"_JSON_VT_co\" used in protocol where invariant one is expected  [misc]\n# - `pyright`: Type variable \"_JSON_VT_co\" used in generic protocol \"SchemaLike\" should be covariant [reportInvalidTypeVarUse]\n# Siding with `pyright` as this is consistent with https://github.com/python/typeshed/blob/9e506eb5e8fc2823db8c60ad561b1145ff114947/stdlib/typing.pyi#L690\n\n\n@runtime_checkable\nclass SchemaLike(Generic[_JSON_VT_co], Protocol):  # type: ignore[misc]\n    \"\"\"\n    Represents ``altair`` classes which *may* not derive ``SchemaBase``.\n\n    Attributes\n    ----------\n    _schema\n        A single item JSON Schema using the `type`_ keyword.\n\n    Notes\n    -----\n    Should be kept tightly defined to the **minimum** requirements for:\n        - Converting into a form that can be validated by `jsonschema`_.\n        - Avoiding calling ``.to_dict()`` on a class external to ``altair``.\n    - ``_schema`` is more accurately described as a ``ClassVar``\n        - See `discussion`_ for blocking issue.\n\n    .. _jsonschema:\n        https://github.com/python-jsonschema/jsonschema\n    .. _type:\n        https://json-schema.org/understanding-json-schema/reference/type\n    .. _discussion:\n        https://github.com/python/typing/discussions/1424\n    \"\"\"\n\n    _schema: _TypeMap[_JSON_VT_co]\n\n    def to_dict(self, *args, **kwds) -> Any: ...\n\n\n@runtime_checkable\nclass ConditionLike(SchemaLike[Literal[\"object\"]], Protocol):\n    \"\"\"\n    Represents the wrapped state of a conditional encoding or property.\n\n    Attributes\n    ----------\n    condition\n        One or more (predicate, statement) pairs which each form a condition.\n\n    Notes\n    -----\n    - Can be extended with additional conditions.\n    - *Does not* define a default value, but can be finalized with one.\n    \"\"\"\n\n    condition: Any\n    _schema: _TypeMap[Literal[\"object\"]] = {\"type\": \"object\"}\n\n\nclass UndefinedType:\n    \"\"\"A singleton object for marking undefined parameters.\"\"\"\n\n    __instance = None\n\n    def __new__(cls, *args, **kwargs) -> Self:\n        if not isinstance(cls.__instance, cls):\n            cls.__instance = object.__new__(cls, *args, **kwargs)\n        return cls.__instance\n\n    def __repr__(self) -> str:\n        return \"Undefined\"\n\n\nUndefined = UndefinedType()\nT = TypeVar(\"T\")\nOptional: TypeAlias = T | UndefinedType\n\"\"\"One of ``T`` specified type(s), or the ``Undefined`` singleton.\n\nExamples\n--------\nThe parameters ``short``, ``long`` accept the same range of types::\n\n    # ruff: noqa: UP006, UP007\n    from altair.typing import Optional\n\n    def func_1(\n        short: Optional[str | bool | float | dict[str, Any] | SchemaBase] = Undefined,\n        long: Union[\n            str, bool, float, Dict[str, Any], SchemaBase, UndefinedType\n        ] = Undefined,\n    ): ...\n\nThis is distinct from `typing.Optional <https://typing.readthedocs.io/en/latest/spec/historical.html#union-and-optional>`__.\n\n``altair.typing.Optional`` treats ``None`` like any other type::\n\n    # ruff: noqa: UP006, UP007\n    from altair.typing import Optional\n\n    def func_2(\n        short: Optional[str | float | dict[str, Any] | None | SchemaBase] = Undefined,\n        long: Union[\n            str, float, Dict[str, Any], None, SchemaBase, UndefinedType\n        ] = Undefined,\n    ): ...\n\"\"\"\n\n\ndef is_undefined(obj: Any) -> TypeIs[UndefinedType]:\n    \"\"\"\n    Type-safe singleton check for `UndefinedType`.\n\n    Notes\n    -----\n    - Using `obj is Undefined` does not narrow from `UndefinedType` in a union.\n        - Due to the assumption that other `UndefinedType`'s could exist.\n    - Current [typing spec advises](https://typing.readthedocs.io/en/latest/spec/concepts.html#support-for-singleton-types-in-unions) using an `Enum`.\n        - Otherwise, requires an explicit guard to inform the type checker.\n    \"\"\"\n    return obj is Undefined\n\n\n@overload\ndef _shallow_copy(obj: _CopyImpl) -> _CopyImpl: ...\n@overload\ndef _shallow_copy(obj: Any) -> Any: ...\ndef _shallow_copy(obj: _CopyImpl | Any) -> _CopyImpl | Any:\n    if isinstance(obj, SchemaBase):\n        return obj.copy(deep=False)\n    elif isinstance(obj, (list, dict)):\n        return obj.copy()\n    else:\n        return obj\n\n\n@overload\ndef _deep_copy(obj: _CopyImpl, by_ref: set[str]) -> _CopyImpl: ...\n@overload\ndef _deep_copy(obj: Any, by_ref: set[str]) -> Any: ...\ndef _deep_copy(obj: _CopyImpl | Any, by_ref: set[str]) -> _CopyImpl | Any:\n    copy = partial(_deep_copy, by_ref=by_ref)\n    if isinstance(obj, SchemaBase):\n        if copier := getattr(obj, \"__deepcopy__\", None):\n            with debug_mode(False):\n                return copier(obj)\n        args = (copy(arg) for arg in obj._args)\n        kwds = {k: (copy(v) if k not in by_ref else v) for k, v in obj._kwds.items()}\n        with debug_mode(False):\n            return obj.__class__(*args, **kwds)\n    elif isinstance(obj, list):\n        return [copy(v) for v in obj]\n    elif isinstance(obj, dict):\n        return {k: (copy(v) if k not in by_ref else v) for k, v in obj.items()}\n    else:\n        return obj\n\n\nclass SchemaBase:\n    \"\"\"\n    Base class for schema wrappers.\n\n    Each derived class should set the _schema class attribute (and optionally\n    the _rootschema class attribute) which is used for validation.\n    \"\"\"\n\n    _schema: ClassVar[dict[str, Any] | Any] = None\n    _rootschema: ClassVar[dict[str, Any] | None] = None\n    _class_is_valid_at_instantiation: ClassVar[bool] = True\n\n    def __init__(self, *args: Any, **kwds: Any) -> None:\n        # Two valid options for initialization, which should be handled by\n        # derived classes:\n        # - a single arg with no kwds, for, e.g. {'type': 'string'}\n        # - zero args with zero or more kwds for {'type': 'object'}\n        if self._schema is None:\n            msg = (\n                f\"Cannot instantiate object of type {self.__class__}: \"\n                \"_schema class attribute is not defined.\"\n                \"\"\n            )\n            raise ValueError(msg)\n\n        if kwds:\n            assert len(args) == 0\n        else:\n            assert len(args) in {0, 1}\n\n        # use object.__setattr__ because we override setattr below.\n        object.__setattr__(self, \"_args\", args)\n        object.__setattr__(self, \"_kwds\", kwds)\n\n        if DEBUG_MODE and self._class_is_valid_at_instantiation:\n            self.to_dict(validate=True)\n\n    def copy(\n        self, deep: bool | Iterable[Any] = True, ignore: list[str] | None = None\n    ) -> Self:\n        \"\"\"\n        Return a copy of the object.\n\n        Parameters\n        ----------\n        deep : boolean or list, optional\n            If True (default) then return a deep copy of all dict, list, and\n            SchemaBase objects within the object structure.\n            If False, then only copy the top object.\n            If a list or iterable, then only copy the listed attributes.\n        ignore : list, optional\n            A list of keys for which the contents should not be copied, but\n            only stored by reference.\n        \"\"\"\n        if deep is True:\n            return cast(\"Self\", _deep_copy(self, set(ignore) if ignore else set()))\n        with debug_mode(False):\n            copy = self.__class__(*self._args, **self._kwds)\n        if _is_iterable(deep):\n            for attr in deep:\n                copy[attr] = _shallow_copy(copy._get(attr))\n        return copy\n\n    def _get(self, attr, default=Undefined):\n        \"\"\"Get an attribute, returning default if not present.\"\"\"\n        attr = self._kwds.get(attr, Undefined)\n        if attr is Undefined:\n            attr = default\n        return attr\n\n    def __getattr__(self, attr):\n        # reminder: getattr is called after the normal lookups\n        if attr == \"_kwds\":\n            raise AttributeError()\n        if attr in self._kwds:\n            return self._kwds[attr]\n        else:\n            try:\n                _getattr = super().__getattr__  # pyright: ignore[reportAttributeAccessIssue]\n            except AttributeError:\n                _getattr = super().__getattribute__\n            return _getattr(attr)\n\n    def __setattr__(self, item, val) -> None:\n        self._kwds[item] = val\n\n    def __getitem__(self, item):\n        return self._kwds[item]\n\n    def __setitem__(self, item, val) -> None:\n        self._kwds[item] = val\n\n    def __repr__(self) -> str:\n        name = type(self).__name__\n        if kwds := self._kwds:\n            it = (f\"{k}: {v!r}\" for k, v in sorted(kwds.items()) if v is not Undefined)\n            args = \",\\n\".join(it).replace(\"\\n\", \"\\n  \")\n            LB, RB = \"{\", \"}\"\n            return f\"{name}({LB}\\n  {args}\\n{RB})\"\n        else:\n            return f\"{name}({self._args[0]!r})\"\n\n    def __eq__(self, other: Any) -> bool:\n        return (\n            type(self) is type(other)\n            and self._args == other._args\n            and self._kwds == other._kwds\n        )\n\n    def to_dict(\n        self,\n        validate: bool = True,\n        *,\n        ignore: list[str] | None = None,\n        context: dict[str, Any] | None = None,\n    ) -> dict[str, Any]:\n        \"\"\"\n        Return a dictionary representation of the object.\n\n        Parameters\n        ----------\n        validate : bool, optional\n            If True (default), then validate the result against the schema.\n        ignore : list[str], optional\n            A list of keys to ignore.\n        context : dict[str, Any], optional\n            A context dictionary.\n\n        Raises\n        ------\n        SchemaValidationError :\n            If ``validate`` and the result does not conform to the schema.\n\n        Notes\n        -----\n        - ``ignore``, ``context`` are usually not needed to be specified as a user.\n        - *Technical*: ``ignore`` will **not** be passed to child :meth:`.to_dict()`.\n        \"\"\"\n        context = context or {}\n        ignore = ignore or []\n        opts = _get_optional_modules(np_opt=\"numpy\", pd_opt=\"pandas\")\n\n        if self._args and not self._kwds:\n            kwds = self._args[0]\n        elif not self._args:\n            kwds = self._kwds.copy()\n            exclude = {*ignore, \"shorthand\"}\n            if parsed := context.pop(\"parsed_shorthand\", None):\n                kwds = _replace_parsed_shorthand(parsed, kwds)\n            kwds = {k: v for k, v in kwds.items() if k not in exclude}\n            if (mark := kwds.get(\"mark\")) and isinstance(mark, str):\n                kwds[\"mark\"] = {\"type\": mark}\n        else:\n            msg = f\"{type(self)} instance has both a value and properties : cannot serialize to dict\"\n            raise ValueError(msg)\n        result = _todict(kwds, context=context, **opts)\n        if validate:\n            # NOTE: Don't raise `from err`, see `SchemaValidationError` doc\n            try:\n                self.validate(result)\n            except jsonschema.ValidationError as err:\n                raise SchemaValidationError(self, err) from None\n        return result\n\n    def to_json(\n        self,\n        validate: bool = True,\n        indent: int | str | None = 2,\n        sort_keys: bool = True,\n        *,\n        ignore: list[str] | None = None,\n        context: dict[str, Any] | None = None,\n        ensure_ascii: bool = False,\n        **kwargs,\n    ) -> str:\n        \"\"\"\n        Emit the JSON representation for this object as a string.\n\n        Parameters\n        ----------\n        validate : bool, optional\n            If True (default), then validate the result against the schema.\n        indent : int, optional\n            The number of spaces of indentation to use. The default is 2.\n        sort_keys : bool, optional\n            If True (default), sort keys in the output.\n        ignore : list[str], optional\n            A list of keys to ignore.\n        context : dict[str, Any], optional\n            A context dictionary.\n        ensure_ascii : bool, optional\n            If False (default), allow UTF-8 characters in the output.\n            If True, escape non-ASCII characters.\n        **kwargs\n            Additional keyword arguments are passed to ``json.dumps()``\n\n        Raises\n        ------\n        SchemaValidationError :\n            If ``validate`` and the result does not conform to the schema.\n\n        Notes\n        -----\n        - ``ignore``, ``context`` are usually not needed to be specified as a user.\n        - *Technical*: ``ignore`` will **not** be passed to child :meth:`.to_dict()`.\n        \"\"\"\n        if ignore is None:\n            ignore = []\n        if context is None:\n            context = {}\n        dct = self.to_dict(validate=validate, ignore=ignore, context=context)\n        return json.dumps(\n            dct, indent=indent, sort_keys=sort_keys, ensure_ascii=ensure_ascii, **kwargs\n        )\n\n    @classmethod\n    def _default_wrapper_classes(cls) -> Iterator[type[SchemaBase]]:\n        \"\"\"Return the set of classes used within cls.from_dict().\"\"\"\n        return _subclasses(SchemaBase)\n\n    @classmethod\n    def from_dict(\n        cls: type[TSchemaBase], dct: dict[str, Any], validate: bool = True\n    ) -> TSchemaBase:\n        \"\"\"\n        Construct class from a dictionary representation.\n\n        Parameters\n        ----------\n        dct : dictionary\n            The dict from which to construct the class\n        validate : boolean\n            If True (default), then validate the input against the schema.\n\n        Raises\n        ------\n        jsonschema.ValidationError :\n            If ``validate`` and ``dct`` does not conform to the schema\n        \"\"\"\n        if validate:\n            cls.validate(dct)\n        converter = _FromDict(cls._default_wrapper_classes())\n        return converter.from_dict(dct, cls)\n\n    @classmethod\n    def from_json(\n        cls,\n        json_string: str,\n        validate: bool = True,\n        **kwargs: Any,\n        # Type hints for this method would get rather complicated\n        # if we want to provide a more specific return type\n    ) -> ChartType:\n        \"\"\"\n        Instantiate the object from a valid JSON string.\n\n        Parameters\n        ----------\n        json_string : string\n            The string containing a valid JSON chart specification.\n        validate : boolean\n            If True (default), then validate the input against the schema.\n        **kwargs :\n            Additional keyword arguments are passed to json.loads\n\n        Returns\n        -------\n        chart : Chart object\n            The altair Chart object built from the specification.\n        \"\"\"\n        dct: dict[str, Any] = json.loads(json_string, **kwargs)\n        return cls.from_dict(dct, validate=validate)  # type: ignore[return-value]\n\n    @classmethod\n    def validate(\n        cls, instance: dict[str, Any], schema: dict[str, Any] | None = None\n    ) -> None:\n        \"\"\"Validate the instance against the class schema in the context of the rootschema.\"\"\"\n        if schema is None:\n            schema = cls._schema\n        # For the benefit of mypy\n        assert schema is not None\n        validate_jsonschema(instance, schema, rootschema=cls._rootschema or cls._schema)\n\n    @classmethod\n    def resolve_references(cls, schema: dict[str, Any] | None = None) -> dict[str, Any]:\n        \"\"\"Resolve references in the context of this object's schema or root schema.\"\"\"\n        schema_to_pass = schema or cls._schema\n        # For the benefit of mypy\n        assert schema_to_pass is not None\n        return _resolve_references(\n            schema=schema_to_pass,\n            rootschema=(cls._rootschema or cls._schema or schema),\n        )\n\n    @classmethod\n    def validate_property(\n        cls, name: str, value: Any, schema: dict[str, Any] | None = None\n    ) -> None:\n        \"\"\"Validate a property against property schema in the context of the rootschema.\"\"\"\n        opts = _get_optional_modules(np_opt=\"numpy\", pd_opt=\"pandas\")\n        value = _todict(value, context={}, **opts)\n        props = cls.resolve_references(schema or cls._schema).get(\"properties\", {})\n        validate_jsonschema(\n            value, props.get(name, {}), rootschema=cls._rootschema or cls._schema\n        )\n\n    def __dir__(self) -> list[str]:\n        return sorted(chain(super().__dir__(), self._kwds))\n\n\ndef _get_optional_modules(**modules: str) -> dict[str, _OptionalModule]:\n    \"\"\"\n    Returns packages only if they have already been imported - otherwise they return `None`.\n\n    This is useful for `isinstance` checks.\n\n    For example, if `pandas` has not been imported, then an object is\n    definitely not a `pandas.Timestamp`.\n\n    Parameters\n    ----------\n    **modules\n        Keyword-only binding from `{alias: module_name}`.\n\n    Examples\n    --------\n    >>> import pandas as pd  # doctest: +SKIP\n    >>> import polars as pl  # doctest: +SKIP\n    >>> from altair.utils.schemapi import _get_optional_modules  # doctest: +SKIP\n    >>>\n    >>> _get_optional_modules(pd=\"pandas\", pl=\"polars\", ibis=\"ibis\")  # doctest: +SKIP\n    {\n        \"pd\": <module 'pandas' from '...'>,\n        \"pl\": <module 'polars' from '...'>,\n        \"ibis\": None,\n    }\n\n    If the user later imports ``ibis``, it would appear in subsequent calls.\n\n    >>> import ibis  # doctest: +SKIP\n    >>>\n    >>> _get_optional_modules(ibis=\"ibis\")  # doctest: +SKIP\n    {\n        \"ibis\": <module 'ibis' from '...'>,\n    }\n    \"\"\"\n    return {k: sys.modules.get(v) for k, v in modules.items()}\n\n\ndef _replace_parsed_shorthand(\n    parsed_shorthand: dict[str, Any], kwds: dict[str, Any]\n) -> dict[str, Any]:\n    \"\"\"\n    `parsed_shorthand` is added by `FieldChannelMixin`.\n\n    It's used below to replace shorthand with its long form equivalent\n    `parsed_shorthand` is removed from `context` if it exists so that it is\n    not passed to child `to_dict` function calls.\n    \"\"\"\n    # Prevent that pandas categorical data is automatically sorted\n    # when a non-ordinal data type is specified manually\n    # or if the encoding channel does not support sorting\n    if \"sort\" in parsed_shorthand and (\n        \"sort\" not in kwds or kwds[\"type\"] not in {\"ordinal\", Undefined}\n    ):\n        parsed_shorthand.pop(\"sort\")\n\n    kwds.update(\n        (k, v)\n        for k, v in parsed_shorthand.items()\n        if kwds.get(k, Undefined) is Undefined\n    )\n    return kwds\n\n\nTSchemaBase = TypeVar(\"TSchemaBase\", bound=SchemaBase)\n\n_CopyImpl = TypeVar(\"_CopyImpl\", SchemaBase, dict[Any, Any], list[Any])\n\"\"\"\nTypes which have an implementation in ``SchemaBase.copy()``.\n\nAll other types are returned **by reference**.\n\"\"\"\n\n\ndef _is_dict(obj: Any | dict[Any, Any]) -> TypeIs[dict[Any, Any]]:\n    return isinstance(obj, dict)\n\n\ndef _is_list(obj: Any | list[Any]) -> TypeIs[list[Any]]:\n    return isinstance(obj, list)\n\n\ndef _is_iterable(\n    obj: Any, *, exclude: type | tuple[type, ...] = (str, bytes)\n) -> TypeIs[Iterable[Any]]:\n    return not isinstance(obj, exclude) and isinstance(obj, Iterable)\n\n\ndef _passthrough(*args: Any, **kwds: Any) -> Any | dict[str, Any]:\n    return args[0] if args else kwds\n\n\nclass _FromDict:\n    \"\"\"\n    Class used to construct SchemaBase class hierarchies from a dict.\n\n    The primary purpose of using this class is to be able to build a hash table\n    that maps schemas to their wrapper classes. The candidate classes are\n    specified in the ``wrapper_classes`` positional-only argument to the constructor.\n    \"\"\"\n\n    _hash_exclude_keys = (\"definitions\", \"title\", \"description\", \"$schema\", \"id\")\n\n    def __init__(self, wrapper_classes: Iterable[type[SchemaBase]], /) -> None:\n        # Create a mapping of a schema hash to a list of matching classes\n        # This lets us quickly determine the correct class to construct\n        self.class_dict: dict[int, list[type[SchemaBase]]] = defaultdict(list)\n        for tp in wrapper_classes:\n            if tp._schema is not None:\n                self.class_dict[self.hash_schema(tp._schema)].append(tp)\n\n    @classmethod\n    def hash_schema(cls, schema: dict[str, Any], use_json: bool = True) -> int:\n        \"\"\"\n        Compute a python hash for a nested dictionary which properly handles dicts, lists, sets, and tuples.\n\n        At the top level, the function excludes from the hashed schema all keys\n        listed in `exclude_keys`.\n\n        This implements two methods: one based on conversion to JSON, and one based\n        on recursive conversions of unhashable to hashable types; the former seems\n        to be slightly faster in several benchmarks.\n        \"\"\"\n        if cls._hash_exclude_keys and isinstance(schema, dict):\n            schema = {\n                key: val\n                for key, val in schema.items()\n                if key not in cls._hash_exclude_keys\n            }\n        if use_json:\n            s = json.dumps(schema, sort_keys=True)\n            return hash(s)\n        else:\n\n            def _freeze(val):\n                if isinstance(val, dict):\n                    return frozenset((k, _freeze(v)) for k, v in val.items())\n                elif isinstance(val, set):\n                    return frozenset(map(_freeze, val))\n                elif isinstance(val, (list, tuple)):\n                    return tuple(map(_freeze, val))\n                else:\n                    return val\n\n            return hash(_freeze(schema))\n\n    @overload\n    def from_dict(\n        self,\n        dct: TSchemaBase,\n        tp: None = ...,\n        schema: None = ...,\n        rootschema: None = ...,\n        default_class: Any = ...,\n    ) -> TSchemaBase: ...\n    @overload\n    def from_dict(\n        self,\n        dct: dict[str, Any] | list[dict[str, Any]],\n        tp: Any = ...,\n        schema: Any = ...,\n        rootschema: Any = ...,\n        default_class: type[TSchemaBase] = ...,  # pyright: ignore[reportInvalidTypeVarUse]\n    ) -> TSchemaBase: ...\n    @overload\n    def from_dict(\n        self,\n        dct: dict[str, Any],\n        tp: None = ...,\n        schema: dict[str, Any] = ...,\n        rootschema: None = ...,\n        default_class: Any = ...,\n    ) -> SchemaBase: ...\n    @overload\n    def from_dict(\n        self,\n        dct: dict[str, Any],\n        tp: type[TSchemaBase],\n        schema: None = ...,\n        rootschema: None = ...,\n        default_class: Any = ...,\n    ) -> TSchemaBase: ...\n    @overload\n    def from_dict(\n        self,\n        dct: dict[str, Any] | list[dict[str, Any]],\n        tp: type[TSchemaBase],\n        schema: dict[str, Any],\n        rootschema: dict[str, Any] | None = ...,\n        default_class: Any = ...,\n    ) -> Never: ...\n    def from_dict(\n        self,\n        dct: dict[str, Any] | list[dict[str, Any]] | TSchemaBase,\n        tp: type[TSchemaBase] | None = None,\n        schema: dict[str, Any] | None = None,\n        rootschema: dict[str, Any] | None = None,\n        default_class: Any = _passthrough,\n    ) -> TSchemaBase | SchemaBase:\n        \"\"\"Construct an object from a dict representation.\"\"\"\n        target_tp: Any\n        current_schema: dict[str, Any]\n        if isinstance(dct, SchemaBase):\n            return dct\n        elif tp is not None:\n            current_schema = tp._schema\n            root_schema: dict[str, Any] = rootschema or tp._rootschema or current_schema\n            target_tp = tp\n        elif schema is not None:\n            # If there are multiple matches, we use the first one in the dict.\n            # Our class dict is constructed breadth-first from top to bottom,\n            # so the first class that matches is the most general match.\n            current_schema = schema\n            root_schema = rootschema or current_schema\n            matches = self.class_dict[self.hash_schema(current_schema)]\n            target_tp = matches[0] if matches else default_class\n        else:\n            msg = \"Must provide either `tp` or `schema`, but not both.\"\n            raise ValueError(msg)\n\n        from_dict = partial(self.from_dict, rootschema=root_schema)\n        # Can also return a list?\n        resolved = _resolve_references(current_schema, root_schema)\n        if \"anyOf\" in resolved or \"oneOf\" in resolved:\n            schemas = resolved.get(\"anyOf\", []) + resolved.get(\"oneOf\", [])\n            for possible in schemas:\n                try:\n                    validate_jsonschema(dct, possible, rootschema=root_schema)\n                except jsonschema.ValidationError:\n                    continue\n                else:\n                    return from_dict(dct, schema=possible, default_class=target_tp)\n\n        if _is_dict(dct):\n            # TODO: handle schemas for additionalProperties/patternProperties\n            props: dict[str, Any] = resolved.get(\"properties\", {})\n            kwds = {\n                k: (from_dict(v, schema=props[k]) if k in props else v)\n                for k, v in dct.items()\n            }\n            return target_tp(**kwds)\n        elif _is_list(dct):\n            item_schema: dict[str, Any] = resolved.get(\"items\", {})\n            return target_tp([from_dict(k, schema=item_schema) for k in dct])\n        else:\n            # NOTE: Unsure what is valid here\n            return target_tp(dct)\n\n\nclass _PropertySetter:\n    def __init__(self, prop: str, schema: dict[str, Any]) -> None:\n        self.prop = prop\n        self.schema = schema\n\n    def __get__(self, obj, cls):\n        from altair import vegalite\n\n        self.obj = obj\n        self.cls = cls\n        # The docs from the encoding class parameter (e.g. `bin` in X, Color,\n        # etc); this provides a general description of the parameter.\n        self.__doc__ = self.schema[\"description\"].replace(\"__\", \"**\")\n        property_name = f\"{self.prop}\"[0].upper() + f\"{self.prop}\"[1:]\n        if altair_prop := getattr(vegalite, property_name, None):\n            # Add the docstring from the helper class (e.g. `BinParams`) so\n            # that all the parameter names of the helper class are included in\n            # the final docstring\n            parameter_index = altair_prop.__doc__.find(\"Parameters\\n\")\n            if parameter_index > -1:\n                self.__doc__ = (\n                    altair_prop.__doc__[:parameter_index].replace(\"    \", \"\")\n                    + self.__doc__\n                    + textwrap.dedent(\n                        f\"\\n\\n    {altair_prop.__doc__[parameter_index:]}\"\n                    )\n                )\n            # For short docstrings such as Aggregate, Stack, et\n            else:\n                self.__doc__ = (\n                    altair_prop.__doc__.replace(\"    \", \"\") + \"\\n\" + self.__doc__\n                )\n            # Add signatures and tab completion for the method and parameter names\n            self.__signature__ = inspect.signature(altair_prop)\n            self.__wrapped__ = inspect.getfullargspec(altair_prop)\n            self.__name__ = altair_prop.__name__\n        else:\n            # It seems like bandPosition is the only parameter that doesn't\n            # have a helper class.\n            pass\n        return self\n\n    def __call__(self, *args: Any, **kwargs: Any):\n        obj = self.obj.copy()\n        # TODO: use schema to validate\n        obj[self.prop] = args[0] if args else kwargs\n        return obj\n\n\ndef with_property_setters(cls: type[TSchemaBase]) -> type[TSchemaBase]:\n    \"\"\"Decorator to add property setters to a Schema class.\"\"\"\n    schema = cls.resolve_references()\n    for prop, propschema in schema.get(\"properties\", {}).items():\n        setattr(cls, prop, _PropertySetter(prop, propschema))\n    return cls\n\n\nVERSIONS: Mapping[\n    Literal[\n        \"vega-datasets\", \"vega-embed\", \"vega-lite\", \"vegafusion\", \"vl-convert-python\"\n    ],\n    str,\n] = {\n    \"vega-datasets\": \"v3.2.1\",\n    \"vega-embed\": \"v7\",\n    \"vega-lite\": \"v6.1.0\",\n    \"vegafusion\": \"2.0.3\",\n    \"vl-convert-python\": \"1.8.0\",\n}\n\"\"\"\nVersion pins for non-``python`` `vega projects`_.\n\nNotes\n-----\nWhen cutting a new release, make sure to update ``[tool.altair.vega]`` in ``pyproject.toml``.\n\n.. _vega projects:\n    https://github.com/vega\n\"\"\"\n"
  },
  {
    "path": "altair/utils/selection.py",
    "content": "from __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Any, NewType\n\n# Type representing the \"{selection}_store\" dataset that corresponds to a\n# Vega-Lite selection\nStore = NewType(\"Store\", list[dict[str, Any]])\n\n\n@dataclass(frozen=True, eq=True)\nclass IndexSelection:\n    \"\"\"\n    Represents the state of an alt.selection_point() when neither the fields nor encodings arguments are specified.\n\n    The value field is a list of zero-based indices into the\n    selected dataset.\n\n    Note: These indices only apply to the input DataFrame\n    for charts that do not include aggregations (e.g. a scatter chart).\n    \"\"\"\n\n    name: str\n    value: list[int]\n    store: Store\n\n    @staticmethod\n    def from_vega(name: str, signal: dict[str, dict] | None, store: Store):\n        \"\"\"\n        Construct an IndexSelection from the raw Vega signal and dataset values.\n\n        Parameters\n        ----------\n        name: str\n            The selection's name\n        signal: dict or None\n            The value of the Vega signal corresponding to the selection\n        store: list\n            The value of the Vega dataset corresponding to the selection.\n            This dataset is named \"{name}_store\" in the Vega view.\n\n        Returns\n        -------\n        IndexSelection\n        \"\"\"\n        if signal is None:\n            indices = []\n        else:\n            points = signal.get(\"vlPoint\", {}).get(\"or\", [])\n            indices = [p[\"_vgsid_\"] - 1 for p in points]\n        return IndexSelection(name=name, value=indices, store=store)\n\n\n@dataclass(frozen=True, eq=True)\nclass PointSelection:\n    \"\"\"\n    Represents the state of an alt.selection_point() when the fields or encodings arguments are specified.\n\n    The value field is a list of dicts of the form:\n        [{\"dim1\": 1, \"dim2\": \"A\"}, {\"dim1\": 2, \"dim2\": \"BB\"}]\n\n    where \"dim1\" and \"dim2\" are dataset columns and the dict values\n    correspond to the specific selected values.\n    \"\"\"\n\n    name: str\n    value: list[dict[str, Any]]\n    store: Store\n\n    @staticmethod\n    def from_vega(name: str, signal: dict[str, dict] | None, store: Store):\n        \"\"\"\n        Construct a PointSelection from the raw Vega signal and dataset values.\n\n        Parameters\n        ----------\n        name: str\n            The selection's name\n        signal: dict or None\n            The value of the Vega signal corresponding to the selection\n        store: list\n            The value of the Vega dataset corresponding to the selection.\n            This dataset is named \"{name}_store\" in the Vega view.\n\n        Returns\n        -------\n        PointSelection\n        \"\"\"\n        points = [] if signal is None else signal.get(\"vlPoint\", {}).get(\"or\", [])\n        return PointSelection(name=name, value=points, store=store)\n\n\n@dataclass(frozen=True, eq=True)\nclass IntervalSelection:\n    \"\"\"\n    Represents the state of an alt.selection_interval().\n\n    The value field is a dict of the form:\n        {\"dim1\": [0, 10], \"dim2\": [\"A\", \"BB\", \"CCC\"]}\n\n    where \"dim1\" and \"dim2\" are dataset columns and the dict values\n    correspond to the selected range.\n    \"\"\"\n\n    name: str\n    value: dict[str, list]\n    store: Store\n\n    @staticmethod\n    def from_vega(name: str, signal: dict[str, list] | None, store: Store):\n        \"\"\"\n        Construct an IntervalSelection from the raw Vega signal and dataset values.\n\n        Parameters\n        ----------\n        name: str\n            The selection's name\n        signal: dict or None\n            The value of the Vega signal corresponding to the selection\n        store: list\n            The value of the Vega dataset corresponding to the selection.\n            This dataset is named \"{name}_store\" in the Vega view.\n\n        Returns\n        -------\n        PointSelection\n        \"\"\"\n        if signal is None:\n            signal = {}\n        return IntervalSelection(name=name, value=signal, store=store)\n"
  },
  {
    "path": "altair/utils/server.py",
    "content": "\"\"\"\nA Simple server used to show altair graphics from a prompt or script.\n\nThis is adapted from the mpld3 package; see\nhttps://github.com/mpld3/mpld3/blob/master/mpld3/_server.py\n\"\"\"\n\nimport itertools\nimport random\nimport socket\nimport sys\nimport threading\nimport webbrowser\nfrom http import server\nfrom io import BytesIO as IO\n\nJUPYTER_WARNING = \"\"\"\nNote: if you're in the Jupyter notebook, Chart.serve() is not the best\n      way to view plots. Consider using Chart.display().\nYou must interrupt the kernel to cancel this command.\n\"\"\"\n\n\n# Mock server used for testing\n\n\nclass MockRequest:\n    def makefile(self, *args, **kwargs):\n        return IO(b\"GET /\")\n\n    def sendall(self, response):\n        pass\n\n\nclass MockServer:\n    def __init__(self, ip_port, Handler):\n        Handler(MockRequest(), ip_port[0], self)\n\n    def serve_forever(self):\n        pass\n\n    def server_close(self):\n        pass\n\n\ndef generate_handler(html, files=None):\n    if files is None:\n        files = {}\n\n    class MyHandler(server.BaseHTTPRequestHandler):\n        def do_GET(self):\n            \"\"\"Respond to a GET request.\"\"\"\n            if self.path == \"/\":\n                self.send_response(200)\n                self.send_header(\"Content-type\", \"text/html\")\n                self.end_headers()\n                self.wfile.write(html.encode())\n            elif self.path in files:\n                content_type, content = files[self.path]\n                self.send_response(200)\n                self.send_header(\"Content-type\", content_type)\n                self.end_headers()\n                self.wfile.write(content.encode())\n            else:\n                self.send_error(404)\n\n    return MyHandler\n\n\ndef find_open_port(ip, port, n=50):\n    \"\"\"Find an open port near the specified port.\"\"\"\n    ports = itertools.chain(\n        (port + i for i in range(n)), (port + random.randint(-2 * n, 2 * n))\n    )\n\n    for port in ports:\n        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n        result = s.connect_ex((ip, port))\n        s.close()\n        if result != 0:\n            return port\n    msg = \"no open ports found\"\n    raise ValueError(msg)\n\n\ndef serve(\n    html,\n    ip=\"127.0.0.1\",\n    port=8888,\n    n_retries=50,\n    files=None,\n    jupyter_warning=True,\n    open_browser=True,\n    http_server=None,\n) -> None:\n    \"\"\"\n    Start a server serving the given HTML, and (optionally) open a browser.\n\n    Parameters\n    ----------\n    html : string\n        HTML to serve\n    ip : string (default = '127.0.0.1')\n        ip address at which the HTML will be served.\n    port : int (default = 8888)\n        the port at which to serve the HTML\n    n_retries : int (default = 50)\n        the number of nearby ports to search if the specified port is in use.\n    files : dictionary (optional)\n        dictionary of extra content to serve\n    jupyter_warning : bool (optional)\n        if True (default), then print a warning if this is used within Jupyter\n    open_browser : bool (optional)\n        if True (default), then open a web browser to the given HTML\n    http_server : class (optional)\n        optionally specify an HTTPServer class to use for showing the\n        figure. The default is Python's basic HTTPServer.\n    \"\"\"\n    port = find_open_port(ip, port, n_retries)\n    Handler = generate_handler(html, files)\n\n    if http_server is None:\n        srvr = server.HTTPServer((ip, port), Handler)\n    else:\n        srvr = http_server((ip, port), Handler)\n\n    if jupyter_warning:\n        try:\n            __IPYTHON__  # type: ignore # noqa\n        except NameError:\n            pass\n        else:\n            print(JUPYTER_WARNING)\n\n    # Start the server\n    print(f\"Serving to http://{ip}:{port}/    [Ctrl-C to exit]\")\n    sys.stdout.flush()\n\n    if open_browser:\n        # Use a thread to open a web browser pointing to the server\n        def b():\n            return webbrowser.open(f\"http://{ip}:{port}\")\n\n        threading.Thread(target=b).start()\n\n    try:\n        srvr.serve_forever()\n    except (KeyboardInterrupt, SystemExit):\n        print(\"\\nstopping Server...\")\n\n    srvr.server_close()\n"
  },
  {
    "path": "altair/vegalite/__init__.py",
    "content": "# ruff: noqa: F403\nfrom .v6 import *\n"
  },
  {
    "path": "altair/vegalite/api.py",
    "content": "# ruff: noqa\nfrom .v6.api import *\n"
  },
  {
    "path": "altair/vegalite/data.py",
    "content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, overload\n\nfrom altair.utils.core import sanitize_pandas_dataframe\nfrom altair.utils.data import DataTransformerRegistry as _DataTransformerRegistry\nfrom altair.utils.data import (\n    MaxRowsError,\n    check_data_type,\n    limit_rows,\n    sample,\n    to_csv,\n    to_json,\n    to_values,\n)\n\nif TYPE_CHECKING:\n    from collections.abc import Callable\n\n    from altair.utils.data import DataType, ToValuesReturnType\n    from altair.utils.plugin_registry import PluginEnabler\n\n\n@overload\ndef default_data_transformer(\n    data: None = ..., max_rows: int = ...\n) -> Callable[[DataType], ToValuesReturnType]: ...\n@overload\ndef default_data_transformer(\n    data: DataType, max_rows: int = ...\n) -> ToValuesReturnType: ...\ndef default_data_transformer(\n    data: DataType | None = None, max_rows: int = 5000\n) -> Callable[[DataType], ToValuesReturnType] | ToValuesReturnType:\n    if data is None:\n\n        def pipe(data: DataType, /) -> ToValuesReturnType:\n            data = limit_rows(data, max_rows=max_rows)\n            return to_values(data)\n\n        return pipe\n\n    else:\n        return to_values(limit_rows(data, max_rows=max_rows))\n\n\nclass DataTransformerRegistry(_DataTransformerRegistry):\n    def disable_max_rows(self) -> PluginEnabler:\n        \"\"\"Disable the MaxRowsError.\"\"\"\n        options = self.options\n        if self.active in {\"default\", \"vegafusion\"}:\n            options = options.copy()\n            options[\"max_rows\"] = None\n        return self.enable(**options)\n\n\n__all__ = (\n    \"DataTransformerRegistry\",\n    \"MaxRowsError\",\n    \"check_data_type\",\n    \"default_data_transformer\",\n    \"limit_rows\",\n    \"sample\",\n    \"sanitize_pandas_dataframe\",\n    \"to_csv\",\n    \"to_json\",\n    \"to_values\",\n)\n"
  },
  {
    "path": "altair/vegalite/display.py",
    "content": "from altair.utils.display import (\n    DefaultRendererReturnType,\n    Displayable,\n    HTMLRenderer,\n    RendererRegistry,\n    default_renderer_base,\n    json_renderer_base,\n)\n\n__all__ = (\n    \"DefaultRendererReturnType\",\n    \"Displayable\",\n    \"HTMLRenderer\",\n    \"RendererRegistry\",\n    \"default_renderer_base\",\n    \"json_renderer_base\",\n)\n"
  },
  {
    "path": "altair/vegalite/schema.py",
    "content": "\"\"\"Altair schema wrappers.\"\"\"\n\n# ruff: noqa: F403\nfrom .v6.schema import *\n"
  },
  {
    "path": "altair/vegalite/v6/__init__.py",
    "content": "# ruff: noqa: F403, F405\nfrom altair.expr.core import datum\nfrom altair.vegalite.v6 import api, compiler, schema\nfrom altair.vegalite.v6.api import *\nfrom altair.vegalite.v6.compiler import vegalite_compilers\nfrom altair.vegalite.v6.data import (\n    MaxRowsError,\n    data_transformers,\n    default_data_transformer,\n    limit_rows,\n    sample,\n    to_csv,\n    to_json,\n    to_values,\n)\nfrom altair.vegalite.v6.display import (\n    VEGA_VERSION,\n    VEGAEMBED_VERSION,\n    VEGALITE_VERSION,\n    VegaLite,\n    renderers,\n)\nfrom altair.vegalite.v6.schema import *\n\n# The content of __all__ is automatically written by\n# tools/update_init_file.py. Do not modify directly.\n\n__all__ = [\n    \"SCHEMA_URL\",\n    \"SCHEMA_VERSION\",\n    \"TOPLEVEL_ONLY_KEYS\",\n    \"URI\",\n    \"VEGAEMBED_VERSION\",\n    \"VEGALITE_VERSION\",\n    \"VEGA_VERSION\",\n    \"X2\",\n    \"Y2\",\n    \"Aggregate\",\n    \"AggregateOp\",\n    \"AggregateTransform\",\n    \"AggregatedFieldDef\",\n    \"Align\",\n    \"AllSortString\",\n    \"Angle\",\n    \"AngleDatum\",\n    \"AngleValue\",\n    \"AnyMark\",\n    \"AnyMarkConfig\",\n    \"AreaConfig\",\n    \"ArgmaxDef\",\n    \"ArgminDef\",\n    \"AutoSizeParams\",\n    \"AutosizeType\",\n    \"Axis\",\n    \"AxisConfig\",\n    \"AxisOrient\",\n    \"AxisResolveMap\",\n    \"BBox\",\n    \"BarConfig\",\n    \"BaseTitleNoValueRefs\",\n    \"Baseline\",\n    \"Bin\",\n    \"BinExtent\",\n    \"BinParams\",\n    \"BinTransform\",\n    \"BindCheckbox\",\n    \"BindDirect\",\n    \"BindInput\",\n    \"BindRadioSelect\",\n    \"BindRange\",\n    \"Binding\",\n    \"BinnedTimeUnit\",\n    \"Blend\",\n    \"BoxPlot\",\n    \"BoxPlotConfig\",\n    \"BoxPlotDef\",\n    \"BrushConfig\",\n    \"CalculateTransform\",\n    \"Categorical\",\n    \"ChainedWhen\",\n    \"Chart\",\n    \"ChartDataType\",\n    \"Color\",\n    \"ColorDatum\",\n    \"ColorDef\",\n    \"ColorName\",\n    \"ColorScheme\",\n    \"ColorValue\",\n    \"Column\",\n    \"CompositeMark\",\n    \"CompositeMarkDef\",\n    \"CompositionConfig\",\n    \"ConcatChart\",\n    \"ConcatSpecGenericSpec\",\n    \"ConditionalAxisColor\",\n    \"ConditionalAxisLabelAlign\",\n    \"ConditionalAxisLabelBaseline\",\n    \"ConditionalAxisLabelFontStyle\",\n    \"ConditionalAxisLabelFontWeight\",\n    \"ConditionalAxisNumber\",\n    \"ConditionalAxisNumberArray\",\n    \"ConditionalAxisPropertyAlignnull\",\n    \"ConditionalAxisPropertyColornull\",\n    \"ConditionalAxisPropertyFontStylenull\",\n    \"ConditionalAxisPropertyFontWeightnull\",\n    \"ConditionalAxisPropertyTextBaselinenull\",\n    \"ConditionalAxisPropertynumberArraynull\",\n    \"ConditionalAxisPropertynumbernull\",\n    \"ConditionalAxisPropertystringnull\",\n    \"ConditionalAxisString\",\n    \"ConditionalMarkPropFieldOrDatumDef\",\n    \"ConditionalMarkPropFieldOrDatumDefTypeForShape\",\n    \"ConditionalParameterMarkPropFieldOrDatumDef\",\n    \"ConditionalParameterMarkPropFieldOrDatumDefTypeForShape\",\n    \"ConditionalParameterStringFieldDef\",\n    \"ConditionalParameterValueDefGradientstringnullExprRef\",\n    \"ConditionalParameterValueDefTextExprRef\",\n    \"ConditionalParameterValueDefnumber\",\n    \"ConditionalParameterValueDefnumberArrayExprRef\",\n    \"ConditionalParameterValueDefnumberExprRef\",\n    \"ConditionalParameterValueDefstringExprRef\",\n    \"ConditionalParameterValueDefstringnullExprRef\",\n    \"ConditionalPredicateMarkPropFieldOrDatumDef\",\n    \"ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape\",\n    \"ConditionalPredicateStringFieldDef\",\n    \"ConditionalPredicateValueDefAlignnullExprRef\",\n    \"ConditionalPredicateValueDefColornullExprRef\",\n    \"ConditionalPredicateValueDefFontStylenullExprRef\",\n    \"ConditionalPredicateValueDefFontWeightnullExprRef\",\n    \"ConditionalPredicateValueDefGradientstringnullExprRef\",\n    \"ConditionalPredicateValueDefTextBaselinenullExprRef\",\n    \"ConditionalPredicateValueDefTextExprRef\",\n    \"ConditionalPredicateValueDefnumber\",\n    \"ConditionalPredicateValueDefnumberArrayExprRef\",\n    \"ConditionalPredicateValueDefnumberArraynullExprRef\",\n    \"ConditionalPredicateValueDefnumberExprRef\",\n    \"ConditionalPredicateValueDefnumbernullExprRef\",\n    \"ConditionalPredicateValueDefstringExprRef\",\n    \"ConditionalPredicateValueDefstringnullExprRef\",\n    \"ConditionalStringFieldDef\",\n    \"ConditionalValueDefGradientstringnullExprRef\",\n    \"ConditionalValueDefTextExprRef\",\n    \"ConditionalValueDefnumber\",\n    \"ConditionalValueDefnumberArrayExprRef\",\n    \"ConditionalValueDefnumberExprRef\",\n    \"ConditionalValueDefstringExprRef\",\n    \"ConditionalValueDefstringnullExprRef\",\n    \"Config\",\n    \"CsvDataFormat\",\n    \"Cursor\",\n    \"Cyclical\",\n    \"Data\",\n    \"DataFormat\",\n    \"DataSource\",\n    \"DataType\",\n    \"Datasets\",\n    \"DateTime\",\n    \"DatumChannelMixin\",\n    \"DatumDef\",\n    \"Day\",\n    \"DensityTransform\",\n    \"DerivedStream\",\n    \"Description\",\n    \"DescriptionValue\",\n    \"Detail\",\n    \"DictInlineDataset\",\n    \"DictSelectionInit\",\n    \"DictSelectionInitInterval\",\n    \"Diverging\",\n    \"DomainUnionWith\",\n    \"DsvDataFormat\",\n    \"Element\",\n    \"Encoding\",\n    \"EncodingSortField\",\n    \"ErrorBand\",\n    \"ErrorBandConfig\",\n    \"ErrorBandDef\",\n    \"ErrorBar\",\n    \"ErrorBarConfig\",\n    \"ErrorBarDef\",\n    \"ErrorBarExtent\",\n    \"EventStream\",\n    \"EventType\",\n    \"Expr\",\n    \"ExprRef\",\n    \"ExtentTransform\",\n    \"Facet\",\n    \"FacetChart\",\n    \"FacetEncodingFieldDef\",\n    \"FacetFieldDef\",\n    \"FacetMapping\",\n    \"FacetSpec\",\n    \"FacetedEncoding\",\n    \"FacetedUnitSpec\",\n    \"Feature\",\n    \"FeatureCollection\",\n    \"FeatureGeometryGeoJsonProperties\",\n    \"Field\",\n    \"FieldChannelMixin\",\n    \"FieldDefWithoutScale\",\n    \"FieldEqualPredicate\",\n    \"FieldGTEPredicate\",\n    \"FieldGTPredicate\",\n    \"FieldLTEPredicate\",\n    \"FieldLTPredicate\",\n    \"FieldName\",\n    \"FieldOneOfPredicate\",\n    \"FieldOrDatumDefWithConditionDatumDefGradientstringnull\",\n    \"FieldOrDatumDefWithConditionDatumDefnumber\",\n    \"FieldOrDatumDefWithConditionDatumDefnumberArray\",\n    \"FieldOrDatumDefWithConditionDatumDefstringnull\",\n    \"FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull\",\n    \"FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull\",\n    \"FieldOrDatumDefWithConditionMarkPropFieldDefnumber\",\n    \"FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray\",\n    \"FieldOrDatumDefWithConditionStringDatumDefText\",\n    \"FieldOrDatumDefWithConditionStringFieldDefText\",\n    \"FieldOrDatumDefWithConditionStringFieldDefstring\",\n    \"FieldRange\",\n    \"FieldRangePredicate\",\n    \"FieldValidPredicate\",\n    \"Fill\",\n    \"FillDatum\",\n    \"FillOpacity\",\n    \"FillOpacityDatum\",\n    \"FillOpacityValue\",\n    \"FillValue\",\n    \"FilterTransform\",\n    \"Fit\",\n    \"FlattenTransform\",\n    \"FoldTransform\",\n    \"FontStyle\",\n    \"FontWeight\",\n    \"Format\",\n    \"FormatConfig\",\n    \"Generator\",\n    \"GenericUnitSpecEncodingAnyMark\",\n    \"GeoJsonFeature\",\n    \"GeoJsonFeatureCollection\",\n    \"GeoJsonProperties\",\n    \"Geometry\",\n    \"GeometryCollection\",\n    \"Gradient\",\n    \"GradientStop\",\n    \"GraticuleGenerator\",\n    \"GraticuleParams\",\n    \"HConcatChart\",\n    \"HConcatSpecGenericSpec\",\n    \"Header\",\n    \"HeaderConfig\",\n    \"HexColor\",\n    \"Href\",\n    \"HrefValue\",\n    \"Impute\",\n    \"ImputeMethod\",\n    \"ImputeParams\",\n    \"ImputeSequence\",\n    \"ImputeTransform\",\n    \"InlineData\",\n    \"InlineDataset\",\n    \"Interpolate\",\n    \"IntervalSelectionConfig\",\n    \"IntervalSelectionConfigWithoutType\",\n    \"JoinAggregateFieldDef\",\n    \"JoinAggregateTransform\",\n    \"JsonDataFormat\",\n    \"Key\",\n    \"LabelOverlap\",\n    \"LatLongDef\",\n    \"LatLongFieldDef\",\n    \"Latitude\",\n    \"Latitude2\",\n    \"Latitude2Datum\",\n    \"Latitude2Value\",\n    \"LatitudeDatum\",\n    \"LayerChart\",\n    \"LayerRepeatMapping\",\n    \"LayerRepeatSpec\",\n    \"LayerSpec\",\n    \"LayoutAlign\",\n    \"Legend\",\n    \"LegendBinding\",\n    \"LegendConfig\",\n    \"LegendOrient\",\n    \"LegendResolveMap\",\n    \"LegendStreamBinding\",\n    \"LineConfig\",\n    \"LineString\",\n    \"LinearGradient\",\n    \"LocalMultiTimeUnit\",\n    \"LocalSingleTimeUnit\",\n    \"Locale\",\n    \"LoessTransform\",\n    \"LogicalAndPredicate\",\n    \"LogicalNotPredicate\",\n    \"LogicalOrPredicate\",\n    \"Longitude\",\n    \"Longitude2\",\n    \"Longitude2Datum\",\n    \"Longitude2Value\",\n    \"LongitudeDatum\",\n    \"LookupData\",\n    \"LookupSelection\",\n    \"LookupTransform\",\n    \"Mark\",\n    \"MarkConfig\",\n    \"MarkDef\",\n    \"MarkInvalidDataMode\",\n    \"MarkPropDefGradientstringnull\",\n    \"MarkPropDefnumber\",\n    \"MarkPropDefnumberArray\",\n    \"MarkPropDefstringnullTypeForShape\",\n    \"MarkType\",\n    \"MaxRowsError\",\n    \"MergedStream\",\n    \"Month\",\n    \"MultiLineString\",\n    \"MultiPoint\",\n    \"MultiPolygon\",\n    \"MultiTimeUnit\",\n    \"NamedData\",\n    \"NonArgAggregateOp\",\n    \"NonLayerRepeatSpec\",\n    \"NonNormalizedSpec\",\n    \"NumberLocale\",\n    \"NumericArrayMarkPropDef\",\n    \"NumericMarkPropDef\",\n    \"OffsetDef\",\n    \"Opacity\",\n    \"OpacityDatum\",\n    \"OpacityValue\",\n    \"Order\",\n    \"OrderFieldDef\",\n    \"OrderOnlyDef\",\n    \"OrderValue\",\n    \"OrderValueDef\",\n    \"Orient\",\n    \"Orientation\",\n    \"OverlayMarkDef\",\n    \"Padding\",\n    \"Parameter\",\n    \"ParameterExpression\",\n    \"ParameterExtent\",\n    \"ParameterName\",\n    \"ParameterPredicate\",\n    \"Parse\",\n    \"ParseValue\",\n    \"PivotTransform\",\n    \"Point\",\n    \"PointSelectionConfig\",\n    \"PointSelectionConfigWithoutType\",\n    \"PolarDef\",\n    \"Polygon\",\n    \"Position\",\n    \"Position2Def\",\n    \"PositionDatumDef\",\n    \"PositionDatumDefBase\",\n    \"PositionDef\",\n    \"PositionFieldDef\",\n    \"PositionFieldDefBase\",\n    \"PositionValueDef\",\n    \"Predicate\",\n    \"PredicateComposition\",\n    \"PrimitiveValue\",\n    \"Projection\",\n    \"ProjectionConfig\",\n    \"ProjectionType\",\n    \"QuantileTransform\",\n    \"RadialGradient\",\n    \"Radius\",\n    \"Radius2\",\n    \"Radius2Datum\",\n    \"Radius2Value\",\n    \"RadiusDatum\",\n    \"RadiusValue\",\n    \"RangeConfig\",\n    \"RangeEnum\",\n    \"RangeRaw\",\n    \"RangeRawArray\",\n    \"RangeScheme\",\n    \"RectConfig\",\n    \"RegressionTransform\",\n    \"RelativeBandSize\",\n    \"RepeatChart\",\n    \"RepeatMapping\",\n    \"RepeatRef\",\n    \"RepeatSpec\",\n    \"Resolve\",\n    \"ResolveMode\",\n    \"Root\",\n    \"Row\",\n    \"RowColLayoutAlign\",\n    \"RowColboolean\",\n    \"RowColnumber\",\n    \"RowColumnEncodingFieldDef\",\n    \"SampleTransform\",\n    \"Scale\",\n    \"ScaleBinParams\",\n    \"ScaleBins\",\n    \"ScaleConfig\",\n    \"ScaleDatumDef\",\n    \"ScaleFieldDef\",\n    \"ScaleInterpolateEnum\",\n    \"ScaleInterpolateParams\",\n    \"ScaleInvalidDataConfig\",\n    \"ScaleInvalidDataShowAsValueangle\",\n    \"ScaleInvalidDataShowAsValuecolor\",\n    \"ScaleInvalidDataShowAsValuefill\",\n    \"ScaleInvalidDataShowAsValuefillOpacity\",\n    \"ScaleInvalidDataShowAsValueopacity\",\n    \"ScaleInvalidDataShowAsValueradius\",\n    \"ScaleInvalidDataShowAsValueshape\",\n    \"ScaleInvalidDataShowAsValuesize\",\n    \"ScaleInvalidDataShowAsValuestroke\",\n    \"ScaleInvalidDataShowAsValuestrokeDash\",\n    \"ScaleInvalidDataShowAsValuestrokeOpacity\",\n    \"ScaleInvalidDataShowAsValuestrokeWidth\",\n    \"ScaleInvalidDataShowAsValuetheta\",\n    \"ScaleInvalidDataShowAsValuetime\",\n    \"ScaleInvalidDataShowAsValuex\",\n    \"ScaleInvalidDataShowAsValuexOffset\",\n    \"ScaleInvalidDataShowAsValuey\",\n    \"ScaleInvalidDataShowAsValueyOffset\",\n    \"ScaleInvalidDataShowAsangle\",\n    \"ScaleInvalidDataShowAscolor\",\n    \"ScaleInvalidDataShowAsfill\",\n    \"ScaleInvalidDataShowAsfillOpacity\",\n    \"ScaleInvalidDataShowAsopacity\",\n    \"ScaleInvalidDataShowAsradius\",\n    \"ScaleInvalidDataShowAsshape\",\n    \"ScaleInvalidDataShowAssize\",\n    \"ScaleInvalidDataShowAsstroke\",\n    \"ScaleInvalidDataShowAsstrokeDash\",\n    \"ScaleInvalidDataShowAsstrokeOpacity\",\n    \"ScaleInvalidDataShowAsstrokeWidth\",\n    \"ScaleInvalidDataShowAstheta\",\n    \"ScaleInvalidDataShowAstime\",\n    \"ScaleInvalidDataShowAsx\",\n    \"ScaleInvalidDataShowAsxOffset\",\n    \"ScaleInvalidDataShowAsy\",\n    \"ScaleInvalidDataShowAsyOffset\",\n    \"ScaleResolveMap\",\n    \"ScaleType\",\n    \"SchemaBase\",\n    \"SchemeParams\",\n    \"SecondaryFieldDef\",\n    \"SelectionConfig\",\n    \"SelectionExpression\",\n    \"SelectionInit\",\n    \"SelectionInitInterval\",\n    \"SelectionInitIntervalMapping\",\n    \"SelectionInitMapping\",\n    \"SelectionParameter\",\n    \"SelectionPredicateComposition\",\n    \"SelectionResolution\",\n    \"SelectionType\",\n    \"SequenceGenerator\",\n    \"SequenceParams\",\n    \"SequentialMultiHue\",\n    \"SequentialSingleHue\",\n    \"Shape\",\n    \"ShapeDatum\",\n    \"ShapeDef\",\n    \"ShapeValue\",\n    \"SharedEncoding\",\n    \"SingleDefUnitChannel\",\n    \"SingleTimeUnit\",\n    \"Size\",\n    \"SizeDatum\",\n    \"SizeValue\",\n    \"Sort\",\n    \"SortArray\",\n    \"SortByChannel\",\n    \"SortByChannelDesc\",\n    \"SortByEncoding\",\n    \"SortField\",\n    \"SortOrder\",\n    \"Spec\",\n    \"SphereGenerator\",\n    \"StackOffset\",\n    \"StackTransform\",\n    \"StandardType\",\n    \"Step\",\n    \"StepFor\",\n    \"Stream\",\n    \"StringFieldDef\",\n    \"StringFieldDefWithCondition\",\n    \"StringValueDefWithCondition\",\n    \"Stroke\",\n    \"StrokeCap\",\n    \"StrokeDash\",\n    \"StrokeDashDatum\",\n    \"StrokeDashValue\",\n    \"StrokeDatum\",\n    \"StrokeJoin\",\n    \"StrokeOpacity\",\n    \"StrokeOpacityDatum\",\n    \"StrokeOpacityValue\",\n    \"StrokeValue\",\n    \"StrokeWidth\",\n    \"StrokeWidthDatum\",\n    \"StrokeWidthValue\",\n    \"StyleConfigIndex\",\n    \"SymbolShape\",\n    \"Text\",\n    \"TextBaseline\",\n    \"TextDatum\",\n    \"TextDef\",\n    \"TextDirection\",\n    \"TextValue\",\n    \"Then\",\n    \"Theta\",\n    \"Theta2\",\n    \"Theta2Datum\",\n    \"Theta2Value\",\n    \"ThetaDatum\",\n    \"ThetaValue\",\n    \"TickConfig\",\n    \"TickCount\",\n    \"Time\",\n    \"TimeDef\",\n    \"TimeFieldDef\",\n    \"TimeFormatSpecifier\",\n    \"TimeInterval\",\n    \"TimeIntervalStep\",\n    \"TimeLocale\",\n    \"TimeUnit\",\n    \"TimeUnitParams\",\n    \"TimeUnitTransform\",\n    \"TimeUnitTransformParams\",\n    \"Title\",\n    \"TitleAnchor\",\n    \"TitleConfig\",\n    \"TitleFrame\",\n    \"TitleOrient\",\n    \"TitleParams\",\n    \"Tooltip\",\n    \"TooltipContent\",\n    \"TooltipValue\",\n    \"TopLevelConcatSpec\",\n    \"TopLevelFacetSpec\",\n    \"TopLevelHConcatSpec\",\n    \"TopLevelLayerSpec\",\n    \"TopLevelMixin\",\n    \"TopLevelParameter\",\n    \"TopLevelRepeatSpec\",\n    \"TopLevelSelectionParameter\",\n    \"TopLevelSpec\",\n    \"TopLevelUnitSpec\",\n    \"TopLevelVConcatSpec\",\n    \"TopoDataFormat\",\n    \"Transform\",\n    \"Type\",\n    \"TypeForShape\",\n    \"TypedFieldDef\",\n    \"UnitSpec\",\n    \"UnitSpecWithFrame\",\n    \"Url\",\n    \"UrlData\",\n    \"UrlValue\",\n    \"UtcMultiTimeUnit\",\n    \"UtcSingleTimeUnit\",\n    \"VConcatChart\",\n    \"VConcatSpecGenericSpec\",\n    \"ValueChannelMixin\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefnumber\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefstringnull\",\n    \"ValueDefWithConditionStringFieldDefText\",\n    \"ValueDefnumber\",\n    \"ValueDefnumberwidthheightExprRef\",\n    \"VariableParameter\",\n    \"Vector2DateTime\",\n    \"Vector2Vector2number\",\n    \"Vector2boolean\",\n    \"Vector2number\",\n    \"Vector2string\",\n    \"Vector3number\",\n    \"Vector7string\",\n    \"Vector10string\",\n    \"Vector12string\",\n    \"VegaLite\",\n    \"VegaLiteSchema\",\n    \"ViewBackground\",\n    \"ViewConfig\",\n    \"When\",\n    \"WindowEventType\",\n    \"WindowFieldDef\",\n    \"WindowOnlyOp\",\n    \"WindowTransform\",\n    \"X\",\n    \"X2Datum\",\n    \"X2Value\",\n    \"XDatum\",\n    \"XError\",\n    \"XError2\",\n    \"XError2Value\",\n    \"XErrorValue\",\n    \"XOffset\",\n    \"XOffsetDatum\",\n    \"XOffsetValue\",\n    \"XValue\",\n    \"Y\",\n    \"Y2Datum\",\n    \"Y2Value\",\n    \"YDatum\",\n    \"YError\",\n    \"YError2\",\n    \"YError2Value\",\n    \"YErrorValue\",\n    \"YOffset\",\n    \"YOffsetDatum\",\n    \"YOffsetValue\",\n    \"YValue\",\n    \"api\",\n    \"binding\",\n    \"binding_checkbox\",\n    \"binding_radio\",\n    \"binding_range\",\n    \"binding_select\",\n    \"channels\",\n    \"check_fields_and_encodings\",\n    \"compiler\",\n    \"concat\",\n    \"condition\",\n    \"core\",\n    \"data_transformers\",\n    \"datum\",\n    \"default_data_transformer\",\n    \"graticule\",\n    \"hconcat\",\n    \"layer\",\n    \"limit_rows\",\n    \"load_schema\",\n    \"mixins\",\n    \"param\",\n    \"renderers\",\n    \"repeat\",\n    \"sample\",\n    \"schema\",\n    \"selection\",\n    \"selection_interval\",\n    \"selection_multi\",\n    \"selection_point\",\n    \"selection_single\",\n    \"sequence\",\n    \"sphere\",\n    \"to_csv\",\n    \"to_json\",\n    \"to_values\",\n    \"topo_feature\",\n    \"value\",\n    \"vconcat\",\n    \"vegalite_compilers\",\n    \"when\",\n    \"with_property_setters\",\n]\n"
  },
  {
    "path": "altair/vegalite/v6/api.py",
    "content": "from __future__ import annotations\n\nimport functools\nimport hashlib\nimport io\nimport itertools\nimport json\nimport operator\nimport sys\nimport typing as t\nimport warnings\nfrom collections.abc import Mapping, Sequence\nfrom copy import deepcopy as _deepcopy\nfrom typing import TYPE_CHECKING, Any, Literal, TypeAlias, TypeVar, Union, overload\n\nimport jsonschema\nimport narwhals.stable.v1 as nw\n\nfrom altair import theme, utils\nfrom altair.expr import core as _expr_core\nfrom altair.utils import Optional, SchemaBase, Undefined\nfrom altair.utils._vegafusion_data import (\n    compile_with_vegafusion as _compile_with_vegafusion,\n)\nfrom altair.utils._vegafusion_data import using_vegafusion as _using_vegafusion\nfrom altair.utils.data import DataType\nfrom altair.utils.data import is_data_type as _is_data_type\nfrom altair.utils.schemapi import ConditionLike, _TypeMap\n\nfrom .compiler import vegalite_compilers\nfrom .data import data_transformers\nfrom .display import VEGA_VERSION, VEGAEMBED_VERSION, VEGALITE_VERSION, renderers\nfrom .schema import SCHEMA_URL, channels, core, mixins\nfrom .schema._typing import Map, PrimitiveValue_T, SingleDefUnitChannel_T, Temporal\nfrom .schema.core import (\n    SelectionParameter,\n    TopLevelSelectionParameter,\n    VariableParameter,\n)\n\nif sys.version_info >= (3, 15):\n    from typing import TypedDict\nelse:\n    from typing_extensions import TypedDict\nif sys.version_info >= (3, 12):\n    from typing import Protocol, TypeAliasType, runtime_checkable\nelse:\n    from typing_extensions import (  # noqa: F401\n        Protocol,\n        TypeAliasType,\n        runtime_checkable,\n    )\nif sys.version_info >= (3, 11):\n    from typing import LiteralString\nelse:\n    from typing_extensions import LiteralString\n\nif TYPE_CHECKING:\n    from collections.abc import Iterable, Iterator\n    from pathlib import Path\n    from typing import IO\n\n    from altair.utils.core import DataFrameLike\n\n    from .schema.core import (\n        SelectionParameter,\n        TopLevelSelectionParameter,\n        VariableParameter,\n    )\n\n    if sys.version_info >= (3, 13):\n        from typing import Required, TypeIs\n    else:\n        from typing_extensions import Required, TypeIs\n    if sys.version_info >= (3, 11):\n        from typing import Never, Self\n    else:\n        from typing_extensions import Never, Self\n\n    from altair.expr.core import (\n        BinaryExpression,\n        Expression,\n        GetAttrExpression,\n        GetItemExpression,\n        IntoExpression,\n    )\n    from altair.utils.display import MimeBundleType\n\n    from .schema._config import BrushConfigKwds, DerivedStreamKwds, MergedStreamKwds\n    from .schema._typing import (\n        AggregateOp_T,\n        AutosizeType_T,\n        ColorName_T,\n        CompositeMark_T,\n        ImputeMethod_T,\n        LayoutAlign_T,\n        Mark_T,\n        MultiTimeUnit_T,\n        OneOrSeq,\n        ProjectionType_T,\n        ResolveMode_T,\n        SelectionResolution_T,\n        SelectionType_T,\n        SingleTimeUnit_T,\n        StackOffset_T,\n    )\n    from .schema.channels import Column, Facet, Row\n    from .schema.core import (\n        AggregatedFieldDef,\n        AggregateOp,\n        AnyMark,\n        BindCheckbox,\n        Binding,\n        BindInput,\n        BindRadioSelect,\n        BindRange,\n        BinParams,\n        BrushConfig,\n        DateTime,\n        Expr,\n        ExprRef,\n        FacetedEncoding,\n        FacetFieldDef,\n        FieldName,\n        GraticuleGenerator,\n        ImputeMethod,\n        ImputeSequence,\n        InlineData,\n        InlineDataset,\n        IntervalSelectionConfig,\n        JoinAggregateFieldDef,\n        LookupSelection,\n        NamedData,\n        ParameterName,\n        PointSelectionConfig,\n        PredicateComposition,\n        ProjectionType,\n        RepeatMapping,\n        RepeatRef,\n        SequenceGenerator,\n        SortField,\n        SphereGenerator,\n        Step,\n        TimeUnit,\n        Transform,\n        UrlData,\n        Vector2number,\n        Vector2Vector2number,\n        Vector3number,\n        WindowFieldDef,\n    )\n\nfrom .schema.core import LayerRepeatMapping\n\n__all__ = [\n    \"TOPLEVEL_ONLY_KEYS\",\n    \"Bin\",\n    \"ChainedWhen\",\n    \"Chart\",\n    \"ChartDataType\",\n    \"ConcatChart\",\n    \"DataType\",\n    \"FacetChart\",\n    \"FacetMapping\",\n    \"HConcatChart\",\n    \"Impute\",\n    \"LayerChart\",\n    \"LookupData\",\n    \"Parameter\",\n    \"ParameterExpression\",\n    \"RepeatChart\",\n    \"SelectionExpression\",\n    \"SelectionPredicateComposition\",\n    \"Then\",\n    \"Title\",\n    \"TopLevelMixin\",\n    \"VConcatChart\",\n    \"When\",\n    \"binding\",\n    \"binding_checkbox\",\n    \"binding_radio\",\n    \"binding_range\",\n    \"binding_select\",\n    \"check_fields_and_encodings\",\n    \"concat\",\n    \"condition\",\n    \"graticule\",\n    \"hconcat\",\n    \"layer\",\n    \"mixins\",\n    \"param\",\n    \"repeat\",\n    \"selection\",\n    \"selection_interval\",\n    \"selection_multi\",\n    \"selection_point\",\n    \"selection_single\",\n    \"sequence\",\n    \"sphere\",\n    \"topo_feature\",\n    \"value\",\n    \"vconcat\",\n    \"when\",\n]\n\nChartDataType: TypeAlias = Optional[DataType | core.Data | str | core.Generator]\n_TSchemaBase = TypeVar(\"_TSchemaBase\", bound=SchemaBase)\n\n\n# ------------------------------------------------------------------------\n# Data Utilities\ndef _dataset_name(values: dict[str, Any] | list[str] | InlineDataset) -> str:\n    \"\"\"\n    Generate a unique hash of the data.\n\n    Parameters\n    ----------\n    values : list, dict, core.InlineDataset\n        A representation of data values.\n\n    Returns\n    -------\n    name : string\n        A unique name generated from the hash of the values.\n    \"\"\"\n    if isinstance(values, core.InlineDataset):\n        values = values.to_dict()\n    if values == [{}]:\n        return \"empty\"\n    values_json = json.dumps(values, sort_keys=True, default=str)\n    hsh = hashlib.sha256(values_json.encode()).hexdigest()[:32]\n    return \"data-\" + hsh\n\n\ndef _consolidate_data(\n    data: ChartDataType | UrlData, context: dict[str, Any]\n) -> ChartDataType | NamedData | InlineData | UrlData:\n    \"\"\"\n    If data is specified inline, then move it to context['datasets'].\n\n    This function will modify context in-place, and return a new version of data\n    \"\"\"\n    values: Any = Undefined\n    kwds: dict = {}\n\n    if isinstance(data, core.InlineData):\n        if utils.is_undefined(data.name) and not utils.is_undefined(data.values):\n            if isinstance(data.values, core.InlineDataset):\n                values = data.to_dict()[\"values\"]\n            else:\n                values = data.values\n            kwds = {\"format\": data.format}\n\n    elif isinstance(data, dict) and (\"name\" not in data) and (\"values\" in data):\n        values = data[\"values\"]\n        kwds = {k: v for k, v in data.items() if k != \"values\"}\n\n    if not utils.is_undefined(values):\n        name = _dataset_name(values)\n        data = core.NamedData(name=name, **kwds)\n        context.setdefault(\"datasets\", {})[name] = values\n\n    return data\n\n\ndef _prepare_data(\n    data: ChartDataType, context: dict[str, Any] | None = None\n) -> ChartDataType | NamedData | InlineData | UrlData | Any:\n    \"\"\"\n    Convert input data to data for use within schema.\n\n    Parameters\n    ----------\n    data :\n        The input dataset in the form of a DataFrame, dictionary, altair data\n        object, or other type that is recognized by the data transformers.\n    context : dict (optional)\n        The to_dict context in which the data is being prepared. This is used\n        to keep track of information that needs to be passed up and down the\n        recursive serialization routine, such as global named datasets.\n    \"\"\"\n    if data is Undefined:\n        return data\n\n    # convert dataframes  or objects with __geo_interface__ to dict\n    elif not isinstance(data, dict) and _is_data_type(data):\n        if func := data_transformers.get():\n            data = func(nw.to_native(data, pass_through=True))\n\n    # convert string input to a URLData\n    elif isinstance(data, str):\n        data = core.UrlData(data)\n\n    # consolidate inline data to top-level datasets\n    if context is not None and data_transformers.consolidate_datasets:\n        data = _consolidate_data(data, context)\n\n    # if data is still not a recognized type, then return\n    if not isinstance(data, (dict, core.Data)):\n        warnings.warn(f\"data of type {type(data)} not recognized\", stacklevel=1)\n\n    return data\n\n\n# ------------------------------------------------------------------------\n# Aliases & specializations\nBin = core.BinParams\nImpute = core.ImputeParams\nTitle = core.TitleParams\n\n\nclass LookupData(core.LookupData):\n    @utils.use_signature(core.LookupData)\n    def __init__(self, *args: Any, **kwargs: Any) -> None:\n        super().__init__(*args, **kwargs)\n\n    def to_dict(self, *args: Any, **kwargs: Any) -> dict[str, Any]:\n        \"\"\"Convert the chart to a dictionary suitable for JSON export.\"\"\"\n        copy = self.copy(deep=False)\n        copy.data = _prepare_data(copy.data, kwargs.get(\"context\"))\n        return super(LookupData, copy).to_dict(*args, **kwargs)\n\n\nclass FacetMapping(core.FacetMapping):\n    \"\"\"\n    FacetMapping schema wrapper.\n\n    Parameters\n    ----------\n    column : str, :class:`FacetFieldDef`, :class:`Column`\n        A field definition for the horizontal facet of trellis plots.\n    row : str, :class:`FacetFieldDef`, :class:`Row`\n        A field definition for the vertical facet of trellis plots.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n\n    def __init__(\n        self,\n        column: Optional[str | FacetFieldDef | Column] = Undefined,\n        row: Optional[str | FacetFieldDef | Row] = Undefined,\n        **kwargs: Any,\n    ) -> None:\n        super().__init__(column=column, row=row, **kwargs)  # type: ignore\n\n    def to_dict(self, *args: Any, **kwargs: Any) -> dict[str, Any]:\n        copy = self.copy(deep=False)\n        context = kwargs.get(\"context\", {})\n        data = context.get(\"data\", None)\n        if isinstance(self.row, str):\n            copy.row = core.FacetFieldDef(**utils.parse_shorthand(self.row, data))\n        if isinstance(self.column, str):\n            copy.column = core.FacetFieldDef(**utils.parse_shorthand(self.column, data))\n        return super(FacetMapping, copy).to_dict(*args, **kwargs)\n\n\n# ------------------------------------------------------------------------\n# Encoding will contain channel objects that aren't valid at instantiation\ncore.FacetedEncoding._class_is_valid_at_instantiation = False\n\n# ------------------------------------------------------------------------\n# These are parameters that are valid at the top level, but are not valid\n# for specs that are within a composite chart\n# (layer, hconcat, vconcat, facet, repeat)\nTOPLEVEL_ONLY_KEYS = {\"background\", \"config\", \"autosize\", \"padding\", \"$schema\"}\n\n\n# -------------------------------------------------------------------------\n# Tools for working with parameters\nclass Parameter(_expr_core.OperatorMixin):\n    \"\"\"A Parameter object.\"\"\"\n\n    _schema: t.ClassVar[_TypeMap[Literal[\"object\"]]] = {\"type\": \"object\"}\n\n    def _compute_hash(self) -> str:\n        \"\"\"\n        Compute a deterministic hash of the parameter specification.\n\n        Includes parameter type, configuration, and context to ensure uniqueness.\n        \"\"\"\n        # Access attributes directly to avoid triggering __getattr__\n        param_type = getattr(self, \"param_type\", None)\n        empty = getattr(self, \"empty\", None)\n        param = getattr(self, \"param\", None)\n\n        # Create a hash data structure with parameter information\n        hash_data = {\n            \"param_type\": param_type,\n            \"empty\": empty,\n        }\n\n        if param is not None and hasattr(param, \"to_dict\"):\n            param_dict = param.to_dict()\n\n            # Create a copy of param_dict without the name field for hash computation\n            # The name should not be part of the hash since it's what we're trying to generate\n            param_dict_for_hash = param_dict.copy()\n            if isinstance(param_dict_for_hash, dict):\n                param_dict_for_hash.pop(\"name\", None)\n\n            hash_data[\"param\"] = param_dict_for_hash\n        else:\n            hash_data[\"param\"] = param\n\n        # Serialize to JSON with sorted keys for consistency\n        hash_json = json.dumps(hash_data, sort_keys=True, default=str)\n\n        # Compute hash and truncate to 16 characters for readability\n        hsh = hashlib.sha256(hash_json.encode()).hexdigest()[:16]\n        return f\"param_{hsh}\"\n\n    def _get_param_hash_name(self) -> str:\n        \"\"\"Get a deterministic name based on the parameter specification hash.\"\"\"\n        return self._compute_hash()\n\n    def __init__(\n        self,\n        name: str | None = None,\n        empty: Optional[bool] = Undefined,\n        param: Optional[\n            VariableParameter | TopLevelSelectionParameter | SelectionParameter\n        ] = Undefined,\n        param_type: Optional[Literal[\"variable\", \"selection\"]] = Undefined,\n    ) -> None:\n        # Set attributes first\n        self.empty = empty\n        self.param = param\n        self.param_type = param_type\n\n        # Generate name after attributes are set\n        if name is None:\n            # Use hash-based naming for deterministic names\n            name = self._get_param_hash_name()\n            self._name_is_hashed = True\n        else:\n            self._name_is_hashed = False\n        self.name = name\n\n        # Update the underlying param object's name to match\n        if self.param is not None and not utils.is_undefined(self.param):\n            self.param.name = self.name\n\n    @utils.deprecated(\n        version=\"5.0.0\",\n        alternative=\"to_dict\",\n        message=\"No need to call '.ref()' anymore.\",\n    )\n    def ref(self) -> dict[str, Any]:\n        \"\"\"'ref' is deprecated. No need to call '.ref()' anymore.\"\"\"\n        return self.to_dict()\n\n    def to_dict(self) -> dict[str, str | dict[str, Any]]:\n        if self.param_type == \"variable\":\n            return {\"expr\": self.name}\n        elif self.param_type == \"selection\":\n            nm: Any = self.name\n            return {\"param\": nm.to_dict() if hasattr(nm, \"to_dict\") else nm}\n        else:\n            msg = f\"Unrecognized parameter type: {self.param_type}\"\n            raise ValueError(msg)\n\n    def __invert__(self) -> PredicateComposition | Any:\n        if self.param_type == \"selection\":\n            param_dict: dict[str, str | bool] = {\"param\": self.name}\n            if isinstance(self.empty, bool):\n                param_dict[\"empty\"] = self.empty\n            return core.PredicateComposition({\"not\": param_dict})\n        else:\n            return _expr_core.OperatorMixin.__invert__(self)\n\n    def __and__(self, other: Any) -> PredicateComposition | Any:\n        if self.param_type == \"selection\":\n            self_dict: dict[str, str | bool] = {\"param\": self.name}\n            if isinstance(self.empty, bool):\n                self_dict[\"empty\"] = self.empty\n            if isinstance(other, Parameter):\n                other_dict: dict[str, str | bool] = {\"param\": other.name}\n                if isinstance(other.empty, bool):\n                    other_dict[\"empty\"] = other.empty\n                other = other_dict\n            return core.PredicateComposition({\"and\": [self_dict, other]})\n        else:\n            return _expr_core.OperatorMixin.__and__(self, other)\n\n    def __or__(self, other: Any) -> PredicateComposition | Any:\n        if self.param_type == \"selection\":\n            self_dict: dict[str, str | bool] = {\"param\": self.name}\n            if isinstance(self.empty, bool):\n                self_dict[\"empty\"] = self.empty\n            if isinstance(other, Parameter):\n                other_dict: dict[str, str | bool] = {\"param\": other.name}\n                if isinstance(other.empty, bool):\n                    other_dict[\"empty\"] = other.empty\n                other = other_dict\n            return core.PredicateComposition({\"or\": [self_dict, other]})\n        else:\n            return _expr_core.OperatorMixin.__or__(self, other)\n\n    def __repr__(self) -> str:\n        return f\"Parameter({self.name!r}, {self.param})\"\n\n    def _to_expr(self) -> str:\n        return self.name\n\n    def _from_expr(self, expr: IntoExpression) -> ParameterExpression:\n        return ParameterExpression(expr=expr)\n\n    def __getattr__(self, field_name: str) -> GetAttrExpression | SelectionExpression:\n        if field_name.startswith(\"__\") and field_name.endswith(\"__\"):\n            raise AttributeError(field_name)\n        _attrexpr = _expr_core.GetAttrExpression(self.name, field_name)\n        # If self is a SelectionParameter and field_name is in its\n        # fields or encodings list, then we want to return an expression.\n        if check_fields_and_encodings(self, field_name):\n            return SelectionExpression(_attrexpr)\n        return _expr_core.GetAttrExpression(self.name, field_name)\n\n    # TODO: Are there any special cases to consider for __getitem__?\n    # This was copied from v4.\n    def __getitem__(self, field_name: str) -> GetItemExpression:\n        return _expr_core.GetItemExpression(self.name, field_name)\n\n\n# Enables use of ~, &, | with compositions of selection objects.\nSelectionPredicateComposition = core.PredicateComposition\n\n\nclass ParameterExpression(_expr_core.OperatorMixin):\n    _schema: t.ClassVar[_TypeMap[Literal[\"object\"]]] = {\"type\": \"object\"}\n\n    def __init__(self, expr: IntoExpression) -> None:\n        self.expr = expr\n\n    def to_dict(self) -> dict[str, str]:\n        return {\"expr\": repr(self.expr)}\n\n    def _to_expr(self) -> str:\n        return repr(self.expr)\n\n    def _from_expr(self, expr: IntoExpression) -> ParameterExpression:\n        return ParameterExpression(expr=expr)\n\n\nclass SelectionExpression(_expr_core.OperatorMixin):\n    _schema: t.ClassVar[_TypeMap[Literal[\"object\"]]] = {\"type\": \"object\"}\n\n    def __init__(self, expr: IntoExpression) -> None:\n        self.expr = expr\n\n    def to_dict(self) -> dict[str, str]:\n        return {\"expr\": repr(self.expr)}\n\n    def _to_expr(self) -> str:\n        return repr(self.expr)\n\n    def _from_expr(self, expr: IntoExpression) -> SelectionExpression:\n        return SelectionExpression(expr=expr)\n\n\ndef check_fields_and_encodings(parameter: Parameter, field_name: str) -> bool:\n    param = parameter.param\n    if utils.is_undefined(param) or isinstance(param, core.VariableParameter):\n        return False\n    for prop in [\"fields\", \"encodings\"]:\n        try:\n            if field_name in getattr(param.select, prop):\n                return True\n        except (AttributeError, TypeError):\n            pass\n\n    return False\n\n\n# -------------------------------------------------------------------------\n# Tools for working with conditions\n_TestPredicateType: TypeAlias = str | _expr_core.Expression | core.PredicateComposition\n\"\"\"https://vega.github.io/vega-lite/docs/predicate.html\"\"\"\n\n_PredicateType: TypeAlias = Union[\n    Parameter,\n    core.Expr,\n    \"_ConditionExtra\",\n    _TestPredicateType,\n    _expr_core.OperatorMixin,\n]\n\"\"\"Permitted types for `predicate`.\"\"\"\n\n_ComposablePredicateType: TypeAlias = (\n    _expr_core.OperatorMixin | core.PredicateComposition\n)\n\"\"\"Permitted types for `&` reduced predicates.\"\"\"\n\n_StatementType: TypeAlias = SchemaBase | Map | str\n\"\"\"Permitted types for `if_true`/`if_false`.\n\nIn python terms:\n```py\nif _PredicateType:\n    return _StatementType\nelif _PredicateType:\n    return _StatementType\nelse:\n    return _StatementType\n```\n\"\"\"\n\n\n_FieldEqualType: TypeAlias = Union[\"IntoExpression\", Parameter, SchemaBase]\n\"\"\"\nPermitted types for equality checks on field values.\n\nApplies to the following context(s):\n\n    import altair as alt\n\n    alt.datum.field == ...\n    alt.FieldEqualPredicate(field=\"field\", equal=...)\n    alt.when(field=...)\n    alt.when().then().when(field=...)\n    alt.Chart.transform_filter(field=...)\n\"\"\"\n\n\ndef _is_test_predicate(obj: Any) -> TypeIs[_TestPredicateType]:\n    return isinstance(obj, (str, _expr_core.Expression, core.PredicateComposition))\n\n\ndef _get_predicate_expr(p: Parameter) -> Optional[_TestPredicateType]:\n    # https://vega.github.io/vega-lite/docs/predicate.html\n    return getattr(p.param, \"expr\", Undefined)\n\n\ndef _predicate_to_condition(\n    predicate: _PredicateType, *, empty: Optional[bool] = Undefined\n) -> _Condition:\n    condition: _Condition\n    if isinstance(predicate, Parameter):\n        predicate_expr = _get_predicate_expr(predicate)\n        if predicate.param_type == \"selection\" or utils.is_undefined(predicate_expr):\n            condition = {\"param\": predicate.name}\n            if isinstance(empty, bool):\n                condition[\"empty\"] = empty\n            elif isinstance(predicate.empty, bool):\n                condition[\"empty\"] = predicate.empty\n        else:\n            condition = {\"test\": predicate_expr}\n    elif _is_test_predicate(predicate):\n        condition = {\"test\": predicate}\n    elif isinstance(predicate, dict):\n        condition = predicate\n    elif isinstance(predicate, _expr_core.OperatorMixin):\n        condition = {\"test\": predicate._to_expr()}\n    else:\n        msg = (\n            f\"Expected a predicate, but got: {type(predicate).__name__!r}\\n\\n\"\n            f\"From `predicate={predicate!r}`.\"\n        )\n        raise TypeError(msg)\n    return condition\n\n\ndef _condition_to_selection(\n    condition: _Condition,\n    if_true: _StatementType,\n    if_false: _StatementType,\n    **kwargs: Any,\n) -> SchemaBase | _Conditional[_Condition]:\n    selection: SchemaBase | _Conditional[_Condition]\n    if isinstance(if_true, SchemaBase):\n        if_true = if_true.to_dict()\n    elif isinstance(if_true, str):\n        if isinstance(if_false, str):\n            msg = (\n                \"A field cannot be used for both the `if_true` and `if_false` \"\n                \"values of a condition. \"\n                \"One of them has to specify a `value` or `datum` definition.\"\n            )\n            raise ValueError(msg)\n        else:\n            if_true = utils.parse_shorthand(if_true)\n            if_true.update(kwargs)\n    cond_mutable: Any = dict(condition)\n    cond_mutable.update(if_true)\n    if isinstance(if_false, SchemaBase):\n        # For the selection, the channel definitions all allow selections\n        # already. So use this SchemaBase wrapper if possible.\n        selection = if_false.copy()\n        selection.condition = cond_mutable\n    elif isinstance(if_false, (str, dict)):\n        if isinstance(if_false, str):\n            if_false = utils.parse_shorthand(if_false)\n            if_false.update(kwargs)\n        selection = _Conditional(condition=cond_mutable, **if_false)  # type: ignore\n    else:\n        raise TypeError(if_false)\n    return selection\n\n\nclass _ConditionExtra(TypedDict, closed=True, total=False):  # type: ignore\n    # https://peps.python.org/pep-0728/\n    # Likely a Field predicate\n    empty: Optional[bool]\n    param: Parameter | str\n    test: _TestPredicateType\n    value: Any\n    __extra_items__: _StatementType | OneOrSeq[PrimitiveValue_T]\n\n\n_Condition: TypeAlias = _ConditionExtra\n\"\"\"\nA singular, *possibly* non-chainable condition produced by ``.when()``.\n\nThe default **permissive** representation.\n\nAllows arbitrary additional keys that *may* be present in a `Conditional Field`_\nbut not a `Conditional Value`_.\n\n.. _Conditional Field:\n    https://vega.github.io/vega-lite/docs/condition.html#field\n.. _Conditional Value:\n    https://vega.github.io/vega-lite/docs/condition.html#value\n\"\"\"\n\n\nclass _ConditionClosed(TypedDict, closed=True, total=False):  # type: ignore\n    # https://peps.python.org/pep-0728/\n    # Parameter {\"param\", \"value\", \"empty\"}\n    # Predicate {\"test\", \"value\"}\n    empty: Optional[bool]\n    param: Parameter | str\n    test: _TestPredicateType\n    value: Any\n\n\n_Conditions: TypeAlias = list[_ConditionClosed]\n\"\"\"\nChainable conditions produced by ``.when()`` and ``Then.when()``.\n\nAll must be a `Conditional Value`_.\n\n.. _Conditional Value:\n    https://vega.github.io/vega-lite/docs/condition.html#value\n\"\"\"\n\n_C = TypeVar(\"_C\", _Conditions, _Condition)\n\n\nclass _Conditional(TypedDict, t.Generic[_C], total=False):\n    \"\"\"\n    A dictionary representation of a conditional encoding or property.\n\n    Parameters\n    ----------\n    condition\n        One or more (predicate, statement) pairs which each form a condition.\n    value\n        An optional default value, used when no predicates were met.\n    \"\"\"\n\n    condition: Required[_C]\n    value: Any\n\n\nIntoCondition: TypeAlias = ConditionLike | _Conditional[Any]\n\"\"\"\nAnything that can be converted into a conditional encoding or property.\n\nNotes\n-----\nRepresents all outputs from `when-then-otherwise` conditions, which are not ``SchemaBase`` types.\n\"\"\"\n\n\nclass _Value(TypedDict, closed=True, total=False):  # type: ignore\n    # https://peps.python.org/pep-0728/\n    value: Required[Any]\n    __extra_items__: Any\n\n\ndef _reveal_parsed_shorthand(obj: Map, /) -> dict[str, Any]:\n    # Helper for producing error message on multiple field collision.\n    return {k: v for k, v in obj.items() if k in utils.SHORTHAND_KEYS}\n\n\ndef _is_extra(*objs: Any, kwds: Map) -> Iterator[bool]:\n    for el in objs:\n        if isinstance(el, (SchemaBase, Mapping)):\n            item = el.to_dict(validate=False) if isinstance(el, SchemaBase) else el\n            yield not (item.keys() - kwds.keys()).isdisjoint(utils.SHORTHAND_KEYS)\n        else:\n            continue\n\n\ndef _is_condition_extra(obj: Any, *objs: Any, kwds: Map) -> TypeIs[_Condition]:\n    # NOTE: Short circuits on the first conflict.\n    # 1 - Originated from parse_shorthand\n    # 2 - Used a wrapper or `dict` directly, including `extra_keys`\n    return isinstance(obj, str) or any(_is_extra(obj, *objs, kwds=kwds))\n\n\ndef _is_condition_closed(obj: Map) -> TypeIs[_ConditionClosed]:\n    \"\"\"Return `True` if ``obj`` can be used in a chained condition.\"\"\"\n    return {\"empty\", \"param\", \"test\", \"value\"} >= obj.keys()\n\n\ndef _parse_when_constraints(\n    constraints: dict[str, _FieldEqualType], /\n) -> Iterator[BinaryExpression]:\n    \"\"\"\n    Wrap kwargs with `alt.datum`.\n\n    ```py\n    # before\n    alt.when(alt.datum.Origin == \"Europe\")\n\n    # after\n    alt.when(Origin=\"Europe\")\n    ```\n    \"\"\"\n    for name, value in constraints.items():\n        yield _expr_core.GetAttrExpression(\"datum\", name) == value\n\n\ndef _validate_composables(\n    predicates: Iterable[Any], /\n) -> Iterator[_ComposablePredicateType]:\n    for p in predicates:\n        if isinstance(p, (_expr_core.OperatorMixin, core.PredicateComposition)):\n            yield p\n        else:\n            msg = (\n                f\"Predicate composition is not permitted for \"\n                f\"{type(p).__name__!r}.\\n\"\n                f\"Try wrapping {p!r} in a `Parameter` first.\"\n            )\n            raise TypeError(msg)\n\n\ndef _parse_when_compose(\n    predicates: tuple[Any, ...],\n    constraints: dict[str, _FieldEqualType],\n    /,\n) -> BinaryExpression:\n    \"\"\"\n    Compose an `&` reduction predicate.\n\n    Parameters\n    ----------\n    predicates\n        Collected positional arguments.\n    constraints\n        Collected keyword arguments.\n\n    Raises\n    ------\n    TypeError\n        On the first non ``_ComposablePredicateType`` of `predicates`\n    \"\"\"\n    iters = []\n    if predicates:\n        iters.append(_validate_composables(predicates))\n    if constraints:\n        iters.append(_parse_when_constraints(constraints))\n    r = functools.reduce(operator.and_, itertools.chain.from_iterable(iters))\n    return t.cast(\"_expr_core.BinaryExpression\", r)\n\n\ndef _parse_when(\n    predicate: Optional[_PredicateType],\n    *more_predicates: _ComposablePredicateType,\n    empty: Optional[bool],\n    **constraints: _FieldEqualType,\n) -> _Condition:\n    composed: _PredicateType\n    if utils.is_undefined(predicate):\n        if more_predicates or constraints:\n            composed = _parse_when_compose(more_predicates, constraints)\n        else:\n            msg = (\n                f\"At least one predicate or constraint must be provided, \"\n                f\"but got: {predicate=}\"\n            )\n            raise TypeError(msg)\n    elif more_predicates or constraints:\n        predicates = predicate, *more_predicates\n        composed = _parse_when_compose(predicates, constraints)\n    else:\n        composed = predicate\n    return _predicate_to_condition(composed, empty=empty)\n\n\ndef _parse_literal(val: Any, /) -> dict[str, Any]:\n    if isinstance(val, str):\n        return utils.parse_shorthand(val)\n    else:\n        msg = (\n            f\"Expected a shorthand `str`, but got: {type(val).__name__!r}\\n\\n\"\n            f\"From `statement={val!r}`.\"\n        )\n        raise TypeError(msg)\n\n\ndef _parse_then(statement: _StatementType, kwds: dict[str, Any], /) -> dict[str, Any]:\n    if isinstance(statement, SchemaBase):\n        statement = statement.to_dict()\n    elif not isinstance(statement, dict):\n        statement = _parse_literal(statement)\n    statement.update(kwds)\n    return statement\n\n\ndef _parse_otherwise(\n    statement: _StatementType, conditions: _Conditional[Any], kwds: dict[str, Any], /\n) -> SchemaBase | _Conditional[Any]:\n    selection: SchemaBase | _Conditional[Any]\n    if isinstance(statement, SchemaBase):\n        selection = statement.copy()\n        conditions.update(**kwds)  # type: ignore\n        selection.condition = conditions[\"condition\"]\n    else:\n        if not isinstance(statement, Mapping):\n            statement = _parse_literal(statement)\n        selection = conditions\n        selection.update(**statement, **kwds)  # type: ignore[call-arg]\n    return selection\n\n\nclass _BaseWhen(Protocol):\n    # NOTE: Temporary solution to non-SchemaBase copy\n    _condition: _Condition\n\n    def _when_then(\n        self, statement: _StatementType, kwds: dict[str, Any], /\n    ) -> _ConditionClosed | _Condition:\n        condition: Any = _deepcopy(self._condition)\n        then = _parse_then(statement, kwds)\n        condition.update(then)\n        return condition\n\n\nclass When(_BaseWhen):\n    \"\"\"\n    Utility class for ``when-then-otherwise`` conditions.\n\n    Represents the state after calling :func:`.when()`.\n\n    This partial state requires calling :meth:`When.then()` to finish the condition.\n\n    References\n    ----------\n    `polars.when <https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.when.html>`__\n    \"\"\"\n\n    def __init__(self, condition: _Condition, /) -> None:\n        self._condition = condition\n\n    def __repr__(self) -> str:\n        return f\"{type(self).__name__}({self._condition!r})\"\n\n    @overload\n    def then(self, statement: str, /, **kwds: Any) -> Then[_Condition]: ...\n    @overload\n    def then(self, statement: _Value, /, **kwds: Any) -> Then[_Conditions]: ...\n    @overload\n    def then(\n        self, statement: dict[str, Any] | SchemaBase, /, **kwds: Any\n    ) -> Then[Any]: ...\n    def then(self, statement: _StatementType, /, **kwds: Any) -> Then[Any]:\n        \"\"\"\n        Attach a statement to this predicate.\n\n        Parameters\n        ----------\n        statement\n            A spec or value to use when the preceding :func:`.when()` clause is true.\n\n            .. note::\n                ``str`` will be encoded as `shorthand`_.\n        **kwds\n            Additional keyword args are added to the resulting ``dict``.\n\n        Returns\n        -------\n        :class:`Then`\n\n        .. _shorthand:\n            https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands\n\n        Examples\n        --------\n        Simple conditions may be expressed without defining a default::\n\n            import altair as alt\n            from altair.datasets import data\n\n            source = data.movies()\n            predicate = (alt.datum[\"IMDB Rating\"] == None) | (\n                alt.datum[\"Rotten Tomatoes Rating\"] == None\n            )\n\n            alt.Chart(source).mark_point(invalid=None).encode(\n                x=\"IMDB Rating:Q\",\n                y=\"Rotten Tomatoes Rating:Q\",\n                color=alt.when(predicate).then(alt.value(\"grey\")),\n            )\n        \"\"\"\n        condition = self._when_then(statement, kwds)\n        if _is_condition_extra(condition, statement, kwds=kwds):\n            return Then(_Conditional(condition=condition))\n        else:\n            return Then(_Conditional(condition=[condition]))\n\n\nclass Then(ConditionLike, t.Generic[_C]):\n    \"\"\"\n    Utility class for ``when-then-otherwise`` conditions.\n\n    Represents the state after calling :func:`.when().then()`.\n\n    This state is a valid condition on its own.\n\n    It can be further specified, via multiple chained `when-then` calls,\n    or finalized with :meth:`Then.otherwise()`.\n\n    References\n    ----------\n    `polars.when <https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.when.html>`__\n    \"\"\"\n\n    def __init__(self, conditions: _Conditional[_C], /) -> None:\n        self.condition: _C = conditions[\"condition\"]\n\n    @overload\n    def otherwise(self, statement: _TSchemaBase, /, **kwds: Any) -> _TSchemaBase: ...\n    @overload\n    def otherwise(self, statement: str, /, **kwds: Any) -> _Conditional[_Condition]: ...\n    @overload\n    def otherwise(\n        self, statement: _Value, /, **kwds: Any\n    ) -> _Conditional[_Conditions]: ...\n    @overload\n    def otherwise(\n        self, statement: dict[str, Any], /, **kwds: Any\n    ) -> _Conditional[Any]: ...\n    def otherwise(\n        self, statement: _StatementType, /, **kwds: Any\n    ) -> SchemaBase | _Conditional[Any]:\n        \"\"\"\n        Finalize the condition with a default value.\n\n        Parameters\n        ----------\n        statement\n            A spec or value to use when no predicates were met.\n\n            .. note::\n                Roughly equivalent to an ``else`` clause.\n\n            .. note::\n                ``str`` will be encoded as `shorthand`_.\n        **kwds\n            Additional keyword args are added to the resulting ``dict``.\n\n        .. _shorthand:\n            https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands\n\n        Examples\n        --------\n        Points outside of ``brush`` will not appear highlighted::\n\n            import altair as alt\n            from altair.datasets import data\n\n            source = data.cars()\n            brush = alt.selection_interval()\n            color = alt.when(brush).then(\"Origin:N\").otherwise(alt.value(\"grey\"))\n\n            alt.Chart(source).mark_point().encode(\n                x=\"Horsepower:Q\",\n                y=\"Miles_per_Gallon:Q\",\n                color=color,\n            ).add_params(brush)\n        \"\"\"\n        conditions: _Conditional[Any]\n        is_extra = functools.partial(_is_condition_extra, kwds=kwds)\n        if is_extra(self.condition, statement):\n            current = self.condition\n            if isinstance(current, list) and len(current) == 1:\n                # This case is guaranteed to have come from `When` and not `ChainedWhen`\n                # The `list` isn't needed if we complete the condition here\n                conditions = _Conditional(condition=current[0])  # pyright: ignore[reportArgumentType]\n            elif isinstance(current, dict):\n                if not is_extra(statement):\n                    conditions = self.to_dict()\n                else:\n                    cond = _reveal_parsed_shorthand(current)\n                    msg = (\n                        f\"Only one field may be used within a condition.\\n\"\n                        f\"Shorthand {statement!r} would conflict with {cond!r}\\n\\n\"\n                        f\"Use `alt.value({statement!r})` if this is not a shorthand string.\"\n                    )\n                    raise TypeError(msg)\n            else:\n                # Generic message to cover less trivial cases\n                msg = (\n                    f\"Chained conditions cannot be mixed with field conditions.\\n\"\n                    f\"{self!r}\\n\\n{statement!r}\"\n                )\n                raise TypeError(msg)\n        else:\n            conditions = self.to_dict()\n        return _parse_otherwise(statement, conditions, kwds)\n\n    def when(\n        self,\n        predicate: Optional[_PredicateType] = Undefined,\n        *more_predicates: _ComposablePredicateType,\n        empty: Optional[bool] = Undefined,\n        **constraints: _FieldEqualType,\n    ) -> ChainedWhen:\n        \"\"\"\n        Attach another predicate to the condition.\n\n        The resulting predicate is an ``&`` reduction over ``predicate`` and optional ``*``, ``**``, arguments.\n\n        Parameters\n        ----------\n        predicate\n            A selection or test predicate. ``str`` input will be treated as a test operand.\n\n            .. note::\n                Accepts the same range of inputs as in :func:`.condition()`.\n        *more_predicates\n            Additional predicates, restricted to types supporting ``&``.\n        empty\n            For selection parameters, the predicate of empty selections returns ``True`` by default.\n            Override this behavior, with ``empty=False``.\n\n            .. note::\n                When ``predicate`` is a ``Parameter`` that is used more than once,\n                ``alt.when().then().when(..., empty=...)`` provides granular control for each occurrence.\n        **constraints\n            Specify `Field Equal Predicate`_'s.\n            Shortcut for ``alt.datum.field_name == value``, see examples for usage.\n\n        Returns\n        -------\n        :class:`ChainedWhen`\n            A partial state which requires calling :meth:`ChainedWhen.then()` to finish the condition.\n\n        .. _Field Equal Predicate:\n            https://vega.github.io/vega-lite/docs/predicate.html#equal-predicate\n\n        Examples\n        --------\n        Chain calls to express precise queries::\n\n            import altair as alt\n            from altair.datasets import data\n\n            source = data.cars()\n            color = (\n                alt.when(alt.datum.Miles_per_Gallon >= 30, Origin=\"Europe\")\n                .then(alt.value(\"crimson\"))\n                .when(alt.datum.Horsepower > 150)\n                .then(alt.value(\"goldenrod\"))\n                .otherwise(alt.value(\"grey\"))\n            )\n\n            alt.Chart(source).mark_point().encode(x=\"Horsepower\", y=\"Miles_per_Gallon\", color=color)\n        \"\"\"\n        condition = _parse_when(predicate, *more_predicates, empty=empty, **constraints)\n        conditions = self.to_dict()\n        current = conditions[\"condition\"]\n        if isinstance(current, list):\n            conditions = t.cast(\"_Conditional[_Conditions]\", conditions)\n            return ChainedWhen(condition, conditions)\n        elif isinstance(current, dict):\n            cond = _reveal_parsed_shorthand(current)\n            msg = (\n                f\"Chained conditions cannot be mixed with field conditions.\\n\"\n                f\"Additional conditions would conflict with {cond!r}\\n\\n\"\n                f\"Must finalize by calling `.otherwise()`.\"\n            )\n            raise TypeError(msg)\n        else:\n            msg = (\n                f\"The internal structure has been modified.\\n\"\n                f\"{type(current).__name__!r} found, but only `dict | list` are valid.\"\n            )\n            raise NotImplementedError(msg)\n\n    def to_dict(self, *args: Any, **kwds: Any) -> _Conditional[_C]:\n        return _Conditional(condition=self.condition.copy())\n\n    def __deepcopy__(self, memo: Any) -> Self:\n        return type(self)(_Conditional(condition=_deepcopy(self.condition, memo)))\n\n    def __repr__(self) -> str:\n        name = type(self).__name__\n        COND = \"condition: \"\n        LB, RB = \"{\", \"}\"\n        if len(self.condition) == 1:\n            args = f\"{COND}{self.condition!r}\".replace(\"\\n\", \"\\n  \")\n        else:\n            conds = \"\\n    \".join(f\"{c!r}\" for c in self.condition)\n            args = f\"{COND}[\\n    {conds}\\n  ]\"\n        return f\"{name}({LB}\\n  {args}\\n{RB})\"\n\n\nclass ChainedWhen(_BaseWhen):\n    \"\"\"\n    Utility class for ``when-then-otherwise`` conditions.\n\n    Represents the state after calling :func:`.when().then().when()`.\n\n    This partial state requires calling :meth:`ChainedWhen.then()` to finish the condition.\n\n    References\n    ----------\n    `polars.when <https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.when.html>`__\n    \"\"\"\n\n    def __init__(\n        self,\n        condition: _Condition,\n        conditions: _Conditional[_Conditions],\n        /,\n    ) -> None:\n        self._condition = condition\n        self._conditions = conditions\n\n    def __repr__(self) -> str:\n        return (\n            f\"{type(self).__name__}(\\n  {self._conditions!r},\\n  {self._condition!r}\\n)\"\n        )\n\n    def then(self, statement: _StatementType, /, **kwds: Any) -> Then[_Conditions]:\n        \"\"\"\n        Attach a statement to this predicate.\n\n        Parameters\n        ----------\n        statement\n            A spec or value to use when the preceding :meth:`Then.when()` clause is true.\n\n            .. note::\n                ``str`` will be encoded as `shorthand`_.\n        **kwds\n            Additional keyword args are added to the resulting ``dict``.\n\n        Returns\n        -------\n        :class:`Then`\n\n        .. _shorthand:\n            https://altair-viz.github.io/user_guide/encodings/index.html#encoding-shorthands\n\n        Examples\n        --------\n        Multiple conditions with an implicit default::\n\n            import altair as alt\n            from altair.datasets import data\n\n            source = data.movies()\n            predicate = (alt.datum[\"IMDB Rating\"] == None) | (\n                alt.datum[\"Rotten Tomatoes Rating\"] == None\n            )\n            color = (\n                alt.when(predicate)\n                .then(alt.value(\"grey\"))\n                .when(alt.datum[\"IMDB Votes\"] < 5000)\n                .then(alt.value(\"lightblue\"))\n            )\n\n            alt.Chart(source).mark_point(invalid=None).encode(\n                x=\"IMDB Rating:Q\", y=\"Rotten Tomatoes Rating:Q\", color=color\n            )\n        \"\"\"\n        condition = self._when_then(statement, kwds)\n        if _is_condition_closed(condition):\n            conditions = self._conditions.copy()\n            conditions[\"condition\"].append(condition)\n            return Then(conditions)\n        else:\n            cond = _reveal_parsed_shorthand(condition)\n            msg = (\n                f\"Chained conditions cannot be mixed with field conditions.\\n\"\n                f\"Shorthand {statement!r} expanded to {cond!r}\\n\\n\"\n                f\"Use `alt.value({statement!r})` if this is not a shorthand string.\"\n            )\n            raise TypeError(msg)\n\n\ndef when(\n    predicate: Optional[_PredicateType] = Undefined,\n    *more_predicates: _ComposablePredicateType,\n    empty: Optional[bool] = Undefined,\n    **constraints: _FieldEqualType,\n) -> When:\n    \"\"\"\n    Start a ``when-then-otherwise`` condition.\n\n    The resulting predicate is an ``&`` reduction over ``predicate`` and optional ``*``, ``**``, arguments.\n\n    Parameters\n    ----------\n    predicate\n        A selection or test predicate. ``str`` input will be treated as a test operand.\n\n        .. note::\n            Accepts the same range of inputs as in :func:`.condition()`.\n    *more_predicates\n        Additional predicates, restricted to types supporting ``&``.\n    empty\n        For selection parameters, the predicate of empty selections returns ``True`` by default.\n        Override this behavior, with ``empty=False``.\n\n        .. note::\n            When ``predicate`` is a ``Parameter`` that is used more than once,\n            ``alt.when(..., empty=...)`` provides granular control for each occurrence.\n    **constraints\n        Specify `Field Equal Predicate`_'s.\n        Shortcut for ``alt.datum.field_name == value``, see examples for usage.\n\n    Returns\n    -------\n    :class:`When`\n        A partial state which requires calling :meth:`When.then()` to finish the condition.\n\n    Notes\n    -----\n    - Directly inspired by the ``when-then-otherwise`` syntax used in `polars.when`_.\n\n    .. _Field Equal Predicate:\n        https://vega.github.io/vega-lite/docs/predicate.html#equal-predicate\n    .. _polars.when:\n        https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.when.html\n\n    Examples\n    --------\n    Setting up a common chart::\n\n        import altair as alt\n        from altair.datasets import data\n\n        source = data.cars()\n        brush = alt.selection_interval()\n        points = (\n            alt.Chart(source)\n            .mark_point()\n            .encode(x=\"Horsepower\", y=\"Miles_per_Gallon\")\n            .add_params(brush)\n        )\n        points\n\n    Basic ``if-then-else`` conditions translate directly to ``when-then-otherwise``::\n\n        points.encode(color=alt.when(brush).then(\"Origin\").otherwise(alt.value(\"lightgray\")))\n\n    Omitting the ``.otherwise()`` clause will use the channel default instead::\n\n        points.encode(color=alt.when(brush).then(\"Origin\"))\n\n    Predicates passed as positional arguments will be reduced with ``&``::\n\n        points.encode(\n            color=alt.when(\n                brush, (alt.datum.Miles_per_Gallon >= 30) | (alt.datum.Horsepower >= 130)\n            )\n            .then(\"Origin\")\n            .otherwise(alt.value(\"lightgray\"))\n        )\n\n    Using keyword-argument ``constraints`` can simplify compositions like::\n\n        verbose_composition = (\n            (alt.datum.Name == \"Name_1\")\n            & (alt.datum.Color == \"Green\")\n            & (alt.datum.Age == 25)\n            & (alt.datum.StartDate == \"2000-10-01\")\n        )\n        when_verbose = alt.when(verbose_composition)\n        when_concise = alt.when(Name=\"Name_1\", Color=\"Green\", Age=25, StartDate=\"2000-10-01\")\n    \"\"\"\n    condition = _parse_when(predicate, *more_predicates, empty=empty, **constraints)\n    return When(condition)\n\n\n# ------------------------------------------------------------------------\n# Top-Level Functions\n\n\ndef value(value: Any, **kwargs: Any) -> _Value:\n    \"\"\"Specify a value for use in an encoding.\"\"\"\n    return _Value(value=value, **kwargs)  # type: ignore\n\n\ndef _make_param_obj(\n    temp_name: str,\n    value: Optional[Any],\n    bind: Optional[Binding],\n    expr: Optional[str | Expr | Expression],\n    kwds: dict[str, Any],\n) -> tuple[\n    VariableParameter | TopLevelSelectionParameter | SelectionParameter,\n    Literal[\"variable\", \"selection\"],\n]:\n    if \"select\" in kwds:\n        select = kwds.pop(\"select\")\n        param_obj: (\n            VariableParameter | TopLevelSelectionParameter | SelectionParameter\n        ) = core.SelectionParameter(\n            name=temp_name, select=select, value=value, bind=bind, **kwds\n        )\n        param_type: Literal[\"variable\", \"selection\"] = \"selection\"\n    elif \"views\" in kwds:\n        param_obj = core.TopLevelSelectionParameter(name=temp_name, value=value, **kwds)\n        param_type = \"selection\"\n    else:\n        param_obj = core.VariableParameter(\n            name=temp_name, value=value, bind=bind, expr=expr, **kwds\n        )\n        param_type = \"variable\"\n\n    return param_obj, param_type\n\n\ndef param(\n    name: str | None = None,\n    value: Optional[Any] = Undefined,\n    bind: Optional[Binding] = Undefined,\n    empty: Optional[bool] = Undefined,\n    expr: Optional[str | Expr | Expression] = Undefined,\n    **kwds: Any,\n) -> Parameter:\n    \"\"\"\n    Create a named parameter, see https://altair-viz.github.io/user_guide/interactions/parameters.html for examples.\n\n    Although both variable parameters and selection parameters can be created using\n    this 'param' function, to create a selection parameter, it is recommended to use\n    either 'selection_point' or 'selection_interval' instead.\n\n    Parameters\n    ----------\n    name : string (optional)\n        The name of the parameter. If not specified, a unique name will be\n        created.\n    value : any (optional)\n        The default value of the parameter. If not specified, the parameter\n        will be created without a default value.\n    bind : :class:`Binding` (optional)\n        Binds the parameter to an external input element such as a slider,\n        selection list or radio button group.\n    empty : boolean (optional)\n        For selection parameters, the predicate of empty selections returns\n        True by default. Override this behavior, by setting this property\n        'empty=False'.\n    expr : str, Expression (optional)\n        An expression for the value of the parameter. This expression may\n        include other parameters, in which case the parameter will\n        automatically update in response to upstream parameter changes.\n    **kwds :\n        additional keywords will be used to construct a parameter.  If 'select'\n        is among the keywords, then a selection parameter will be created.\n        Otherwise, a variable parameter will be created.\n\n    Returns\n    -------\n    parameter: Parameter\n        The parameter object that can be used in chart creation.\n    \"\"\"\n    temp_name = \"__TEMP__\"\n    # Always use a string for the name\n\n    if _init := kwds.pop(\"init\", None):\n        utils.deprecated_warn(\n            \"The 'init' argument is deprecated. Use 'value' instead.\",\n            version=\"5.0.0\",\n        )\n        if utils.is_undefined(value):\n            value = _init\n\n    # Create underlying parameter object with temp_name using helper\n    param_obj, param_type = _make_param_obj(temp_name, value, bind, expr, kwds)\n\n    # Construct Parameter with temp_name and param_obj\n    parameter = Parameter(\n        name=temp_name, empty=empty, param=param_obj, param_type=param_type\n    )\n\n    # Set the final name on both Parameter and underlying param object\n    if name is not None:\n        parameter.name = str(name)\n        if parameter.param is not Undefined:\n            param_obj = t.cast(\n                \"VariableParameter | TopLevelSelectionParameter | SelectionParameter\",\n                parameter.param,\n            )\n            param_obj.name = str(name)\n    else:\n        # Compute hash-based name\n        hash_name = parameter._get_param_hash_name()\n        parameter.name = hash_name\n        parameter._name_is_hashed = True\n        if parameter.param is not Undefined:\n            param_obj = t.cast(\n                \"VariableParameter | TopLevelSelectionParameter | SelectionParameter\",\n                parameter.param,\n            )\n            param_obj.name = hash_name\n\n    return parameter\n\n\ndef _selection(type: Optional[SelectionType_T] = Undefined, **kwds: Any) -> Parameter:\n    # We separate out the parameter keywords from the selection keywords\n    # param_kwds_names contains keywords that should be passed to param() function\n    # The remaining kwds are used to create the selection config (PointSelectionConfig, etc.)\n\n    param_kwds_names = {\"name\", \"bind\", \"value\", \"empty\", \"init\", \"views\"}\n    param_kwds = {key: kwds.pop(key) for key in param_kwds_names & kwds.keys()}\n\n    select: IntervalSelectionConfig | PointSelectionConfig\n    if type == \"interval\":\n        select = core.IntervalSelectionConfig(type=type, **kwds)\n    elif type == \"point\":\n        select = core.PointSelectionConfig(type=type, **kwds)\n    elif type in {\"single\", \"multi\"}:\n        select = core.PointSelectionConfig(type=\"point\", **kwds)\n        utils.deprecated_warn(\n            \"The types `single` and `multi` are now combined.\",\n            version=\"5.0.0\",\n            alternative=\"selection_point()\",\n        )\n    else:\n        msg = \"\"\"'type' must be 'point' or 'interval'\"\"\"\n        raise ValueError(msg)\n\n    # Extract all expected parameters from param_kwds and pass them as direct parameters\n    name = param_kwds.pop(\"name\", None)\n    value = param_kwds.pop(\"value\", Undefined)\n    bind = param_kwds.pop(\"bind\", Undefined)\n    empty = param_kwds.pop(\"empty\", Undefined)\n    expr = param_kwds.pop(\"expr\", Undefined)\n    return param(\n        select=select,\n        name=name,\n        value=value,\n        bind=bind,\n        empty=empty,\n        expr=expr,\n        **param_kwds,\n    )\n\n\n@utils.deprecated(\n    version=\"5.0.0\",\n    alternative=\"'selection_point()' or 'selection_interval()'\",\n    message=\"These functions also include more helpful docstrings.\",\n)\ndef selection(type: Optional[SelectionType_T] = Undefined, **kwds: Any) -> Parameter:\n    \"\"\"'selection' is deprecated use 'selection_point' or 'selection_interval' instead, depending on the type of parameter you want to create.\"\"\"\n    return _selection(type=type, **kwds)\n\n\n_SelectionPointValue: TypeAlias = \"PrimitiveValue_T | Temporal | DateTime | Sequence[Mapping[SingleDefUnitChannel_T | LiteralString, PrimitiveValue_T | Temporal | DateTime]]\"\n\"\"\"\nPoint selections can be initialized with a single primitive value:\n\n    import altair as alt\n\n    alt.selection_point(fields=[\"year\"], value=1980)\n\n\nYou can also provide a sequence of mappings between ``encodings`` or ``fields`` to **values**:\n\n    alt.selection_point(\n        fields=[\"cylinders\", \"year\"],\n        value=[{\"cylinders\": 4, \"year\": 1981}, {\"cylinders\": 8, \"year\": 1972}],\n    )\n\"\"\"\n\n_SelectionIntervalValueMap: TypeAlias = Mapping[\n    SingleDefUnitChannel_T,\n    tuple[bool, bool]\n    | tuple[float, float]\n    | tuple[str, str]\n    | tuple[\"Temporal | DateTime\", \"Temporal | DateTime\"]\n    | Sequence[bool]\n    | Sequence[float]\n    | Sequence[str]\n    | Sequence[\"Temporal | DateTime\"],\n]\n\"\"\"\nInterval selections are initialized with a mapping between ``encodings`` to **values**:\n\n    import altair as alt\n\n    alt.selection_interval(\n        encodings=[\"longitude\"],\n        empty=False,\n        value={\"longitude\": [-50, -110]},\n    )\n\nThe values specify the **start** and **end** of the interval selection.\n\nYou can use a ``tuple`` for type-checking each sequence has **two** elements:\n\n    alt.selection_interval(value={\"x\": (55, 160), \"y\": (13, 37)})\n\n\n.. note::\n\n    Unlike :func:`.selection_point()`, the use of ``None`` is not permitted.\n\"\"\"\n\n\ndef selection_interval(\n    name: str | None = None,\n    value: Optional[_SelectionIntervalValueMap] = Undefined,\n    bind: Optional[Binding | str] = Undefined,\n    empty: Optional[bool] = Undefined,\n    expr: Optional[str | Expr | Expression] = Undefined,\n    encodings: Optional[Sequence[SingleDefUnitChannel_T]] = Undefined,\n    on: Optional[str | MergedStreamKwds | DerivedStreamKwds] = Undefined,\n    clear: Optional[str | bool | MergedStreamKwds | DerivedStreamKwds] = Undefined,\n    resolve: Optional[SelectionResolution_T] = Undefined,\n    mark: Optional[BrushConfig | BrushConfigKwds] = Undefined,\n    translate: Optional[str | bool] = Undefined,\n    zoom: Optional[str | bool] = Undefined,\n    **kwds: Any,\n) -> Parameter:\n    \"\"\"\n    Create an interval selection parameter. Selection parameters define data queries that are driven by direct manipulation from user input (e.g., mouse clicks or drags). Interval selection parameters are used to select a continuous range of data values on drag, whereas point selection parameters (`selection_point`) are used to select multiple discrete data values.).\n\n    Parameters\n    ----------\n    name : str (optional)\n        The name of the parameter. If not specified, a unique name will be\n        created.\n    value : Any (optional)\n        The default value of the parameter. If not specified, the parameter\n        will be created without a default value.\n    bind : :class:`Binding`, str (optional)\n        Binds the parameter to an external input element such as a slider,\n        selection list or radio button group.\n    empty : bool (optional)\n        For selection parameters, the predicate of empty selections returns\n        True by default. Override this behavior, by setting this property\n        'empty=False'.\n    expr : :class:`Expr` (optional)\n        An expression for the value of the parameter. This expression may\n        include other parameters, in which case the parameter will\n        automatically update in response to upstream parameter changes.\n    encodings : Sequence[str] (optional)\n        A list of encoding channels. The corresponding data field values\n        must match for a data tuple to fall within the selection.\n    on : str (optional)\n        A Vega event stream (object or selector) that triggers the selection.\n        For interval selections, the event stream must specify a start and end.\n    clear : str, bool (optional)\n        Clears the selection, emptying it of all values. This property can\n        be an Event Stream or False to disable clear.  Default is 'dblclick'.\n    resolve : Literal['global', 'union', 'intersect'] (optional)\n        With layered and multi-view displays, a strategy that determines\n        how selections' data queries are resolved when applied in a filter\n        transform, conditional encoding rule, or scale domain.\n        One of:\n\n        * 'global': only one brush exists for the entire SPLOM. When the\n          user begins to drag, any previous brushes are cleared, and a\n          new one is constructed.\n        * 'union': each cell contains its own brush, and points are\n          highlighted if they lie within any of these individual brushes.\n        * 'intersect': each cell contains its own brush, and points are\n          highlighted only if they fall within all of these individual\n          brushes.\n\n        The default is 'global'.\n    mark : :class:`BrushConfig` (optional)\n        An interval selection also adds a rectangle mark to depict the\n        extents of the interval. The ``mark`` property can be used to\n        customize the appearance of the mark.\n    translate : str, bool (optional)\n        When truthy, allows a user to interactively move an interval\n        selection back-and-forth. Can be True, False (to disable panning),\n        or a Vega event stream definition which must include a start and\n        end event to trigger continuous panning. Discrete panning (e.g.,\n        pressing the left/right arrow keys) will be supported in future\n        versions.\n        The default value is True, which corresponds to\n        [pointerdown, window:pointerup] > window:pointermove!\n        This default allows users to click and drag within an interval\n        selection to reposition it.\n    zoom : str, bool (optional)\n        When truthy, allows a user to interactively resize an interval\n        selection. Can be True, False (to disable zooming), or a Vega\n        event stream definition. Currently, only wheel events are supported,\n        but custom event streams can still be used to specify filters,\n        debouncing, and throttling. Future versions will expand the set of\n        events that can trigger this transformation.\n        The default value is True, which corresponds to wheel!. This\n        default allows users to use the mouse wheel to resize an interval\n        selection.\n    **kwds : Any\n        Additional keywords to control the selection.\n\n    Returns\n    -------\n    parameter: Parameter\n        The parameter object that can be used in chart creation.\n    \"\"\"\n    return _selection(\n        type=\"interval\",\n        name=name,\n        value=value,\n        bind=bind,\n        empty=empty,\n        expr=expr,\n        encodings=encodings,\n        on=on,\n        clear=clear,\n        resolve=resolve,\n        mark=mark,\n        translate=translate,\n        zoom=zoom,\n        **kwds,\n    )\n\n\ndef selection_point(\n    name: str | None = None,\n    value: Optional[_SelectionPointValue] = Undefined,\n    bind: Optional[Binding | str] = Undefined,\n    empty: Optional[bool] = Undefined,\n    expr: Optional[str | Expr | Expression] = Undefined,\n    encodings: Optional[Sequence[SingleDefUnitChannel_T]] = Undefined,\n    fields: Optional[Sequence[str]] = Undefined,\n    on: Optional[str | MergedStreamKwds | DerivedStreamKwds] = Undefined,\n    clear: Optional[str | bool | MergedStreamKwds | DerivedStreamKwds] = Undefined,\n    resolve: Optional[SelectionResolution_T] = Undefined,\n    toggle: Optional[str | bool] = Undefined,\n    nearest: Optional[bool] = Undefined,\n    **kwds: Any,\n) -> Parameter:\n    \"\"\"\n    Create a point selection parameter. Selection parameters define data queries that are driven by direct manipulation from user input (e.g., mouse clicks or drags). Point selection parameters are used to select multiple discrete data values; the first value is selected on click and additional values toggled on shift-click. To select a continuous range of data values on drag interval selection parameters (`selection_interval`) can be used instead.\n\n    Parameters\n    ----------\n    name : str (optional)\n        The name of the parameter. If not specified, a unique name will be\n        created.\n    value : Any (optional)\n        The default value of the parameter. If not specified, the parameter\n        will be created without a default value.\n    bind : :class:`Binding`, str (optional)\n        Binds the parameter to an external input element such as a slider,\n        selection list or radio button group.\n    empty : bool (optional)\n        For selection parameters, the predicate of empty selections returns\n        True by default. Override this behavior, by setting this property\n        'empty=False'.\n    expr : :class:`Expr` (optional)\n        An expression for the value of the parameter. This expression may\n        include other parameters, in which case the parameter will\n        automatically update in response to upstream parameter changes.\n    encodings : Sequence[str] (optional)\n        A list of encoding channels. The corresponding data field values\n        must match for a data tuple to fall within the selection.\n    fields : Sequence[str] (optional)\n        A list of field names whose values must match for a data tuple to\n        fall within the selection.\n    on : str (optional)\n        A Vega event stream (object or selector) that triggers the selection.\n        For interval selections, the event stream must specify a start and end.\n    clear : str, bool (optional)\n        Clears the selection, emptying it of all values. This property can\n        be an Event Stream or False to disable clear.  Default is 'dblclick'.\n    resolve : Literal['global', 'union', 'intersect'] (optional)\n        With layered and multi-view displays, a strategy that determines\n        how selections' data queries are resolved when applied in a filter\n        transform, conditional encoding rule, or scale domain.\n        One of:\n\n        * 'global': only one brush exists for the entire SPLOM. When the\n          user begins to drag, any previous brushes are cleared, and a\n          new one is constructed.\n        * 'union': each cell contains its own brush, and points are\n          highlighted if they lie within any of these individual brushes.\n        * 'intersect': each cell contains its own brush, and points are\n          highlighted only if they fall within all of these individual\n          brushes.\n\n        The default is 'global'.\n    toggle : str, bool (optional)\n        Controls whether data values should be toggled (inserted or\n        removed from a point selection) or only ever inserted into\n        point selections.\n        One of:\n\n        * True (default): the toggle behavior, which corresponds to\n          \"event.shiftKey\". As a result, data values are toggled\n          when the user interacts with the shift-key pressed.\n        * False: disables toggling behaviour; the selection will\n          only ever contain a single data value corresponding\n          to the most recent interaction.\n        * A Vega expression which is re-evaluated as the user interacts.\n          If the expression evaluates to True, the data value is\n          toggled into or out of the point selection. If the expression\n          evaluates to False, the point selection is first cleared, and\n          the data value is then inserted. For example, setting the\n          value to the Vega expression True will toggle data values\n          without the user pressing the shift-key.\n\n    nearest : bool (optional)\n        When true, an invisible voronoi diagram is computed to accelerate\n        discrete selection. The data value nearest the mouse cursor is\n        added to the selection.  The default is False, which means that\n        data values must be interacted with directly (e.g., clicked on)\n        to be added to the selection.\n    **kwds : Any\n        Additional keywords to control the selection.\n\n    Returns\n    -------\n    parameter: Parameter\n        The parameter object that can be used in chart creation.\n    \"\"\"\n    return _selection(\n        type=\"point\",\n        name=name,\n        value=value,\n        bind=bind,\n        empty=empty,\n        expr=expr,\n        encodings=encodings,\n        fields=fields,\n        on=on,\n        clear=clear,\n        resolve=resolve,\n        toggle=toggle,\n        nearest=nearest,\n        **kwds,\n    )\n\n\n@utils.deprecated(version=\"5.0.0\", alternative=\"selection_point\")\ndef selection_multi(**kwargs: Any) -> Parameter:\n    \"\"\"'selection_multi' is deprecated.  Use 'selection_point'.\"\"\"\n    return _selection(type=\"point\", **kwargs)\n\n\n@utils.deprecated(version=\"5.0.0\", alternative=\"selection_point\")\ndef selection_single(**kwargs: Any) -> Parameter:\n    \"\"\"'selection_single' is deprecated.  Use 'selection_point'.\"\"\"\n    return _selection(type=\"point\", **kwargs)\n\n\ndef binding(\n    input: str,\n    *,\n    autocomplete: Optional[str] = Undefined,\n    debounce: Optional[float] = Undefined,\n    element: Optional[str] = Undefined,\n    name: Optional[str] = Undefined,\n    placeholder: Optional[str] = Undefined,\n) -> BindInput:\n    \"\"\"\n    A generic binding.\n\n    Parameters\n    ----------\n    input : str\n        The type of input element to use. The valid values are ``\"checkbox\"``, ``\"radio\"``,\n        ``\"range\"``, ``\"select\"``, and any other legal `HTML form input type\n        <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input>`__.\n    autocomplete : str\n        A hint for form autofill. See the `HTML autocomplete attribute\n        <https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete>`__ for\n        additional information.\n    debounce : float\n        If defined, delays event handling until the specified milliseconds have elapsed\n        since the last event was fired.\n    element : str\n        An optional CSS selector string indicating the parent element to which the input\n        element should be added. By default, all input elements are added within the parent\n        container of the Vega view.\n    name : str\n        By default, the signal name is used to label input elements. This ``name`` property\n        can be used instead to specify a custom label for the bound signal.\n    placeholder : str\n        Text that appears in the form control when it has no value set.\n    \"\"\"\n    return core.BindInput(\n        autocomplete=autocomplete,\n        debounce=debounce,\n        element=element,\n        input=input,\n        name=name,\n        placeholder=placeholder,\n    )\n\n\n@utils.use_signature_func(core.BindCheckbox)\ndef binding_checkbox(**kwargs: Any) -> BindCheckbox:\n    \"\"\"A checkbox binding.\"\"\"\n    return core.BindCheckbox(input=\"checkbox\", **kwargs)\n\n\n@utils.use_signature_func(core.BindRadioSelect)\ndef binding_radio(**kwargs: Any) -> BindRadioSelect:\n    \"\"\"A radio button binding.\"\"\"\n    return core.BindRadioSelect(input=\"radio\", **kwargs)\n\n\n@utils.use_signature_func(core.BindRadioSelect)\ndef binding_select(**kwargs: Any) -> BindRadioSelect:\n    \"\"\"A select binding.\"\"\"\n    return core.BindRadioSelect(input=\"select\", **kwargs)\n\n\n@utils.use_signature_func(core.BindRange)\ndef binding_range(**kwargs: Any) -> BindRange:\n    \"\"\"A range binding.\"\"\"\n    return core.BindRange(input=\"range\", **kwargs)\n\n\n@overload\ndef condition(\n    predicate: _PredicateType,\n    if_true: _StatementType,\n    if_false: _TSchemaBase,\n    *,\n    empty: Optional[bool] = ...,\n    **kwargs: Any,\n) -> _TSchemaBase: ...\n@overload\ndef condition(\n    predicate: _PredicateType,\n    if_true: Map | SchemaBase,\n    if_false: Map | str,\n    *,\n    empty: Optional[bool] = ...,\n    **kwargs: Any,\n) -> _Conditional[_Condition]: ...\n@overload\ndef condition(\n    predicate: _PredicateType,\n    if_true: Map | str,\n    if_false: Map,\n    *,\n    empty: Optional[bool] = ...,\n    **kwargs: Any,\n) -> _Conditional[_Condition]: ...\n@overload\ndef condition(\n    predicate: _PredicateType, if_true: str, if_false: str, **kwargs: Any\n) -> Never: ...\n# TODO: update the docstring\ndef condition(\n    predicate: _PredicateType,\n    if_true: _StatementType,\n    if_false: _StatementType,\n    *,\n    empty: Optional[bool] = Undefined,\n    **kwargs: Any,\n) -> SchemaBase | _Conditional[_Condition]:\n    \"\"\"\n    A conditional attribute or encoding.\n\n    Parameters\n    ----------\n    predicate: Parameter, PredicateComposition, expr.Expression, dict, or string\n        the selection predicate or test predicate for the condition.\n        if a string is passed, it will be treated as a test operand.\n    if_true:\n        the spec or object to use if the selection predicate is true\n    if_false:\n        the spec or object to use if the selection predicate is false\n    empty\n        For selection parameters, the predicate of empty selections returns ``True`` by default.\n        Override this behavior, with ``empty=False``.\n\n        .. note::\n            When ``predicate`` is a ``Parameter`` that is used more than once,\n            ``alt.condition(..., empty=...)`` provides granular control for each :func:`.condition()`.\n    **kwargs:\n        additional keyword args are added to the resulting dict\n\n    Returns\n    -------\n    spec: dict or VegaLiteSchema\n        the spec that describes the condition\n    \"\"\"\n    condition = _predicate_to_condition(predicate, empty=empty)\n    return _condition_to_selection(condition, if_true, if_false, **kwargs)\n\n\n# --------------------------------------------------------------------\n# Top-level objects\n\n\ndef _top_schema_base(  # noqa: ANN202\n    obj: Any, /\n):  # -> <subclass of SchemaBase and TopLevelMixin>\n    \"\"\"\n    Enforces an intersection type w/ `SchemaBase` & `TopLevelMixin` objects.\n\n    Use for methods, called from `TopLevelMixin` that are defined in `SchemaBase`.\n\n    Notes\n    -----\n    - The `super` sub-branch is not statically checked *here*.\n        - It would widen the inferred intersection to:\n            - `(<subclass of SchemaBase and TopLevelMixin> | super)`\n        - Both dunder attributes are not in the `super` type stubs\n            - Requiring 2x *# type: ignore[attr-defined]*\n    - However it is required at runtime for any cases that use `super(..., copy)`.\n    - The inferred type **is** used statically **outside** of this function.\n    \"\"\"\n    if (isinstance(obj, SchemaBase) and isinstance(obj, TopLevelMixin)) or (\n        not TYPE_CHECKING\n        and (\n            isinstance(obj, super)\n            and issubclass(obj.__self_class__, SchemaBase)\n            and obj.__thisclass__ is TopLevelMixin\n        )\n    ):\n        return obj\n    else:\n        msg = f\"{type(obj).__name__!r} does not derive from {SchemaBase.__name__!r}\"\n        raise TypeError(msg)\n\n\nclass TopLevelMixin(mixins.ConfigMethodMixin):\n    \"\"\"Mixin for top-level chart objects such as Chart, LayeredChart, etc.\"\"\"\n\n    _class_is_valid_at_instantiation: bool = False\n    data: Any\n\n    def to_dict(  # noqa: C901\n        self,\n        validate: bool = True,\n        *,\n        format: Literal[\"vega-lite\", \"vega\"] = \"vega-lite\",\n        ignore: list[str] | None = None,\n        context: dict[str, Any] | None = None,\n    ) -> dict[str, Any]:\n        \"\"\"\n        Convert the chart to a dictionary suitable for JSON export.\n\n        Parameters\n        ----------\n        validate : bool, optional\n            If True (default), then validate the result against the schema.\n        format : {\"vega-lite\", \"vega\"}, optional\n            The chart specification format.\n            The `\"vega\"` format relies on the active Vega-Lite compiler plugin, which\n            by default requires the vl-convert-python package.\n        ignore : list[str], optional\n            A list of keys to ignore.\n        context : dict[str, Any], optional\n            A context dictionary.\n\n        Raises\n        ------\n        SchemaValidationError :\n            If ``validate`` and the result does not conform to the schema.\n\n        Notes\n        -----\n        - ``ignore``, ``context`` are usually not needed to be specified as a user.\n        - *Technical*: ``ignore`` will **not** be passed to child :meth:`.to_dict()`.\n        \"\"\"\n        # Validate format\n        if format not in {\"vega-lite\", \"vega\"}:\n            msg = f'The format argument must be either \"vega-lite\" or \"vega\". Received {format!r}'\n            raise ValueError(msg)\n\n        # We make use of three context markers:\n        # - 'data' points to the data that should be referenced for column type\n        #   inference.\n        # - 'top_level' is a boolean flag that is assumed to be true; if it's\n        #   true then a \"$schema\" arg is added to the dict.\n        # - 'datasets' is a dict of named datasets that should be inserted\n        #   in the top-level object\n        # - 'pre_transform' whether data transformations should be pre-evaluated\n        #   if the current data transformer supports it (currently only used when\n        #   the \"vegafusion\" transformer is enabled)\n\n        # note: not a deep copy because we want datasets and data arguments to\n        # be passed by reference\n        context = context.copy() if context else {}\n        context.setdefault(\"datasets\", {})\n        is_top_level = context.get(\"top_level\", True)\n\n        copy = _top_schema_base(self).copy(deep=False)\n        original_data = getattr(copy, \"data\", Undefined)\n        if not utils.is_undefined(original_data):\n            try:\n                data = nw.from_native(original_data, eager_or_interchange_only=True)\n            except TypeError:\n                # Non-narwhalifiable type supported by Altair, such as dict\n                data = original_data\n            copy.data = _prepare_data(data, context)\n            context[\"data\"] = data\n\n        # remaining to_dict calls are not at top level\n        context[\"top_level\"] = False\n\n        vegalite_spec: Any = _top_schema_base(super(TopLevelMixin, copy)).to_dict(\n            validate=validate, ignore=ignore, context=dict(context, pre_transform=False)\n        )\n\n        # TODO: following entries are added after validation. Should they be validated?\n        if is_top_level:\n            # since this is top-level we add $schema if it's missing\n            if \"$schema\" not in vegalite_spec:\n                vegalite_spec[\"$schema\"] = SCHEMA_URL\n\n            if func := theme.get():\n                vegalite_spec = utils.update_nested(func(), vegalite_spec, copy=True)\n            else:\n                msg = (\n                    f\"Expected a theme to be set but got {None!r}.\\n\"\n                    f\"Call `themes.enable('default')` to reset the `ThemeRegistry`.\"\n                )\n                raise TypeError(msg)\n\n            # update datasets\n            if context[\"datasets\"]:\n                vegalite_spec.setdefault(\"datasets\", {}).update(context[\"datasets\"])\n\n        if context.get(\"pre_transform\", True) and _using_vegafusion():\n            if format == \"vega-lite\":\n                msg = (\n                    'When the \"vegafusion\" data transformer is enabled, the \\n'\n                    \"to_dict() and to_json() chart methods must be called with \"\n                    'format=\"vega\". \\n'\n                    \"For example: \\n\"\n                    '    >>> chart.to_dict(format=\"vega\")\\n'\n                    '    >>> chart.to_json(format=\"vega\")'\n                )\n                raise ValueError(msg)\n            else:\n                return _compile_with_vegafusion(vegalite_spec)\n        elif format == \"vega\":\n            plugin = vegalite_compilers.get()\n            if plugin is None:\n                msg = \"No active vega-lite compiler plugin found\"\n                raise ValueError(msg)\n            return plugin(vegalite_spec)\n        else:\n            return vegalite_spec\n\n    def to_json(\n        self,\n        validate: bool = True,\n        indent: int | str | None = 2,\n        sort_keys: bool = True,\n        *,\n        format: Literal[\"vega-lite\", \"vega\"] = \"vega-lite\",\n        ignore: list[str] | None = None,\n        context: dict[str, Any] | None = None,\n        ensure_ascii: bool = False,\n        **kwargs: Any,\n    ) -> str:\n        \"\"\"\n        Convert a chart to a JSON string.\n\n        Parameters\n        ----------\n        validate : bool, optional\n            If True (default), then validate the result against the schema.\n        indent : int, optional\n            The number of spaces of indentation to use. The default is 2.\n        sort_keys : bool, optional\n            If True (default), sort keys in the output.\n        format : {\"vega-lite\", \"vega\"}, optional\n            The chart specification format.\n            The `\"vega\"` format relies on the active Vega-Lite compiler plugin, which\n            by default requires the vl-convert-python package.\n        ignore : list[str], optional\n            A list of keys to ignore.\n        context : dict[str, Any], optional\n            A context dictionary.\n        ensure_ascii : bool, optional\n            If False (default), allow UTF-8 characters in the output.\n            If True, escape non-ASCII characters.\n        **kwargs\n            Additional keyword arguments are passed to ``json.dumps()``\n\n        Raises\n        ------\n        SchemaValidationError :\n            If ``validate`` and the result does not conform to the schema.\n\n        Notes\n        -----\n        - ``ignore``, ``context`` are usually not needed to be specified as a user.\n        - *Technical*: ``ignore`` will **not** be passed to child :meth:`.to_dict()`.\n        \"\"\"\n        if ignore is None:\n            ignore = []\n        if context is None:\n            context = {}\n        spec = self.to_dict(\n            validate=validate, format=format, ignore=ignore, context=context\n        )\n        return json.dumps(\n            spec,\n            indent=indent,\n            sort_keys=sort_keys,\n            ensure_ascii=ensure_ascii,\n            **kwargs,\n        )\n\n    def to_html(\n        self,\n        base_url: str = \"https://cdn.jsdelivr.net/npm\",\n        output_div: str = \"vis\",\n        embed_options: dict[str, Any] | None = None,\n        json_kwds: dict[str, Any] | None = None,\n        fullhtml: bool = True,\n        requirejs: bool = False,\n        inline: bool = False,\n        **kwargs: Any,\n    ) -> str:\n        \"\"\"\n        Embed a Vega/Vega-Lite spec into an HTML page.\n\n        Parameters\n        ----------\n        base_url : string (optional)\n            The base url from which to load the javascript libraries.\n        output_div : string (optional)\n            The id of the div element where the plot will be shown.\n        embed_options : dict (optional)\n            Dictionary of options to pass to the vega-embed script. Default\n            entry is {'mode': mode}.\n        json_kwds : dict (optional)\n            Dictionary of keywords to pass to json.dumps().\n        fullhtml : boolean (optional)\n            If True (default) then return a full html page. If False, then return\n            an HTML snippet that can be embedded into an HTML page.\n        requirejs : boolean (optional)\n            If False (default) then load libraries from base_url using <script>\n            tags. If True, then load libraries using requirejs\n        inline: bool (optional)\n            If False (default), the required JavaScript libraries are loaded\n            from a CDN location in the resulting html file.\n            If True, the required JavaScript libraries are inlined into the resulting\n            html file so that it will work without an internet connection.\n            The vl-convert-python package is required if True.\n        **kwargs :\n            additional kwargs passed to spec_to_html.\n\n        Returns\n        -------\n        output : string\n            an HTML string for rendering the chart.\n        \"\"\"\n        if inline:\n            kwargs[\"template\"] = \"inline\"\n        return utils.spec_to_html(\n            self.to_dict(),\n            mode=\"vega-lite\",\n            vegalite_version=VEGALITE_VERSION,\n            vegaembed_version=VEGAEMBED_VERSION,\n            vega_version=VEGA_VERSION,\n            base_url=base_url,\n            output_div=output_div,\n            embed_options=embed_options,\n            json_kwds=json_kwds,\n            fullhtml=fullhtml,\n            requirejs=requirejs,\n            **kwargs,\n        )\n\n    def to_url(self, *, fullscreen: bool = False, validate: bool = True) -> str:\n        \"\"\"\n        Convert a chart to a URL that opens the chart specification in the Vega chart editor.\n\n        The chart specification (including any inline data) is encoded in the URL.\n\n        This method requires that the vl-convert-python package is installed.\n\n        Parameters\n        ----------\n        fullscreen : bool\n            If True, editor will open chart in fullscreen mode. Default False\n        validate : boolean\n            If True, then validate the input against the schema.\n        \"\"\"\n        from altair.utils._importers import import_vl_convert\n\n        vlc = import_vl_convert()\n        if _using_vegafusion():\n            return vlc.vega_to_url(\n                self.to_dict(format=\"vega\", validate=validate), fullscreen=fullscreen\n            )\n        else:\n            return vlc.vegalite_to_url(\n                self.to_dict(validate=validate), fullscreen=fullscreen\n            )\n\n    def open_editor(self, *, fullscreen: bool = False, validate: bool = True) -> None:\n        \"\"\"\n        Opens the chart specification in the Vega chart editor using the default browser.\n\n        Parameters\n        ----------\n        fullscreen : bool\n            If True, editor will open chart in fullscreen mode. Default False\n        validate : boolean\n            If True, then validate the input against the schema.\n        \"\"\"\n        import webbrowser\n\n        webbrowser.open(self.to_url(fullscreen=fullscreen, validate=validate))\n\n    def save(\n        self,\n        fp: str | Path | IO[Any],\n        format: Literal[\"json\", \"html\", \"png\", \"svg\", \"pdf\"] | None = None,\n        override_data_transformer: bool = True,\n        scale_factor: float = 1.0,\n        mode: str | None = None,\n        vegalite_version: str = VEGALITE_VERSION,\n        vega_version: str = VEGA_VERSION,\n        vegaembed_version: str = VEGAEMBED_VERSION,\n        embed_options: dict[str, Any] | None = None,\n        json_kwds: dict[str, Any] | None = None,\n        engine: str | None = None,\n        inline: bool = False,\n        **kwargs: Any,\n    ) -> None:\n        \"\"\"\n        Save a chart to file in a variety of formats.\n\n        Supported formats are json, html, png, svg, pdf; the last three require\n        the vl-convert-python package to be installed.\n\n        Parameters\n        ----------\n        fp : string filename or file-like object\n            file in which to write the chart.\n        format : string (optional)\n            the format to write: one of ['json', 'html', 'png', 'svg', 'pdf'].\n            If not specified, the format will be determined from the filename.\n        override_data_transformer : `boolean` (optional)\n            If True (default), then the save action will be done with\n            the MaxRowsError disabled. If False, then do not change the data\n            transformer.\n        scale_factor : float (optional)\n            scale_factor to use to change size/resolution of png or svg output\n        mode : string (optional)\n            Must be 'vega-lite'. If not specified, then infer the mode from\n            the '$schema' property of the spec, or the ``opt`` dictionary.\n            If it's not specified in either of those places, then use 'vega-lite'.\n        vegalite_version : string (optional)\n            For html output, the version of vegalite.js to use\n        vega_version : string (optional)\n            For html output, the version of vega.js to use\n        vegaembed_version : string (optional)\n            For html output, the version of vegaembed.js to use\n        embed_options : dict (optional)\n            The vegaEmbed options dictionary. Default is {}\n            (See https://github.com/vega/vega-embed for details)\n        json_kwds : dict (optional)\n            Additional keyword arguments are passed to the output method\n            associated with the specified format.\n        engine: string {'vl-convert'}\n            the conversion engine to use for 'png', 'svg', and 'pdf' formats\n        inline: bool (optional)\n            If False (default), the required JavaScript libraries are loaded\n            from a CDN location in the resulting html file.\n            If True, the required JavaScript libraries are inlined into the resulting\n            html file so that it will work without an internet connection.\n            The vl-convert-python package is required if True.\n        **kwargs :\n            additional kwargs passed to spec_to_mimebundle.\n        \"\"\"\n        if _ := kwargs.pop(\"webdriver\", None):\n            utils.deprecated_warn(\n                \"The webdriver argument is not relevant for the new vl-convert engine which replaced altair_saver. \"\n                \"The argument will be removed in a future release.\",\n                version=\"5.0.0\",\n            )\n\n        from altair.utils.save import save\n\n        kwds: dict[str, Any] = dict(\n            chart=self,\n            fp=fp,\n            format=format,\n            scale_factor=scale_factor,\n            mode=mode,\n            vegalite_version=vegalite_version,\n            vega_version=vega_version,\n            vegaembed_version=vegaembed_version,\n            embed_options=embed_options,\n            json_kwds=json_kwds,\n            engine=engine,\n            inline=inline,\n            **kwargs,\n        )\n\n        # By default we override the data transformer. This makes it so\n        # that save() will succeed even for large datasets that would\n        # normally trigger a MaxRowsError\n        if override_data_transformer:\n            with data_transformers.disable_max_rows():\n                save(**kwds)\n        else:\n            save(**kwds)\n\n    # Fallback for when rendering fails; the full repr is too long to be\n    # useful in nearly all cases.\n    def __repr__(self) -> str:\n        return f\"alt.{self.__class__.__name__}(...)\"\n\n    # Layering and stacking\n    def __add__(self, other: ChartType) -> LayerChart | FacetChart:\n        if not is_chart_type(other):\n            msg = \"Only Chart objects can be layered.\"\n            raise ValueError(msg)\n        return layer(t.cast(\"ChartType\", self), other)\n\n    def __and__(self, other: ChartType) -> VConcatChart:\n        if not is_chart_type(other):\n            msg = \"Only Chart objects can be concatenated.\"\n            raise ValueError(msg)\n        # Too difficult to type check this\n        return vconcat(t.cast(\"ChartType\", self), other)\n\n    def __or__(self, other: ChartType) -> HConcatChart | ConcatChart:\n        if not is_chart_type(other):\n            msg = \"Only Chart objects can be concatenated.\"\n            raise ValueError(msg)\n        elif isinstance(self, ConcatChart):\n            return concat(self, other)\n        else:\n            return hconcat(t.cast(\"ChartType\", self), other)\n\n    def repeat(\n        self,\n        repeat: Optional[list[str]] = Undefined,\n        row: Optional[list[str]] = Undefined,\n        column: Optional[list[str]] = Undefined,\n        layer: Optional[list[str]] = Undefined,\n        columns: Optional[int] = Undefined,\n        **kwargs: Any,\n    ) -> RepeatChart:\n        \"\"\"\n        Return a RepeatChart built from the chart.\n\n        Fields within the chart can be set to correspond to the row or\n        column using `alt.repeat('row')` and `alt.repeat('column')`.\n\n        Parameters\n        ----------\n        repeat : list\n            a list of data column names to be repeated. This cannot be\n            used along with the ``row``, ``column`` or ``layer`` argument.\n        row : list\n            a list of data column names to be mapped to the row facet\n        column : list\n            a list of data column names to be mapped to the column facet\n        layer : list\n            a list of data column names to be layered. This cannot be\n            used along with the ``row``, ``column`` or ``repeat`` argument.\n        columns : int\n            the maximum number of columns before wrapping. Only referenced\n            if ``repeat`` is specified.\n        **kwargs :\n            additional keywords passed to RepeatChart.\n\n        Returns\n        -------\n        chart : RepeatChart\n            a repeated chart.\n        \"\"\"\n        repeat_specified = repeat is not Undefined\n        rowcol_specified = row is not Undefined or column is not Undefined\n        layer_specified = layer is not Undefined\n\n        if repeat_specified and rowcol_specified:\n            msg = \"repeat argument cannot be combined with row/column argument.\"\n            raise ValueError(msg)\n        elif repeat_specified and layer_specified:\n            msg = \"repeat argument cannot be combined with layer argument.\"\n            raise ValueError(msg)\n\n        repeat_arg: list[str] | LayerRepeatMapping | RepeatMapping\n        if repeat_specified:\n            assert isinstance(repeat, list)\n            repeat_arg = repeat\n        elif layer_specified:\n            repeat_arg = core.LayerRepeatMapping(layer=layer, row=row, column=column)\n        else:\n            repeat_arg = core.RepeatMapping(row=row, column=column)\n\n        return RepeatChart(\n            spec=t.cast(\"ChartType\", self), repeat=repeat_arg, columns=columns, **kwargs\n        )\n\n    def properties(self, **kwargs: Any) -> Self:\n        \"\"\"\n        Set top-level properties of the Chart.\n\n        Argument names and types are the same as class initialization.\n        \"\"\"\n        copy = _top_schema_base(self).copy(deep=False)\n        for key, val in kwargs.items():\n            if key == \"selection\" and isinstance(val, Parameter):\n                # TODO: Can this be removed\n                # For backward compatibility with old selection interface.\n                setattr(copy, key, {val.name: val.selection})\n            else:\n                # Don't validate data, because it hasn't been processed.\n                if key != \"data\":\n                    _top_schema_base(self).validate_property(key, val)\n                setattr(copy, key, val)\n        return t.cast(\"Self\", copy)\n\n    def project(\n        self,\n        type: Optional[\n            ProjectionType_T | ProjectionType | ExprRef | Parameter\n        ] = Undefined,\n        center: Optional[list[float] | Vector2number | ExprRef | Parameter] = Undefined,\n        clipAngle: Optional[float | ExprRef | Parameter] = Undefined,\n        clipExtent: Optional[\n            list[list[float]] | Vector2Vector2number | ExprRef | Parameter\n        ] = Undefined,\n        coefficient: Optional[float | ExprRef | Parameter] = Undefined,\n        distance: Optional[float | ExprRef | Parameter] = Undefined,\n        fraction: Optional[float | ExprRef | Parameter] = Undefined,\n        lobes: Optional[float | ExprRef | Parameter] = Undefined,\n        parallel: Optional[float | ExprRef | Parameter] = Undefined,\n        precision: Optional[float | ExprRef | Parameter] = Undefined,\n        radius: Optional[float | ExprRef | Parameter] = Undefined,\n        ratio: Optional[float | ExprRef | Parameter] = Undefined,\n        reflectX: Optional[bool | ExprRef | Parameter] = Undefined,\n        reflectY: Optional[bool | ExprRef | Parameter] = Undefined,\n        rotate: Optional[\n            list[float] | Vector2number | Vector3number | ExprRef | Parameter\n        ] = Undefined,\n        scale: Optional[float | ExprRef | Parameter] = Undefined,\n        spacing: Optional[float | Vector2number | ExprRef | Parameter] = Undefined,\n        tilt: Optional[float | ExprRef | Parameter] = Undefined,\n        translate: Optional[\n            list[float] | Vector2number | ExprRef | Parameter\n        ] = Undefined,\n        **kwds: Any,\n    ) -> Self:\n        \"\"\"\n        Add a geographic projection to the chart.\n\n        This is generally used either with ``mark_geoshape`` or with the\n        ``latitude``/``longitude`` encodings.\n\n        Available projection types are\n        ['albers', 'albersUsa', 'azimuthalEqualArea', 'azimuthalEquidistant',\n        'conicConformal', 'conicEqualArea', 'conicEquidistant', 'equalEarth', 'equirectangular',\n        'gnomonic', 'identity', 'mercator', 'orthographic', 'stereographic', 'transverseMercator']\n\n        Parameters\n        ----------\n        type : str\n            The cartographic projection to use. This value is case-insensitive, for example\n            `\"albers\"` and `\"Albers\"` indicate the same projection type. You can find all valid\n            projection types [in the\n            documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types).\n\n            **Default value:** `equalEarth`\n        center : List(float)\n            Sets the projection's center to the specified center, a two-element array of\n            longitude and latitude in degrees.\n\n            **Default value:** `[0, 0]`\n        clipAngle : float\n            Sets the projection's clipping circle radius to the specified angle in degrees. If\n            `null`, switches to [antimeridian](http://bl.ocks.org/mbostock/3788999) cutting\n            rather than small-circle clipping.\n        clipExtent : List(List(float))\n            Sets the projection's viewport clip extent to the specified bounds in pixels. The\n            extent bounds are specified as an array `[[x0, y0], [x1, y1]]`, where `x0` is the\n            left-side of the viewport, `y0` is the top, `x1` is the right and `y1` is the\n            bottom. If `null`, no viewport clipping is performed.\n        coefficient : float\n            The coefficient parameter for the ``hammer`` projection.\n\n            **Default value:** ``2``\n        distance : float\n            For the ``satellite`` projection, the distance from the center of the sphere to the\n            point of view, as a proportion of the sphere's radius. The recommended maximum clip\n            angle for a given ``distance`` is acos(1 / distance) converted to degrees. If tilt\n            is also applied, then more conservative clipping may be necessary.\n\n            **Default value:** ``2.0``\n        fraction : float\n            The fraction parameter for the ``bottomley`` projection.\n\n            **Default value:** ``0.5``, corresponding to a sin(ψ) where ψ = π/6.\n        lobes : float\n            The number of lobes in projections that support multi-lobe views: ``berghaus``,\n            ``gingery``, or ``healpix``. The default value varies based on the projection type.\n        parallel : float\n            For conic projections, the `two standard parallels\n            <https://en.wikipedia.org/wiki/Map_projection#Conic>`__ that define the map layout.\n            The default depends on the specific conic projection used.\n        precision : float\n            Sets the threshold for the projection's [adaptive\n            resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels.\n            This value corresponds to the [Douglas-Peucker\n            distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm).\n             If precision is not specified, returns the projection's current resampling\n            precision which defaults to `√0.5 ≅ 0.70710…`.\n        radius : float\n            The radius parameter for the ``airy`` or ``gingery`` projection. The default value\n            varies based on the projection type.\n        ratio : float\n            The ratio parameter for the ``hill``, ``hufnagel``, or ``wagner`` projections. The\n            default value varies based on the projection type.\n        reflectX : boolean\n            Sets whether or not the x-dimension is reflected (negated) in the output.\n        reflectY : boolean\n            Sets whether or not the y-dimension is reflected (negated) in the output.\n        rotate : List(float)\n            Sets the projection's three-axis rotation to the specified angles, which must be a\n            two- or three-element array of numbers [`lambda`, `phi`, `gamma`] specifying the\n            rotation angles in degrees about each spherical axis. (These correspond to yaw,\n            pitch and roll.)\n\n            **Default value:** `[0, 0, 0]`\n        scale : float\n            The projection's scale (zoom) factor, overriding automatic fitting. The default\n            scale is projection-specific. The scale factor corresponds linearly to the distance\n            between projected points; however, scale factor values are not equivalent across\n            projections.\n        spacing : float\n            The spacing parameter for the ``lagrange`` projection.\n\n            **Default value:** ``0.5``\n        tilt : float\n            The tilt angle (in degrees) for the ``satellite`` projection.\n\n            **Default value:** ``0``.\n        translate : List(float)\n            The projection's translation offset as a two-element array ``[tx, ty]``,\n            overriding automatic fitting.\n\n        \"\"\"\n        projection = core.Projection(\n            center=center,\n            clipAngle=clipAngle,\n            clipExtent=clipExtent,\n            coefficient=coefficient,\n            distance=distance,\n            fraction=fraction,\n            lobes=lobes,\n            parallel=parallel,\n            precision=precision,\n            radius=radius,\n            ratio=ratio,\n            reflectX=reflectX,\n            reflectY=reflectY,\n            rotate=rotate,\n            scale=scale,\n            spacing=spacing,\n            tilt=tilt,\n            translate=translate,\n            type=type,\n            **kwds,\n        )\n        return self.properties(projection=projection)\n\n    def _add_transform(self, *transforms: Transform) -> Self:\n        \"\"\"Copy the chart and add specified transforms to chart.transform.\"\"\"\n        copy = _top_schema_base(self).copy(deep=[\"transform\"])\n        if copy.transform is Undefined:\n            copy.transform = []\n        copy.transform.extend(transforms)\n        return t.cast(\"Self\", copy)\n\n    def transform_aggregate(\n        self,\n        aggregate: Optional[list[AggregatedFieldDef]] = Undefined,\n        groupby: Optional[list[str | FieldName]] = Undefined,\n        **kwds: dict[str, Any] | str,\n    ) -> Self:\n        \"\"\"\n        Add an :class:`AggregateTransform` to the schema.\n\n        Parameters\n        ----------\n        aggregate : List(:class:`AggregatedFieldDef`)\n            Array of objects that define fields to aggregate.\n        groupby : List(string)\n            The data fields to group by. If not specified, a single group containing all data\n            objects will be used.\n        **kwds : Union[TypingDict[str, Any], str]\n            additional keywords are converted to aggregates using standard\n            shorthand parsing.\n\n        Returns\n        -------\n        self : Chart object\n            returns chart to allow for chaining\n\n        Examples\n        --------\n        The aggregate transform allows you to specify transforms directly using\n        the same shorthand syntax as used in encodings:\n\n        >>> import altair as alt\n        >>> chart1 = alt.Chart().transform_aggregate(\n        ...     mean_acc=\"mean(Acceleration)\", groupby=[\"Origin\"]\n        ... )\n        >>> print(chart1.transform[0].to_json())  # doctest: +NORMALIZE_WHITESPACE\n        {\n          \"aggregate\": [\n            {\n              \"as\": \"mean_acc\",\n              \"field\": \"Acceleration\",\n              \"op\": \"mean\"\n            }\n          ],\n          \"groupby\": [\n            \"Origin\"\n          ]\n        }\n\n        It also supports including AggregatedFieldDef instances or dicts directly,\n        so you can create the above transform like this:\n\n        >>> chart2 = alt.Chart().transform_aggregate(\n        ...     [alt.AggregatedFieldDef(field=\"Acceleration\", op=\"mean\", **{\"as\": \"mean_acc\"})],\n        ...     groupby=[\"Origin\"],\n        ... )\n        >>> chart2.transform == chart1.transform\n        True\n\n        See Also\n        --------\n        alt.AggregateTransform : underlying transform object\n\n        \"\"\"\n        if aggregate is Undefined:\n            aggregate = []\n        for key, val in kwds.items():\n            parsed = utils.parse_shorthand(val)\n            dct = {\n                \"as\": key,\n                \"field\": parsed.get(\"field\", Undefined),\n                \"op\": parsed.get(\"aggregate\", Undefined),\n            }\n            assert isinstance(aggregate, list)\n            aggregate.append(core.AggregatedFieldDef(**dct))\n        return self._add_transform(\n            core.AggregateTransform(aggregate=aggregate, groupby=groupby)\n        )\n\n    def transform_bin(\n        self,\n        as_: Optional[str | FieldName | list[str | FieldName]] = Undefined,\n        field: Optional[str | FieldName] = Undefined,\n        bin: Literal[True] | BinParams = True,\n        **kwargs: Any,\n    ) -> Self:\n        \"\"\"\n        Add a :class:`BinTransform` to the schema.\n\n        Parameters\n        ----------\n        as_ : anyOf(string, List(string))\n            The output fields at which to write the start and end bin values.\n        bin : anyOf(boolean, :class:`BinParams`)\n            An object indicating bin properties, or simply ``true`` for using default bin\n            parameters.\n        field : string\n            The data field to bin.\n\n        Returns\n        -------\n        self : Chart object\n            returns chart to allow for chaining\n\n        Examples\n        --------\n        >>> import altair as alt\n        >>> chart = alt.Chart().transform_bin(\"x_binned\", \"x\")\n        >>> chart.transform[0]\n        BinTransform({\n          as: 'x_binned',\n          bin: True,\n          field: 'x'\n        })\n\n        >>> chart = alt.Chart().transform_bin(\"x_binned\", \"x\", bin=alt.Bin(maxbins=10))\n        >>> chart.transform[0]\n        BinTransform({\n          as: 'x_binned',\n          bin: BinParams({\n            maxbins: 10\n          }),\n          field: 'x'\n        })\n\n        See Also\n        --------\n        alt.BinTransform : underlying transform object\n\n        \"\"\"\n        if as_ is not Undefined:\n            if \"as\" in kwargs:\n                msg = \"transform_bin: both 'as_' and 'as' passed as arguments.\"\n                raise ValueError(msg)\n            kwargs[\"as\"] = as_\n        kwargs[\"bin\"] = bin\n        kwargs[\"field\"] = field\n        return self._add_transform(core.BinTransform(**kwargs))\n\n    def transform_calculate(\n        self,\n        as_: Optional[str | FieldName] = Undefined,\n        calculate: Optional[str | Expr | Expression] = Undefined,\n        **kwargs: str | Expr | Expression,\n    ) -> Self:\n        \"\"\"\n        Add a :class:`CalculateTransform` to the schema.\n\n        Parameters\n        ----------\n        as_ : string\n            The field for storing the computed formula value.\n        calculate : string or alt.expr.Expression\n            An `expression <https://vega.github.io/vega-lite/docs/types.html#expression>`__\n            string. Use the variable ``datum`` to refer to the current data object.\n        **kwargs\n            transforms can also be passed by keyword argument; see Examples\n\n        Returns\n        -------\n        self : Chart object\n            returns chart to allow for chaining\n\n        Examples\n        --------\n        >>> import altair as alt\n        >>> from altair import datum, expr\n\n        >>> chart = alt.Chart().transform_calculate(y=2 * expr.sin(datum.x))\n        >>> chart.transform[0]\n        CalculateTransform({\n          as: 'y',\n          calculate: (2 * sin(datum.x))\n        })\n\n        It's also possible to pass the ``CalculateTransform`` arguments directly:\n\n        >>> kwds = {\"as_\": \"y\", \"calculate\": \"2 * sin(datum.x)\"}\n        >>> chart = alt.Chart().transform_calculate(**kwds)\n        >>> chart.transform[0]\n        CalculateTransform({\n          as: 'y',\n          calculate: '2 * sin(datum.x)'\n        })\n\n        As the first form is easier to write and understand, that is the\n        recommended method.\n\n        See Also\n        --------\n        alt.CalculateTransform : underlying transform object\n        \"\"\"\n        calc_as: Optional[str | FieldName | Expr | Expression]\n        if as_ is Undefined:\n            calc_as = kwargs.pop(\"as\", Undefined)\n        elif \"as\" in kwargs:\n            msg = \"transform_calculate: both 'as_' and 'as' passed as arguments.\"\n            raise ValueError(msg)\n        else:\n            calc_as = as_\n        if calc_as is not Undefined or calculate is not Undefined:\n            dct: dict[str, Any] = {\"as\": calc_as, \"calculate\": calculate}\n            self = self._add_transform(core.CalculateTransform(**dct))\n        for a, calculate in kwargs.items():\n            dct = {\"as\": a, \"calculate\": calculate}\n            self = self._add_transform(core.CalculateTransform(**dct))\n        return self\n\n    def transform_density(\n        self,\n        density: str | FieldName,\n        as_: Optional[list[str | FieldName]] = Undefined,\n        bandwidth: Optional[float] = Undefined,\n        counts: Optional[bool] = Undefined,\n        cumulative: Optional[bool] = Undefined,\n        extent: Optional[list[float]] = Undefined,\n        groupby: Optional[list[str | FieldName]] = Undefined,\n        maxsteps: Optional[int] = Undefined,\n        minsteps: Optional[int] = Undefined,\n        steps: Optional[int] = Undefined,\n        resolve: Optional[ResolveMode_T] = Undefined,\n    ) -> Self:\n        \"\"\"\n        Add a :class:`DensityTransform` to the spec.\n\n        Parameters\n        ----------\n        density : str\n            The data field for which to perform density estimation.\n        as_ : [str, str]\n            The output fields for the sample value and corresponding density estimate.\n            **Default value:** ``[\"value\", \"density\"]``\n        bandwidth : float\n            The bandwidth (standard deviation) of the Gaussian kernel. If unspecified or set to\n            zero, the bandwidth value is automatically estimated from the input data using\n            Scott's rule.\n        counts : boolean\n            A boolean flag indicating if the output values should be probability estimates\n            (false) or smoothed counts (true).\n            **Default value:** ``false``\n        cumulative : boolean\n            A boolean flag indicating whether to produce density estimates (false) or cumulative\n            density estimates (true).\n            **Default value:** ``false``\n        extent : List([float, float])\n            A [min, max] domain from which to sample the distribution. If unspecified, the\n            extent will be determined by the observed minimum and maximum values of the density\n            value field.\n        groupby : List(str)\n            The data fields to group by. If not specified, a single group containing all data\n            objects will be used.\n        maxsteps : int\n            The maximum number of samples to take along the extent domain for plotting the\n            density. **Default value:** ``200``\n        minsteps : int\n            The minimum number of samples to take along the extent domain for plotting the\n            density. **Default value:** ``25``\n        steps : int\n            The exact number of samples to take along the extent domain for plotting the\n            density. If specified, overrides both minsteps and maxsteps to set an exact number\n            of uniform samples. Potentially useful in conjunction with a fixed extent to ensure\n            consistent sample points for stacked densities.\n        resolve : Literal['independent', 'shared']\n            Indicates how parameters for multiple densities should be resolved. If\n            ``\"independent\"``, each density may have its own domain extent and dynamic number of\n            curve sample steps. If ``\"shared\"``, the KDE transform will ensure that all\n            densities are defined over a shared domain and curve steps, enabling stacking.\n\n            **Default value:** ``\"shared\"``\n        \"\"\"\n        return self._add_transform(\n            core.DensityTransform(\n                density=density,\n                bandwidth=bandwidth,\n                counts=counts,\n                cumulative=cumulative,\n                extent=extent,\n                groupby=groupby,\n                maxsteps=maxsteps,\n                minsteps=minsteps,\n                steps=steps,\n                resolve=resolve,\n                **{\"as\": as_},\n            )\n        )\n\n    def transform_impute(\n        self,\n        impute: str | FieldName,\n        key: str | FieldName,\n        frame: Optional[list[int | None]] = Undefined,\n        groupby: Optional[list[str | FieldName]] = Undefined,\n        keyvals: Optional[list[Any] | ImputeSequence] = Undefined,\n        method: Optional[ImputeMethod_T | ImputeMethod] = Undefined,\n        value: Optional[Any] = Undefined,\n    ) -> Self:\n        \"\"\"\n        Add an :class:`ImputeTransform` to the schema.\n\n        Parameters\n        ----------\n        impute : string\n            The data field for which the missing values should be imputed.\n        key : string\n            A key field that uniquely identifies data objects within a group.\n            Missing key values (those occurring in the data but not in the current group) will\n            be imputed.\n        frame : List(anyOf(None, int))\n            A frame specification as a two-element array used to control the window over which\n            the specified method is applied. The array entries should either be a number\n            indicating the offset from the current data object, or null to indicate unbounded\n            rows preceding or following the current data object.  For example, the value ``[-5,\n            5]`` indicates that the window should include five objects preceding and five\n            objects following the current object.\n            **Default value:** :  ``[null, null]`` indicating that the window includes all\n            objects.\n        groupby : List(string)\n            An optional array of fields by which to group the values.\n            Imputation will then be performed on a per-group basis.\n        keyvals : anyOf(List(Mapping(required=[])), :class:`ImputeSequence`)\n            Defines the key values that should be considered for imputation.\n            An array of key values or an object defining a `number sequence\n            <https://vega.github.io/vega-lite/docs/impute.html#sequence-def>`__.\n            If provided, this will be used in addition to the key values observed within the\n            input data.  If not provided, the values will be derived from all unique values of\n            the ``key`` field. For ``impute`` in ``encoding``, the key field is the x-field if\n            the y-field is imputed, or vice versa.\n            If there is no impute grouping, this property *must* be specified.\n        method : :class:`ImputeMethod`\n            The imputation method to use for the field value of imputed data objects.\n            One of ``value``, ``mean``, ``median``, ``max`` or ``min``.\n            **Default value:**  ``\"value\"``\n        value : Mapping(required=[])\n            The field value to use when the imputation ``method`` is ``\"value\"``.\n\n        Returns\n        -------\n        self : Chart object\n            returns chart to allow for chaining\n\n        See Also\n        --------\n        alt.ImputeTransform : underlying transform object\n        \"\"\"\n        return self._add_transform(\n            core.ImputeTransform(\n                impute=impute,\n                key=key,\n                frame=frame,\n                groupby=groupby,\n                keyvals=keyvals,\n                method=method,\n                value=value,\n            )\n        )\n\n    def transform_joinaggregate(\n        self,\n        joinaggregate: Optional[list[JoinAggregateFieldDef]] = Undefined,\n        groupby: Optional[list[str | FieldName]] = Undefined,\n        **kwargs: str,\n    ) -> Self:\n        \"\"\"\n        Add a :class:`JoinAggregateTransform` to the schema.\n\n        Parameters\n        ----------\n        joinaggregate : List(:class:`JoinAggregateFieldDef`)\n            The definition of the fields in the join aggregate, and what calculations to use.\n        groupby : List(string)\n            The data fields for partitioning the data objects into separate groups. If\n            unspecified, all data points will be in a single group.\n        **kwargs\n            joinaggregates can also be passed by keyword argument; see Examples.\n\n        Returns\n        -------\n        self : Chart object\n            returns chart to allow for chaining\n\n        Examples\n        --------\n        >>> import altair as alt\n        >>> chart = alt.Chart().transform_joinaggregate(x=\"sum(y)\")\n        >>> chart.transform[0]\n        JoinAggregateTransform({\n          joinaggregate: [JoinAggregateFieldDef({\n            as: 'x',\n            field: 'y',\n            op: 'sum'\n          })]\n        })\n\n        See Also\n        --------\n        alt.JoinAggregateTransform : underlying transform object\n        \"\"\"\n        if joinaggregate is Undefined:\n            joinaggregate = []\n        for key, val in kwargs.items():\n            parsed = utils.parse_shorthand(val)\n            dct = {\n                \"as\": key,\n                \"field\": parsed.get(\"field\", Undefined),\n                \"op\": parsed.get(\"aggregate\", Undefined),\n            }\n            assert isinstance(joinaggregate, list)\n            joinaggregate.append(core.JoinAggregateFieldDef(**dct))\n        return self._add_transform(\n            core.JoinAggregateTransform(joinaggregate=joinaggregate, groupby=groupby)\n        )\n\n    def transform_extent(\n        self, extent: str | FieldName, param: str | ParameterName\n    ) -> Self:\n        \"\"\"\n        Add a :class:`ExtentTransform` to the spec.\n\n        Parameters\n        ----------\n        extent : str\n            The field of which to get the extent.\n        param : str\n            The name of the output parameter which will be created by\n            the extent transform.\n\n        Returns\n        -------\n        self : Chart object\n            returns chart to allow for chaining\n        \"\"\"\n        return self._add_transform(core.ExtentTransform(extent=extent, param=param))\n\n    def transform_filter(\n        self,\n        predicate: Optional[_PredicateType] = Undefined,\n        *more_predicates: _ComposablePredicateType,\n        empty: Optional[bool] = Undefined,\n        **constraints: _FieldEqualType,\n    ) -> Self:\n        \"\"\"\n        Add a :class:`FilterTransform` to the spec.\n\n        The resulting predicate is an ``&`` reduction over ``predicate`` and optional ``*``, ``**``, arguments.\n\n        Parameters\n        ----------\n        predicate\n            A selection or test predicate. ``str`` input will be treated as a test operand.\n        *more_predicates\n            Additional predicates, restricted to types supporting ``&``.\n        empty\n            For selection parameters, the predicate of empty selections returns ``True`` by default.\n            Override this behavior, with ``empty=False``.\n\n            .. note::\n                When ``predicate`` is a ``Parameter`` that is used more than once,\n                ``self.transform_filter(..., empty=...)`` provides granular control for each occurrence.\n        **constraints\n            Specify `Field Equal Predicate`_'s.\n            Shortcut for ``alt.datum.field_name == value``, see examples for usage.\n\n        Warns\n        -----\n        AltairDeprecationWarning\n            If called using ``filter`` as a keyword argument.\n\n        See Also\n        --------\n        alt.when : Uses a similar syntax for defining conditional values.\n\n        Notes\n        -----\n        - Directly inspired by the syntax used in `polars.DataFrame.filter`_.\n\n        .. _Field Equal Predicate:\n            https://vega.github.io/vega-lite/docs/predicate.html#equal-predicate\n        .. _polars.DataFrame.filter:\n            https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.filter.html\n\n        Examples\n        --------\n        Setting up a common chart::\n\n            import altair as alt\n            from altair import datum\n            from altair.datasets import data\n\n            source = data.population.url\n            chart = (\n                alt.Chart(source)\n                .mark_line()\n                .encode(\n                    x=\"age:O\",\n                    y=\"sum(people):Q\",\n                    color=alt.Color(\"year:O\").legend(symbolType=\"square\"),\n                )\n            )\n            chart\n\n        Singular predicates can be expressed via ``datum``::\n\n            chart.transform_filter(datum.year <= 1980)\n\n        We can also use selection parameters directly::\n\n            selection = alt.selection_point(encodings=[\"color\"], bind=\"legend\")\n            chart.transform_filter(selection).add_params(selection)\n\n        Or a field predicate::\n\n            between_1950_60 = alt.FieldRangePredicate(field=\"year\", range=[1950, 1960])\n            chart.transform_filter(between_1950_60) | chart.transform_filter(~between_1950_60)\n\n        Predicates can be composed together using logical operands::\n\n            chart.transform_filter(between_1950_60 | (datum.year == 1850))\n\n        Predicates passed as positional arguments will be reduced with ``&``::\n\n            chart.transform_filter(datum.year > 1980, datum.age != 90)\n\n        Using keyword-argument ``constraints`` can simplify compositions like::\n\n            verbose_composition = chart.transform_filter((datum.year == 2000) & (datum.sex == 1))\n            chart.transform_filter(year=2000, sex=1)\n        \"\"\"\n        if depr_filter := t.cast(\"Any\", constraints.pop(\"filter\", None)):\n            utils.deprecated_warn(\n                \"Passing `filter` as a keyword is ambiguous.\\n\\n\"\n                \"Use a positional argument for `<5.5.0` behavior.\\n\"\n                \"Or, `alt.datum['filter'] == ...` if referring to a column named 'filter'.\",\n                version=\"5.5.0\",\n            )\n            if utils.is_undefined(predicate):\n                predicate = depr_filter\n            else:\n                more_predicates = *more_predicates, depr_filter\n        cond = _parse_when(predicate, *more_predicates, empty=empty, **constraints)\n        return self._add_transform(core.FilterTransform(filter=cond.get(\"test\", cond)))\n\n    def transform_flatten(\n        self,\n        flatten: list[str | FieldName],\n        as_: Optional[list[str | FieldName]] = Undefined,\n    ) -> Self:\n        \"\"\"\n        Add a :class:`FlattenTransform` to the schema.\n\n        Parameters\n        ----------\n        flatten : List(string)\n            An array of one or more data fields containing arrays to flatten.\n            If multiple fields are specified, their array values should have a parallel\n            structure, ideally with the same length.\n            If the lengths of parallel arrays do not match,\n            the longest array will be used with ``null`` values added for missing entries.\n        as : List(string)\n            The output field names for extracted array values.\n            **Default value:** The field name of the corresponding array field\n\n        Returns\n        -------\n        self : Chart object\n            returns chart to allow for chaining\n\n        See Also\n        --------\n        alt.FlattenTransform : underlying transform object\n        \"\"\"\n        return self._add_transform(\n            core.FlattenTransform(flatten=flatten, **{\"as\": as_})\n        )\n\n    def transform_fold(\n        self,\n        fold: list[str | FieldName],\n        as_: Optional[list[str | FieldName]] = Undefined,\n    ) -> Self:\n        \"\"\"\n        Add a :class:`FoldTransform` to the spec.\n\n        Parameters\n        ----------\n        fold : List(string)\n            An array of data fields indicating the properties to fold.\n        as : [string, string]\n            The output field names for the key and value properties produced by the fold\n            transform. Default: ``[\"key\", \"value\"]``\n\n        Returns\n        -------\n        self : Chart object\n            returns chart to allow for chaining\n\n        See Also\n        --------\n        Chart.transform_pivot : pivot transform - opposite of fold.\n        alt.FoldTransform : underlying transform object\n        \"\"\"\n        return self._add_transform(core.FoldTransform(fold=fold, **{\"as\": as_}))\n\n    def transform_loess(\n        self,\n        on: str | FieldName,\n        loess: str | FieldName,\n        as_: Optional[list[str | FieldName]] = Undefined,\n        bandwidth: Optional[float] = Undefined,\n        groupby: Optional[list[str | FieldName]] = Undefined,\n    ) -> Self:\n        \"\"\"\n        Add a :class:`LoessTransform` to the spec.\n\n        Parameters\n        ----------\n        on : str\n            The data field of the independent variable to use a predictor.\n        loess : str\n            The data field of the dependent variable to smooth.\n        as_ : [str, str]\n            The output field names for the smoothed points generated by the loess transform.\n            **Default value:** The field names of the input x and y values.\n        bandwidth : float\n            A bandwidth parameter in the range ``[0, 1]`` that determines the amount of\n            smoothing. **Default value:** ``0.3``\n        groupby : List(str)\n            The data fields to group by. If not specified, a single group containing all data\n            objects will be used.\n\n        Returns\n        -------\n        self : Chart object\n            returns chart to allow for chaining\n\n        See Also\n        --------\n        Chart.transform_regression: regression transform\n        alt.LoessTransform : underlying transform object\n        \"\"\"\n        return self._add_transform(\n            core.LoessTransform(\n                loess=loess, on=on, bandwidth=bandwidth, groupby=groupby, **{\"as\": as_}\n            )\n        )\n\n    def transform_lookup(\n        self,\n        lookup: Optional[str] = Undefined,\n        from_: Optional[LookupData | LookupSelection] = Undefined,\n        as_: Optional[str | FieldName | list[str | FieldName]] = Undefined,\n        default: Optional[str] = Undefined,\n        **kwargs: Any,\n    ) -> Self:\n        \"\"\"\n        Add a :class:`DataLookupTransform` or :class:`SelectionLookupTransform` to the chart.\n\n        Parameters\n        ----------\n        lookup : string\n            Key in primary data source.\n        from_ : anyOf(:class:`LookupData`, :class:`LookupSelection`)\n            Secondary data reference.\n        as_ : anyOf(string, List(string))\n            The output fields on which to store the looked up data values.\n\n            For data lookups, this property may be left blank if ``from_.fields``\n            has been specified (those field names will be used); if ``from_.fields``\n            has not been specified, ``as_`` must be a string.\n\n            For selection lookups, this property is optional: if unspecified,\n            looked up values will be stored under a property named for the selection;\n            and if specified, it must correspond to ``from_.fields``.\n        default : string\n            The default value to use if lookup fails. **Default value:** ``null``\n\n        Returns\n        -------\n        self : Chart object\n            returns chart to allow for chaining\n\n        See Also\n        --------\n        alt.DataLookupTransform : underlying transform object\n        alt.SelectionLookupTransform : underlying transform object\n        \"\"\"\n        if as_ is not Undefined:\n            if \"as\" in kwargs:\n                msg = \"transform_lookup: both 'as_' and 'as' passed as arguments.\"\n                raise ValueError(msg)\n            kwargs[\"as\"] = as_\n        if from_ is not Undefined:\n            if \"from\" in kwargs:\n                msg = \"transform_lookup: both 'from_' and 'from' passed as arguments.\"\n                raise ValueError(msg)\n            kwargs[\"from\"] = from_\n        kwargs[\"lookup\"] = lookup\n        kwargs[\"default\"] = default\n        return self._add_transform(core.LookupTransform(**kwargs))\n\n    def transform_pivot(\n        self,\n        pivot: str | FieldName,\n        value: str | FieldName,\n        groupby: Optional[list[str | FieldName]] = Undefined,\n        limit: Optional[int] = Undefined,\n        op: Optional[AggregateOp_T | AggregateOp] = Undefined,\n    ) -> Self:\n        \"\"\"\n        Add a :class:`PivotTransform` to the chart.\n\n        Parameters\n        ----------\n        pivot : str\n            The data field to pivot on. The unique values of this field become new field names\n            in the output stream.\n        value : str\n            The data field to populate pivoted fields. The aggregate values of this field become\n            the values of the new pivoted fields.\n        groupby : List(str)\n            The optional data fields to group by. If not specified, a single group containing\n            all data objects will be used.\n        limit : int\n            An optional parameter indicating the maximum number of pivoted fields to generate.\n            The default ( ``0`` ) applies no limit. The pivoted ``pivot`` names are sorted in\n            ascending order prior to enforcing the limit.\n            **Default value:** ``0``\n        op : Literal['argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n            The aggregation operation to apply to grouped ``value`` field values.\n            **Default value:** ``sum``\n\n        Returns\n        -------\n        self : Chart object\n            returns chart to allow for chaining\n\n        See Also\n        --------\n        Chart.transform_fold : fold transform - opposite of pivot.\n        alt.PivotTransform : underlying transform object\n        \"\"\"\n        return self._add_transform(\n            core.PivotTransform(\n                pivot=pivot, value=value, groupby=groupby, limit=limit, op=op\n            )\n        )\n\n    def transform_quantile(\n        self,\n        quantile: str | FieldName,\n        as_: Optional[list[str | FieldName]] = Undefined,\n        groupby: Optional[list[str | FieldName]] = Undefined,\n        probs: Optional[list[float]] = Undefined,\n        step: Optional[float] = Undefined,\n    ) -> Self:\n        \"\"\"\n        Add a :class:`QuantileTransform` to the chart.\n\n        Parameters\n        ----------\n        quantile : str\n            The data field for which to perform quantile estimation.\n        as : [str, str]\n            The output field names for the probability and quantile values.\n        groupby : List(str)\n            The data fields to group by. If not specified, a single group containing all data\n            objects will be used.\n        probs : List(float)\n            An array of probabilities in the range (0, 1) for which to compute quantile values.\n            If not specified, the *step* parameter will be used.\n        step : float\n            A probability step size (default 0.01) for sampling quantile values. All values from\n            one-half the step size up to 1 (exclusive) will be sampled. This parameter is only\n            used if the *probs* parameter is not provided. **Default value:** ``[\"prob\", \"value\"]``\n\n        Returns\n        -------\n        self : Chart object\n            returns chart to allow for chaining\n\n        See Also\n        --------\n        alt.QuantileTransform : underlying transform object\n        \"\"\"\n        return self._add_transform(\n            core.QuantileTransform(\n                quantile=quantile,\n                groupby=groupby,\n                probs=probs,\n                step=step,\n                **{\"as\": as_},\n            )\n        )\n\n    def transform_regression(\n        self,\n        on: str | FieldName,\n        regression: str | FieldName,\n        as_: Optional[list[str | FieldName]] = Undefined,\n        extent: Optional[list[float]] = Undefined,\n        groupby: Optional[list[str | FieldName]] = Undefined,\n        method: Optional[\n            Literal[\"linear\", \"log\", \"exp\", \"pow\", \"quad\", \"poly\"]\n        ] = Undefined,\n        order: Optional[int] = Undefined,\n        params: Optional[bool] = Undefined,\n    ) -> Self:\n        \"\"\"\n        Add a :class:`RegressionTransform` to the chart.\n\n        Parameters\n        ----------\n        on : str\n            The data field of the independent variable to use a predictor.\n        regression : str\n            The data field of the dependent variable to predict.\n        as_ : [str, str]\n            The output field names for the smoothed points generated by the regression\n            transform. **Default value:** The field names of the input x and y values.\n        extent : [float, float]\n            A [min, max] domain over the independent (x) field for the starting and ending\n            points of the generated trend line.\n        groupby : List(str)\n            The data fields to group by. If not specified, a single group containing all data\n            objects will be used.\n        method : enum('linear', 'log', 'exp', 'pow', 'quad', 'poly')\n            The functional form of the regression model. One of ``\"linear\"``, ``\"log\"``,\n            ``\"exp\"``, ``\"pow\"``, ``\"quad\"``, or ``\"poly\"``.  **Default value:** ``\"linear\"``\n        order : int\n            The polynomial order (number of coefficients) for the 'poly' method.\n            **Default value:** ``3``\n        params : boolean\n            A boolean flag indicating if the transform should return the regression model\n            parameters (one object per group), rather than trend line points.\n            The resulting objects include a ``coef`` array of fitted coefficient values\n            (starting with the intercept term and then including terms of increasing order)\n            and an ``rSquared`` value (indicating the total variance explained by the model).\n            **Default value:** ``false``\n\n        Returns\n        -------\n        self : Chart object\n            returns chart to allow for chaining\n\n        See Also\n        --------\n        Chart.transform_loess : LOESS transform\n        alt.RegressionTransform : underlying transform object\n        \"\"\"\n        return self._add_transform(\n            core.RegressionTransform(\n                regression=regression,\n                on=on,\n                extent=extent,\n                groupby=groupby,\n                method=method,\n                order=order,\n                params=params,\n                **{\"as\": as_},\n            )\n        )\n\n    def transform_sample(self, sample: int = 1000) -> Self:\n        \"\"\"\n        Add a :class:`SampleTransform` to the schema.\n\n        Parameters\n        ----------\n        sample : int\n            The maximum number of data objects to include in the sample. Default: 1000.\n\n        Returns\n        -------\n        self : Chart object\n            returns chart to allow for chaining\n\n        See Also\n        --------\n        alt.SampleTransform : underlying transform object\n        \"\"\"\n        return self._add_transform(core.SampleTransform(sample))\n\n    def transform_stack(\n        self,\n        as_: str | FieldName | list[str],\n        stack: str | FieldName,\n        groupby: list[str | FieldName],\n        offset: Optional[StackOffset_T] = Undefined,\n        sort: Optional[list[SortField]] = Undefined,\n    ) -> Self:\n        \"\"\"\n        Add a :class:`StackTransform` to the schema.\n\n        Parameters\n        ----------\n        as_ : anyOf(string, List(string))\n            Output field names. This can be either a string or an array of strings with\n            two elements denoting the name for the fields for stack start and stack end\n            respectively.\n            If a single string(eg.\"val\") is provided, the end field will be \"val_end\".\n        stack : string\n            The field which is stacked.\n        groupby : List(string)\n            The data fields to group by.\n        offset : enum('zero', 'center', 'normalize')\n            Mode for stacking marks. Default: 'zero'.\n        sort : List(:class:`SortField`)\n            Field that determines the order of leaves in the stacked charts.\n\n        Returns\n        -------\n        self : Chart object\n            returns chart to allow for chaining\n\n        See Also\n        --------\n        alt.StackTransform : underlying transform object\n        \"\"\"\n        return self._add_transform(\n            core.StackTransform(\n                stack=stack, groupby=groupby, offset=offset, sort=sort, **{\"as\": as_}\n            )\n        )\n\n    def transform_timeunit(\n        self,\n        as_: Optional[str | FieldName] = Undefined,\n        field: Optional[str | FieldName] = Undefined,\n        timeUnit: Optional[MultiTimeUnit_T | SingleTimeUnit_T | TimeUnit] = Undefined,\n        **kwargs: str,\n    ) -> Self:\n        \"\"\"\n        Add a :class:`TimeUnitTransform` to the schema.\n\n        Parameters\n        ----------\n        as_ : string\n            The output field to write the timeUnit value.\n        field : string\n            The data field to apply time unit.\n        timeUnit : str or :class:`TimeUnit`\n            The timeUnit.\n        **kwargs\n            transforms can also be passed by keyword argument; see Examples\n\n        Returns\n        -------\n        self : Chart object\n            returns chart to allow for chaining\n\n        Examples\n        --------\n        >>> import altair as alt\n        >>> from altair import datum, expr\n\n        >>> chart = alt.Chart().transform_timeunit(month=\"month(date)\")\n        >>> chart.transform[0]\n        TimeUnitTransform({\n          as: 'month',\n          field: 'date',\n          timeUnit: 'month'\n        })\n\n        It's also possible to pass the ``TimeUnitTransform`` arguments directly;\n        this is most useful in cases where the desired field name is not a\n        valid python identifier:\n\n        >>> kwds = {\"as\": \"month\", \"timeUnit\": \"month\", \"field\": \"The Month\"}\n        >>> chart = alt.Chart().transform_timeunit(**kwds)\n        >>> chart.transform[0]\n        TimeUnitTransform({\n          as: 'month',\n          field: 'The Month',\n          timeUnit: 'month'\n        })\n\n        As the first form is easier to write and understand, that is the\n        recommended method.\n\n        See Also\n        --------\n        alt.TimeUnitTransform : underlying transform object\n\n        \"\"\"\n        if as_ is Undefined:\n            as_ = kwargs.pop(\"as\", Undefined)\n        elif \"as\" in kwargs:\n            msg = \"transform_timeunit: both 'as_' and 'as' passed as arguments.\"\n            raise ValueError(msg)\n        if as_ is not Undefined:\n            dct: dict[str, Any] = {\"as\": as_, \"timeUnit\": timeUnit, \"field\": field}\n            self = self._add_transform(core.TimeUnitTransform(**dct))\n        for as_, shorthand in kwargs.items():\n            dct = utils.parse_shorthand(\n                shorthand,\n                parse_timeunits=True,\n                parse_aggregates=False,\n                parse_types=False,\n            )\n            dct.pop(\"type\", None)\n            dct[\"as\"] = as_\n            if \"timeUnit\" not in dct:\n                msg = f\"'{shorthand}' must include a valid timeUnit\"\n                raise ValueError(msg)\n            self = self._add_transform(core.TimeUnitTransform(**dct))\n        return self\n\n    def transform_window(\n        self,\n        window: Optional[list[WindowFieldDef]] = Undefined,\n        frame: Optional[list[int | None]] = Undefined,\n        groupby: Optional[list[str]] = Undefined,\n        ignorePeers: Optional[bool] = Undefined,\n        sort: Optional[list[SortField | dict[str, str]]] = Undefined,\n        **kwargs: str,\n    ) -> Self:\n        \"\"\"\n        Add a :class:`WindowTransform` to the schema.\n\n        Parameters\n        ----------\n        window : List(:class:`WindowFieldDef`)\n            The definition of the fields in the window, and what calculations to use.\n        frame : List(anyOf(None, int))\n            A frame specification as a two-element array indicating how the sliding window\n            should proceed. The array entries should either be a number indicating the offset\n            from the current data object, or null to indicate unbounded rows preceding or\n            following the current data object. The default value is ``[null, 0]``, indicating\n            that the sliding window includes the current object and all preceding objects. The\n            value ``[-5, 5]`` indicates that the window should include five objects preceding\n            and five objects following the current object. Finally, ``[null, null]`` indicates\n            that the window frame should always include all data objects. The only operators\n            affected are the aggregation operations and the ``first_value``, ``last_value``, and\n            ``nth_value`` window operations. The other window operations are not affected by\n            this.\n\n            **Default value:** :  ``[null, 0]`` (includes the current object and all preceding\n            objects)\n        groupby : List(string)\n            The data fields for partitioning the data objects into separate windows. If\n            unspecified, all data points will be in a single group.\n        ignorePeers : boolean\n            Indicates if the sliding window frame should ignore peer values. (Peer values are\n            those considered identical by the sort criteria). The default is false, causing the\n            window frame to expand to include all peer values. If set to true, the window frame\n            will be defined by offset values only. This setting only affects those operations\n            that depend on the window frame, namely aggregation operations and the first_value,\n            last_value, and nth_value window operations.\n\n            **Default value:** ``false``\n        sort : List(:class:`SortField`)\n            A sort field definition for sorting data objects within a window. If two data\n            objects are considered equal by the comparator, they are considered \"peer\" values of\n            equal rank. If sort is not specified, the order is undefined: data objects are\n            processed in the order they are observed and none are considered peers (the\n            ignorePeers parameter is ignored and treated as if set to ``true`` ).\n        **kwargs\n            transforms can also be passed by keyword argument; see Examples\n\n        Examples\n        --------\n        A cumulative line chart\n\n        >>> import altair as alt\n        >>> import numpy as np\n        >>> import pandas as pd\n        >>> data = pd.DataFrame({\"x\": np.arange(100), \"y\": np.random.randn(100)})\n        >>> chart = (\n        ...     alt.Chart(data)\n        ...     .mark_line()\n        ...     .encode(x=\"x:Q\", y=\"ycuml:Q\")\n        ...     .transform_window(ycuml=\"sum(y)\")\n        ... )\n        >>> chart.transform[0]\n        WindowTransform({\n          window: [WindowFieldDef({\n            as: 'ycuml',\n            field: 'y',\n            op: 'sum'\n          })]\n        })\n\n        \"\"\"\n        w = window if isinstance(window, list) else []\n        if kwargs:\n            for as_, shorthand in kwargs.items():\n                kwds: dict[str, Any] = {\"as\": as_}\n                kwds.update(\n                    utils.parse_shorthand(\n                        shorthand,\n                        parse_aggregates=False,\n                        parse_window_ops=True,\n                        parse_timeunits=False,\n                        parse_types=False,\n                    )\n                )\n                w.append(core.WindowFieldDef(**kwds))\n\n        return self._add_transform(\n            core.WindowTransform(\n                window=w or Undefined,\n                frame=frame,\n                groupby=groupby,\n                ignorePeers=ignorePeers,\n                sort=sort,\n            )\n        )\n\n    # Display-related methods\n\n    def _repr_mimebundle_(self, *args: Any, **kwds: Any) -> MimeBundleType | None:  # type:ignore\n        \"\"\"Return a MIME bundle for display in Jupyter frontends.\"\"\"\n        # Catch errors explicitly to get around issues in Jupyter frontend\n        # see https://github.com/ipython/ipython/issues/11038\n        try:\n            dct = self.to_dict(context={\"pre_transform\": False})\n        except Exception:\n            utils.display_traceback(in_ipython=True)\n            return {}\n        else:\n            if renderer := renderers.get():\n                return renderer(dct)\n\n    def display(\n        self,\n        renderer: Optional[Literal[\"canvas\", \"svg\"]] = Undefined,\n        theme: Optional[str] = Undefined,\n        actions: Optional[bool | dict[str, Any]] = Undefined,\n        **kwargs: Any,\n    ) -> None:\n        \"\"\"\n        Display chart in Jupyter notebook or JupyterLab.\n\n        Parameters are passed as options to vega-embed within supported frontends.\n        See https://github.com/vega/vega-embed#options for details.\n\n        Parameters\n        ----------\n        renderer : string ('canvas' or 'svg')\n            The renderer to use\n        theme : string\n            The Vega theme name to use; see https://github.com/vega/vega-themes\n        actions : bool or dict\n            Specify whether action links (\"Open In Vega Editor\", etc.) are\n            included in the view.\n        **kwargs :\n            Additional parameters are also passed to vega-embed as options.\n\n        \"\"\"\n        from IPython.display import display\n\n        if renderer is not Undefined:\n            kwargs[\"renderer\"] = renderer\n        if theme is not Undefined:\n            kwargs[\"theme\"] = theme\n        if actions is not Undefined:\n            kwargs[\"actions\"] = actions\n\n        if kwargs:\n            options = renderers.options.copy()\n            options[\"embed_options\"] = options.get(\"embed_options\", {}).copy()\n            options[\"embed_options\"].update(kwargs)\n            with renderers.enable(**options):\n                display(self)\n        else:\n            display(self)\n\n    @utils.deprecated(version=\"4.1.0\", alternative=\"show\")\n    def serve(\n        self,\n        ip=\"127.0.0.1\",  # noqa: ANN001\n        port=8888,  # noqa: ANN001\n        n_retries=50,  # noqa: ANN001\n        files=None,  # noqa: ANN001\n        jupyter_warning=True,  # noqa: ANN001\n        open_browser=True,  # noqa: ANN001\n        http_server=None,  # noqa: ANN001\n        **kwargs,  # noqa: ANN003\n    ) -> None:\n        \"\"\"'serve' is deprecated. Use 'show' instead.\"\"\"\n        from altair.utils.server import serve\n\n        html = io.StringIO()\n        self.save(html, format=\"html\", **kwargs)\n        html.seek(0)\n\n        serve(\n            html.read(),\n            ip=ip,\n            port=port,\n            n_retries=n_retries,\n            files=files,\n            jupyter_warning=jupyter_warning,\n            open_browser=open_browser,\n            http_server=http_server,\n        )\n\n    def show(self) -> None:\n        \"\"\"Display the chart using the active renderer.\"\"\"\n        if renderers.active == \"browser\":\n            # Opens browser window as side-effect.\n            # We use a special case here so that IPython is not required\n            self._repr_mimebundle_()\n        else:\n            # Mime-bundle based renderer, requires running in an IPython session\n            from IPython.display import display\n\n            display(self)\n\n    @utils.use_signature(core.Resolve)\n    def _set_resolve(self, **kwargs: Any):  # noqa: ANN202\n        \"\"\"Copy the chart and update the resolve property with kwargs.\"\"\"\n        if not hasattr(self, \"resolve\"):\n            msg = f\"{self.__class__} object has no attribute 'resolve'\"\n            raise ValueError(msg)\n        copy = _top_schema_base(self).copy(deep=[\"resolve\"])\n        if copy.resolve is Undefined:\n            copy.resolve = core.Resolve()\n        for key, val in kwargs.items():\n            copy.resolve[key] = val\n        return copy\n\n    @utils.use_signature(core.AxisResolveMap)\n    def resolve_axis(self, *args: Any, **kwargs: Any) -> Self:\n        check = _top_schema_base(self)\n        r = check._set_resolve(axis=core.AxisResolveMap(*args, **kwargs))\n        return t.cast(\"Self\", r)\n\n    @utils.use_signature(core.LegendResolveMap)\n    def resolve_legend(self, *args: Any, **kwargs: Any) -> Self:\n        check = _top_schema_base(self)\n        r = check._set_resolve(legend=core.LegendResolveMap(*args, **kwargs))\n        return t.cast(\"Self\", r)\n\n    @utils.use_signature(core.ScaleResolveMap)\n    def resolve_scale(self, *args: Any, **kwargs: Any) -> Self:\n        check = _top_schema_base(self)\n        r = check._set_resolve(scale=core.ScaleResolveMap(*args, **kwargs))\n        return t.cast(\"Self\", r)\n\n\nclass _EncodingMixin(channels._EncodingMixin):\n    data: Any\n\n    def facet(\n        self,\n        facet: Optional[str | Facet] = Undefined,\n        row: Optional[str | FacetFieldDef | Row] = Undefined,\n        column: Optional[str | FacetFieldDef | Column] = Undefined,\n        data: Optional[ChartDataType] = Undefined,\n        columns: Optional[int] = Undefined,\n        **kwargs: Any,\n    ) -> FacetChart:\n        \"\"\"\n        Create a facet chart from the current chart.\n\n        Faceted charts require data to be specified at the top level; if data\n        is not specified, the data from the current chart will be used at the\n        top level.\n\n        Parameters\n        ----------\n        facet : string, Facet (optional)\n            The data column to use as an encoding for a wrapped facet.\n            If specified, then neither row nor column may be specified.\n        column : string, Column, FacetFieldDef (optional)\n            The data column to use as an encoding for a column facet.\n            May be combined with row argument, but not with facet argument.\n        row : string or Row, FacetFieldDef (optional)\n            The data column to use as an encoding for a row facet.\n            May be combined with column argument, but not with facet argument.\n        data : string or dataframe (optional)\n            The dataset to use for faceting. If not supplied, then data must\n            be specified in the top-level chart that calls this method.\n        columns : integer\n            the maximum number of columns for a wrapped facet.\n\n        Returns\n        -------\n        self :\n            for chaining\n        \"\"\"\n        facet_specified = facet is not Undefined\n        rowcol_specified = row is not Undefined or column is not Undefined\n\n        if facet_specified and rowcol_specified:\n            msg = \"facet argument cannot be combined with row/column argument.\"\n            raise ValueError(msg)\n        self = _top_schema_base(self)\n\n        if data is Undefined:\n            if self.data is Undefined:\n                msg = (\n                    \"Facet charts require data to be specified at the top level. \"\n                    \"If you are trying to facet layered or concatenated charts, \"\n                    \"ensure that the same data variable is passed to each chart \"\n                    \"or specify the data inside the facet method instead.\"\n                )\n                raise ValueError(msg)\n            self = _top_schema_base(self).copy(deep=False)\n            data, self.data = self.data, Undefined\n\n        f: Facet | FacetMapping\n        if not utils.is_undefined(facet):\n            f = channels.Facet(facet) if isinstance(facet, str) else facet\n        else:\n            r: Any = row\n            f = FacetMapping(row=r, column=column)\n\n        return FacetChart(spec=self, facet=f, data=data, columns=columns, **kwargs)  # pyright: ignore[reportArgumentType]\n\n\nclass Chart(\n    TopLevelMixin, _EncodingMixin, mixins.MarkMethodMixin, core.TopLevelUnitSpec\n):\n    \"\"\"\n    Create a basic Altair/Vega-Lite chart.\n\n    Although it is possible to set all Chart properties as constructor attributes,\n    it is more idiomatic to use methods such as ``mark_point()``, ``encode()``,\n    ``transform_filter()``, ``properties()``, etc. See Altair's documentation\n    for details and examples: http://altair-viz.github.io/.\n\n    Parameters\n    ----------\n    data : Data\n        An object describing the data source\n    mark : AnyMark\n        A `MarkDef` or `CompositeMarkDef` object, or a string describing the mark type\n        (one of `\"arc\"`, `\"area\"`, `\"bar\"`, `\"circle\"`, `\"geoshape\"`, `\"image\"`,\n        `\"line\"`, `\"point\"`, `\"rule\"`, `\"rect\"`, `\"square\"`, `\"text\"`, `\"tick\"`,\n        `\"trail\"`, `\"boxplot\"`, `\"errorband\"`, and `\"errorbar\"`).\n    encoding : FacetedEncoding\n        A key-value mapping between encoding channels and definition of fields.\n    autosize : anyOf(AutosizeType, AutoSizeParams)\n        Sets how the visualization size should be determined. If a string, should be one of\n        `\"pad\"`, `\"fit\"` or `\"none\"`. Object values can additionally specify parameters for\n        content sizing and automatic resizing. `\"fit\"` is only supported for single and\n        layered views that don't use `rangeStep`.  Default value: `pad`\n    background : string\n        CSS color property to use as the background of visualization.\n\n        **Default value:** none (transparent)\n    config : Config\n        Vega-Lite configuration object.  This property can only be defined at the top-level\n        of a specification.\n    description : string\n        Description of this mark for commenting purpose.\n    height : float\n        The height of a visualization.\n    name : string\n        Name of the visualization for later reference.\n    padding : Padding\n        The default visualization padding, in pixels, from the edge of the visualization\n        canvas to the data rectangle.  If a number, specifies padding for all sides. If an\n        object, the value should have the format `{\"left\": 5, \"top\": 5, \"right\": 5,\n        \"bottom\": 5}` to specify padding for each side of the visualization.  Default\n        value: `5`\n    projection : Projection\n        An object defining properties of geographic projection.  Works with `\"geoshape\"`\n        marks and `\"point\"` or `\"line\"` marks that have a channel (one or more of `\"X\"`,\n        `\"X2\"`, `\"Y\"`, `\"Y2\"`) with type `\"latitude\"`, or `\"longitude\"`.\n    selection : Mapping(required=[])\n        A key-value mapping between selection names and definitions.\n    title : anyOf(string, TitleParams)\n        Title for the plot.\n    transform : List(Transform)\n        An array of data transformations such as filter and new field calculation.\n    width : float\n        The width of a visualization.\n    \"\"\"\n\n    def __init__(\n        self,\n        data: Optional[ChartDataType] = Undefined,\n        encoding: Optional[FacetedEncoding] = Undefined,\n        mark: Optional[AnyMark | Mark_T | CompositeMark_T] = Undefined,\n        width: Optional[\n            float | dict[str, Any] | Step | Literal[\"container\"]\n        ] = Undefined,\n        height: Optional[\n            float | dict[str, Any] | Step | Literal[\"container\"]\n        ] = Undefined,\n        **kwargs: Any,\n    ) -> None:\n        super().__init__(\n            data=data,\n            encoding=encoding,\n            mark=mark,\n            width=width,\n            height=height,\n            **kwargs,\n        )\n\n    def _compute_hash(self) -> str:\n        \"\"\"Compute a deterministic hash of the chart specification.\"\"\"\n        # Get data name if available, otherwise use data object\n        data = getattr(self, \"data\", None)\n        if data is not None and hasattr(data, \"name\") and data.name is not None:\n            data_for_hash = data.name\n        else:\n            data_for_hash = data\n\n        # Use basic chart attributes for hash computation.\n        hash_data = {\n            \"class\": self.__class__.__name__,\n            \"mark\": getattr(self, \"mark\", None),\n            \"encoding\": getattr(self, \"encoding\", None),\n            \"data\": data_for_hash,\n            \"transform\": getattr(self, \"transform\", None),\n        }\n        hash_json = json.dumps(hash_data, sort_keys=True, default=str)\n        hsh = hashlib.sha256(hash_json.encode()).hexdigest()[:16]\n        return f\"view_{hsh}\"\n\n    def _get_view_hash_name(self) -> str:\n        \"\"\"Get a deterministic name based on the chart specification hash.\"\"\"\n        return self._compute_hash()\n\n    @classmethod\n    def from_dict(\n        cls: type[_TSchemaBase], dct: dict[str, Any], validate: bool = True\n    ) -> _TSchemaBase:\n        \"\"\"\n        Construct a ``Chart`` from a dictionary representation.\n\n        Parameters\n        ----------\n        dct : dictionary\n            The dict from which to construct the ``Chart``.\n        validate : boolean\n            If True (default), then validate the input against the schema.\n\n        Raises\n        ------\n        jsonschema.ValidationError :\n            If ``validate`` and ``dct`` does not conform to the schema\n        \"\"\"\n        _tp: Any\n        for tp in TopLevelMixin.__subclasses__():\n            _tp = super() if tp is Chart else tp\n            try:\n                return _tp.from_dict(dct, validate=validate)\n            except jsonschema.ValidationError:\n                pass\n\n        # As a last resort, try using the Root vegalite object\n        return t.cast(\"_TSchemaBase\", core.Root.from_dict(dct, validate))\n\n    def to_dict(\n        self,\n        validate: bool = True,\n        *,\n        format: Literal[\"vega-lite\", \"vega\"] = \"vega-lite\",\n        ignore: list[str] | None = None,\n        context: dict[str, Any] | None = None,\n    ) -> dict[str, Any]:\n        \"\"\"\n        Convert the ``Chart`` to a dictionary suitable for JSON export.\n\n        Parameters\n        ----------\n        validate : bool, optional\n            If True (default), then validate the result against the schema.\n        format : {\"vega-lite\", \"vega\"}, optional\n            The chart specification format.\n            The `\"vega\"` format relies on the active Vega-Lite compiler plugin, which\n            by default requires the vl-convert-python package.\n        ignore : list[str], optional\n            A list of keys to ignore.\n        context : dict[str, Any], optional\n            A context dictionary.\n\n        Raises\n        ------\n        SchemaValidationError :\n            If ``validate`` and the result does not conform to the schema.\n\n        Notes\n        -----\n        - ``ignore``, ``context`` are usually not needed to be specified as a user.\n        - *Technical*: ``ignore`` will **not** be passed to child :meth:`.to_dict()`.\n        \"\"\"\n        context = context or {}\n        kwds: Map = {\n            \"validate\": validate,\n            \"format\": format,\n            \"ignore\": ignore,\n            \"context\": context,\n        }\n        if self.data is Undefined and \"data\" not in context:\n            # No data specified here or in parent: inject empty data\n            # for easier specification of datum encodings.\n            copy = self.copy(deep=False)\n            copy.data = core.InlineData(values=[{}])\n            return super(Chart, copy).to_dict(**kwds)\n        return super().to_dict(**kwds)\n\n    def transformed_data(\n        self, row_limit: int | None = None, exclude: Iterable[str] | None = None\n    ) -> DataFrameLike | None:\n        \"\"\"\n        Evaluate a Chart's transforms.\n\n        Evaluate the data transforms associated with a Chart and return the\n        transformed data a DataFrame\n\n        Parameters\n        ----------\n        row_limit : int (optional)\n            Maximum number of rows to return for each DataFrame. None (default) for unlimited\n        exclude : iterable of str\n            Set of the names of charts to exclude\n\n        Returns\n        -------\n        DataFrame\n            Transformed data as a DataFrame\n        \"\"\"\n        from altair.utils._transformed_data import transformed_data\n\n        return transformed_data(self, row_limit=row_limit, exclude=exclude)\n\n    def add_params(self, *params: Parameter) -> Self:\n        \"\"\"Add one or more parameters to the chart.\"\"\"\n        if not params:\n            return self\n        copy = self.copy(deep=[\"params\"])\n        if copy.params is Undefined:\n            copy.params = []\n\n        # Track existing parameter names\n        existing_names = {param.name for param in copy.params}\n\n        for param in params:\n            if param.name in existing_names:\n                if param._name_is_hashed:\n                    continue  # deduplicate hash-based\n                else:\n                    # If we see a duplicate explicit name, raise\n                    msg = f\"Duplicate explicit parameter name: {param.name}\"\n                    raise ValueError(msg)\n            copy.params.append(param.param)\n            existing_names.add(param.name)\n        return copy\n\n    @utils.deprecated(version=\"5.0.0\", alternative=\"add_params\")\n    def add_selection(self, *params) -> Self:  # noqa: ANN002\n        \"\"\"'add_selection' is deprecated. Use 'add_params' instead.\"\"\"\n        return self.add_params(*params)\n\n    def interactive(\n        self, name: str | None = None, bind_x: bool = True, bind_y: bool = True\n    ) -> Self:\n        \"\"\"\n        Make chart axes scales interactive.\n\n        Parameters\n        ----------\n        name : string\n            The parameter name to use for the axes scales. This name should be\n            unique among all parameters within the chart.\n        bind_x : boolean, default True\n            If true, then bind the interactive scales to the x-axis\n        bind_y : boolean, default True\n            If true, then bind the interactive scales to the y-axis\n\n        Returns\n        -------\n        chart :\n            copy of self, with interactive axes added\n\n        \"\"\"\n        encodings: list[SingleDefUnitChannel_T] = []\n        if bind_x:\n            encodings.append(\"x\")\n        if bind_y:\n            encodings.append(\"y\")\n        return self.add_params(\n            selection_interval(name=name, bind=\"scales\", encodings=encodings)\n        )\n\n\ndef _check_if_valid_subspec(\n    spec: ConcatType | LayerType,\n    classname: Literal[\n        \"ConcatChart\",\n        \"FacetChart\",\n        \"HConcatChart\",\n        \"LayerChart\",\n        \"RepeatChart\",\n        \"VConcatChart\",\n    ],\n) -> None:\n    \"\"\"Raise a `TypeError` if `spec` is not a valid sub-spec.\"\"\"\n    if not isinstance(spec, SchemaBase):\n        msg = f\"Only chart objects can be used in {classname}.\"\n        raise TypeError(msg)\n    for attr in TOPLEVEL_ONLY_KEYS:\n        if spec._get(attr) is not Undefined:\n            msg = (\n                f\"Objects with {attr!r} attribute cannot be used within {classname}. \"\n                f\"Consider defining the {attr} attribute in the {classname} object instead.\"\n            )\n            raise TypeError(msg)\n\n\ndef _check_if_can_be_layered(spec: LayerType) -> None:\n    \"\"\"Raise a `TypeError` if `spec` cannot be layered.\"\"\"\n\n    def _get_any(spec: LayerType, *attrs: str) -> bool:\n        return any(spec._get(attr) is not Undefined for attr in attrs)\n\n    base_msg = \"charts cannot be layered. Instead, layer the charts before\"\n\n    encoding: Any = spec._get(\"encoding\")\n    if not utils.is_undefined(encoding):\n        for channel in [\"row\", \"column\", \"facet\"]:\n            if encoding._get(channel) is not Undefined:\n                msg = f\"Faceted {base_msg} faceting.\"\n                raise TypeError(msg)\n    if isinstance(spec, (Chart, LayerChart)):\n        return\n    elif is_chart_type(spec) or _get_any(\n        spec, \"facet\", \"repeat\", \"concat\", \"hconcat\", \"vconcat\"\n    ):\n        if isinstance(spec, FacetChart) or spec._get(\"facet\") is not Undefined:\n            msg = f\"Faceted {base_msg} faceting.\"\n        elif isinstance(spec, RepeatChart) or spec._get(\"repeat\") is not Undefined:\n            msg = f\"Repeat {base_msg} repeating.\"\n        elif isinstance(spec, (ConcatChart, HConcatChart, VConcatChart)) or _get_any(\n            spec, \"concat\", \"hconcat\", \"vconcat\"\n        ):\n            msg = f\"Concatenated {base_msg} concatenating.\"\n        else:\n            msg = \"Should be unreachable\"\n            raise NotImplementedError(msg)\n        raise TypeError(msg)\n\n\nclass RepeatChart(TopLevelMixin, core.TopLevelRepeatSpec):\n    \"\"\"A chart repeated across rows and columns with small changes.\"\"\"\n\n    def __init__(\n        self,\n        repeat: Optional[list[str] | LayerRepeatMapping | RepeatMapping] = Undefined,\n        spec: Optional[ChartType] = Undefined,\n        align: Optional[dict[str, Any] | SchemaBase | LayoutAlign_T] = Undefined,\n        autosize: Optional[dict[str, Any] | SchemaBase | AutosizeType_T] = Undefined,\n        background: Optional[\n            str | dict[str, Any] | Parameter | SchemaBase | ColorName_T\n        ] = Undefined,\n        bounds: Optional[Literal[\"full\", \"flush\"]] = Undefined,\n        center: Optional[bool | dict[str, Any] | SchemaBase] = Undefined,\n        columns: Optional[int] = Undefined,\n        config: Optional[dict[str, Any] | SchemaBase] = Undefined,\n        data: Optional[ChartDataType] = Undefined,\n        datasets: Optional[dict[str, Any] | SchemaBase] = Undefined,\n        description: Optional[str] = Undefined,\n        name: Optional[str] = Undefined,\n        padding: Optional[dict[str, Any] | float | Parameter | SchemaBase] = Undefined,\n        params: Optional[Sequence[_Parameter]] = Undefined,\n        resolve: Optional[dict[str, Any] | SchemaBase] = Undefined,\n        spacing: Optional[dict[str, Any] | float | SchemaBase] = Undefined,\n        title: Optional[str | dict[str, Any] | SchemaBase | Sequence[str]] = Undefined,\n        transform: Optional[Sequence[dict[str, Any] | SchemaBase]] = Undefined,\n        usermeta: Optional[dict[str, Any] | SchemaBase] = Undefined,\n        **kwds: Any,\n    ) -> None:\n        tp_name = type(self).__name__\n        if utils.is_undefined(spec):\n            msg = f\"{tp_name!r} requires a `spec`, but got: {spec!r}\"\n            raise TypeError(msg)\n        _check_if_valid_subspec(spec, \"RepeatChart\")\n        _spec_as_list = [spec]\n        params, _spec_as_list = _combine_subchart_params(params, _spec_as_list)\n        spec = _spec_as_list[0]\n        if isinstance(spec, (Chart, LayerChart)):\n            if utils.is_undefined(repeat):\n                msg = f\"{tp_name!r} requires a `repeat`, but got: {repeat!r}\"\n                raise TypeError(msg)\n            params = _repeat_names(params, repeat, spec)\n        super().__init__(\n            repeat=repeat,\n            spec=spec,\n            align=align,\n            autosize=autosize,\n            background=background,\n            bounds=bounds,\n            center=center,\n            columns=columns,\n            config=config,\n            data=data,\n            datasets=datasets,\n            description=description,\n            name=name,\n            padding=padding,\n            params=params,\n            resolve=resolve,\n            spacing=spacing,\n            title=title,\n            transform=transform,\n            usermeta=usermeta,\n            **kwds,\n        )\n\n    def transformed_data(\n        self, row_limit: int | None = None, exclude: Iterable[str] | None = None\n    ) -> DataFrameLike | None:\n        \"\"\"\n        Evaluate a RepeatChart's transforms.\n\n        Evaluate the data transforms associated with a RepeatChart and return the\n        transformed data a DataFrame\n\n        Parameters\n        ----------\n        row_limit : int (optional)\n            Maximum number of rows to return for each DataFrame. None (default) for unlimited\n        exclude : iterable of str\n            Set of the names of charts to exclude\n\n        Raises\n        ------\n        NotImplementedError\n            RepeatChart does not yet support transformed_data\n        \"\"\"\n        msg = \"transformed_data is not yet implemented for RepeatChart\"\n        raise NotImplementedError(msg)\n\n    def interactive(\n        self, name: str | None = None, bind_x: bool = True, bind_y: bool = True\n    ) -> Self:\n        \"\"\"\n        Make chart axes scales interactive.\n\n        Parameters\n        ----------\n        name : string\n            The parameter name to use for the axes scales. This name should be\n            unique among all parameters within the chart.\n        bind_x : boolean, default True\n            If true, then bind the interactive scales to the x-axis\n        bind_y : boolean, default True\n            If true, then bind the interactive scales to the y-axis\n\n        Returns\n        -------\n        chart :\n            copy of self, with interactive axes added\n\n        \"\"\"\n        copy = self.copy(deep=False)\n        copy.spec = copy.spec.interactive(name=name, bind_x=bind_x, bind_y=bind_y)\n        return copy\n\n    def add_params(self, *params: Parameter) -> Self:\n        \"\"\"Add one or more parameters to the chart.\"\"\"\n        if not params or self.spec is Undefined:\n            return self\n        copy = self.copy()\n        copy.spec = copy.spec.add_params(*params)\n        return copy.copy()\n\n    @utils.deprecated(version=\"5.0.0\", alternative=\"add_params\")\n    def add_selection(self, *selections) -> Self:  # noqa: ANN002\n        \"\"\"'add_selection' is deprecated. Use 'add_params' instead.\"\"\"\n        return self.add_params(*selections)\n\n\ndef repeat(\n    repeater: Literal[\"row\", \"column\", \"repeat\", \"layer\"] = \"repeat\",\n) -> RepeatRef:\n    \"\"\"\n    Tie a channel to the row or column within a repeated chart.\n\n    The output of this should be passed to the ``field`` attribute of\n    a channel.\n\n    Parameters\n    ----------\n    repeater : {'row'|'column'|'repeat'|'layer'}\n        The repeater to tie the field to. Default is 'repeat'.\n\n    Returns\n    -------\n    repeat : RepeatRef object\n    \"\"\"\n    if repeater not in {\"row\", \"column\", \"repeat\", \"layer\"}:\n        msg = \"repeater must be one of ['row', 'column', 'repeat', 'layer']\"\n        raise ValueError(msg)\n    return core.RepeatRef(repeat=repeater)\n\n\nclass ConcatChart(TopLevelMixin, core.TopLevelConcatSpec):\n    \"\"\"A chart with horizontally-concatenated facets.\"\"\"\n\n    @utils.use_signature(core.TopLevelConcatSpec)\n    def __init__(\n        self,\n        data: Optional[ChartDataType] = Undefined,\n        concat: Sequence[ConcatType] = (),\n        columns: Optional[float] = Undefined,\n        **kwargs: Any,\n    ) -> None:\n        for spec in concat:\n            _check_if_valid_subspec(spec, \"ConcatChart\")\n        super().__init__(data=data, concat=list(concat), columns=columns, **kwargs)\n        self.concat: list[ChartType]\n        self.params: Optional[Sequence[_Parameter]]\n        self.data: Optional[ChartDataType]\n        self.data, self.concat = _combine_subchart_data(self.data, self.concat)\n        self.params, self.concat = _combine_subchart_params(self.params, self.concat)\n\n    def __ior__(self, other: ChartType) -> Self:\n        _check_if_valid_subspec(other, \"ConcatChart\")\n        self.concat.append(other)\n        self.data, self.concat = _combine_subchart_data(self.data, self.concat)\n        self.params, self.concat = _combine_subchart_params(self.params, self.concat)\n        return self\n\n    def __or__(self, other: ChartType) -> Self:\n        copy = self.copy(deep=[\"concat\"])\n        copy |= other\n        return copy\n\n    def transformed_data(\n        self, row_limit: int | None = None, exclude: Iterable[str] | None = None\n    ) -> list[DataFrameLike]:\n        \"\"\"\n        Evaluate a ConcatChart's transforms.\n\n        Evaluate the data transforms associated with a ConcatChart and return the\n        transformed data for each subplot as a list of DataFrames.\n\n        Parameters\n        ----------\n        row_limit : int (optional)\n            Maximum number of rows to return for each DataFrame. None (default) for unlimited\n        exclude : iterable of str\n            Set of the names of charts to exclude\n\n        Returns\n        -------\n        list of DataFrame\n            Transformed data for each subplot as a list of DataFrames\n        \"\"\"\n        from altair.utils._transformed_data import transformed_data\n\n        return transformed_data(self, row_limit=row_limit, exclude=exclude)\n\n    def interactive(\n        self, name: str | None = None, bind_x: bool = True, bind_y: bool = True\n    ) -> Self:\n        \"\"\"\n        Make chart axes scales interactive.\n\n        Parameters\n        ----------\n        name : string\n            The parameter name to use for the axes scales. This name should be\n            unique among all parameters within the chart.\n        bind_x : boolean, default True\n            If true, then bind the interactive scales to the x-axis\n        bind_y : boolean, default True\n            If true, then bind the interactive scales to the y-axis\n\n        Returns\n        -------\n        chart :\n            copy of self, with interactive axes added\n\n        \"\"\"\n        encodings: list[SingleDefUnitChannel_T] = []\n        if bind_x:\n            encodings.append(\"x\")\n        if bind_y:\n            encodings.append(\"y\")\n        return self.add_params(selection_interval(bind=\"scales\", encodings=encodings))\n\n    def add_params(self, *params: Parameter) -> Self:\n        \"\"\"Add one or more parameters to the chart.\"\"\"\n        if not params or not self.concat:\n            return self\n        copy = self.copy()\n        copy.concat = [chart.add_params(*params) for chart in copy.concat]\n        return copy\n\n    @utils.deprecated(version=\"5.0.0\", alternative=\"add_params\")\n    def add_selection(self, *selections) -> Self:  # noqa: ANN002\n        \"\"\"'add_selection' is deprecated. Use 'add_params' instead.\"\"\"\n        return self.add_params(*selections)\n\n\ndef concat(*charts: ConcatType, **kwargs: Any) -> ConcatChart:\n    \"\"\"Concatenate charts horizontally.\"\"\"\n    return ConcatChart(concat=charts, **kwargs)\n\n\nclass HConcatChart(TopLevelMixin, core.TopLevelHConcatSpec):\n    \"\"\"A chart with horizontally-concatenated facets.\"\"\"\n\n    @utils.use_signature(core.TopLevelHConcatSpec)\n    def __init__(\n        self,\n        data: Optional[ChartDataType] = Undefined,\n        hconcat: Sequence[ConcatType] = (),\n        **kwargs: Any,\n    ) -> None:\n        for spec in hconcat:\n            _check_if_valid_subspec(spec, \"HConcatChart\")\n        super().__init__(data=data, hconcat=list(hconcat), **kwargs)\n        self.hconcat: list[ChartType]\n        self.params: Optional[Sequence[_Parameter]]\n        self.data: Optional[ChartDataType]\n        self.data, self.hconcat = _combine_subchart_data(self.data, self.hconcat)\n        self.params, self.hconcat = _combine_subchart_params(self.params, self.hconcat)\n\n    def __ior__(self, other: ChartType) -> Self:\n        _check_if_valid_subspec(other, \"HConcatChart\")\n        self.hconcat.append(other)\n        self.data, self.hconcat = _combine_subchart_data(self.data, self.hconcat)\n        self.params, self.hconcat = _combine_subchart_params(self.params, self.hconcat)\n        return self\n\n    def __or__(self, other: ChartType) -> Self:\n        copy = self.copy(deep=[\"hconcat\"])\n        copy |= other\n        return copy\n\n    def transformed_data(\n        self, row_limit: int | None = None, exclude: Iterable[str] | None = None\n    ) -> list[DataFrameLike]:\n        \"\"\"\n        Evaluate an HConcatChart's transforms.\n\n        Evaluate the data transforms associated with an HConcatChart and return the\n        transformed data for each subplot as a list of DataFrames.\n\n        Parameters\n        ----------\n        row_limit : int (optional)\n            Maximum number of rows to return for each DataFrame. None (default) for unlimited\n        exclude : iterable of str\n            Set of the names of charts to exclude\n\n        Returns\n        -------\n        list of DataFrame\n            Transformed data for each subplot as a list of DataFrames\n        \"\"\"\n        from altair.utils._transformed_data import transformed_data\n\n        return transformed_data(self, row_limit=row_limit, exclude=exclude)\n\n    def interactive(\n        self, name: str | None = None, bind_x: bool = True, bind_y: bool = True\n    ) -> Self:\n        \"\"\"\n        Make chart axes scales interactive.\n\n        Parameters\n        ----------\n        name : string\n            The parameter name to use for the axes scales. This name should be\n            unique among all parameters within the chart.\n        bind_x : boolean, default True\n            If true, then bind the interactive scales to the x-axis\n        bind_y : boolean, default True\n            If true, then bind the interactive scales to the y-axis\n\n        Returns\n        -------\n        chart :\n            copy of self, with interactive axes added\n\n        \"\"\"\n        encodings: list[SingleDefUnitChannel_T] = []\n        if bind_x:\n            encodings.append(\"x\")\n        if bind_y:\n            encodings.append(\"y\")\n        return self.add_params(selection_interval(bind=\"scales\", encodings=encodings))\n\n    def add_params(self, *params: Parameter) -> Self:\n        \"\"\"Add one or more parameters to the chart.\"\"\"\n        if not params or not self.hconcat:\n            return self\n        copy = self.copy()\n        copy.hconcat = [chart.add_params(*params) for chart in copy.hconcat]\n        return copy\n\n    @utils.deprecated(version=\"5.0.0\", alternative=\"add_params\")\n    def add_selection(self, *selections) -> Self:  # noqa: ANN002\n        \"\"\"'add_selection' is deprecated. Use 'add_params' instead.\"\"\"\n        return self.add_params(*selections)\n\n\ndef hconcat(*charts: ConcatType, **kwargs: Any) -> HConcatChart:\n    \"\"\"Concatenate charts horizontally.\"\"\"\n    return HConcatChart(hconcat=charts, **kwargs)\n\n\nclass VConcatChart(TopLevelMixin, core.TopLevelVConcatSpec):\n    \"\"\"A chart with vertically-concatenated facets.\"\"\"\n\n    @utils.use_signature(core.TopLevelVConcatSpec)\n    def __init__(\n        self,\n        data: Optional[ChartDataType] = Undefined,\n        vconcat: Sequence[ConcatType] = (),\n        **kwargs: Any,\n    ) -> None:\n        for spec in vconcat:\n            _check_if_valid_subspec(spec, \"VConcatChart\")\n        super().__init__(data=data, vconcat=list(vconcat), **kwargs)\n        self.vconcat: list[ChartType]\n        self.params: Optional[Sequence[_Parameter]]\n        self.data: Optional[ChartDataType]\n        self.data, self.vconcat = _combine_subchart_data(self.data, self.vconcat)\n        self.params, self.vconcat = _combine_subchart_params(self.params, self.vconcat)\n\n    def __iand__(self, other: ChartType) -> Self:\n        _check_if_valid_subspec(other, \"VConcatChart\")\n        self.vconcat.append(other)\n        self.data, self.vconcat = _combine_subchart_data(self.data, self.vconcat)\n        self.params, self.vconcat = _combine_subchart_params(self.params, self.vconcat)\n        return self\n\n    def __and__(self, other: ChartType) -> Self:\n        copy = self.copy(deep=[\"vconcat\"])\n        copy &= other\n        return copy\n\n    def transformed_data(\n        self,\n        row_limit: int | None = None,\n        exclude: Iterable[str] | None = None,\n    ) -> list[DataFrameLike]:\n        \"\"\"\n        Evaluate a VConcatChart's transforms.\n\n        Evaluate the data transforms associated with a VConcatChart and return the\n        transformed data for each subplot as a list of DataFrames\n\n        Parameters\n        ----------\n        row_limit : int (optional)\n            Maximum number of rows to return for each DataFrame. None (default) for unlimited\n        exclude : iterable of str\n            Set of the names of charts to exclude\n\n        Returns\n        -------\n        list of DataFrame\n            Transformed data for each subplot as a list of DataFrames\n        \"\"\"\n        from altair.utils._transformed_data import transformed_data\n\n        return transformed_data(self, row_limit=row_limit, exclude=exclude)\n\n    def interactive(\n        self, name: str | None = None, bind_x: bool = True, bind_y: bool = True\n    ) -> Self:\n        \"\"\"\n        Make chart axes scales interactive.\n\n        Parameters\n        ----------\n        name : string\n            The parameter name to use for the axes scales. This name should be\n            unique among all parameters within the chart.\n        bind_x : boolean, default True\n            If true, then bind the interactive scales to the x-axis\n        bind_y : boolean, default True\n            If true, then bind the interactive scales to the y-axis\n\n        Returns\n        -------\n        chart :\n            copy of self, with interactive axes added\n\n        \"\"\"\n        encodings: list[SingleDefUnitChannel_T] = []\n        if bind_x:\n            encodings.append(\"x\")\n        if bind_y:\n            encodings.append(\"y\")\n        return self.add_params(selection_interval(bind=\"scales\", encodings=encodings))\n\n    def add_params(self, *params: Parameter) -> Self:\n        \"\"\"Add one or more parameters to the chart.\"\"\"\n        if not params or not self.vconcat:\n            return self\n        copy = self.copy()\n        copy.vconcat = [chart.add_params(*params) for chart in copy.vconcat]\n        return copy\n\n    @utils.deprecated(version=\"5.0.0\", alternative=\"add_params\")\n    def add_selection(self, *selections) -> Self:  # noqa: ANN002\n        \"\"\"'add_selection' is deprecated. Use 'add_params' instead.\"\"\"\n        return self.add_params(*selections)\n\n\ndef vconcat(*charts: ConcatType, **kwargs: Any) -> VConcatChart:\n    \"\"\"Concatenate charts vertically.\"\"\"\n    return VConcatChart(vconcat=charts, **kwargs)\n\n\nclass LayerChart(TopLevelMixin, _EncodingMixin, core.TopLevelLayerSpec):\n    \"\"\"A Chart with layers within a single panel.\"\"\"\n\n    @utils.use_signature(core.TopLevelLayerSpec)\n    def __init__(\n        self,\n        data: Optional[ChartDataType] = Undefined,\n        layer: Sequence[LayerType] = (),\n        **kwargs: Any,\n    ) -> None:\n        # TODO: check for conflicting interaction\n        for spec in layer:\n            _check_if_valid_subspec(spec, \"LayerChart\")\n            _check_if_can_be_layered(spec)\n        super().__init__(data=data, layer=list(layer), **kwargs)\n        self.layer: list[ChartType]\n        self.params: Optional[Sequence[_Parameter]]\n        self.data: Optional[ChartDataType]\n        self.data, self.layer = _combine_subchart_data(self.data, self.layer)\n        # Currently (Vega-Lite 5.5) the same param can't occur on two layers\n        self.layer = _remove_duplicate_params(self.layer)\n        self.params, self.layer = _combine_subchart_params(self.params, self.layer)\n\n        # Some properties are not allowed within layer; we'll move to parent.\n        layer_props = (\"height\", \"width\", \"view\")\n        combined_dict, self.layer = _remove_layer_props(self, self.layer, layer_props)\n\n        for prop in combined_dict:\n            self[prop] = combined_dict[prop]\n\n    def transformed_data(\n        self,\n        row_limit: int | None = None,\n        exclude: Iterable[str] | None = None,\n    ) -> list[DataFrameLike]:\n        \"\"\"\n        Evaluate a LayerChart's transforms.\n\n        Evaluate the data transforms associated with a LayerChart and return the\n        transformed data for each layer as a list of DataFrames\n\n        Parameters\n        ----------\n        row_limit : int (optional)\n            Maximum number of rows to return for each DataFrame. None (default) for unlimited\n        exclude : iterable of str\n            Set of the names of charts to exclude\n\n        Returns\n        -------\n        list of DataFrame\n            Transformed data for each layer as a list of DataFrames\n        \"\"\"\n        from altair.utils._transformed_data import transformed_data\n\n        return transformed_data(self, row_limit=row_limit, exclude=exclude)\n\n    def __iadd__(self, other: ChartType) -> Self:\n        _check_if_valid_subspec(other, \"LayerChart\")\n        _check_if_can_be_layered(other)\n        self.layer.append(other)\n        self.data, self.layer = _combine_subchart_data(self.data, self.layer)\n        self.params, self.layer = _combine_subchart_params(self.params, self.layer)\n        return self\n\n    def __add__(self, other: ChartType) -> Self:\n        copy = self.copy(deep=[\"layer\"])\n        copy += other\n        return copy\n\n    def add_layers(self, *layers: LayerChart | Chart) -> Self:\n        copy = self.copy(deep=[\"layer\"])\n        for layer in layers:\n            copy += layer\n        return copy\n\n    def interactive(\n        self, name: str | None = None, bind_x: bool = True, bind_y: bool = True\n    ) -> Self:\n        \"\"\"\n        Make chart axes scales interactive.\n\n        Parameters\n        ----------\n        name : string\n            The parameter name to use for the axes scales. This name should be\n            unique among all parameters within the chart.\n        bind_x : boolean, default True\n            If true, then bind the interactive scales to the x-axis\n        bind_y : boolean, default True\n            If true, then bind the interactive scales to the y-axis\n\n        Returns\n        -------\n        chart :\n            copy of self, with interactive axes added\n\n        \"\"\"\n        if not self.layer:\n            msg = \"LayerChart: cannot call interactive() until a layer is defined\"\n            raise ValueError(msg)\n        copy = self.copy(deep=[\"layer\"])\n        copy.layer[0] = copy.layer[0].interactive(\n            name=name, bind_x=bind_x, bind_y=bind_y\n        )\n        return copy\n\n    def add_params(self, *params: Parameter) -> Self:\n        \"\"\"Add one or more parameters to the chart.\"\"\"\n        if not params or not self.layer:\n            return self\n        copy = self.copy()\n        copy.layer[0] = copy.layer[0].add_params(*params)\n        return copy.copy()\n\n    @utils.deprecated(version=\"5.0.0\", alternative=\"add_params\")\n    def add_selection(self, *selections) -> Self:  # noqa: ANN002\n        \"\"\"'add_selection' is deprecated. Use 'add_params' instead.\"\"\"\n        return self.add_params(*selections)\n\n\n_FACET_CHANNELS = (\"row\", \"column\", \"facet\")\n\n\ndef _get_facet_spec(chart: LayerType) -> dict[str, Any]:\n    \"\"\"Return the facet-related encoding channels from a chart as a plain dict.\"\"\"\n    encoding = chart._get(\"encoding\")\n    if utils.is_undefined(encoding):\n        return {}\n    d: dict[str, Any] = {}\n    for ch in _FACET_CHANNELS:\n        val = encoding._get(ch)\n        if val is not Undefined:\n            d[ch] = val\n    return d\n\n\ndef _hoist_facet_encodings(\n    subcharts: Sequence[LayerType],\n) -> tuple[list[LayerType], dict[str, Any]]:\n    \"\"\"\n    Extract common facet encodings from layers if all layers share them.\n\n    If all subcharts have identical facet-related encodings (``row``, ``column``,\n    ``facet``), strips those channels from each subchart's encoding and returns\n    the cleaned subcharts together with the common facet encoding dict.  Returns\n    ``(list(subcharts), {})`` when there is nothing to hoist (no facet encodings,\n    or the specs differ across layers).\n    \"\"\"\n    per_chart = [_get_facet_spec(c) for c in subcharts]\n\n    # Nothing to hoist if no chart has any facet encoding.\n    if all(not d for d in per_chart):\n        return list(subcharts), {}\n\n    # Use to_dict() for robust equality comparison of SchemaBase objects.\n    def _serialize(d: dict[str, Any]) -> dict[str, Any]:\n        return {k: v.to_dict() if hasattr(v, \"to_dict\") else v for k, v in d.items()}\n\n    first_cmp = _serialize(per_chart[0])\n    if not all(_serialize(d) == first_cmp for d in per_chart[1:]):\n        # Facet specs differ across layers; cannot hoist — fall through to error.\n        return list(subcharts), {}\n\n    # All layers share the same facet spec — strip those channels from each layer.\n    # Use copy(deep=[\"encoding\"]) so the original charts are not mutated and so\n    # that the data identity (needed by _combine_subchart_data) is preserved.\n    cleaned: list[Any] = []\n    for chart in subcharts:\n        chart = chart.copy(deep=[\"encoding\"])\n        encoding = chart._get(\"encoding\")\n        if not utils.is_undefined(encoding):\n            for ch in _FACET_CHANNELS:\n                encoding[ch] = Undefined\n        cleaned.append(chart)\n\n    return cleaned, per_chart[0]\n\n\ndef layer(*charts: LayerType, **kwargs: Any) -> LayerChart | FacetChart:\n    \"\"\"\n    Layer multiple charts.\n\n    When all charts share identical facet encodings (``row``, ``column``, or\n    ``facet`` channels), those encodings are automatically hoisted and the\n    result is a :class:`FacetChart` equivalent to calling\n    ``.facet(row=..., column=...)`` after layering.\n    \"\"\"\n    cleaned_charts, facet_kwargs = _hoist_facet_encodings(charts)\n    result = LayerChart(layer=cleaned_charts, **kwargs)\n    if facet_kwargs:\n        return result.facet(**facet_kwargs)\n    return result\n\n\nclass FacetChart(TopLevelMixin, core.TopLevelFacetSpec):\n    \"\"\"A Chart with layers within a single panel.\"\"\"\n\n    @utils.use_signature(core.TopLevelFacetSpec)\n    def __init__(\n        self,\n        data: Optional[ChartDataType] = Undefined,\n        spec: Optional[ChartType] = Undefined,\n        facet: Optional[dict[str, Any] | SchemaBase] = Undefined,\n        params: Optional[Sequence[_Parameter]] = Undefined,\n        **kwargs: Any,\n    ) -> None:\n        if utils.is_undefined(spec):\n            msg = f\"{type(self).__name__!r} requires a `spec`, but got: {spec!r}\"\n            raise TypeError(msg)\n        _check_if_valid_subspec(spec, \"FacetChart\")\n        _spec_as_list = [spec]\n        params, _spec_as_list = _combine_subchart_params(params, _spec_as_list)\n        spec = _spec_as_list[0]\n        super().__init__(data=data, spec=spec, facet=facet, params=params, **kwargs)\n        self.data: Optional[ChartDataType]\n        self.spec: ChartType\n        self.params: Optional[Sequence[_Parameter]]\n\n    def transformed_data(\n        self, row_limit: int | None = None, exclude: Iterable[str] | None = None\n    ) -> DataFrameLike | None:\n        \"\"\"\n        Evaluate a FacetChart's transforms.\n\n        Evaluate the data transforms associated with a FacetChart and return the\n        transformed data a DataFrame\n\n        Parameters\n        ----------\n        row_limit : int (optional)\n            Maximum number of rows to return for each DataFrame. None (default) for unlimited\n        exclude : iterable of str\n            Set of the names of charts to exclude\n\n        Returns\n        -------\n        DataFrame\n            Transformed data as a DataFrame\n        \"\"\"\n        from altair.utils._transformed_data import transformed_data\n\n        return transformed_data(self, row_limit=row_limit, exclude=exclude)\n\n    def interactive(\n        self, name: str | None = None, bind_x: bool = True, bind_y: bool = True\n    ) -> Self:\n        \"\"\"\n        Make chart axes scales interactive.\n\n        Parameters\n        ----------\n        name : string\n            The parameter name to use for the axes scales. This name should be\n            unique among all parameters within the chart.\n        bind_x : boolean, default True\n            If true, then bind the interactive scales to the x-axis\n        bind_y : boolean, default True\n            If true, then bind the interactive scales to the y-axis\n\n        Returns\n        -------\n        chart :\n            copy of self, with interactive axes added\n\n        \"\"\"\n        copy = self.copy(deep=False)\n        copy.spec = copy.spec.interactive(name=name, bind_x=bind_x, bind_y=bind_y)\n        return copy\n\n    def add_params(self, *params: Parameter) -> Self:\n        \"\"\"Add one or more parameters to the chart.\"\"\"\n        if not params or self.spec is Undefined:\n            return self\n        copy = self.copy()\n        copy.spec = copy.spec.add_params(*params)\n        return copy.copy()\n\n    @utils.deprecated(version=\"5.0.0\", alternative=\"add_params\")\n    def add_selection(self, *selections) -> Self:  # noqa: ANN002\n        \"\"\"'add_selection' is deprecated. Use 'add_params' instead.\"\"\"\n        return self.add_params(*selections)\n\n\ndef topo_feature(url: str, feature: str, **kwargs: Any) -> UrlData:\n    \"\"\"\n    A convenience function for extracting features from a topojson url.\n\n    Parameters\n    ----------\n    url : string\n        A URL from which to load the data set.\n\n    feature : string\n        The name of the TopoJSON object set to convert to a GeoJSON feature collection. For\n        example, in a map of the world, there may be an object set named `\"countries\"`.\n        Using the feature property, we can extract this set and generate a GeoJSON feature\n        object for each country.\n\n    **kwargs :\n        additional keywords passed to TopoDataFormat\n    \"\"\"\n    return core.UrlData(\n        url=url, format=core.TopoDataFormat(type=\"topojson\", feature=feature, **kwargs)\n    )\n\n\ndef _combine_subchart_data(\n    data: Optional[ChartDataType], subcharts: list[ChartType]\n) -> tuple[Optional[ChartDataType], list[ChartType]]:\n    def remove_data(subchart: _TSchemaBase) -> _TSchemaBase:\n        if subchart.data is not Undefined:\n            subchart = subchart.copy()\n            subchart.data = Undefined\n        return subchart\n\n    if not subcharts:\n        # No subcharts = nothing to do.\n        pass\n    elif data is Undefined:\n        # Top level has no data; all subchart data must\n        # be identical to proceed.\n        subdata = subcharts[0].data\n        if subdata is not Undefined and all(c.data is subdata for c in subcharts):\n            data = subdata\n            subcharts = [remove_data(c) for c in subcharts]\n    elif all(c.data is Undefined or c.data is data for c in subcharts):\n        # Top level has data; subchart data must be either\n        # undefined or identical to proceed.\n        subcharts = [remove_data(c) for c in subcharts]\n\n    return data, subcharts\n\n\n_Parameter: TypeAlias = (\n    core.VariableParameter | core.TopLevelSelectionParameter | core.SelectionParameter\n)\n\n\ndef _viewless_dict(param: _Parameter) -> dict[str, Any]:\n    d = param.to_dict()\n    d.pop(\"views\", None)\n    return d\n\n\ndef _needs_name(subchart: ChartType) -> bool:\n    # Only `Chart` objects need a name\n    if (subchart.name is not Undefined) or (not isinstance(subchart, Chart)):\n        return False\n\n    # Variable parameters won't receive a views property.\n    return not all(isinstance(p, core.VariableParameter) for p in subchart.params)\n\n\n# Convert SelectionParameters to TopLevelSelectionParameters with a views property.\ndef _prepare_to_lift(param: _Parameter) -> _Parameter:\n    param = param.copy()\n\n    if isinstance(param, core.VariableParameter):\n        return param\n\n    if isinstance(param, core.SelectionParameter):\n        return core.TopLevelSelectionParameter(**param.to_dict(), views=[])\n\n    if param.views is Undefined:\n        param.views = []\n\n    return param\n\n\ndef _remove_duplicate_params(layer: list[ChartType]) -> list[ChartType]:\n    subcharts = [subchart.copy() for subchart in layer]\n    found_params = []\n\n    for subchart in subcharts:\n        if (not hasattr(subchart, \"params\")) or (utils.is_undefined(subchart.params)):\n            continue\n\n        params: list[_Parameter] = []\n\n        # Ensure the same selection parameter doesn't appear twice\n        for param in subchart.params:\n            if isinstance(param, core.VariableParameter):\n                params.append(param)\n                continue\n\n            p = param.copy()\n            pd = _viewless_dict(p)\n\n            if pd not in found_params:\n                params.append(p)\n                found_params.append(pd)\n\n        if len(params) == 0:\n            subchart.params = Undefined\n        else:\n            subchart.params = params\n\n    return subcharts\n\n\ndef _view_base_for_chart(obj: Any) -> str:\n    \"\"\"Return a base view name for a chart/layer (for building position-based names).\"\"\"\n    name = obj.name\n    parts = name.rsplit(\"_\", 1)\n    if len(parts) == 2 and parts[1].isdigit():\n        return parts[0] or name\n    return name\n\n\ndef _view_name_for_param(subchart: ChartType, is_concat: bool) -> str:\n    \"\"\"View name for this subchart to add to a param's views.\"\"\"\n    if isinstance(subchart, Chart):\n        return subchart.name\n    if is_concat and isinstance(subchart, FacetChart):\n        spec = subchart.spec\n        if isinstance(spec, Chart):\n            return spec.name\n        if isinstance(spec, LayerChart) and spec.layer:\n            return spec.layer[0].name\n    return \"\"\n\n\ndef _combine_subchart_params(  # noqa: C901\n    params: Optional[Sequence[_Parameter]], subcharts: list[ChartType]\n) -> tuple[Optional[Sequence[_Parameter]], list[ChartType]]:\n    if utils.is_undefined(params):\n        params = []\n    # List of triples related to params, (param, dictionary minus views, views)\n    param_info: list[tuple[_Parameter, dict[str, Any], list[str]]] = []\n\n    # Put parameters already found into `param_info`. Copy each param's views so we can\n    # mutate the list in the MERGE branch and so no two entries share the same list.\n    for param in params:\n        p = _prepare_to_lift(param)\n        views = (\n            []\n            if isinstance(p, core.VariableParameter)\n            else list(p.views)\n            if p.views\n            else []\n        )\n        param_info.append((p, _viewless_dict(p), views))\n\n    subcharts = [subchart.copy() for subchart in subcharts]\n    is_concat = len(subcharts) > 1\n\n    for i, subchart in enumerate(subcharts):\n        if (not hasattr(subchart, \"params\")) or (utils.is_undefined(subchart.params)):\n            continue\n\n        if _needs_name(subchart):\n            # For concatenated charts, we need unique names even for identical charts\n            # Use the hash as a base but append the position to ensure uniqueness\n            base_name = subchart._get_view_hash_name()\n            subchart.name = f\"{base_name}_{i}\"\n\n        # In concat, FacetCharts get the same content-hash view name; disambiguate by position.\n        if is_concat and isinstance(subchart, FacetChart):\n            spec = subchart.spec\n            subchart.spec = spec.copy(deep=True)\n            spec = subchart.spec\n            if isinstance(spec, LayerChart) and spec.layer:\n                spec.layer[0].name = f\"{_view_base_for_chart(spec.layer[0])}_{i}\"\n            elif isinstance(spec, Chart):\n                spec.name = f\"{_view_base_for_chart(spec)}_{i}\"\n\n        for param in subchart.params:\n            p = _prepare_to_lift(param)\n            pd = _viewless_dict(p)\n\n            dlist = [d for _, d, _ in param_info]\n            found = pd in dlist\n\n            if isinstance(p, core.VariableParameter) and found:\n                continue\n\n            if isinstance(p, core.VariableParameter) and not found:\n                param_info.append((p, pd, []))\n                continue\n\n            # At this stage in the loop, p must be a TopLevelSelectionParameter.\n            # Get this subchart's view name from the subchart only (not p.views: params can share lists).\n            view_to_add = _view_name_for_param(subchart, is_concat)\n            # MERGE: start from param's views; APPEND: start from [] so we don't pull in another param's views.\n            views_after = list(p.views or []) if found else []\n            if view_to_add and view_to_add not in views_after:\n                views_after.append(view_to_add)\n\n            if found:\n                merge_idx = dlist.index(pd)\n                _, _, old_views = param_info[merge_idx]\n                new_views = [v for v in views_after if v not in old_views]\n                old_views += new_views\n\n                # Warn when parameters get deduplicated\n                warnings.warn(\n                    \"Automatically deduplicated selection parameter with identical configuration. \"\n                    \"If you want independent parameters, explicitly name them differently (e.g., \"\n                    \"name='param1', name='param2'). See https://github.com/vega/altair/issues/3891\",\n                    category=UserWarning,\n                    stacklevel=5,\n                )\n            else:\n                param_info.append((p, pd, views_after))\n\n        subchart.params = Undefined\n\n    for p, _, v in param_info:\n        if len(v) > 0:\n            p.views = v\n\n    subparams: Any = [p for p, _, _ in param_info]\n\n    if len(subparams) == 0:\n        subparams = Undefined\n\n    return subparams, subcharts\n\n\ndef _get_repeat_strings(\n    repeat: list[str] | LayerRepeatMapping | RepeatMapping,\n) -> list[str]:\n    if isinstance(repeat, list):\n        return repeat\n\n    klist = [\"row\", \"column\"]  # RepeatMapping\n    if isinstance(repeat, LayerRepeatMapping):\n        klist = [\"row\", \"column\", \"layer\"]\n    rclist = [k for k in klist if repeat[k] is not Undefined]\n    rcstrings = [[f\"{k}_{v}\" for v in repeat[k]] for k in rclist]\n    retstr: list[str] = [\"\".join(s) for s in itertools.product(*rcstrings)]\n    return retstr\n\n\ndef _extend_view_name(v: str, r: str, spec: Chart | LayerChart) -> str:\n    # prevent the same extension from happening more than once\n    if isinstance(spec, Chart):\n        if v.endswith(\"child__\" + r):\n            return v\n        else:\n            return f\"{v}_child__{r}\"\n    elif isinstance(spec, LayerChart):\n        if v.startswith(\"child__\" + r):\n            return v\n        else:\n            return f\"child__{r}_{v}\"\n    else:\n        msg = f\"Expected 'Chart | LayerChart', but got: {type(spec).__name__!r}\"\n        raise TypeError(msg)\n\n\ndef _repeat_names(\n    params: Optional[Sequence[_Parameter]],\n    repeat: list[str] | LayerRepeatMapping | RepeatMapping,\n    spec: Chart | LayerChart,\n) -> Optional[Sequence[_Parameter]]:\n    if utils.is_undefined(params):\n        return params\n\n    repeat = _get_repeat_strings(repeat)\n    params_named: list[_Parameter] = []\n\n    for param in params:\n        if not isinstance(param, core.TopLevelSelectionParameter):\n            params_named.append(param)\n            continue\n        p = param.copy()\n        views = []\n        repeat_strings = _get_repeat_strings(repeat)\n        for v in param.views:\n            if isinstance(spec, Chart):\n                if any(v.endswith(f\"child__{r}\") for r in repeat_strings):\n                    views.append(v)\n                else:\n                    views += [_extend_view_name(v, r, spec) for r in repeat_strings]\n            elif isinstance(spec, LayerChart):\n                if any(v.startswith(f\"child__{r}\") for r in repeat_strings):\n                    views.append(v)\n                else:\n                    views += [_extend_view_name(v, r, spec) for r in repeat_strings]\n\n        p.views = views\n        params_named.append(p)\n\n    return params_named\n\n\ndef _remove_layer_props(  # noqa: C901\n    chart: LayerChart, subcharts: list[ChartType], layer_props: Iterable[str]\n) -> tuple[dict[str, Any], list[ChartType]]:\n    def remove_prop(subchart: ChartType, prop: str) -> ChartType:\n        # If subchart is a UnitSpec, then subchart[\"height\"] raises a KeyError\n        try:\n            if subchart[prop] is not Undefined:\n                subchart = subchart.copy()\n                subchart[prop] = Undefined\n        except KeyError:\n            pass\n        return subchart\n\n    output_dict: dict[str, Any] = {}\n\n    if not subcharts:\n        # No subcharts = nothing to do.\n        return output_dict, subcharts\n\n    for prop in layer_props:\n        if chart[prop] is Undefined:\n            # Top level does not have this prop.\n            # Check for consistent props within the subcharts.\n            values = []\n            for c in subcharts:\n                # If c is a UnitSpec, then c[\"height\"] raises a KeyError.\n                try:\n                    val = c[prop]\n                    if val is not Undefined:\n                        values.append(val)\n                except KeyError:\n                    pass\n            if len(values) == 0:\n                pass\n            elif all(v == values[0] for v in values[1:]):\n                output_dict[prop] = values[0]\n            else:\n                msg = f\"There are inconsistent values {values} for {prop}\"\n                raise ValueError(msg)\n        elif all(\n            getattr(c, prop, Undefined) is Undefined or c[prop] == chart[prop]\n            for c in subcharts\n        ):\n            # Top level has this prop; subchart must either not have the prop\n            # or it must be Undefined or identical to proceed.\n            output_dict[prop] = chart[prop]\n        else:\n            msg = f\"There are inconsistent values for {prop}\"\n            raise ValueError(msg)\n        subcharts = [remove_prop(c, prop) for c in subcharts]\n\n    return output_dict, subcharts\n\n\n@utils.use_signature_func(core.SequenceParams)\ndef sequence(\n    start: Optional[float],\n    stop: Optional[float | None] = None,\n    step: Optional[float] = Undefined,\n    as_: Optional[str] = Undefined,\n    **kwds: Any,\n) -> SequenceGenerator:\n    \"\"\"Sequence generator.\"\"\"\n    if stop is None:\n        start, stop = 0, start\n    params = core.SequenceParams(start=start, stop=stop, step=step, **{\"as\": as_})\n    return core.SequenceGenerator(sequence=params, **kwds)\n\n\n@utils.use_signature_func(core.GraticuleParams)\ndef graticule(**kwds: Any) -> GraticuleGenerator:\n    \"\"\"Graticule generator.\"\"\"\n    # graticule: True indicates default parameters\n    graticule: Any = core.GraticuleParams(**kwds) if kwds else True\n    return core.GraticuleGenerator(graticule=graticule)\n\n\ndef sphere() -> SphereGenerator:\n    \"\"\"Sphere generator.\"\"\"\n    return core.SphereGenerator(sphere=True)\n\n\nChartType: TypeAlias = (\n    Chart\n    | RepeatChart\n    | ConcatChart\n    | HConcatChart\n    | VConcatChart\n    | FacetChart\n    | LayerChart\n)\nConcatType: TypeAlias = (\n    ChartType\n    | core.FacetSpec\n    | core.LayerSpec\n    | core.RepeatSpec\n    | core.FacetedUnitSpec\n    | core.LayerRepeatSpec\n    | core.NonNormalizedSpec\n    | core.NonLayerRepeatSpec\n    | core.ConcatSpecGenericSpec\n    | core.ConcatSpecGenericSpec\n    | core.HConcatSpecGenericSpec\n    | core.VConcatSpecGenericSpec\n)\nLayerType: TypeAlias = ChartType | core.UnitSpec | core.LayerSpec\n\n\ndef is_chart_type(obj: Any) -> TypeIs[ChartType]:\n    \"\"\"\n    Return `True` if the object is an Altair chart.\n\n    This can be a basic chart but also a repeat, concat, or facet chart.\n    \"\"\"\n    return isinstance(\n        obj,\n        (Chart, RepeatChart, ConcatChart, HConcatChart, VConcatChart, FacetChart, LayerChart)\n    )  # fmt: skip\n"
  },
  {
    "path": "altair/vegalite/v6/compiler.py",
    "content": "from typing import Final\n\nfrom altair.utils._importers import import_vl_convert\nfrom altair.utils.compiler import VegaLiteCompilerRegistry\n\nENTRY_POINT_GROUP: Final = \"altair.vegalite.v6.vegalite_compiler\"\nvegalite_compilers = VegaLiteCompilerRegistry(entry_point_group=ENTRY_POINT_GROUP)\n\n\ndef vl_convert_compiler(vegalite_spec: dict) -> dict:\n    \"\"\"Vega-Lite to Vega compiler that uses vl-convert.\"\"\"\n    from . import SCHEMA_VERSION\n\n    vlc = import_vl_convert()\n\n    # Compute vl-convert's vl_version string (of the form 'v5_8')\n    # from SCHEMA_VERSION (of the form 'v5.8.0')\n    vl_version = \"_\".join(SCHEMA_VERSION.split(\".\")[:2])\n    return vlc.vegalite_to_vega(vegalite_spec, vl_version=vl_version)\n\n\nvegalite_compilers.register(\"vl-convert\", vl_convert_compiler)\nvegalite_compilers.enable(\"vl-convert\")\n"
  },
  {
    "path": "altair/vegalite/v6/data.py",
    "content": "from typing import Final\n\nfrom altair.utils._vegafusion_data import vegafusion_data_transformer\nfrom altair.vegalite.data import (\n    DataTransformerRegistry,\n    MaxRowsError,\n    default_data_transformer,\n    limit_rows,\n    sample,\n    to_csv,\n    to_json,\n    to_values,\n)\n\n# ==============================================================================\n# VegaLite 6 data transformers\n# ==============================================================================\n\n\nENTRY_POINT_GROUP: Final = \"altair.vegalite.v6.data_transformer\"\n\n\ndata_transformers = DataTransformerRegistry(entry_point_group=ENTRY_POINT_GROUP)\ndata_transformers.register(\"default\", default_data_transformer)\ndata_transformers.register(\"json\", to_json)\n# FIXME: `to_csv` cannot accept all `DataType` https://github.com/vega/altair/issues/3441\ndata_transformers.register(\"csv\", to_csv)  # type: ignore[arg-type]\ndata_transformers.register(\"vegafusion\", vegafusion_data_transformer)\ndata_transformers.enable(\"default\")\n\n\n__all__ = (\n    \"MaxRowsError\",\n    \"default_data_transformer\",\n    \"limit_rows\",\n    \"sample\",\n    \"to_csv\",\n    \"to_json\",\n    \"to_values\",\n    \"vegafusion_data_transformer\",\n)\n"
  },
  {
    "path": "altair/vegalite/v6/display.py",
    "content": "from __future__ import annotations\n\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Final\n\nfrom altair.utils.mimebundle import spec_to_mimebundle\nfrom altair.vegalite.display import (\n    Displayable,\n    HTMLRenderer,\n    RendererRegistry,\n    default_renderer_base,\n    json_renderer_base,\n)\n\nfrom .schema import SCHEMA_VERSION\n\nif TYPE_CHECKING:\n    from altair.vegalite.display import DefaultRendererReturnType\n\n\nVEGALITE_VERSION: Final = SCHEMA_VERSION.lstrip(\"v\")\nVEGA_VERSION: Final = \"6\"\nVEGAEMBED_VERSION: Final = \"7\"\n\n\n# ==============================================================================\n# VegaLite v6 renderer logic\n# ==============================================================================\n\n\n# The MIME type for Vega-Lite 6.x releases.\nVEGALITE_MIME_TYPE: Final = \"application/vnd.vegalite.v6.json\"\n\n# The MIME type for Vega 6.x releases.\nVEGA_MIME_TYPE: Final = \"application/vnd.vega.v6.json\"\n\n# The entry point group that can be used by other packages to declare other\n# renderers that will be auto-detected. Explicit registration is also\n# allowed by the PluginRegistery API.\nENTRY_POINT_GROUP: Final = \"altair.vegalite.v6.renderer\"\n\n# The display message when rendering fails\nDEFAULT_DISPLAY: Final = f\"\"\"\\\n<VegaLite {VEGALITE_VERSION.split(\".\")[0]} object>\n\nIf you see this message, it means the renderer has not been properly enabled\nfor the frontend that you are using. For more information, see\nhttps://altair-viz.github.io/user_guide/display_frontends.html#troubleshooting\n\"\"\"\n\nrenderers = RendererRegistry(entry_point_group=ENTRY_POINT_GROUP)\n\nhere = str(Path(__file__).parent)\n\n\ndef mimetype_renderer(spec: dict, **metadata) -> DefaultRendererReturnType:\n    return default_renderer_base(spec, VEGALITE_MIME_TYPE, DEFAULT_DISPLAY, **metadata)\n\n\ndef json_renderer(spec: dict, **metadata) -> DefaultRendererReturnType:\n    return json_renderer_base(spec, DEFAULT_DISPLAY, **metadata)\n\n\ndef png_renderer(spec: dict, **metadata) -> dict[str, bytes]:\n    # To get proper return value type, would need to write complex\n    # overload signatures for spec_to_mimebundle based on `format`\n    return spec_to_mimebundle(  # type: ignore[return-value]\n        spec,\n        format=\"png\",\n        mode=\"vega-lite\",\n        vega_version=VEGA_VERSION,\n        vegaembed_version=VEGAEMBED_VERSION,\n        vegalite_version=VEGALITE_VERSION,\n        **metadata,\n    )\n\n\ndef svg_renderer(spec: dict, **metadata) -> dict[str, str]:\n    # To get proper return value type, would need to write complex\n    # overload signatures for spec_to_mimebundle based on `format`\n    return spec_to_mimebundle(\n        spec,\n        format=\"svg\",\n        mode=\"vega-lite\",\n        vega_version=VEGA_VERSION,\n        vegaembed_version=VEGAEMBED_VERSION,\n        vegalite_version=VEGALITE_VERSION,\n        **metadata,\n    )\n\n\ndef jupyter_renderer(spec: dict, **metadata):\n    \"\"\"Render chart using the JupyterChart Jupyter Widget.\"\"\"\n    from altair import Chart, JupyterChart\n\n    # Configure offline mode\n    offline = metadata.get(\"offline\", False)\n\n    # mypy doesn't see the enable_offline class method for some reason\n    JupyterChart.enable_offline(offline=offline)  # type: ignore[attr-defined]\n\n    # propagate embed options\n    embed_options = metadata.get(\"embed_options\")\n\n    # Need to ignore attr-defined mypy rule because mypy doesn't see _repr_mimebundle_\n    # conditionally defined in AnyWidget\n    return JupyterChart(\n        chart=Chart.from_dict(spec), embed_options=embed_options\n    )._repr_mimebundle_()  # type: ignore[attr-defined]\n\n\ndef browser_renderer(\n    spec: dict, offline=False, using=None, port=0, **metadata\n) -> dict[str, str]:\n    from altair.utils._show import open_html_in_browser\n\n    if offline:\n        metadata[\"template\"] = \"inline\"\n    mimebundle = spec_to_mimebundle(\n        spec,\n        format=\"html\",\n        mode=\"vega-lite\",\n        vega_version=VEGA_VERSION,\n        vegaembed_version=VEGAEMBED_VERSION,\n        vegalite_version=VEGALITE_VERSION,\n        **metadata,\n    )\n    html = mimebundle[\"text/html\"]\n    open_html_in_browser(html, using=using, port=port)\n    return {}\n\n\nhtml_renderer = HTMLRenderer(\n    mode=\"vega-lite\",\n    template=\"universal\",\n    vega_version=VEGA_VERSION,\n    vegaembed_version=VEGAEMBED_VERSION,\n    vegalite_version=VEGALITE_VERSION,\n)\n\n\nolli_renderer = HTMLRenderer(\n    mode=\"vega-lite\",\n    template=\"olli\",\n    vega_version=VEGA_VERSION,\n    vegaembed_version=VEGAEMBED_VERSION,\n    vegalite_version=VEGALITE_VERSION,\n)\n\nrenderers.register(\"default\", html_renderer)\nrenderers.register(\"html\", html_renderer)\nrenderers.register(\"colab\", html_renderer)\nrenderers.register(\"kaggle\", html_renderer)\nrenderers.register(\"zeppelin\", html_renderer)\nrenderers.register(\"mimetype\", mimetype_renderer)\nrenderers.register(\"jupyterlab\", mimetype_renderer)\nrenderers.register(\"nteract\", mimetype_renderer)\nrenderers.register(\"json\", json_renderer)\nrenderers.register(\"png\", png_renderer)\nrenderers.register(\"svg\", svg_renderer)\n# FIXME: Caused by upstream # type: ignore[unreachable]\n# https://github.com/manzt/anywidget/blob/b7961305a7304f4d3def1fafef0df65db56cf41e/anywidget/widget.py#L80-L81\nrenderers.register(\"jupyter\", jupyter_renderer)  # pyright: ignore[reportArgumentType]\nrenderers.register(\"browser\", browser_renderer)\nrenderers.register(\"olli\", olli_renderer)\nrenderers.enable(\"default\")\n\n\nclass VegaLite(Displayable):\n    \"\"\"An IPython/Jupyter display class for rendering VegaLite 6.\"\"\"\n\n    renderers = renderers\n    schema_path = (__name__, \"schema/vega-lite-schema.json\")\n\n\ndef vegalite(spec: dict, validate: bool = True) -> None:\n    \"\"\"\n    Render and optionally validate a VegaLite 6 spec.\n\n    This will use the currently enabled renderer to render the spec.\n\n    Parameters\n    ----------\n    spec: dict\n        A fully compliant VegaLite 6 spec, with the data portion fully processed.\n    validate: bool\n        Should the spec be validated against the VegaLite 6 schema?\n    \"\"\"\n    from IPython.display import display\n\n    display(VegaLite(spec, validate=validate))\n"
  },
  {
    "path": "altair/vegalite/v6/schema/__init__.py",
    "content": "# ruff: noqa: F403, F405\n# The contents of this file are automatically written by\n# tools/generate_schema_wrapper.py. Do not modify directly.\n\nfrom altair.vegalite.v6.schema import channels, core\nfrom altair.vegalite.v6.schema.channels import *\nfrom altair.vegalite.v6.schema.core import *\n\nSCHEMA_VERSION = \"v6.1.0\"\n\nSCHEMA_URL = \"https://vega.github.io/schema/vega-lite/v6.1.0.json\"\n\n__all__ = [\n    \"SCHEMA_URL\",\n    \"SCHEMA_VERSION\",\n    \"URI\",\n    \"X2\",\n    \"Y2\",\n    \"Aggregate\",\n    \"AggregateOp\",\n    \"AggregateTransform\",\n    \"AggregatedFieldDef\",\n    \"Align\",\n    \"AllSortString\",\n    \"Angle\",\n    \"AngleDatum\",\n    \"AngleValue\",\n    \"AnyMark\",\n    \"AnyMarkConfig\",\n    \"AreaConfig\",\n    \"ArgmaxDef\",\n    \"ArgminDef\",\n    \"AutoSizeParams\",\n    \"AutosizeType\",\n    \"Axis\",\n    \"AxisConfig\",\n    \"AxisOrient\",\n    \"AxisResolveMap\",\n    \"BBox\",\n    \"BarConfig\",\n    \"BaseTitleNoValueRefs\",\n    \"Baseline\",\n    \"BinExtent\",\n    \"BinParams\",\n    \"BinTransform\",\n    \"BindCheckbox\",\n    \"BindDirect\",\n    \"BindInput\",\n    \"BindRadioSelect\",\n    \"BindRange\",\n    \"Binding\",\n    \"BinnedTimeUnit\",\n    \"Blend\",\n    \"BoxPlot\",\n    \"BoxPlotConfig\",\n    \"BoxPlotDef\",\n    \"BrushConfig\",\n    \"CalculateTransform\",\n    \"Categorical\",\n    \"Color\",\n    \"ColorDatum\",\n    \"ColorDef\",\n    \"ColorName\",\n    \"ColorScheme\",\n    \"ColorValue\",\n    \"Column\",\n    \"CompositeMark\",\n    \"CompositeMarkDef\",\n    \"CompositionConfig\",\n    \"ConcatSpecGenericSpec\",\n    \"ConditionalAxisColor\",\n    \"ConditionalAxisLabelAlign\",\n    \"ConditionalAxisLabelBaseline\",\n    \"ConditionalAxisLabelFontStyle\",\n    \"ConditionalAxisLabelFontWeight\",\n    \"ConditionalAxisNumber\",\n    \"ConditionalAxisNumberArray\",\n    \"ConditionalAxisPropertyAlignnull\",\n    \"ConditionalAxisPropertyColornull\",\n    \"ConditionalAxisPropertyFontStylenull\",\n    \"ConditionalAxisPropertyFontWeightnull\",\n    \"ConditionalAxisPropertyTextBaselinenull\",\n    \"ConditionalAxisPropertynumberArraynull\",\n    \"ConditionalAxisPropertynumbernull\",\n    \"ConditionalAxisPropertystringnull\",\n    \"ConditionalAxisString\",\n    \"ConditionalMarkPropFieldOrDatumDef\",\n    \"ConditionalMarkPropFieldOrDatumDefTypeForShape\",\n    \"ConditionalParameterMarkPropFieldOrDatumDef\",\n    \"ConditionalParameterMarkPropFieldOrDatumDefTypeForShape\",\n    \"ConditionalParameterStringFieldDef\",\n    \"ConditionalParameterValueDefGradientstringnullExprRef\",\n    \"ConditionalParameterValueDefTextExprRef\",\n    \"ConditionalParameterValueDefnumber\",\n    \"ConditionalParameterValueDefnumberArrayExprRef\",\n    \"ConditionalParameterValueDefnumberExprRef\",\n    \"ConditionalParameterValueDefstringExprRef\",\n    \"ConditionalParameterValueDefstringnullExprRef\",\n    \"ConditionalPredicateMarkPropFieldOrDatumDef\",\n    \"ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape\",\n    \"ConditionalPredicateStringFieldDef\",\n    \"ConditionalPredicateValueDefAlignnullExprRef\",\n    \"ConditionalPredicateValueDefColornullExprRef\",\n    \"ConditionalPredicateValueDefFontStylenullExprRef\",\n    \"ConditionalPredicateValueDefFontWeightnullExprRef\",\n    \"ConditionalPredicateValueDefGradientstringnullExprRef\",\n    \"ConditionalPredicateValueDefTextBaselinenullExprRef\",\n    \"ConditionalPredicateValueDefTextExprRef\",\n    \"ConditionalPredicateValueDefnumber\",\n    \"ConditionalPredicateValueDefnumberArrayExprRef\",\n    \"ConditionalPredicateValueDefnumberArraynullExprRef\",\n    \"ConditionalPredicateValueDefnumberExprRef\",\n    \"ConditionalPredicateValueDefnumbernullExprRef\",\n    \"ConditionalPredicateValueDefstringExprRef\",\n    \"ConditionalPredicateValueDefstringnullExprRef\",\n    \"ConditionalStringFieldDef\",\n    \"ConditionalValueDefGradientstringnullExprRef\",\n    \"ConditionalValueDefTextExprRef\",\n    \"ConditionalValueDefnumber\",\n    \"ConditionalValueDefnumberArrayExprRef\",\n    \"ConditionalValueDefnumberExprRef\",\n    \"ConditionalValueDefstringExprRef\",\n    \"ConditionalValueDefstringnullExprRef\",\n    \"Config\",\n    \"CsvDataFormat\",\n    \"Cursor\",\n    \"Cyclical\",\n    \"Data\",\n    \"DataFormat\",\n    \"DataSource\",\n    \"Datasets\",\n    \"DateTime\",\n    \"DatumChannelMixin\",\n    \"DatumDef\",\n    \"Day\",\n    \"DensityTransform\",\n    \"DerivedStream\",\n    \"Description\",\n    \"DescriptionValue\",\n    \"Detail\",\n    \"DictInlineDataset\",\n    \"DictSelectionInit\",\n    \"DictSelectionInitInterval\",\n    \"Diverging\",\n    \"DomainUnionWith\",\n    \"DsvDataFormat\",\n    \"Element\",\n    \"Encoding\",\n    \"EncodingSortField\",\n    \"ErrorBand\",\n    \"ErrorBandConfig\",\n    \"ErrorBandDef\",\n    \"ErrorBar\",\n    \"ErrorBarConfig\",\n    \"ErrorBarDef\",\n    \"ErrorBarExtent\",\n    \"EventStream\",\n    \"EventType\",\n    \"Expr\",\n    \"ExprRef\",\n    \"ExtentTransform\",\n    \"Facet\",\n    \"FacetEncodingFieldDef\",\n    \"FacetFieldDef\",\n    \"FacetSpec\",\n    \"FacetedEncoding\",\n    \"FacetedUnitSpec\",\n    \"Feature\",\n    \"FeatureCollection\",\n    \"FeatureGeometryGeoJsonProperties\",\n    \"Field\",\n    \"FieldChannelMixin\",\n    \"FieldDefWithoutScale\",\n    \"FieldEqualPredicate\",\n    \"FieldGTEPredicate\",\n    \"FieldGTPredicate\",\n    \"FieldLTEPredicate\",\n    \"FieldLTPredicate\",\n    \"FieldName\",\n    \"FieldOneOfPredicate\",\n    \"FieldOrDatumDefWithConditionDatumDefGradientstringnull\",\n    \"FieldOrDatumDefWithConditionDatumDefnumber\",\n    \"FieldOrDatumDefWithConditionDatumDefnumberArray\",\n    \"FieldOrDatumDefWithConditionDatumDefstringnull\",\n    \"FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull\",\n    \"FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull\",\n    \"FieldOrDatumDefWithConditionMarkPropFieldDefnumber\",\n    \"FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray\",\n    \"FieldOrDatumDefWithConditionStringDatumDefText\",\n    \"FieldOrDatumDefWithConditionStringFieldDefText\",\n    \"FieldOrDatumDefWithConditionStringFieldDefstring\",\n    \"FieldRange\",\n    \"FieldRangePredicate\",\n    \"FieldValidPredicate\",\n    \"Fill\",\n    \"FillDatum\",\n    \"FillOpacity\",\n    \"FillOpacityDatum\",\n    \"FillOpacityValue\",\n    \"FillValue\",\n    \"FilterTransform\",\n    \"Fit\",\n    \"FlattenTransform\",\n    \"FoldTransform\",\n    \"FontStyle\",\n    \"FontWeight\",\n    \"Format\",\n    \"FormatConfig\",\n    \"Generator\",\n    \"GenericUnitSpecEncodingAnyMark\",\n    \"GeoJsonFeature\",\n    \"GeoJsonFeatureCollection\",\n    \"GeoJsonProperties\",\n    \"Geometry\",\n    \"GeometryCollection\",\n    \"Gradient\",\n    \"GradientStop\",\n    \"GraticuleGenerator\",\n    \"GraticuleParams\",\n    \"HConcatSpecGenericSpec\",\n    \"Header\",\n    \"HeaderConfig\",\n    \"HexColor\",\n    \"Href\",\n    \"HrefValue\",\n    \"ImputeMethod\",\n    \"ImputeParams\",\n    \"ImputeSequence\",\n    \"ImputeTransform\",\n    \"InlineData\",\n    \"InlineDataset\",\n    \"Interpolate\",\n    \"IntervalSelectionConfig\",\n    \"IntervalSelectionConfigWithoutType\",\n    \"JoinAggregateFieldDef\",\n    \"JoinAggregateTransform\",\n    \"JsonDataFormat\",\n    \"Key\",\n    \"LabelOverlap\",\n    \"LatLongDef\",\n    \"LatLongFieldDef\",\n    \"Latitude\",\n    \"Latitude2\",\n    \"Latitude2Datum\",\n    \"Latitude2Value\",\n    \"LatitudeDatum\",\n    \"LayerRepeatMapping\",\n    \"LayerRepeatSpec\",\n    \"LayerSpec\",\n    \"LayoutAlign\",\n    \"Legend\",\n    \"LegendBinding\",\n    \"LegendConfig\",\n    \"LegendOrient\",\n    \"LegendResolveMap\",\n    \"LegendStreamBinding\",\n    \"LineConfig\",\n    \"LineString\",\n    \"LinearGradient\",\n    \"LocalMultiTimeUnit\",\n    \"LocalSingleTimeUnit\",\n    \"Locale\",\n    \"LoessTransform\",\n    \"LogicalAndPredicate\",\n    \"LogicalNotPredicate\",\n    \"LogicalOrPredicate\",\n    \"Longitude\",\n    \"Longitude2\",\n    \"Longitude2Datum\",\n    \"Longitude2Value\",\n    \"LongitudeDatum\",\n    \"LookupSelection\",\n    \"LookupTransform\",\n    \"Mark\",\n    \"MarkConfig\",\n    \"MarkDef\",\n    \"MarkInvalidDataMode\",\n    \"MarkPropDefGradientstringnull\",\n    \"MarkPropDefnumber\",\n    \"MarkPropDefnumberArray\",\n    \"MarkPropDefstringnullTypeForShape\",\n    \"MarkType\",\n    \"MergedStream\",\n    \"Month\",\n    \"MultiLineString\",\n    \"MultiPoint\",\n    \"MultiPolygon\",\n    \"MultiTimeUnit\",\n    \"NamedData\",\n    \"NonArgAggregateOp\",\n    \"NonLayerRepeatSpec\",\n    \"NonNormalizedSpec\",\n    \"NumberLocale\",\n    \"NumericArrayMarkPropDef\",\n    \"NumericMarkPropDef\",\n    \"OffsetDef\",\n    \"Opacity\",\n    \"OpacityDatum\",\n    \"OpacityValue\",\n    \"Order\",\n    \"OrderFieldDef\",\n    \"OrderOnlyDef\",\n    \"OrderValue\",\n    \"OrderValueDef\",\n    \"Orient\",\n    \"Orientation\",\n    \"OverlayMarkDef\",\n    \"Padding\",\n    \"ParameterExtent\",\n    \"ParameterName\",\n    \"ParameterPredicate\",\n    \"Parse\",\n    \"ParseValue\",\n    \"PivotTransform\",\n    \"Point\",\n    \"PointSelectionConfig\",\n    \"PointSelectionConfigWithoutType\",\n    \"PolarDef\",\n    \"Polygon\",\n    \"Position\",\n    \"Position2Def\",\n    \"PositionDatumDef\",\n    \"PositionDatumDefBase\",\n    \"PositionDef\",\n    \"PositionFieldDef\",\n    \"PositionFieldDefBase\",\n    \"PositionValueDef\",\n    \"Predicate\",\n    \"PredicateComposition\",\n    \"PrimitiveValue\",\n    \"Projection\",\n    \"ProjectionConfig\",\n    \"ProjectionType\",\n    \"QuantileTransform\",\n    \"RadialGradient\",\n    \"Radius\",\n    \"Radius2\",\n    \"Radius2Datum\",\n    \"Radius2Value\",\n    \"RadiusDatum\",\n    \"RadiusValue\",\n    \"RangeConfig\",\n    \"RangeEnum\",\n    \"RangeRaw\",\n    \"RangeRawArray\",\n    \"RangeScheme\",\n    \"RectConfig\",\n    \"RegressionTransform\",\n    \"RelativeBandSize\",\n    \"RepeatMapping\",\n    \"RepeatRef\",\n    \"RepeatSpec\",\n    \"Resolve\",\n    \"ResolveMode\",\n    \"Root\",\n    \"Row\",\n    \"RowColLayoutAlign\",\n    \"RowColboolean\",\n    \"RowColnumber\",\n    \"RowColumnEncodingFieldDef\",\n    \"SampleTransform\",\n    \"Scale\",\n    \"ScaleBinParams\",\n    \"ScaleBins\",\n    \"ScaleConfig\",\n    \"ScaleDatumDef\",\n    \"ScaleFieldDef\",\n    \"ScaleInterpolateEnum\",\n    \"ScaleInterpolateParams\",\n    \"ScaleInvalidDataConfig\",\n    \"ScaleInvalidDataShowAsValueangle\",\n    \"ScaleInvalidDataShowAsValuecolor\",\n    \"ScaleInvalidDataShowAsValuefill\",\n    \"ScaleInvalidDataShowAsValuefillOpacity\",\n    \"ScaleInvalidDataShowAsValueopacity\",\n    \"ScaleInvalidDataShowAsValueradius\",\n    \"ScaleInvalidDataShowAsValueshape\",\n    \"ScaleInvalidDataShowAsValuesize\",\n    \"ScaleInvalidDataShowAsValuestroke\",\n    \"ScaleInvalidDataShowAsValuestrokeDash\",\n    \"ScaleInvalidDataShowAsValuestrokeOpacity\",\n    \"ScaleInvalidDataShowAsValuestrokeWidth\",\n    \"ScaleInvalidDataShowAsValuetheta\",\n    \"ScaleInvalidDataShowAsValuetime\",\n    \"ScaleInvalidDataShowAsValuex\",\n    \"ScaleInvalidDataShowAsValuexOffset\",\n    \"ScaleInvalidDataShowAsValuey\",\n    \"ScaleInvalidDataShowAsValueyOffset\",\n    \"ScaleInvalidDataShowAsangle\",\n    \"ScaleInvalidDataShowAscolor\",\n    \"ScaleInvalidDataShowAsfill\",\n    \"ScaleInvalidDataShowAsfillOpacity\",\n    \"ScaleInvalidDataShowAsopacity\",\n    \"ScaleInvalidDataShowAsradius\",\n    \"ScaleInvalidDataShowAsshape\",\n    \"ScaleInvalidDataShowAssize\",\n    \"ScaleInvalidDataShowAsstroke\",\n    \"ScaleInvalidDataShowAsstrokeDash\",\n    \"ScaleInvalidDataShowAsstrokeOpacity\",\n    \"ScaleInvalidDataShowAsstrokeWidth\",\n    \"ScaleInvalidDataShowAstheta\",\n    \"ScaleInvalidDataShowAstime\",\n    \"ScaleInvalidDataShowAsx\",\n    \"ScaleInvalidDataShowAsxOffset\",\n    \"ScaleInvalidDataShowAsy\",\n    \"ScaleInvalidDataShowAsyOffset\",\n    \"ScaleResolveMap\",\n    \"ScaleType\",\n    \"SchemaBase\",\n    \"SchemeParams\",\n    \"SecondaryFieldDef\",\n    \"SelectionConfig\",\n    \"SelectionInit\",\n    \"SelectionInitInterval\",\n    \"SelectionInitIntervalMapping\",\n    \"SelectionInitMapping\",\n    \"SelectionParameter\",\n    \"SelectionResolution\",\n    \"SelectionType\",\n    \"SequenceGenerator\",\n    \"SequenceParams\",\n    \"SequentialMultiHue\",\n    \"SequentialSingleHue\",\n    \"Shape\",\n    \"ShapeDatum\",\n    \"ShapeDef\",\n    \"ShapeValue\",\n    \"SharedEncoding\",\n    \"SingleDefUnitChannel\",\n    \"SingleTimeUnit\",\n    \"Size\",\n    \"SizeDatum\",\n    \"SizeValue\",\n    \"Sort\",\n    \"SortArray\",\n    \"SortByChannel\",\n    \"SortByChannelDesc\",\n    \"SortByEncoding\",\n    \"SortField\",\n    \"SortOrder\",\n    \"Spec\",\n    \"SphereGenerator\",\n    \"StackOffset\",\n    \"StackTransform\",\n    \"StandardType\",\n    \"Step\",\n    \"StepFor\",\n    \"Stream\",\n    \"StringFieldDef\",\n    \"StringFieldDefWithCondition\",\n    \"StringValueDefWithCondition\",\n    \"Stroke\",\n    \"StrokeCap\",\n    \"StrokeDash\",\n    \"StrokeDashDatum\",\n    \"StrokeDashValue\",\n    \"StrokeDatum\",\n    \"StrokeJoin\",\n    \"StrokeOpacity\",\n    \"StrokeOpacityDatum\",\n    \"StrokeOpacityValue\",\n    \"StrokeValue\",\n    \"StrokeWidth\",\n    \"StrokeWidthDatum\",\n    \"StrokeWidthValue\",\n    \"StyleConfigIndex\",\n    \"SymbolShape\",\n    \"Text\",\n    \"TextBaseline\",\n    \"TextDatum\",\n    \"TextDef\",\n    \"TextDirection\",\n    \"TextValue\",\n    \"Theta\",\n    \"Theta2\",\n    \"Theta2Datum\",\n    \"Theta2Value\",\n    \"ThetaDatum\",\n    \"ThetaValue\",\n    \"TickConfig\",\n    \"TickCount\",\n    \"Time\",\n    \"TimeDef\",\n    \"TimeFieldDef\",\n    \"TimeFormatSpecifier\",\n    \"TimeInterval\",\n    \"TimeIntervalStep\",\n    \"TimeLocale\",\n    \"TimeUnit\",\n    \"TimeUnitParams\",\n    \"TimeUnitTransform\",\n    \"TimeUnitTransformParams\",\n    \"TitleAnchor\",\n    \"TitleConfig\",\n    \"TitleFrame\",\n    \"TitleOrient\",\n    \"TitleParams\",\n    \"Tooltip\",\n    \"TooltipContent\",\n    \"TooltipValue\",\n    \"TopLevelConcatSpec\",\n    \"TopLevelFacetSpec\",\n    \"TopLevelHConcatSpec\",\n    \"TopLevelLayerSpec\",\n    \"TopLevelParameter\",\n    \"TopLevelRepeatSpec\",\n    \"TopLevelSelectionParameter\",\n    \"TopLevelSpec\",\n    \"TopLevelUnitSpec\",\n    \"TopLevelVConcatSpec\",\n    \"TopoDataFormat\",\n    \"Transform\",\n    \"Type\",\n    \"TypeForShape\",\n    \"TypedFieldDef\",\n    \"UnitSpec\",\n    \"UnitSpecWithFrame\",\n    \"Url\",\n    \"UrlData\",\n    \"UrlValue\",\n    \"UtcMultiTimeUnit\",\n    \"UtcSingleTimeUnit\",\n    \"VConcatSpecGenericSpec\",\n    \"ValueChannelMixin\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefnumber\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefstringnull\",\n    \"ValueDefWithConditionStringFieldDefText\",\n    \"ValueDefnumber\",\n    \"ValueDefnumberwidthheightExprRef\",\n    \"VariableParameter\",\n    \"Vector2DateTime\",\n    \"Vector2Vector2number\",\n    \"Vector2boolean\",\n    \"Vector2number\",\n    \"Vector2string\",\n    \"Vector3number\",\n    \"Vector7string\",\n    \"Vector10string\",\n    \"Vector12string\",\n    \"VegaLiteSchema\",\n    \"ViewBackground\",\n    \"ViewConfig\",\n    \"WindowEventType\",\n    \"WindowFieldDef\",\n    \"WindowOnlyOp\",\n    \"WindowTransform\",\n    \"X\",\n    \"X2Datum\",\n    \"X2Value\",\n    \"XDatum\",\n    \"XError\",\n    \"XError2\",\n    \"XError2Value\",\n    \"XErrorValue\",\n    \"XOffset\",\n    \"XOffsetDatum\",\n    \"XOffsetValue\",\n    \"XValue\",\n    \"Y\",\n    \"Y2Datum\",\n    \"Y2Value\",\n    \"YDatum\",\n    \"YError\",\n    \"YError2\",\n    \"YError2Value\",\n    \"YErrorValue\",\n    \"YOffset\",\n    \"YOffsetDatum\",\n    \"YOffsetValue\",\n    \"YValue\",\n    \"channels\",\n    \"core\",\n    \"load_schema\",\n    \"with_property_setters\",\n]\n"
  },
  {
    "path": "altair/vegalite/v6/schema/_config.py",
    "content": "# The contents of this file are automatically written by\n# tools/generate_schema_wrapper.py. Do not modify directly.\n\nfrom __future__ import annotations\n\nimport sys\nfrom typing import TYPE_CHECKING, Any, Literal, TypedDict\n\nfrom ._typing import PaddingKwds, RowColKwds\n\nif TYPE_CHECKING:\n    # ruff: noqa: F405\n    from collections.abc import Sequence\n\n    from ._typing import *  # noqa: F403\n\n\nif sys.version_info >= (3, 15):\n    from typing import TypedDict\nelse:\n    from typing_extensions import TypedDict\n\n\n__all__ = [\n    \"AreaConfigKwds\",\n    \"AutoSizeParamsKwds\",\n    \"AxisConfigKwds\",\n    \"AxisResolveMapKwds\",\n    \"BarConfigKwds\",\n    \"BindCheckboxKwds\",\n    \"BindDirectKwds\",\n    \"BindInputKwds\",\n    \"BindRadioSelectKwds\",\n    \"BindRangeKwds\",\n    \"BoxPlotConfigKwds\",\n    \"BrushConfigKwds\",\n    \"CompositionConfigKwds\",\n    \"ConfigKwds\",\n    \"DateTimeKwds\",\n    \"DerivedStreamKwds\",\n    \"ErrorBandConfigKwds\",\n    \"ErrorBarConfigKwds\",\n    \"FeatureGeometryGeoJsonPropertiesKwds\",\n    \"FormatConfigKwds\",\n    \"GeoJsonFeatureCollectionKwds\",\n    \"GeoJsonFeatureKwds\",\n    \"GeometryCollectionKwds\",\n    \"GradientStopKwds\",\n    \"HeaderConfigKwds\",\n    \"IntervalSelectionConfigKwds\",\n    \"IntervalSelectionConfigWithoutTypeKwds\",\n    \"LegendConfigKwds\",\n    \"LegendResolveMapKwds\",\n    \"LegendStreamBindingKwds\",\n    \"LineConfigKwds\",\n    \"LineStringKwds\",\n    \"LinearGradientKwds\",\n    \"LocaleKwds\",\n    \"MarkConfigKwds\",\n    \"MergedStreamKwds\",\n    \"MultiLineStringKwds\",\n    \"MultiPointKwds\",\n    \"MultiPolygonKwds\",\n    \"NumberLocaleKwds\",\n    \"OverlayMarkDefKwds\",\n    \"PaddingKwds\",\n    \"PointKwds\",\n    \"PointSelectionConfigKwds\",\n    \"PointSelectionConfigWithoutTypeKwds\",\n    \"PolygonKwds\",\n    \"ProjectionConfigKwds\",\n    \"ProjectionKwds\",\n    \"RadialGradientKwds\",\n    \"RangeConfigKwds\",\n    \"RectConfigKwds\",\n    \"ResolveKwds\",\n    \"RowColKwds\",\n    \"ScaleConfigKwds\",\n    \"ScaleInvalidDataConfigKwds\",\n    \"ScaleResolveMapKwds\",\n    \"SelectionConfigKwds\",\n    \"StepKwds\",\n    \"StyleConfigIndexKwds\",\n    \"ThemeConfig\",\n    \"TickConfigKwds\",\n    \"TimeFormatSpecifierKwds\",\n    \"TimeIntervalStepKwds\",\n    \"TimeLocaleKwds\",\n    \"TitleConfigKwds\",\n    \"TitleParamsKwds\",\n    \"TooltipContentKwds\",\n    \"TopLevelSelectionParameterKwds\",\n    \"VariableParameterKwds\",\n    \"ViewBackgroundKwds\",\n    \"ViewConfigKwds\",\n]\n\n\nclass AreaConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.AreaConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    align\n        The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).\n        One of ``\"left\"``, ``\"right\"``, ``\"center\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    angle\n        The rotation angle of the text, in degrees.\n    aria\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG element, removing the mark item from the ARIA accessibility tree.\n    ariaRole\n        Sets the type of user interface element of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"role\" attribute. Warning: this\n        property is experimental and may be changed in the future.\n    ariaRoleDescription\n        A human-readable, author-localized description for the role of the mark item for\n        `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"aria-roledescription\" attribute.\n        Warning: this property is experimental and may be changed in the future.\n    aspect\n        Whether to keep aspect ratio of image marks.\n    baseline\n        For text marks, the vertical text baseline. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, ``\"line-bottom\"``, or an\n        expression reference that provides one of the valid values. The ``\"line-top\"`` and\n        ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but are\n        calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.\n\n        For range marks, the vertical alignment of the marks. One of ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    blend\n        The color blend mode for drawing an item on its current background. Any valid `CSS\n        mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__\n        value can be used.\n\n        **Default value:** ``\"source-over\"``\n    color\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    cornerRadius\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cornerRadiusBottomLeft\n        The radius in pixels of rounded rectangles' bottom left corner.\n\n        **Default value:** ``0``\n    cornerRadiusBottomRight\n        The radius in pixels of rounded rectangles' bottom right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopLeft\n        The radius in pixels of rounded rectangles' top right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopRight\n        The radius in pixels of rounded rectangles' top left corner.\n\n        **Default value:** ``0``\n    cursor\n        The mouse cursor used over the mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    description\n        A text description of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.\n    dir\n        The direction of the text. One of ``\"ltr\"`` (left-to-right) or ``\"rtl\"``\n        (right-to-left). This property determines on which side is truncated in response to\n        the limit parameter.\n\n        **Default value:** ``\"ltr\"``\n    dx\n        The horizontal offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    dy\n        The vertical offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    ellipsis\n        The ellipsis string for text truncated in response to the limit parameter.\n\n        **Default value:** ``\"…\"``\n    endAngle\n        The end angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    fill\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    fillOpacity\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    filled\n        Whether the mark's color should be used as fill color instead of stroke color.\n\n        **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well\n        as ``geoshape`` marks for `graticule\n        <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;\n        otherwise, ``true``.\n\n        **Note:** This property cannot be used in a `style config\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n    font\n        The typeface to set the text in (e.g., ``\"Helvetica Neue\"``).\n    fontSize\n        The font size, in pixels.\n\n        **Default value:** ``11``\n    fontStyle\n        The font style (e.g., ``\"italic\"``).\n    fontWeight\n        The font weight. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``) or a\n        number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400`` and\n        ``\"bold\"`` = ``700``).\n    height\n        Height of the marks.\n    href\n        A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\n    innerRadius\n        The inner radius in pixels of arc marks. ``innerRadius`` is an alias for\n        ``radius2``.\n\n        **Default value:** ``0``\n    interpolate\n        The line interpolation method to use for line and area marks. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"step-before\"``: alternate between vertical and horizontal segments, as in a\n          step function.\n        * ``\"step-after\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    invalid\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    limit\n        The maximum length of the text mark in pixels. The text value will be automatically\n        truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0`` -- indicating no limit\n    line\n        A flag for overlaying line on top of area marks, or an object defining the\n        properties of the overlayed lines.\n\n        * If this value is an empty object (``{}``) or ``true``, lines with default\n          properties will be used.\n\n        * If this value is ``false``, no lines would be automatically added to area marks.\n\n        **Default value:** ``false``.\n    lineBreak\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property is ignored if the text is array-valued.\n    lineHeight\n        The line height in pixels (the spacing between subsequent lines of text) for\n        multi-line text marks.\n    opacity\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    order\n        For line and trail marks, this ``order`` property can be set to ``null`` or\n        ``false`` to make the lines use the original order in the data sources.\n    orient\n        The orientation of a non-stacked bar, tick, area, and line charts. The value is\n        either horizontal (default) or vertical.\n\n        * For bar, rule and tick, this determines whether the size of the bar and tick\n          should be applied to x or y dimension.\n        * For area, this property determines the orient property of the Vega output.\n        * For line and trail marks, this property determines the sort order of the points in\n          the line if ``config.sortLineBy`` is not specified. For stacked charts, this is\n          always determined by the orientation of the stack; therefore explicitly specified\n          value will be ignored.\n    outerRadius\n        The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.\n\n        **Default value:** ``0``\n    padAngle\n        The angular padding applied to sides of the arc, in radians.\n    point\n        A flag for overlaying points on top of line or area marks, or an object defining the\n        properties of the overlayed points.\n\n        * If this property is ``\"transparent\"``, transparent points will be used (for\n          enhancing tooltips and selections).\n\n        * If this property is an empty object (``{}``) or ``true``, filled points with\n          default properties will be used.\n\n        * If this property is ``false``, no points would be automatically added to line or\n          area marks.\n\n        **Default value:** ``false``.\n    radius\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    radius2\n        The secondary (inner) radius in pixels of arc marks.\n\n        **Default value:** ``0``\n    shape\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    size\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    smooth\n        A boolean flag (default true) indicating if the image should be smoothed when\n        resized. If false, individual pixels should be scaled directly rather than\n        interpolated with smoothing. For SVG rendering, this option may not work in some\n        browsers due to lack of standardization.\n    startAngle\n        The start angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    stroke\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    strokeCap\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit\n        The miter limit at which to bevel a line join.\n    strokeOffset\n        The offset in pixels at which to draw the group stroke and fill. If unspecified, the\n        default behavior is to dynamically offset stroked groups such that 1 pixel stroke\n        widths align with the pixel grid.\n    strokeOpacity\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth\n        The stroke width, in pixels.\n    tension\n        Depending on the interpolation type, sets the tension parameter (for line and area\n        marks).\n    text\n        Placeholder text if the ``text`` channel is not specified\n    theta\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    time\n\n    timeUnitBandPosition\n        Default relative band position for a time unit. If set to ``0``, the marks will be\n        positioned at the beginning of the time unit band step. If set to ``0.5``, the marks\n        will be positioned in the middle of the time unit band step.\n    timeUnitBandSize\n        Default relative band size for a time unit. If set to ``1``, the bandwidth of the\n        marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the\n        marks will be half of the time unit band step.\n    tooltip\n        The tooltip text string to show upon mouse hover or an object defining which fields\n        should the tooltip be derived from.\n\n        * If ``tooltip`` is ``true`` or ``{\"content\": \"encoding\"}``, then all fields from\n          ``encoding`` will be used.\n        * If ``tooltip`` is ``{\"content\": \"data\"}``, then all fields that appear in the\n          highlighted data point will be used.\n        * If set to ``null`` or ``false``, then no tooltip will be used.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n        **Default value:** ``null``\n    url\n        The URL of the image file for image marks.\n    width\n        Width of the marks.\n    x\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    y\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    \"\"\"\n\n    align: Align_T\n    angle: float\n    aria: bool\n    ariaRole: str\n    ariaRoleDescription: str\n    aspect: bool\n    baseline: TextBaseline_T\n    blend: Blend_T\n    color: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T\n    cornerRadius: float\n    cornerRadiusBottomLeft: float\n    cornerRadiusBottomRight: float\n    cornerRadiusTopLeft: float\n    cornerRadiusTopRight: float\n    cursor: Cursor_T\n    description: str\n    dir: TextDirection_T\n    dx: float\n    dy: float\n    ellipsis: str\n    endAngle: float\n    fill: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None\n    fillOpacity: float\n    filled: bool\n    font: str\n    fontSize: float\n    fontStyle: str\n    fontWeight: FontWeight_T\n    height: float\n    href: str\n    innerRadius: float\n    interpolate: Interpolate_T\n    invalid: MarkInvalidDataMode_T | None\n    limit: float\n    line: bool | OverlayMarkDefKwds\n    lineBreak: str\n    lineHeight: float\n    opacity: float\n    order: bool | None\n    orient: Orientation_T\n    outerRadius: float\n    padAngle: float\n    point: bool | OverlayMarkDefKwds | Literal[\"transparent\"]\n    radius: float\n    radius2: float\n    shape: str\n    size: float\n    smooth: bool\n    startAngle: float\n    stroke: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None\n    strokeCap: StrokeCap_T\n    strokeDash: Sequence[float]\n    strokeDashOffset: float\n    strokeJoin: StrokeJoin_T\n    strokeMiterLimit: float\n    strokeOffset: float\n    strokeOpacity: float\n    strokeWidth: float\n    tension: float\n    text: str | Sequence[str]\n    theta: float\n    theta2: float\n    time: float\n    timeUnitBandPosition: float\n    timeUnitBandSize: float\n    tooltip: str | bool | float | TooltipContentKwds | None\n    url: str\n    width: float\n    x: float | Literal[\"width\"]\n    x2: float | Literal[\"width\"]\n    y: float | Literal[\"height\"]\n    y2: float | Literal[\"height\"]\n\n\nclass AutoSizeParamsKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.AutoSizeParams` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    contains\n        Determines how size calculation should be performed, one of ``\"content\"`` or\n        ``\"padding\"``. The default setting (``\"content\"``) interprets the width and height\n        settings as the data rectangle (plotting) dimensions, to which padding is then\n        added. In contrast, the ``\"padding\"`` setting includes the padding within the view\n        size calculations, such that the width and height settings indicate the **total**\n        intended size of the view.\n\n        **Default value**: ``\"content\"``\n    resize\n        A boolean flag indicating if autosize layout should be re-calculated on every view\n        update.\n\n        **Default value**: ``false``\n    type\n        The sizing format type. One of ``\"pad\"``, ``\"fit\"``, ``\"fit-x\"``, ``\"fit-y\"``,  or\n        ``\"none\"``. See the `autosize type\n        <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ documentation for\n        descriptions of each.\n\n        **Default value**: ``\"pad\"``\n    \"\"\"\n\n    contains: Literal[\"content\", \"padding\"]\n    resize: bool\n    type: AutosizeType_T\n\n\nclass AxisConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.AxisConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    aria\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG group, removing the axis from the ARIA accessibility tree.\n\n        **Default value:** ``true``\n    bandPosition\n        An interpolation fraction indicating where, for ``band`` scales, axis ticks should\n        be positioned. A value of ``0`` places ticks at the left edge of their bands. A\n        value of ``0.5`` places ticks in the middle of their bands.\n\n        **Default value:** ``0.5``\n    description\n        A text description of this axis for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If the ``aria`` property is true, for SVG output the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__\n        will be set to this description. If the description is unspecified it will be\n        automatically generated.\n    disable\n        Disable axis by default.\n    domain\n        A boolean flag indicating if the domain (the axis baseline) should be included as\n        part of the axis.\n\n        **Default value:** ``true``\n    domainCap\n        The stroke cap for the domain line's ending style. One of ``\"butt\"``, ``\"round\"`` or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    domainColor\n        Color of axis domain line.\n\n        **Default value:** ``\"gray\"``.\n    domainDash\n        An array of alternating [stroke, space] lengths for dashed domain lines.\n    domainDashOffset\n        The pixel offset at which to start drawing with the domain dash array.\n    domainOpacity\n        Opacity of the axis domain line.\n    domainWidth\n        Stroke width of axis domain line\n\n        **Default value:** ``1``\n    format\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    grid\n        A boolean flag indicating if grid lines should be included as part of the axis\n\n        **Default value:** ``true`` for `continuous scales\n        <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ that are not\n        binned; otherwise, ``false``.\n    gridCap\n        The stroke cap for grid lines' ending style. One of ``\"butt\"``, ``\"round\"`` or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    gridColor\n        Color of gridlines.\n\n        **Default value:** ``\"lightGray\"``.\n    gridDash\n        An array of alternating [stroke, space] lengths for dashed grid lines.\n    gridDashOffset\n        The pixel offset at which to start drawing with the grid dash array.\n    gridOpacity\n        The stroke opacity of grid (value between [0,1])\n\n        **Default value:** ``1``\n    gridWidth\n        The grid width, in pixels.\n\n        **Default value:** ``1``\n    labelAlign\n        Horizontal text alignment of axis tick labels, overriding the default setting for\n        the current axis orientation.\n    labelAngle\n        The rotation angle of the axis labels.\n\n        **Default value:** ``-90`` for nominal and ordinal fields; ``0`` otherwise.\n    labelBaseline\n        Vertical text baseline of axis tick labels, overriding the default setting for the\n        current axis orientation. One of ``\"alphabetic\"`` (default), ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or ``\"line-bottom\"``. The ``\"line-top\"``\n        and ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but\n        are calculated relative to the *lineHeight* rather than *fontSize* alone.\n    labelBound\n        Indicates if labels should be hidden if they exceed the axis range. If ``false``\n        (the default) no bounds overlap analysis is performed. If ``true``, labels will be\n        hidden if they exceed the axis range by more than 1 pixel. If this property is a\n        number, it specifies the pixel tolerance: the maximum amount by which a label\n        bounding box may exceed the axis range.\n\n        **Default value:** ``false``.\n    labelColor\n        The color of the tick label, can be in hex color code or regular color name.\n    labelExpr\n        `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing\n        labels.\n\n        **Note:** The label text and value can be assessed via the ``label`` and ``value``\n        properties of the axis's backing ``datum`` object.\n    labelFlush\n        Indicates if the first and last axis labels should be aligned flush with the scale\n        range. Flush alignment for a horizontal axis will left-align the first label and\n        right-align the last label. For vertical axes, bottom and top text baselines are\n        applied instead. If this property is a number, it also indicates the number of\n        pixels by which to offset the first and last labels; for example, a value of 2 will\n        flush-align the first and last labels and also push them 2 pixels outward from the\n        center of the axis. The additional adjustment can sometimes help the labels better\n        visually group with corresponding axis ticks.\n\n        **Default value:** ``true`` for axis of a continuous x-scale. Otherwise, ``false``.\n    labelFlushOffset\n        Indicates the number of pixels by which to offset flush-adjusted labels. For\n        example, a value of ``2`` will push flush-adjusted labels 2 pixels outward from the\n        center of the axis. Offsets can help the labels better visually group with\n        corresponding axis ticks.\n\n        **Default value:** ``0``.\n    labelFont\n        The font of the tick label.\n    labelFontSize\n        The font size of the label, in pixels.\n    labelFontStyle\n        Font style of the title.\n    labelFontWeight\n        Font weight of axis tick labels.\n    labelLimit\n        Maximum allowed pixel width of axis tick labels.\n\n        **Default value:** ``180``\n    labelLineHeight\n        Line height in pixels for multi-line label text or label text with ``\"line-top\"`` or\n        ``\"line-bottom\"`` baseline.\n    labelOffset\n        Position offset in pixels to apply to labels, in addition to tickOffset.\n\n        **Default value:** ``0``\n    labelOpacity\n        The opacity of the labels.\n    labelOverlap\n        The strategy to use for resolving overlap of axis labels. If ``false`` (the\n        default), no overlap reduction is attempted. If set to ``true`` or ``\"parity\"``, a\n        strategy of removing every other label is used (this works well for standard linear\n        axes). If set to ``\"greedy\"``, a linear scan of the labels is performed, removing\n        any labels that overlaps with the last visible label (this often works better for\n        log-scaled axes).\n\n        **Default value:** ``true`` for non-nominal fields with non-log scales; ``\"greedy\"``\n        for log scales; otherwise ``false``.\n    labelPadding\n        The padding in pixels between labels and ticks.\n\n        **Default value:** ``2``\n    labelSeparation\n        The minimum separation that must be between label bounding boxes for them to be\n        considered non-overlapping (default ``0``). This property is ignored if\n        *labelOverlap* resolution is not enabled.\n    labels\n        A boolean flag indicating if labels should be included as part of the axis.\n\n        **Default value:** ``true``.\n    maxExtent\n        The maximum extent in pixels that axis ticks and labels should use. This determines\n        a maximum offset value for axis titles.\n\n        **Default value:** ``undefined``.\n    minExtent\n        The minimum extent in pixels that axis ticks and labels should use. This determines\n        a minimum offset value for axis titles.\n\n        **Default value:** ``30`` for y-axis; ``undefined`` for x-axis.\n    offset\n        The offset, in pixels, by which to displace the axis from the edge of the enclosing\n        group or data rectangle.\n\n        **Default value:** derived from the `axis config\n        <https://vega.github.io/vega-lite/docs/config.html#facet-scale-config>`__'s\n        ``offset`` (``0`` by default)\n    orient\n        The orientation of the axis. One of ``\"top\"``, ``\"bottom\"``, ``\"left\"`` or\n        ``\"right\"``. The orientation can be used to further specialize the axis type (e.g.,\n        a y-axis oriented towards the right edge of the chart).\n\n        **Default value:** ``\"bottom\"`` for x-axes and ``\"left\"`` for y-axes.\n    position\n        The anchor position of the axis in pixels. For x-axes with top or bottom\n        orientation, this sets the axis group x coordinate. For y-axes with left or right\n        orientation, this sets the axis group y coordinate.\n\n        **Default value**: ``0``\n    style\n        A string or array of strings indicating the name of custom styles to apply to the\n        axis. A style is a named collection of axis property defined within the `style\n        configuration <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If\n        style is an array, later styles will override earlier styles.\n\n        **Default value:** (none) **Note:** Any specified style will augment the default\n        style. For example, an x-axis mark with ``\"style\": \"foo\"`` will use ``config.axisX``\n        and ``config.style.foo`` (the specified style ``\"foo\"`` has higher precedence).\n    tickBand\n        For band scales, indicates if ticks and grid lines should be placed at the\n        ``\"center\"`` of a band (default) or at the band extents to indicate intervals\n    tickCap\n        The stroke cap for the tick lines' ending style. One of ``\"butt\"``, ``\"round\"`` or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    tickColor\n        The color of the axis's tick.\n\n        **Default value:** ``\"gray\"``\n    tickCount\n        A desired number of ticks, for axes visualizing quantitative scales. The resulting\n        number may be different so that values are \"nice\" (multiples of 2, 5, 10) and lie\n        within the underlying scale's range.\n\n        For scales of type ``\"time\"`` or ``\"utc\"``, the tick count can instead be a time\n        interval specifier. Legal string values are ``\"millisecond\"``, ``\"second\"``,\n        ``\"minute\"``, ``\"hour\"``, ``\"day\"``, ``\"week\"``, ``\"month\"``, and ``\"year\"``.\n        Alternatively, an object-valued interval specifier of the form ``{\"interval\":\n        \"month\", \"step\": 3}`` includes a desired number of interval steps. Here, ticks are\n        generated for each quarter (Jan, Apr, Jul, Oct) boundary.\n\n        **Default value**: Determine using a formula ``ceil(width/40)`` for x and\n        ``ceil(height/40)`` for y.\n    tickDash\n        An array of alternating [stroke, space] lengths for dashed tick mark lines.\n    tickDashOffset\n        The pixel offset at which to start drawing with the tick mark dash array.\n    tickExtra\n        Boolean flag indicating if an extra axis tick should be added for the initial\n        position of the axis. This flag is useful for styling axes for ``band`` scales such\n        that ticks are placed on band boundaries rather in the middle of a band. Use in\n        conjunction with ``\"bandPosition\": 1`` and an axis ``\"padding\"`` value of ``0``.\n    tickMinStep\n        The minimum desired step between axis ticks, in terms of scale domain values. For\n        example, a value of ``1`` indicates that ticks should not be less than 1 unit apart.\n        If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if\n        necessary, to enforce the minimum step value.\n    tickOffset\n        Position offset in pixels to apply to ticks, labels, and gridlines.\n    tickOpacity\n        Opacity of the ticks.\n    tickRound\n        Boolean flag indicating if pixel position values should be rounded to the nearest\n        integer.\n\n        **Default value:** ``true``\n    tickSize\n        The size in pixels of axis ticks.\n\n        **Default value:** ``5``\n    tickWidth\n        The width, in pixels, of ticks.\n\n        **Default value:** ``1``\n    ticks\n        Boolean value that determines whether the axis should include ticks.\n\n        **Default value:** ``true``\n    title\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    titleAlign\n        Horizontal text alignment of axis titles.\n    titleAnchor\n        Text anchor position for placing axis titles.\n    titleAngle\n        Angle in degrees of axis titles.\n    titleBaseline\n        Vertical text baseline for axis titles. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or ``\"line-bottom\"``. The\n        ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and\n        ``\"bottom\"``, but are calculated relative to the *lineHeight* rather than *fontSize*\n        alone.\n    titleColor\n        Color of the title, can be in hex color code or regular color name.\n    titleFont\n        Font of the title. (e.g., ``\"Helvetica Neue\"``).\n    titleFontSize\n        Font size of the title.\n    titleFontStyle\n        Font style of the title.\n    titleFontWeight\n        Font weight of the title. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``)\n        or a number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400``\n        and ``\"bold\"`` = ``700``).\n    titleLimit\n        Maximum allowed pixel width of axis titles.\n    titleLineHeight\n        Line height in pixels for multi-line title text or title text with ``\"line-top\"`` or\n        ``\"line-bottom\"`` baseline.\n    titleOpacity\n        Opacity of the axis title.\n    titlePadding\n        The padding, in pixels, between title and axis.\n    titleX\n        X-coordinate of the axis title relative to the axis group.\n    titleY\n        Y-coordinate of the axis title relative to the axis group.\n    translate\n        Coordinate space translation offset for axis layout. By default, axes are translated\n        by a 0.5 pixel offset for both the x and y coordinates in order to align stroked\n        lines with the pixel grid. However, for vector graphics output these pixel-specific\n        adjustments may be undesirable, in which case translate can be changed (for example,\n        to zero).\n\n        **Default value:** ``0.5``\n    values\n        Explicitly set the visible axis tick values.\n    zindex\n        A non-negative integer indicating the z-index of the axis. If zindex is 0, axes\n        should be drawn behind all chart elements. To put them in front, set ``zindex`` to\n        ``1`` or more.\n\n        **Default value:** ``0`` (behind the marks).\n    \"\"\"\n\n    aria: bool\n    bandPosition: float\n    description: str\n    disable: bool\n    domain: bool\n    domainCap: StrokeCap_T\n    domainColor: ColorHex | ColorName_T | None\n    domainDash: Sequence[float]\n    domainDashOffset: float\n    domainOpacity: float\n    domainWidth: float\n    format: str | TimeFormatSpecifierKwds\n    formatType: str\n    grid: bool\n    gridCap: StrokeCap_T\n    gridColor: ColorHex | ColorName_T | None\n    gridDash: Sequence[float]\n    gridDashOffset: float\n    gridOpacity: float\n    gridWidth: float\n    labelAlign: Align_T\n    labelAngle: float\n    labelBaseline: TextBaseline_T\n    labelBound: bool | float\n    labelColor: ColorHex | ColorName_T | None\n    labelExpr: str\n    labelFlush: bool | float\n    labelFlushOffset: float\n    labelFont: str\n    labelFontSize: float\n    labelFontStyle: str\n    labelFontWeight: FontWeight_T\n    labelLimit: float\n    labelLineHeight: float\n    labelOffset: float\n    labelOpacity: float\n    labelOverlap: bool | Literal[\"greedy\", \"parity\"]\n    labelPadding: float\n    labelSeparation: float\n    labels: bool\n    maxExtent: float\n    minExtent: float\n    offset: float\n    orient: AxisOrient_T\n    position: float\n    style: str | Sequence[str]\n    tickBand: Literal[\"center\", \"extent\"]\n    tickCap: StrokeCap_T\n    tickColor: ColorHex | ColorName_T | None\n    tickCount: float | TimeIntervalStepKwds | TimeInterval_T\n    tickDash: Sequence[float]\n    tickDashOffset: float\n    tickExtra: bool\n    tickMinStep: float\n    tickOffset: float\n    tickOpacity: float\n    tickRound: bool\n    tickSize: float\n    tickWidth: float\n    ticks: bool\n    title: str | Sequence[str] | None\n    titleAlign: Align_T\n    titleAnchor: TitleAnchor_T\n    titleAngle: float\n    titleBaseline: TextBaseline_T\n    titleColor: ColorHex | ColorName_T | None\n    titleFont: str\n    titleFontSize: float\n    titleFontStyle: str\n    titleFontWeight: FontWeight_T\n    titleLimit: float\n    titleLineHeight: float\n    titleOpacity: float\n    titlePadding: float\n    titleX: float\n    titleY: float\n    translate: float\n    values: Sequence[str] | Sequence[bool] | Sequence[float] | Sequence[DateTimeKwds]\n    zindex: float\n\n\nclass AxisResolveMapKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.AxisResolveMap` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    x\n\n    y\n\n    \"\"\"\n\n    x: ResolveMode_T\n    y: ResolveMode_T\n\n\nclass BarConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.BarConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    align\n        The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).\n        One of ``\"left\"``, ``\"right\"``, ``\"center\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    angle\n        The rotation angle of the text, in degrees.\n    aria\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG element, removing the mark item from the ARIA accessibility tree.\n    ariaRole\n        Sets the type of user interface element of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"role\" attribute. Warning: this\n        property is experimental and may be changed in the future.\n    ariaRoleDescription\n        A human-readable, author-localized description for the role of the mark item for\n        `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"aria-roledescription\" attribute.\n        Warning: this property is experimental and may be changed in the future.\n    aspect\n        Whether to keep aspect ratio of image marks.\n    baseline\n        For text marks, the vertical text baseline. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, ``\"line-bottom\"``, or an\n        expression reference that provides one of the valid values. The ``\"line-top\"`` and\n        ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but are\n        calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.\n\n        For range marks, the vertical alignment of the marks. One of ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    binSpacing\n        Offset between bars for binned field. The ideal value for this is either 0\n        (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n        **Default value:** ``1``\n    blend\n        The color blend mode for drawing an item on its current background. Any valid `CSS\n        mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__\n        value can be used.\n\n        **Default value:** ``\"source-over\"``\n    color\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    continuousBandSize\n        The default size of the bars on continuous scales.\n\n        **Default value:** ``5``\n    cornerRadius\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cornerRadiusBottomLeft\n        The radius in pixels of rounded rectangles' bottom left corner.\n\n        **Default value:** ``0``\n    cornerRadiusBottomRight\n        The radius in pixels of rounded rectangles' bottom right corner.\n\n        **Default value:** ``0``\n    cornerRadiusEnd\n        * For vertical bars, top-left and top-right corner radius.\n\n        * For horizontal bars, top-right and bottom-right corner radius.\n    cornerRadiusTopLeft\n        The radius in pixels of rounded rectangles' top right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopRight\n        The radius in pixels of rounded rectangles' top left corner.\n\n        **Default value:** ``0``\n    cursor\n        The mouse cursor used over the mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    description\n        A text description of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.\n    dir\n        The direction of the text. One of ``\"ltr\"`` (left-to-right) or ``\"rtl\"``\n        (right-to-left). This property determines on which side is truncated in response to\n        the limit parameter.\n\n        **Default value:** ``\"ltr\"``\n    discreteBandSize\n        The default size of the bars with discrete dimensions. If unspecified, the default\n        size is  ``step-2``, which provides 2 pixel offset between bars.\n    dx\n        The horizontal offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    dy\n        The vertical offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    ellipsis\n        The ellipsis string for text truncated in response to the limit parameter.\n\n        **Default value:** ``\"…\"``\n    endAngle\n        The end angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    fill\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    fillOpacity\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    filled\n        Whether the mark's color should be used as fill color instead of stroke color.\n\n        **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well\n        as ``geoshape`` marks for `graticule\n        <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;\n        otherwise, ``true``.\n\n        **Note:** This property cannot be used in a `style config\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n    font\n        The typeface to set the text in (e.g., ``\"Helvetica Neue\"``).\n    fontSize\n        The font size, in pixels.\n\n        **Default value:** ``11``\n    fontStyle\n        The font style (e.g., ``\"italic\"``).\n    fontWeight\n        The font weight. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``) or a\n        number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400`` and\n        ``\"bold\"`` = ``700``).\n    height\n        Height of the marks.\n    href\n        A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\n    innerRadius\n        The inner radius in pixels of arc marks. ``innerRadius`` is an alias for\n        ``radius2``.\n\n        **Default value:** ``0``\n    interpolate\n        The line interpolation method to use for line and area marks. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"step-before\"``: alternate between vertical and horizontal segments, as in a\n          step function.\n        * ``\"step-after\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    invalid\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    limit\n        The maximum length of the text mark in pixels. The text value will be automatically\n        truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0`` -- indicating no limit\n    lineBreak\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property is ignored if the text is array-valued.\n    lineHeight\n        The line height in pixels (the spacing between subsequent lines of text) for\n        multi-line text marks.\n    minBandSize\n        The minimum band size for bar and rectangle marks. **Default value:** ``0.25``\n    opacity\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    order\n        For line and trail marks, this ``order`` property can be set to ``null`` or\n        ``false`` to make the lines use the original order in the data sources.\n    orient\n        The orientation of a non-stacked bar, tick, area, and line charts. The value is\n        either horizontal (default) or vertical.\n\n        * For bar, rule and tick, this determines whether the size of the bar and tick\n          should be applied to x or y dimension.\n        * For area, this property determines the orient property of the Vega output.\n        * For line and trail marks, this property determines the sort order of the points in\n          the line if ``config.sortLineBy`` is not specified. For stacked charts, this is\n          always determined by the orientation of the stack; therefore explicitly specified\n          value will be ignored.\n    outerRadius\n        The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.\n\n        **Default value:** ``0``\n    padAngle\n        The angular padding applied to sides of the arc, in radians.\n    radius\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    radius2\n        The secondary (inner) radius in pixels of arc marks.\n\n        **Default value:** ``0``\n    shape\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    size\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    smooth\n        A boolean flag (default true) indicating if the image should be smoothed when\n        resized. If false, individual pixels should be scaled directly rather than\n        interpolated with smoothing. For SVG rendering, this option may not work in some\n        browsers due to lack of standardization.\n    startAngle\n        The start angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    stroke\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    strokeCap\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit\n        The miter limit at which to bevel a line join.\n    strokeOffset\n        The offset in pixels at which to draw the group stroke and fill. If unspecified, the\n        default behavior is to dynamically offset stroked groups such that 1 pixel stroke\n        widths align with the pixel grid.\n    strokeOpacity\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth\n        The stroke width, in pixels.\n    tension\n        Depending on the interpolation type, sets the tension parameter (for line and area\n        marks).\n    text\n        Placeholder text if the ``text`` channel is not specified\n    theta\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    time\n\n    timeUnitBandPosition\n        Default relative band position for a time unit. If set to ``0``, the marks will be\n        positioned at the beginning of the time unit band step. If set to ``0.5``, the marks\n        will be positioned in the middle of the time unit band step.\n    timeUnitBandSize\n        Default relative band size for a time unit. If set to ``1``, the bandwidth of the\n        marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the\n        marks will be half of the time unit band step.\n    tooltip\n        The tooltip text string to show upon mouse hover or an object defining which fields\n        should the tooltip be derived from.\n\n        * If ``tooltip`` is ``true`` or ``{\"content\": \"encoding\"}``, then all fields from\n          ``encoding`` will be used.\n        * If ``tooltip`` is ``{\"content\": \"data\"}``, then all fields that appear in the\n          highlighted data point will be used.\n        * If set to ``null`` or ``false``, then no tooltip will be used.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n        **Default value:** ``null``\n    url\n        The URL of the image file for image marks.\n    width\n        Width of the marks.\n    x\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    y\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    \"\"\"\n\n    align: Align_T\n    angle: float\n    aria: bool\n    ariaRole: str\n    ariaRoleDescription: str\n    aspect: bool\n    baseline: TextBaseline_T\n    binSpacing: float\n    blend: Blend_T\n    color: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T\n    continuousBandSize: float\n    cornerRadius: float\n    cornerRadiusBottomLeft: float\n    cornerRadiusBottomRight: float\n    cornerRadiusEnd: float\n    cornerRadiusTopLeft: float\n    cornerRadiusTopRight: float\n    cursor: Cursor_T\n    description: str\n    dir: TextDirection_T\n    discreteBandSize: float\n    dx: float\n    dy: float\n    ellipsis: str\n    endAngle: float\n    fill: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None\n    fillOpacity: float\n    filled: bool\n    font: str\n    fontSize: float\n    fontStyle: str\n    fontWeight: FontWeight_T\n    height: float\n    href: str\n    innerRadius: float\n    interpolate: Interpolate_T\n    invalid: MarkInvalidDataMode_T | None\n    limit: float\n    lineBreak: str\n    lineHeight: float\n    minBandSize: float\n    opacity: float\n    order: bool | None\n    orient: Orientation_T\n    outerRadius: float\n    padAngle: float\n    radius: float\n    radius2: float\n    shape: str\n    size: float\n    smooth: bool\n    startAngle: float\n    stroke: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None\n    strokeCap: StrokeCap_T\n    strokeDash: Sequence[float]\n    strokeDashOffset: float\n    strokeJoin: StrokeJoin_T\n    strokeMiterLimit: float\n    strokeOffset: float\n    strokeOpacity: float\n    strokeWidth: float\n    tension: float\n    text: str | Sequence[str]\n    theta: float\n    theta2: float\n    time: float\n    timeUnitBandPosition: float\n    timeUnitBandSize: float\n    tooltip: str | bool | float | TooltipContentKwds | None\n    url: str\n    width: float\n    x: float | Literal[\"width\"]\n    x2: float | Literal[\"width\"]\n    y: float | Literal[\"height\"]\n    y2: float | Literal[\"height\"]\n\n\nclass BindCheckboxKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.BindCheckbox` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    input\n\n    debounce\n        If defined, delays event handling until the specified milliseconds have elapsed\n        since the last event was fired.\n    element\n        An optional CSS selector string indicating the parent element to which the input\n        element should be added. By default, all input elements are added within the parent\n        container of the Vega view.\n    name\n        By default, the signal name is used to label input elements. This ``name`` property\n        can be used instead to specify a custom label for the bound signal.\n    \"\"\"\n\n    input: Literal[\"checkbox\"]\n    debounce: float\n    element: str\n    name: str\n\n\nclass BindDirectKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.BindDirect` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    element\n        An input element that exposes a *value* property and supports the `EventTarget\n        <https://developer.mozilla.org/en-US/docs/Web/API/EventTarget>`__ interface, or a\n        CSS selector string to such an element. When the element updates and dispatches an\n        event, the *value* property will be used as the new, bound signal value. When the\n        signal updates independent of the element, the *value* property will be set to the\n        signal value and a new event will be dispatched on the element.\n    debounce\n        If defined, delays event handling until the specified milliseconds have elapsed\n        since the last event was fired.\n    event\n        The event (default ``\"input\"``) to listen for to track changes on the external\n        element.\n    \"\"\"\n\n    element: str\n    debounce: float\n    event: str\n\n\nclass BindInputKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.BindInput` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    autocomplete\n        A hint for form autofill. See the `HTML autocomplete attribute\n        <https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete>`__ for\n        additional information.\n    debounce\n        If defined, delays event handling until the specified milliseconds have elapsed\n        since the last event was fired.\n    element\n        An optional CSS selector string indicating the parent element to which the input\n        element should be added. By default, all input elements are added within the parent\n        container of the Vega view.\n    input\n        The type of input element to use. The valid values are ``\"checkbox\"``, ``\"radio\"``,\n        ``\"range\"``, ``\"select\"``, and any other legal `HTML form input type\n        <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input>`__.\n    name\n        By default, the signal name is used to label input elements. This ``name`` property\n        can be used instead to specify a custom label for the bound signal.\n    placeholder\n        Text that appears in the form control when it has no value set.\n    \"\"\"\n\n    autocomplete: str\n    debounce: float\n    element: str\n    input: str\n    name: str\n    placeholder: str\n\n\nclass BindRadioSelectKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.BindRadioSelect` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    input\n\n    options\n        An array of options to select from.\n    debounce\n        If defined, delays event handling until the specified milliseconds have elapsed\n        since the last event was fired.\n    element\n        An optional CSS selector string indicating the parent element to which the input\n        element should be added. By default, all input elements are added within the parent\n        container of the Vega view.\n    labels\n        An array of label strings to represent the ``options`` values. If unspecified, the\n        ``options`` value will be coerced to a string and used as the label.\n    name\n        By default, the signal name is used to label input elements. This ``name`` property\n        can be used instead to specify a custom label for the bound signal.\n    \"\"\"\n\n    input: Literal[\"radio\", \"select\"]\n    options: Sequence[Any]\n    debounce: float\n    element: str\n    labels: Sequence[str]\n    name: str\n\n\nclass BindRangeKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.BindRange` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    input\n\n    debounce\n        If defined, delays event handling until the specified milliseconds have elapsed\n        since the last event was fired.\n    element\n        An optional CSS selector string indicating the parent element to which the input\n        element should be added. By default, all input elements are added within the parent\n        container of the Vega view.\n    max\n        Sets the maximum slider value. Defaults to the larger of the signal value and\n        ``100``.\n    min\n        Sets the minimum slider value. Defaults to the smaller of the signal value and\n        ``0``.\n    name\n        By default, the signal name is used to label input elements. This ``name`` property\n        can be used instead to specify a custom label for the bound signal.\n    step\n        Sets the minimum slider increment. If undefined, the step size will be automatically\n        determined based on the ``min`` and ``max`` values.\n    \"\"\"\n\n    input: Literal[\"range\"]\n    debounce: float\n    element: str\n    max: float\n    min: float\n    name: str\n    step: float\n\n\nclass BoxPlotConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.BoxPlotConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    box\n\n    extent\n        The extent of the whiskers. Available options include:\n\n        * ``\"min-max\"``: min and max are the lower and upper whiskers respectively.\n        * A number representing multiple of the interquartile range. This number will be\n          multiplied by the IQR to determine whisker boundary, which spans from the smallest\n          data to the largest data within the range *[Q1 - k * IQR, Q3 + k * IQR]* where\n          *Q1* and *Q3* are the first and third quartiles while *IQR* is the interquartile\n          range (*Q3-Q1*).\n\n        **Default value:** ``1.5``.\n    median\n\n    outliers\n\n    rule\n\n    size\n        Size of the box and median tick of a box plot\n    ticks\n\n    \"\"\"\n\n    box: (\n        bool\n        | BarConfigKwds\n        | AreaConfigKwds\n        | LineConfigKwds\n        | MarkConfigKwds\n        | RectConfigKwds\n        | TickConfigKwds\n    )\n    extent: float | Literal[\"min-max\"]\n    median: (\n        bool\n        | BarConfigKwds\n        | AreaConfigKwds\n        | LineConfigKwds\n        | MarkConfigKwds\n        | RectConfigKwds\n        | TickConfigKwds\n    )\n    outliers: (\n        bool\n        | BarConfigKwds\n        | AreaConfigKwds\n        | LineConfigKwds\n        | MarkConfigKwds\n        | RectConfigKwds\n        | TickConfigKwds\n    )\n    rule: (\n        bool\n        | BarConfigKwds\n        | AreaConfigKwds\n        | LineConfigKwds\n        | MarkConfigKwds\n        | RectConfigKwds\n        | TickConfigKwds\n    )\n    size: float\n    ticks: (\n        bool\n        | BarConfigKwds\n        | AreaConfigKwds\n        | LineConfigKwds\n        | MarkConfigKwds\n        | RectConfigKwds\n        | TickConfigKwds\n    )\n\n\nclass BrushConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.BrushConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    cursor\n        The mouse cursor used over the interval mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    fill\n        The fill color of the interval mark.\n\n        **Default value:** ``\"#333333\"``\n    fillOpacity\n        The fill opacity of the interval mark (a value between ``0`` and ``1``).\n\n        **Default value:** ``0.125``\n    stroke\n        The stroke color of the interval mark.\n\n        **Default value:** ``\"#ffffff\"``\n    strokeDash\n        An array of alternating stroke and space lengths, for creating dashed or dotted\n        lines.\n    strokeDashOffset\n        The offset (in pixels) with which to begin drawing the stroke dash array.\n    strokeOpacity\n        The stroke opacity of the interval mark (a value between ``0`` and ``1``).\n    strokeWidth\n        The stroke width of the interval mark.\n    \"\"\"\n\n    cursor: Cursor_T\n    fill: ColorHex | ColorName_T\n    fillOpacity: float\n    stroke: ColorHex | ColorName_T\n    strokeDash: Sequence[float]\n    strokeDashOffset: float\n    strokeOpacity: float\n    strokeWidth: float\n\n\nclass CompositionConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.CompositionConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    columns\n        The number of columns to include in the view composition layout.\n\n        **Default value**: ``undefined`` -- An infinite number of columns (a single row)\n        will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the\n        ``column`` channel (for ``facet`` and ``repeat``).\n\n        **Note**:\n\n        1) This property is only for:\n\n        * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)\n        * the ``facet`` and ``repeat`` operator with one field/repetition definition\n          (without row/column nesting)\n\n        2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)\n        and to using the ``row`` channel (for ``facet`` and ``repeat``).\n    spacing\n        The default spacing in pixels between composed sub-views.\n\n        **Default value**: ``20``\n    \"\"\"\n\n    columns: float\n    spacing: float\n\n\nclass ConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.Config` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    arc\n        Arc-specific Config\n    area\n        Area-Specific Config\n    aria\n        A boolean flag indicating if ARIA default attributes should be included for marks\n        and guides (SVG output only). If false, the ``\"aria-hidden\"`` attribute will be set\n        for all guides, removing them from the ARIA accessibility tree and Vega-Lite will\n        not generate default descriptions for marks.\n\n        **Default value:** ``true``.\n    autosize\n        How the visualization size should be determined. If a string, should be one of\n        ``\"pad\"``, ``\"fit\"`` or ``\"none\"``. Object values can additionally specify\n        parameters for content sizing and automatic resizing.\n\n        **Default value**: ``pad``\n    axis\n        Axis configuration, which determines default properties for all ``x`` and ``y``\n        `axes <https://vega.github.io/vega-lite/docs/axis.html>`__. For a full list of axis\n        configuration options, please see the `corresponding section of the axis\n        documentation <https://vega.github.io/vega-lite/docs/axis.html#config>`__.\n    axisBand\n        Config for axes with \"band\" scales.\n    axisBottom\n        Config for x-axis along the bottom edge of the chart.\n    axisDiscrete\n        Config for axes with \"point\" or \"band\" scales.\n    axisLeft\n        Config for y-axis along the left edge of the chart.\n    axisPoint\n        Config for axes with \"point\" scales.\n    axisQuantitative\n        Config for quantitative axes.\n    axisRight\n        Config for y-axis along the right edge of the chart.\n    axisTemporal\n        Config for temporal axes.\n    axisTop\n        Config for x-axis along the top edge of the chart.\n    axisX\n        X-axis specific config.\n    axisXBand\n        Config for x-axes with \"band\" scales.\n    axisXDiscrete\n        Config for x-axes with \"point\" or \"band\" scales.\n    axisXPoint\n        Config for x-axes with \"point\" scales.\n    axisXQuantitative\n        Config for x-quantitative axes.\n    axisXTemporal\n        Config for x-temporal axes.\n    axisY\n        Y-axis specific config.\n    axisYBand\n        Config for y-axes with \"band\" scales.\n    axisYDiscrete\n        Config for y-axes with \"point\" or \"band\" scales.\n    axisYPoint\n        Config for y-axes with \"point\" scales.\n    axisYQuantitative\n        Config for y-quantitative axes.\n    axisYTemporal\n        Config for y-temporal axes.\n    background\n        CSS color property to use as the background of the entire view.\n\n        **Default value:** ``\"white\"``\n    bar\n        Bar-Specific Config\n    boxplot\n        Box Config\n    circle\n        Circle-Specific Config\n    concat\n        Default configuration for all concatenation and repeat view composition operators\n        (``concat``, ``hconcat``, ``vconcat``, and ``repeat``)\n    countTitle\n        Default axis and legend title for count fields.\n\n        **Default value:** ``'Count of Records``.\n    customFormatTypes\n        Allow the ``formatType`` property for text marks and guides to accept a custom\n        formatter function `registered as a Vega expression\n        <https://vega.github.io/vega-lite/usage/compile.html#format-type>`__.\n    errorband\n        ErrorBand Config\n    errorbar\n        ErrorBar Config\n    facet\n        Default configuration for the ``facet`` view composition operator\n    fieldTitle\n        Defines how Vega-Lite generates title for fields. There are three possible styles:\n\n        * ``\"verbal\"`` (Default) - displays function in a verbal style (e.g., \"Sum of\n          field\", \"Year-month of date\", \"field (binned)\").\n        * ``\"function\"`` - displays function using parentheses and capitalized texts (e.g.,\n          \"SUM(field)\", \"YEARMONTH(date)\", \"BIN(field)\").\n        * ``\"plain\"`` - displays only the field name without functions (e.g., \"field\",\n          \"date\", \"field\").\n    font\n        Default font for all text marks, titles, and labels.\n    geoshape\n        Geoshape-Specific Config\n    header\n        Header configuration, which determines default properties for all `headers\n        <https://vega.github.io/vega-lite/docs/header.html>`__.\n\n        For a full list of header configuration options, please see the `corresponding\n        section of in the header documentation\n        <https://vega.github.io/vega-lite/docs/header.html#config>`__.\n    headerColumn\n        Header configuration, which determines default properties for column `headers\n        <https://vega.github.io/vega-lite/docs/header.html>`__.\n\n        For a full list of header configuration options, please see the `corresponding\n        section of in the header documentation\n        <https://vega.github.io/vega-lite/docs/header.html#config>`__.\n    headerFacet\n        Header configuration, which determines default properties for non-row/column facet\n        `headers <https://vega.github.io/vega-lite/docs/header.html>`__.\n\n        For a full list of header configuration options, please see the `corresponding\n        section of in the header documentation\n        <https://vega.github.io/vega-lite/docs/header.html#config>`__.\n    headerRow\n        Header configuration, which determines default properties for row `headers\n        <https://vega.github.io/vega-lite/docs/header.html>`__.\n\n        For a full list of header configuration options, please see the `corresponding\n        section of in the header documentation\n        <https://vega.github.io/vega-lite/docs/header.html#config>`__.\n    image\n        Image-specific Config\n    legend\n        Legend configuration, which determines default properties for all `legends\n        <https://vega.github.io/vega-lite/docs/legend.html>`__. For a full list of legend\n        configuration options, please see the `corresponding section of in the legend\n        documentation <https://vega.github.io/vega-lite/docs/legend.html#config>`__.\n    line\n        Line-Specific Config\n    lineBreak\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property provides a global default for text marks, which is\n        overridden by mark or style config settings, and by the lineBreak mark encoding\n        channel. If signal-valued, either string or regular expression (regexp) values are\n        valid.\n    locale\n        Locale definitions for string parsing and formatting of number and date values. The\n        locale object should contain ``number`` and/or ``time`` properties with `locale\n        definitions <https://vega.github.io/vega/docs/api/locale/>`__. Locale definitions\n        provided in the config block may be overridden by the View constructor locale\n        option.\n    mark\n        Mark Config\n    normalizedNumberFormat\n        If normalizedNumberFormatType is not specified, D3 number format for axis labels,\n        text marks, and tooltips of normalized stacked fields (fields with ``stack:\n        \"normalize\"``). For example ``\"s\"`` for SI units. Use `D3's number format pattern\n        <https://github.com/d3/d3-format#locale_format>`__.\n\n        If ``config.normalizedNumberFormatType`` is specified and\n        ``config.customFormatTypes`` is ``true``, this value will be passed as ``format``\n        alongside ``datum.value`` to the ``config.numberFormatType`` function. **Default\n        value:** ``%``\n    normalizedNumberFormatType\n        `Custom format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for\n        ``config.normalizedNumberFormat``.\n\n        **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is\n        exposed as `format in Vega-Expression\n        <https://vega.github.io/vega/docs/expressions/#format>`__. **Note:** You must also\n        set ``customFormatTypes`` to ``true`` to use this feature.\n    numberFormat\n        If numberFormatType is not specified, D3 number format for guide labels, text marks,\n        and tooltips of non-normalized fields (fields *without* ``stack: \"normalize\"``). For\n        example ``\"s\"`` for SI units. Use `D3's number format pattern\n        <https://github.com/d3/d3-format#locale_format>`__.\n\n        If ``config.numberFormatType`` is specified and ``config.customFormatTypes`` is\n        ``true``, this value will be passed as ``format`` alongside ``datum.value`` to the\n        ``config.numberFormatType`` function.\n    numberFormatType\n        `Custom format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for\n        ``config.numberFormat``.\n\n        **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is\n        exposed as `format in Vega-Expression\n        <https://vega.github.io/vega/docs/expressions/#format>`__. **Note:** You must also\n        set ``customFormatTypes`` to ``true`` to use this feature.\n    padding\n        The default visualization padding, in pixels, from the edge of the visualization\n        canvas to the data rectangle. If a number, specifies padding for all sides. If an\n        object, the value should have the format ``{\"left\": 5, \"top\": 5, \"right\": 5,\n        \"bottom\": 5}`` to specify padding for each side of the visualization.\n\n        **Default value**: ``5``\n    params\n        Dynamic variables or selections that parameterize a visualization.\n    point\n        Point-Specific Config\n    projection\n        Projection configuration, which determines default properties for all `projections\n        <https://vega.github.io/vega-lite/docs/projection.html>`__. For a full list of\n        projection configuration options, please see the `corresponding section of the\n        projection documentation\n        <https://vega.github.io/vega-lite/docs/projection.html#config>`__.\n    range\n        An object hash that defines default range arrays or schemes for using with scales.\n        For a full list of scale range configuration options, please see the `corresponding\n        section of the scale documentation\n        <https://vega.github.io/vega-lite/docs/scale.html#config>`__.\n    rect\n        Rect-Specific Config\n    rule\n        Rule-Specific Config\n    scale\n        Scale configuration determines default properties for all `scales\n        <https://vega.github.io/vega-lite/docs/scale.html>`__. For a full list of scale\n        configuration options, please see the `corresponding section of the scale\n        documentation <https://vega.github.io/vega-lite/docs/scale.html#config>`__.\n    selection\n        An object hash for defining default properties for each type of selections.\n    square\n        Square-Specific Config\n    style\n        An object hash that defines key-value mappings to determine default properties for\n        marks with a given `style\n        <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__. The keys represent\n        styles names; the values have to be valid `mark configuration objects\n        <https://vega.github.io/vega-lite/docs/mark.html#config>`__.\n    text\n        Text-Specific Config\n    tick\n        Tick-Specific Config\n    timeFormat\n        Default time format for raw time values (without time units) in text marks, legend\n        labels and header labels.\n\n        **Default value:** ``\"%b %d, %Y\"`` **Note:** Axes automatically determine the format\n        for each label automatically so this config does not affect axes.\n    timeFormatType\n        `Custom format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for\n        ``config.timeFormat``.\n\n        **Default value:** ``undefined`` -- This is equilvalent to call D3-time-format,\n        which is exposed as `timeFormat in Vega-Expression\n        <https://vega.github.io/vega/docs/expressions/#timeFormat>`__. **Note:** You must\n        also set ``customFormatTypes`` to ``true`` and there must *not* be a ``timeUnit``\n        defined to use this feature.\n    title\n        Title configuration, which determines default properties for all `titles\n        <https://vega.github.io/vega-lite/docs/title.html>`__. For a full list of title\n        configuration options, please see the `corresponding section of the title\n        documentation <https://vega.github.io/vega-lite/docs/title.html#config>`__.\n    tooltipFormat\n        Define `custom format configuration\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ for tooltips. If\n        unspecified, default format config will be applied.\n    trail\n        Trail-Specific Config\n    view\n        Default properties for `single view plots\n        <https://vega.github.io/vega-lite/docs/spec.html#single>`__.\n    \"\"\"\n\n    arc: RectConfigKwds\n    area: AreaConfigKwds\n    aria: bool\n    autosize: AutoSizeParamsKwds | AutosizeType_T\n    axis: AxisConfigKwds\n    axisBand: AxisConfigKwds\n    axisBottom: AxisConfigKwds\n    axisDiscrete: AxisConfigKwds\n    axisLeft: AxisConfigKwds\n    axisPoint: AxisConfigKwds\n    axisQuantitative: AxisConfigKwds\n    axisRight: AxisConfigKwds\n    axisTemporal: AxisConfigKwds\n    axisTop: AxisConfigKwds\n    axisX: AxisConfigKwds\n    axisXBand: AxisConfigKwds\n    axisXDiscrete: AxisConfigKwds\n    axisXPoint: AxisConfigKwds\n    axisXQuantitative: AxisConfigKwds\n    axisXTemporal: AxisConfigKwds\n    axisY: AxisConfigKwds\n    axisYBand: AxisConfigKwds\n    axisYDiscrete: AxisConfigKwds\n    axisYPoint: AxisConfigKwds\n    axisYQuantitative: AxisConfigKwds\n    axisYTemporal: AxisConfigKwds\n    background: ColorHex | ColorName_T\n    bar: BarConfigKwds\n    boxplot: BoxPlotConfigKwds\n    circle: MarkConfigKwds\n    concat: CompositionConfigKwds\n    countTitle: str\n    customFormatTypes: bool\n    errorband: ErrorBandConfigKwds\n    errorbar: ErrorBarConfigKwds\n    facet: CompositionConfigKwds\n    fieldTitle: Literal[\"verbal\", \"functional\", \"plain\"]\n    font: str\n    geoshape: MarkConfigKwds\n    header: HeaderConfigKwds\n    headerColumn: HeaderConfigKwds\n    headerFacet: HeaderConfigKwds\n    headerRow: HeaderConfigKwds\n    image: RectConfigKwds\n    legend: LegendConfigKwds\n    line: LineConfigKwds\n    lineBreak: str\n    locale: LocaleKwds\n    mark: MarkConfigKwds\n    normalizedNumberFormat: str\n    normalizedNumberFormatType: str\n    numberFormat: str\n    numberFormatType: str\n    padding: float | PaddingKwds\n    params: Sequence[VariableParameterKwds | TopLevelSelectionParameterKwds]\n    point: MarkConfigKwds\n    projection: ProjectionConfigKwds\n    range: RangeConfigKwds\n    rect: RectConfigKwds\n    rule: MarkConfigKwds\n    scale: ScaleConfigKwds\n    selection: SelectionConfigKwds\n    square: MarkConfigKwds\n    style: StyleConfigIndexKwds\n    text: MarkConfigKwds\n    tick: TickConfigKwds\n    timeFormat: str\n    timeFormatType: str\n    title: TitleConfigKwds\n    tooltipFormat: FormatConfigKwds\n    trail: LineConfigKwds\n    view: ViewConfigKwds\n\n\nclass DateTimeKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.DateTime` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    date\n        Integer value representing the date (day of the month) from 1-31.\n    day\n        Value representing the day of a week. This can be one of: (1) integer value -- ``1``\n        represents Monday; (2) case-insensitive day name (e.g., ``\"Monday\"``); (3)\n        case-insensitive, 3-character short day name (e.g., ``\"Mon\"``).\n\n        **Warning:** A DateTime definition object with ``day``** should not be combined with\n        ``year``, ``quarter``, ``month``, or ``date``.\n    hours\n        Integer value representing the hour of a day from 0-23.\n    milliseconds\n        Integer value representing the millisecond segment of time.\n    minutes\n        Integer value representing the minute segment of time from 0-59.\n    month\n        One of: (1) integer value representing the month from ``1``-``12``. ``1`` represents\n        January; (2) case-insensitive month name (e.g., ``\"January\"``); (3)\n        case-insensitive, 3-character short month name (e.g., ``\"Jan\"``).\n    quarter\n        Integer value representing the quarter of the year (from 1-4).\n    seconds\n        Integer value representing the second segment (0-59) of a time value\n    utc\n        A boolean flag indicating if date time is in utc time. If false, the date time is in\n        local time\n    year\n        Integer value representing the year.\n    \"\"\"\n\n    date: float\n    day: str | float\n    hours: float\n    milliseconds: float\n    minutes: float\n    month: str | float\n    quarter: float\n    seconds: float\n    utc: bool\n    year: float\n\n\nclass DerivedStreamKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.DerivedStream` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    stream\n\n    between\n\n    consume\n\n    debounce\n\n    filter\n\n    markname\n\n    marktype\n\n    throttle\n\n    \"\"\"\n\n    stream: MergedStreamKwds | DerivedStreamKwds\n    between: Sequence[MergedStreamKwds | DerivedStreamKwds]\n    consume: bool\n    debounce: float\n    filter: str | Sequence[str]\n    markname: str\n    marktype: MarkType_T\n    throttle: float\n\n\nclass ErrorBandConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.ErrorBandConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    band\n\n    borders\n\n    extent\n        The extent of the band. Available options include:\n\n        * ``\"ci\"``: Extend the band to the 95% bootstrapped confidence interval of the mean.\n        * ``\"stderr\"``: The size of band are set to the value of standard error, extending\n          from the mean.\n        * ``\"stdev\"``: The size of band are set to the value of standard deviation,\n          extending from the mean.\n        * ``\"iqr\"``: Extend the band to the q1 and q3.\n\n        **Default value:** ``\"stderr\"``.\n    interpolate\n        The line interpolation method for the error band. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: a piecewise constant function (a step function) consisting of\n          alternating horizontal and vertical lines. The y-value changes at the midpoint of\n          each pair of adjacent x-values.\n        * ``\"step-before\"``: a piecewise constant function (a step function) consisting of\n          alternating horizontal and vertical lines. The y-value changes before the x-value.\n        * ``\"step-after\"``: a piecewise constant function (a step function) consisting of\n          alternating horizontal and vertical lines. The y-value changes after the x-value.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    tension\n        The tension parameter for the interpolation type of the error band.\n    \"\"\"\n\n    band: (\n        bool\n        | BarConfigKwds\n        | AreaConfigKwds\n        | LineConfigKwds\n        | MarkConfigKwds\n        | RectConfigKwds\n        | TickConfigKwds\n    )\n    borders: (\n        bool\n        | BarConfigKwds\n        | AreaConfigKwds\n        | LineConfigKwds\n        | MarkConfigKwds\n        | RectConfigKwds\n        | TickConfigKwds\n    )\n    extent: ErrorBarExtent_T\n    interpolate: Interpolate_T\n    tension: float\n\n\nclass ErrorBarConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.ErrorBarConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    extent\n        The extent of the rule. Available options include:\n\n        * ``\"ci\"``: Extend the rule to the 95% bootstrapped confidence interval of the mean.\n        * ``\"stderr\"``: The size of rule are set to the value of standard error, extending\n          from the mean.\n        * ``\"stdev\"``: The size of rule are set to the value of standard deviation,\n          extending from the mean.\n        * ``\"iqr\"``: Extend the rule to the q1 and q3.\n\n        **Default value:** ``\"stderr\"``.\n    rule\n\n    size\n        Size of the ticks of an error bar\n    thickness\n        Thickness of the ticks and the bar of an error bar\n    ticks\n\n    \"\"\"\n\n    extent: ErrorBarExtent_T\n    rule: (\n        bool\n        | BarConfigKwds\n        | AreaConfigKwds\n        | LineConfigKwds\n        | MarkConfigKwds\n        | RectConfigKwds\n        | TickConfigKwds\n    )\n    size: float\n    thickness: float\n    ticks: (\n        bool\n        | BarConfigKwds\n        | AreaConfigKwds\n        | LineConfigKwds\n        | MarkConfigKwds\n        | RectConfigKwds\n        | TickConfigKwds\n    )\n\n\nclass FeatureGeometryGeoJsonPropertiesKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.FeatureGeometryGeoJsonProperties` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    geometry\n        The feature's geometry\n    properties\n        Properties associated with this feature.\n    type\n        Specifies the type of GeoJSON object.\n    bbox\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    id\n        A value that uniquely identifies this feature in a\n        https://tools.ietf.org/html/rfc7946#section-3.2.\n    \"\"\"\n\n    geometry: (\n        PointKwds\n        | PolygonKwds\n        | LineStringKwds\n        | MultiPointKwds\n        | MultiPolygonKwds\n        | MultiLineStringKwds\n        | GeometryCollectionKwds\n    )\n    properties: None\n    type: Literal[\"Feature\"]\n    bbox: Sequence[float]\n    id: str | float\n\n\nclass FormatConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.FormatConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    normalizedNumberFormat\n        If normalizedNumberFormatType is not specified, D3 number format for axis labels,\n        text marks, and tooltips of normalized stacked fields (fields with ``stack:\n        \"normalize\"``). For example ``\"s\"`` for SI units. Use `D3's number format pattern\n        <https://github.com/d3/d3-format#locale_format>`__.\n\n        If ``config.normalizedNumberFormatType`` is specified and\n        ``config.customFormatTypes`` is ``true``, this value will be passed as ``format``\n        alongside ``datum.value`` to the ``config.numberFormatType`` function. **Default\n        value:** ``%``\n    normalizedNumberFormatType\n        `Custom format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for\n        ``config.normalizedNumberFormat``.\n\n        **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is\n        exposed as `format in Vega-Expression\n        <https://vega.github.io/vega/docs/expressions/#format>`__. **Note:** You must also\n        set ``customFormatTypes`` to ``true`` to use this feature.\n    numberFormat\n        If numberFormatType is not specified, D3 number format for guide labels, text marks,\n        and tooltips of non-normalized fields (fields *without* ``stack: \"normalize\"``). For\n        example ``\"s\"`` for SI units. Use `D3's number format pattern\n        <https://github.com/d3/d3-format#locale_format>`__.\n\n        If ``config.numberFormatType`` is specified and ``config.customFormatTypes`` is\n        ``true``, this value will be passed as ``format`` alongside ``datum.value`` to the\n        ``config.numberFormatType`` function.\n    numberFormatType\n        `Custom format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for\n        ``config.numberFormat``.\n\n        **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is\n        exposed as `format in Vega-Expression\n        <https://vega.github.io/vega/docs/expressions/#format>`__. **Note:** You must also\n        set ``customFormatTypes`` to ``true`` to use this feature.\n    timeFormat\n        Default time format for raw time values (without time units) in text marks, legend\n        labels and header labels.\n\n        **Default value:** ``\"%b %d, %Y\"`` **Note:** Axes automatically determine the format\n        for each label automatically so this config does not affect axes.\n    timeFormatType\n        `Custom format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for\n        ``config.timeFormat``.\n\n        **Default value:** ``undefined`` -- This is equilvalent to call D3-time-format,\n        which is exposed as `timeFormat in Vega-Expression\n        <https://vega.github.io/vega/docs/expressions/#timeFormat>`__. **Note:** You must\n        also set ``customFormatTypes`` to ``true`` and there must *not* be a ``timeUnit``\n        defined to use this feature.\n    \"\"\"\n\n    normalizedNumberFormat: str\n    normalizedNumberFormatType: str\n    numberFormat: str\n    numberFormatType: str\n    timeFormat: str\n    timeFormatType: str\n\n\nclass GeoJsonFeatureKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.GeoJsonFeature` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    geometry\n        The feature's geometry\n    properties\n        Properties associated with this feature.\n    type\n        Specifies the type of GeoJSON object.\n    bbox\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    id\n        A value that uniquely identifies this feature in a\n        https://tools.ietf.org/html/rfc7946#section-3.2.\n    \"\"\"\n\n    geometry: (\n        PointKwds\n        | PolygonKwds\n        | LineStringKwds\n        | MultiPointKwds\n        | MultiPolygonKwds\n        | MultiLineStringKwds\n        | GeometryCollectionKwds\n    )\n    properties: None\n    type: Literal[\"Feature\"]\n    bbox: Sequence[float]\n    id: str | float\n\n\nclass GeoJsonFeatureCollectionKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.GeoJsonFeatureCollection` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    features\n\n    type\n        Specifies the type of GeoJSON object.\n    bbox\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    features: Sequence[FeatureGeometryGeoJsonPropertiesKwds]\n    type: Literal[\"FeatureCollection\"]\n    bbox: Sequence[float]\n\n\nclass GeometryCollectionKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.GeometryCollection` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    geometries\n\n    type\n        Specifies the type of GeoJSON object.\n    bbox\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    geometries: Sequence[\n        PointKwds\n        | PolygonKwds\n        | LineStringKwds\n        | MultiPointKwds\n        | MultiPolygonKwds\n        | MultiLineStringKwds\n        | GeometryCollectionKwds\n    ]\n    type: Literal[\"GeometryCollection\"]\n    bbox: Sequence[float]\n\n\nclass GradientStopKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.GradientStop` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    color\n        The color value at this point in the gradient.\n    offset\n        The offset fraction for the color stop, indicating its position within the gradient.\n    \"\"\"\n\n    color: ColorHex | ColorName_T\n    offset: float\n\n\nclass HeaderConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.HeaderConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    format\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    labelAlign\n        Horizontal text alignment of header labels. One of ``\"left\"``, ``\"center\"``, or\n        ``\"right\"``.\n    labelAnchor\n        The anchor position for placing the labels. One of ``\"start\"``, ``\"middle\"``, or\n        ``\"end\"``. For example, with a label orientation of top these anchor positions map\n        to a left-, center-, or right-aligned label.\n    labelAngle\n        The rotation angle of the header labels.\n\n        **Default value:** ``0`` for column header, ``-90`` for row header.\n    labelBaseline\n        The vertical text baseline for the header labels. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or ``\"line-bottom\"``. The\n        ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and\n        ``\"bottom\"``, but are calculated relative to the ``titleLineHeight`` rather than\n        ``titleFontSize`` alone.\n    labelColor\n        The color of the header label, can be in hex color code or regular color name.\n    labelExpr\n        `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing\n        labels.\n\n        **Note:** The label text and value can be assessed via the ``label`` and ``value``\n        properties of the header's backing ``datum`` object.\n    labelFont\n        The font of the header label.\n    labelFontSize\n        The font size of the header label, in pixels.\n    labelFontStyle\n        The font style of the header label.\n    labelFontWeight\n        The font weight of the header label.\n    labelLimit\n        The maximum length of the header label in pixels. The text value will be\n        automatically truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0``, indicating no limit\n    labelLineHeight\n        Line height in pixels for multi-line header labels or title text with ``\"line-top\"``\n        or ``\"line-bottom\"`` baseline.\n    labelOrient\n        The orientation of the header label. One of ``\"top\"``, ``\"bottom\"``, ``\"left\"`` or\n        ``\"right\"``.\n    labelPadding\n        The padding, in pixel, between facet header's label and the plot.\n\n        **Default value:** ``10``\n    labels\n        A boolean flag indicating if labels should be included as part of the header.\n\n        **Default value:** ``true``.\n    orient\n        Shortcut for setting both labelOrient and titleOrient.\n    title\n        Set to null to disable title for the axis, legend, or header.\n    titleAlign\n        Horizontal text alignment (to the anchor) of header titles.\n    titleAnchor\n        The anchor position for placing the title. One of ``\"start\"``, ``\"middle\"``, or\n        ``\"end\"``. For example, with an orientation of top these anchor positions map to a\n        left-, center-, or right-aligned title.\n    titleAngle\n        The rotation angle of the header title.\n\n        **Default value:** ``0``.\n    titleBaseline\n        The vertical text baseline for the header title. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or ``\"line-bottom\"``. The\n        ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and\n        ``\"bottom\"``, but are calculated relative to the ``titleLineHeight`` rather than\n        ``titleFontSize`` alone.\n\n        **Default value:** ``\"middle\"``\n    titleColor\n        Color of the header title, can be in hex color code or regular color name.\n    titleFont\n        Font of the header title. (e.g., ``\"Helvetica Neue\"``).\n    titleFontSize\n        Font size of the header title.\n    titleFontStyle\n        The font style of the header title.\n    titleFontWeight\n        Font weight of the header title. This can be either a string (e.g ``\"bold\"``,\n        ``\"normal\"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where\n        ``\"normal\"`` = ``400`` and ``\"bold\"`` = ``700``).\n    titleLimit\n        The maximum length of the header title in pixels. The text value will be\n        automatically truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0``, indicating no limit\n    titleLineHeight\n        Line height in pixels for multi-line header title text or title text with\n        ``\"line-top\"`` or ``\"line-bottom\"`` baseline.\n    titleOrient\n        The orientation of the header title. One of ``\"top\"``, ``\"bottom\"``, ``\"left\"`` or\n        ``\"right\"``.\n    titlePadding\n        The padding, in pixel, between facet header's title and the label.\n\n        **Default value:** ``10``\n    \"\"\"\n\n    format: str | TimeFormatSpecifierKwds\n    formatType: str\n    labelAlign: Align_T\n    labelAnchor: TitleAnchor_T\n    labelAngle: float\n    labelBaseline: TextBaseline_T\n    labelColor: ColorHex | ColorName_T\n    labelExpr: str\n    labelFont: str\n    labelFontSize: float\n    labelFontStyle: str\n    labelFontWeight: FontWeight_T\n    labelLimit: float\n    labelLineHeight: float\n    labelOrient: Orient_T\n    labelPadding: float\n    labels: bool\n    orient: Orient_T\n    title: None\n    titleAlign: Align_T\n    titleAnchor: TitleAnchor_T\n    titleAngle: float\n    titleBaseline: TextBaseline_T\n    titleColor: ColorHex | ColorName_T\n    titleFont: str\n    titleFontSize: float\n    titleFontStyle: str\n    titleFontWeight: FontWeight_T\n    titleLimit: float\n    titleLineHeight: float\n    titleOrient: Orient_T\n    titlePadding: float\n\n\nclass IntervalSelectionConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.IntervalSelectionConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    type\n        Determines the default event processing and data query for the selection. Vega-Lite\n        currently supports two selection types:\n\n        * ``\"point\"`` -- to select multiple discrete data values; the first value is\n          selected on ``click`` and additional values toggled on shift-click.\n        * ``\"interval\"`` -- to select a continuous range of data values on ``drag``.\n    clear\n        Clears the selection, emptying it of all values. This property can be a `Event\n        Stream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable\n        clear.\n\n        **Default value:** ``dblclick``.\n\n        **See also:** `clear examples\n        <https://vega.github.io/vega-lite/docs/selection.html#clear>`__ in the\n        documentation.\n    encodings\n        An array of encoding channels. The corresponding data field values must match for a\n        data tuple to fall within the selection.\n\n        **See also:** The `projection with encodings and fields section\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the\n        documentation.\n    fields\n        An array of field names whose values must match for a data tuple to fall within the\n        selection.\n\n        **See also:** The `projection with encodings and fields section\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the\n        documentation.\n    mark\n        An interval selection also adds a rectangle mark to depict the extents of the\n        interval. The ``mark`` property can be used to customize the appearance of the mark.\n\n        **See also:** `mark examples\n        <https://vega.github.io/vega-lite/docs/selection.html#mark>`__ in the documentation.\n    on\n        A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or\n        selector) that triggers the selection. For interval selections, the event stream\n        must specify a `start and end\n        <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.\n\n        **See also:** `on examples\n        <https://vega.github.io/vega-lite/docs/selection.html#on>`__ in the documentation.\n    resolve\n        With layered and multi-view displays, a strategy that determines how selections'\n        data queries are resolved when applied in a filter transform, conditional encoding\n        rule, or scale domain.\n\n        One of:\n\n        * ``\"global\"`` -- only one brush exists for the entire SPLOM. When the user begins\n          to drag, any previous brushes are cleared, and a new one is constructed.\n        * ``\"union\"`` -- each cell contains its own brush, and points are highlighted if\n          they lie within *any* of these individual brushes.\n        * ``\"intersect\"`` -- each cell contains its own brush, and points are highlighted\n          only if they fall within *all* of these individual brushes.\n\n        **Default value:** ``global``.\n\n        **See also:** `resolve examples\n        <https://vega.github.io/vega-lite/docs/selection.html#resolve>`__ in the\n        documentation.\n    translate\n        When truthy, allows a user to interactively move an interval selection\n        back-and-forth. Can be ``true``, ``false`` (to disable panning), or a `Vega event\n        stream definition <https://vega.github.io/vega/docs/event-streams/>`__ which must\n        include a start and end event to trigger continuous panning. Discrete panning (e.g.,\n        pressing the left/right arrow keys) will be supported in future versions.\n\n        **Default value:** ``true``, which corresponds to ``[pointerdown, window:pointerup]\n        > window:pointermove!``. This default allows users to clicks and drags within an\n        interval selection to reposition it.\n\n        **See also:** `translate examples\n        <https://vega.github.io/vega-lite/docs/selection.html#translate>`__ in the\n        documentation.\n    zoom\n        When truthy, allows a user to interactively resize an interval selection. Can be\n        ``true``, ``false`` (to disable zooming), or a `Vega event stream definition\n        <https://vega.github.io/vega/docs/event-streams/>`__. Currently, only ``wheel``\n        events are supported, but custom event streams can still be used to specify filters,\n        debouncing, and throttling. Future versions will expand the set of events that can\n        trigger this transformation.\n\n        **Default value:** ``true``, which corresponds to ``wheel!``. This default allows\n        users to use the mouse wheel to resize an interval selection.\n\n        **See also:** `zoom examples\n        <https://vega.github.io/vega-lite/docs/selection.html#zoom>`__ in the documentation.\n    \"\"\"\n\n    type: Literal[\"interval\"]\n    clear: str | bool | MergedStreamKwds | DerivedStreamKwds\n    encodings: Sequence[SingleDefUnitChannel_T]\n    fields: Sequence[str]\n    mark: BrushConfigKwds\n    on: str | MergedStreamKwds | DerivedStreamKwds\n    resolve: SelectionResolution_T\n    translate: str | bool\n    zoom: str | bool\n\n\nclass IntervalSelectionConfigWithoutTypeKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.IntervalSelectionConfigWithoutType` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    clear\n        Clears the selection, emptying it of all values. This property can be a `Event\n        Stream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable\n        clear.\n\n        **Default value:** ``dblclick``.\n\n        **See also:** `clear examples\n        <https://vega.github.io/vega-lite/docs/selection.html#clear>`__ in the\n        documentation.\n    encodings\n        An array of encoding channels. The corresponding data field values must match for a\n        data tuple to fall within the selection.\n\n        **See also:** The `projection with encodings and fields section\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the\n        documentation.\n    fields\n        An array of field names whose values must match for a data tuple to fall within the\n        selection.\n\n        **See also:** The `projection with encodings and fields section\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the\n        documentation.\n    mark\n        An interval selection also adds a rectangle mark to depict the extents of the\n        interval. The ``mark`` property can be used to customize the appearance of the mark.\n\n        **See also:** `mark examples\n        <https://vega.github.io/vega-lite/docs/selection.html#mark>`__ in the documentation.\n    on\n        A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or\n        selector) that triggers the selection. For interval selections, the event stream\n        must specify a `start and end\n        <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.\n\n        **See also:** `on examples\n        <https://vega.github.io/vega-lite/docs/selection.html#on>`__ in the documentation.\n    resolve\n        With layered and multi-view displays, a strategy that determines how selections'\n        data queries are resolved when applied in a filter transform, conditional encoding\n        rule, or scale domain.\n\n        One of:\n\n        * ``\"global\"`` -- only one brush exists for the entire SPLOM. When the user begins\n          to drag, any previous brushes are cleared, and a new one is constructed.\n        * ``\"union\"`` -- each cell contains its own brush, and points are highlighted if\n          they lie within *any* of these individual brushes.\n        * ``\"intersect\"`` -- each cell contains its own brush, and points are highlighted\n          only if they fall within *all* of these individual brushes.\n\n        **Default value:** ``global``.\n\n        **See also:** `resolve examples\n        <https://vega.github.io/vega-lite/docs/selection.html#resolve>`__ in the\n        documentation.\n    translate\n        When truthy, allows a user to interactively move an interval selection\n        back-and-forth. Can be ``true``, ``false`` (to disable panning), or a `Vega event\n        stream definition <https://vega.github.io/vega/docs/event-streams/>`__ which must\n        include a start and end event to trigger continuous panning. Discrete panning (e.g.,\n        pressing the left/right arrow keys) will be supported in future versions.\n\n        **Default value:** ``true``, which corresponds to ``[pointerdown, window:pointerup]\n        > window:pointermove!``. This default allows users to clicks and drags within an\n        interval selection to reposition it.\n\n        **See also:** `translate examples\n        <https://vega.github.io/vega-lite/docs/selection.html#translate>`__ in the\n        documentation.\n    zoom\n        When truthy, allows a user to interactively resize an interval selection. Can be\n        ``true``, ``false`` (to disable zooming), or a `Vega event stream definition\n        <https://vega.github.io/vega/docs/event-streams/>`__. Currently, only ``wheel``\n        events are supported, but custom event streams can still be used to specify filters,\n        debouncing, and throttling. Future versions will expand the set of events that can\n        trigger this transformation.\n\n        **Default value:** ``true``, which corresponds to ``wheel!``. This default allows\n        users to use the mouse wheel to resize an interval selection.\n\n        **See also:** `zoom examples\n        <https://vega.github.io/vega-lite/docs/selection.html#zoom>`__ in the documentation.\n    \"\"\"\n\n    clear: str | bool | MergedStreamKwds | DerivedStreamKwds\n    encodings: Sequence[SingleDefUnitChannel_T]\n    fields: Sequence[str]\n    mark: BrushConfigKwds\n    on: str | MergedStreamKwds | DerivedStreamKwds\n    resolve: SelectionResolution_T\n    translate: str | bool\n    zoom: str | bool\n\n\nclass LegendConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.LegendConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    aria\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG group, removing the legend from the ARIA accessibility tree.\n\n        **Default value:** ``true``\n    clipHeight\n        The height in pixels to clip symbol legend entries and limit their size.\n    columnPadding\n        The horizontal padding in pixels between symbol legend entries.\n\n        **Default value:** ``10``.\n    columns\n        The number of columns in which to arrange symbol legend entries. A value of ``0`` or\n        lower indicates a single row with one column per entry.\n    cornerRadius\n        Corner radius for the full legend.\n    description\n        A text description of this legend for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If the ``aria`` property is true, for SVG output the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__\n        will be set to this description. If the description is unspecified it will be\n        automatically generated.\n    direction\n        The direction of the legend, one of ``\"vertical\"`` or ``\"horizontal\"``.\n\n        **Default value:**\n\n        * For top-/bottom-``orient``ed legends, ``\"horizontal\"``\n        * For left-/right-``orient``ed legends, ``\"vertical\"``\n        * For top/bottom-left/right-``orient``ed legends, ``\"horizontal\"`` for gradient\n          legends and ``\"vertical\"`` for symbol legends.\n    disable\n        Disable legend by default\n    fillColor\n        Background fill color for the full legend.\n    gradientDirection\n        The default direction (``\"horizontal\"`` or ``\"vertical\"``) for gradient legends.\n\n        **Default value:** ``\"vertical\"``.\n    gradientHorizontalMaxLength\n        Max legend length for a horizontal gradient when ``config.legend.gradientLength`` is\n        undefined.\n\n        **Default value:** ``200``\n    gradientHorizontalMinLength\n        Min legend length for a horizontal gradient when ``config.legend.gradientLength`` is\n        undefined.\n\n        **Default value:** ``100``\n    gradientLabelLimit\n        The maximum allowed length in pixels of color ramp gradient labels.\n    gradientLabelOffset\n        Vertical offset in pixels for color ramp gradient labels.\n\n        **Default value:** ``2``.\n    gradientLength\n        The length in pixels of the primary axis of a color gradient. This value corresponds\n        to the height of a vertical gradient or the width of a horizontal gradient.\n\n        **Default value:** ``200``.\n    gradientOpacity\n        Opacity of the color gradient.\n    gradientStrokeColor\n        The color of the gradient stroke, can be in hex color code or regular color name.\n\n        **Default value:** ``\"lightGray\"``.\n    gradientStrokeWidth\n        The width of the gradient stroke, in pixels.\n\n        **Default value:** ``0``.\n    gradientThickness\n        The thickness in pixels of the color gradient. This value corresponds to the width\n        of a vertical gradient or the height of a horizontal gradient.\n\n        **Default value:** ``16``.\n    gradientVerticalMaxLength\n        Max legend length for a vertical gradient when ``config.legend.gradientLength`` is\n        undefined.\n\n        **Default value:** ``200``\n    gradientVerticalMinLength\n        Min legend length for a vertical gradient when ``config.legend.gradientLength`` is\n        undefined.\n\n        **Default value:** ``100``\n    gridAlign\n        The alignment to apply to symbol legends rows and columns. The supported string\n        values are ``\"all\"``, ``\"each\"`` (the default), and ``none``. For more information,\n        see the `grid layout documentation <https://vega.github.io/vega/docs/layout>`__.\n\n        **Default value:** ``\"each\"``.\n    labelAlign\n        The alignment of the legend label, can be left, center, or right.\n    labelBaseline\n        The position of the baseline of legend label, can be ``\"top\"``, ``\"middle\"``,\n        ``\"bottom\"``, or ``\"alphabetic\"``.\n\n        **Default value:** ``\"middle\"``.\n    labelColor\n        The color of the legend label, can be in hex color code or regular color name.\n    labelFont\n        The font of the legend label.\n    labelFontSize\n        The font size of legend label.\n\n        **Default value:** ``10``.\n    labelFontStyle\n        The font style of legend label.\n    labelFontWeight\n        The font weight of legend label.\n    labelLimit\n        Maximum allowed pixel width of legend tick labels.\n\n        **Default value:** ``160``.\n    labelOffset\n        The offset of the legend label.\n\n        **Default value:** ``4``.\n    labelOpacity\n        Opacity of labels.\n    labelOverlap\n        The strategy to use for resolving overlap of labels in gradient legends. If\n        ``false``, no overlap reduction is attempted. If set to ``true`` or ``\"parity\"``, a\n        strategy of removing every other label is used. If set to ``\"greedy\"``, a linear\n        scan of the labels is performed, removing any label that overlaps with the last\n        visible label (this often works better for log-scaled axes).\n\n        **Default value:** ``\"greedy\"`` for log scales otherwise ``true``.\n    labelPadding\n        Padding in pixels between the legend and legend labels.\n    labelSeparation\n        The minimum separation that must be between label bounding boxes for them to be\n        considered non-overlapping (default ``0``). This property is ignored if\n        *labelOverlap* resolution is not enabled.\n    layout\n\n    legendX\n        Custom x-position for legend with orient \"none\".\n    legendY\n        Custom y-position for legend with orient \"none\".\n    offset\n        The offset in pixels by which to displace the legend from the data rectangle and\n        axes.\n\n        **Default value:** ``18``.\n    orient\n        The orientation of the legend, which determines how the legend is positioned within\n        the scene. One of ``\"left\"``, ``\"right\"``, ``\"top\"``, ``\"bottom\"``, ``\"top-left\"``,\n        ``\"top-right\"``, ``\"bottom-left\"``, ``\"bottom-right\"``, ``\"none\"``.\n\n        **Default value:** ``\"right\"``\n    padding\n        The padding between the border and content of the legend group.\n\n        **Default value:** ``0``.\n    rowPadding\n        The vertical padding in pixels between symbol legend entries.\n\n        **Default value:** ``2``.\n    strokeColor\n        Border stroke color for the full legend.\n    strokeDash\n        Border stroke dash pattern for the full legend.\n    strokeWidth\n        Border stroke width for the full legend.\n    symbolBaseFillColor\n        Default fill color for legend symbols. Only applied if there is no ``\"fill\"`` scale\n        color encoding for the legend.\n\n        **Default value:** ``\"transparent\"``.\n    symbolBaseStrokeColor\n        Default stroke color for legend symbols. Only applied if there is no ``\"fill\"``\n        scale color encoding for the legend.\n\n        **Default value:** ``\"gray\"``.\n    symbolDash\n        An array of alternating [stroke, space] lengths for dashed symbol strokes.\n    symbolDashOffset\n        The pixel offset at which to start drawing with the symbol stroke dash array.\n    symbolDirection\n        The default direction (``\"horizontal\"`` or ``\"vertical\"``) for symbol legends.\n\n        **Default value:** ``\"vertical\"``.\n    symbolFillColor\n        The color of the legend symbol,\n    symbolLimit\n        The maximum number of allowed entries for a symbol legend. Additional entries will\n        be dropped.\n    symbolOffset\n        Horizontal pixel offset for legend symbols.\n\n        **Default value:** ``0``.\n    symbolOpacity\n        Opacity of the legend symbols.\n    symbolSize\n        The size of the legend symbol, in pixels.\n\n        **Default value:** ``100``.\n    symbolStrokeColor\n        Stroke color for legend symbols.\n    symbolStrokeWidth\n        The width of the symbol's stroke.\n\n        **Default value:** ``1.5``.\n    symbolType\n        The symbol shape. One of the plotting shapes ``circle`` (default), ``square``,\n        ``cross``, ``diamond``, ``triangle-up``, ``triangle-down``, ``triangle-right``, or\n        ``triangle-left``, the line symbol ``stroke``, or one of the centered directional\n        shapes ``arrow``, ``wedge``, or ``triangle``. Alternatively, a custom `SVG path\n        string <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ can be\n        provided. For correct sizing, custom shape paths should be defined within a square\n        bounding box with coordinates ranging from -1 to 1 along both the x and y\n        dimensions.\n\n        **Default value:** ``\"circle\"``.\n    tickCount\n        The desired number of tick values for quantitative legends.\n    title\n        Set to null to disable title for the axis, legend, or header.\n    titleAlign\n        Horizontal text alignment for legend titles.\n\n        **Default value:** ``\"left\"``.\n    titleAnchor\n        Text anchor position for placing legend titles.\n    titleBaseline\n        Vertical text baseline for legend titles.  One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or ``\"line-bottom\"``. The\n        ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and\n        ``\"bottom\"``, but are calculated relative to the *lineHeight* rather than *fontSize*\n        alone.\n\n        **Default value:** ``\"top\"``.\n    titleColor\n        The color of the legend title, can be in hex color code or regular color name.\n    titleFont\n        The font of the legend title.\n    titleFontSize\n        The font size of the legend title.\n    titleFontStyle\n        The font style of the legend title.\n    titleFontWeight\n        The font weight of the legend title. This can be either a string (e.g ``\"bold\"``,\n        ``\"normal\"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where\n        ``\"normal\"`` = ``400`` and ``\"bold\"`` = ``700``).\n    titleLimit\n        Maximum allowed pixel width of legend titles.\n\n        **Default value:** ``180``.\n    titleLineHeight\n        Line height in pixels for multi-line title text or title text with ``\"line-top\"`` or\n        ``\"line-bottom\"`` baseline.\n    titleOpacity\n        Opacity of the legend title.\n    titleOrient\n        Orientation of the legend title.\n    titlePadding\n        The padding, in pixels, between title and legend.\n\n        **Default value:** ``5``.\n    unselectedOpacity\n        The opacity of unselected legend entries.\n\n        **Default value:** 0.35.\n    zindex\n        The integer z-index indicating the layering of the legend group relative to other\n        axis, mark, and legend groups.\n    \"\"\"\n\n    aria: bool\n    clipHeight: float\n    columnPadding: float\n    columns: float\n    cornerRadius: float\n    description: str\n    direction: Orientation_T\n    disable: bool\n    fillColor: ColorHex | ColorName_T | None\n    gradientDirection: Orientation_T\n    gradientHorizontalMaxLength: float\n    gradientHorizontalMinLength: float\n    gradientLabelLimit: float\n    gradientLabelOffset: float\n    gradientLength: float\n    gradientOpacity: float\n    gradientStrokeColor: ColorHex | ColorName_T | None\n    gradientStrokeWidth: float\n    gradientThickness: float\n    gradientVerticalMaxLength: float\n    gradientVerticalMinLength: float\n    gridAlign: LayoutAlign_T\n    labelAlign: Align_T\n    labelBaseline: TextBaseline_T\n    labelColor: ColorHex | ColorName_T | None\n    labelFont: str\n    labelFontSize: float\n    labelFontStyle: str\n    labelFontWeight: FontWeight_T\n    labelLimit: float\n    labelOffset: float\n    labelOpacity: float\n    labelOverlap: bool | Literal[\"greedy\", \"parity\"]\n    labelPadding: float\n    labelSeparation: float\n    layout: Map\n    legendX: float\n    legendY: float\n    offset: float\n    orient: LegendOrient_T\n    padding: float\n    rowPadding: float\n    strokeColor: ColorHex | ColorName_T | None\n    strokeDash: Sequence[float]\n    strokeWidth: float\n    symbolBaseFillColor: ColorHex | ColorName_T | None\n    symbolBaseStrokeColor: ColorHex | ColorName_T | None\n    symbolDash: Sequence[float]\n    symbolDashOffset: float\n    symbolDirection: Orientation_T\n    symbolFillColor: ColorHex | ColorName_T | None\n    symbolLimit: float\n    symbolOffset: float\n    symbolOpacity: float\n    symbolSize: float\n    symbolStrokeColor: ColorHex | ColorName_T | None\n    symbolStrokeWidth: float\n    symbolType: str\n    tickCount: float | TimeIntervalStepKwds | TimeInterval_T\n    title: None\n    titleAlign: Align_T\n    titleAnchor: TitleAnchor_T\n    titleBaseline: TextBaseline_T\n    titleColor: ColorHex | ColorName_T | None\n    titleFont: str\n    titleFontSize: float\n    titleFontStyle: str\n    titleFontWeight: FontWeight_T\n    titleLimit: float\n    titleLineHeight: float\n    titleOpacity: float\n    titleOrient: Orient_T\n    titlePadding: float\n    unselectedOpacity: float\n    zindex: float\n\n\nclass LegendResolveMapKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.LegendResolveMap` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    angle\n\n    color\n\n    fill\n\n    fillOpacity\n\n    opacity\n\n    shape\n\n    size\n\n    stroke\n\n    strokeDash\n\n    strokeOpacity\n\n    strokeWidth\n\n    time\n\n    \"\"\"\n\n    angle: ResolveMode_T\n    color: ResolveMode_T\n    fill: ResolveMode_T\n    fillOpacity: ResolveMode_T\n    opacity: ResolveMode_T\n    shape: ResolveMode_T\n    size: ResolveMode_T\n    stroke: ResolveMode_T\n    strokeDash: ResolveMode_T\n    strokeOpacity: ResolveMode_T\n    strokeWidth: ResolveMode_T\n    time: ResolveMode_T\n\n\nclass LegendStreamBindingKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.LegendStreamBinding` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    legend\n\n    \"\"\"\n\n    legend: str | MergedStreamKwds | DerivedStreamKwds\n\n\nclass LineConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.LineConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    align\n        The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).\n        One of ``\"left\"``, ``\"right\"``, ``\"center\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    angle\n        The rotation angle of the text, in degrees.\n    aria\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG element, removing the mark item from the ARIA accessibility tree.\n    ariaRole\n        Sets the type of user interface element of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"role\" attribute. Warning: this\n        property is experimental and may be changed in the future.\n    ariaRoleDescription\n        A human-readable, author-localized description for the role of the mark item for\n        `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"aria-roledescription\" attribute.\n        Warning: this property is experimental and may be changed in the future.\n    aspect\n        Whether to keep aspect ratio of image marks.\n    baseline\n        For text marks, the vertical text baseline. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, ``\"line-bottom\"``, or an\n        expression reference that provides one of the valid values. The ``\"line-top\"`` and\n        ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but are\n        calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.\n\n        For range marks, the vertical alignment of the marks. One of ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    blend\n        The color blend mode for drawing an item on its current background. Any valid `CSS\n        mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__\n        value can be used.\n\n        **Default value:** ``\"source-over\"``\n    color\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    cornerRadius\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cornerRadiusBottomLeft\n        The radius in pixels of rounded rectangles' bottom left corner.\n\n        **Default value:** ``0``\n    cornerRadiusBottomRight\n        The radius in pixels of rounded rectangles' bottom right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopLeft\n        The radius in pixels of rounded rectangles' top right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopRight\n        The radius in pixels of rounded rectangles' top left corner.\n\n        **Default value:** ``0``\n    cursor\n        The mouse cursor used over the mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    description\n        A text description of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.\n    dir\n        The direction of the text. One of ``\"ltr\"`` (left-to-right) or ``\"rtl\"``\n        (right-to-left). This property determines on which side is truncated in response to\n        the limit parameter.\n\n        **Default value:** ``\"ltr\"``\n    dx\n        The horizontal offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    dy\n        The vertical offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    ellipsis\n        The ellipsis string for text truncated in response to the limit parameter.\n\n        **Default value:** ``\"…\"``\n    endAngle\n        The end angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    fill\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    fillOpacity\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    filled\n        Whether the mark's color should be used as fill color instead of stroke color.\n\n        **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well\n        as ``geoshape`` marks for `graticule\n        <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;\n        otherwise, ``true``.\n\n        **Note:** This property cannot be used in a `style config\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n    font\n        The typeface to set the text in (e.g., ``\"Helvetica Neue\"``).\n    fontSize\n        The font size, in pixels.\n\n        **Default value:** ``11``\n    fontStyle\n        The font style (e.g., ``\"italic\"``).\n    fontWeight\n        The font weight. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``) or a\n        number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400`` and\n        ``\"bold\"`` = ``700``).\n    height\n        Height of the marks.\n    href\n        A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\n    innerRadius\n        The inner radius in pixels of arc marks. ``innerRadius`` is an alias for\n        ``radius2``.\n\n        **Default value:** ``0``\n    interpolate\n        The line interpolation method to use for line and area marks. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"step-before\"``: alternate between vertical and horizontal segments, as in a\n          step function.\n        * ``\"step-after\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    invalid\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    limit\n        The maximum length of the text mark in pixels. The text value will be automatically\n        truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0`` -- indicating no limit\n    lineBreak\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property is ignored if the text is array-valued.\n    lineHeight\n        The line height in pixels (the spacing between subsequent lines of text) for\n        multi-line text marks.\n    opacity\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    order\n        For line and trail marks, this ``order`` property can be set to ``null`` or\n        ``false`` to make the lines use the original order in the data sources.\n    orient\n        The orientation of a non-stacked bar, tick, area, and line charts. The value is\n        either horizontal (default) or vertical.\n\n        * For bar, rule and tick, this determines whether the size of the bar and tick\n          should be applied to x or y dimension.\n        * For area, this property determines the orient property of the Vega output.\n        * For line and trail marks, this property determines the sort order of the points in\n          the line if ``config.sortLineBy`` is not specified. For stacked charts, this is\n          always determined by the orientation of the stack; therefore explicitly specified\n          value will be ignored.\n    outerRadius\n        The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.\n\n        **Default value:** ``0``\n    padAngle\n        The angular padding applied to sides of the arc, in radians.\n    point\n        A flag for overlaying points on top of line or area marks, or an object defining the\n        properties of the overlayed points.\n\n        * If this property is ``\"transparent\"``, transparent points will be used (for\n          enhancing tooltips and selections).\n\n        * If this property is an empty object (``{}``) or ``true``, filled points with\n          default properties will be used.\n\n        * If this property is ``false``, no points would be automatically added to line or\n          area marks.\n\n        **Default value:** ``false``.\n    radius\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    radius2\n        The secondary (inner) radius in pixels of arc marks.\n\n        **Default value:** ``0``\n    shape\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    size\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    smooth\n        A boolean flag (default true) indicating if the image should be smoothed when\n        resized. If false, individual pixels should be scaled directly rather than\n        interpolated with smoothing. For SVG rendering, this option may not work in some\n        browsers due to lack of standardization.\n    startAngle\n        The start angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    stroke\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    strokeCap\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit\n        The miter limit at which to bevel a line join.\n    strokeOffset\n        The offset in pixels at which to draw the group stroke and fill. If unspecified, the\n        default behavior is to dynamically offset stroked groups such that 1 pixel stroke\n        widths align with the pixel grid.\n    strokeOpacity\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth\n        The stroke width, in pixels.\n    tension\n        Depending on the interpolation type, sets the tension parameter (for line and area\n        marks).\n    text\n        Placeholder text if the ``text`` channel is not specified\n    theta\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    time\n\n    timeUnitBandPosition\n        Default relative band position for a time unit. If set to ``0``, the marks will be\n        positioned at the beginning of the time unit band step. If set to ``0.5``, the marks\n        will be positioned in the middle of the time unit band step.\n    timeUnitBandSize\n        Default relative band size for a time unit. If set to ``1``, the bandwidth of the\n        marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the\n        marks will be half of the time unit band step.\n    tooltip\n        The tooltip text string to show upon mouse hover or an object defining which fields\n        should the tooltip be derived from.\n\n        * If ``tooltip`` is ``true`` or ``{\"content\": \"encoding\"}``, then all fields from\n          ``encoding`` will be used.\n        * If ``tooltip`` is ``{\"content\": \"data\"}``, then all fields that appear in the\n          highlighted data point will be used.\n        * If set to ``null`` or ``false``, then no tooltip will be used.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n        **Default value:** ``null``\n    url\n        The URL of the image file for image marks.\n    width\n        Width of the marks.\n    x\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    y\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    \"\"\"\n\n    align: Align_T\n    angle: float\n    aria: bool\n    ariaRole: str\n    ariaRoleDescription: str\n    aspect: bool\n    baseline: TextBaseline_T\n    blend: Blend_T\n    color: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T\n    cornerRadius: float\n    cornerRadiusBottomLeft: float\n    cornerRadiusBottomRight: float\n    cornerRadiusTopLeft: float\n    cornerRadiusTopRight: float\n    cursor: Cursor_T\n    description: str\n    dir: TextDirection_T\n    dx: float\n    dy: float\n    ellipsis: str\n    endAngle: float\n    fill: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None\n    fillOpacity: float\n    filled: bool\n    font: str\n    fontSize: float\n    fontStyle: str\n    fontWeight: FontWeight_T\n    height: float\n    href: str\n    innerRadius: float\n    interpolate: Interpolate_T\n    invalid: MarkInvalidDataMode_T | None\n    limit: float\n    lineBreak: str\n    lineHeight: float\n    opacity: float\n    order: bool | None\n    orient: Orientation_T\n    outerRadius: float\n    padAngle: float\n    point: bool | OverlayMarkDefKwds | Literal[\"transparent\"]\n    radius: float\n    radius2: float\n    shape: str\n    size: float\n    smooth: bool\n    startAngle: float\n    stroke: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None\n    strokeCap: StrokeCap_T\n    strokeDash: Sequence[float]\n    strokeDashOffset: float\n    strokeJoin: StrokeJoin_T\n    strokeMiterLimit: float\n    strokeOffset: float\n    strokeOpacity: float\n    strokeWidth: float\n    tension: float\n    text: str | Sequence[str]\n    theta: float\n    theta2: float\n    time: float\n    timeUnitBandPosition: float\n    timeUnitBandSize: float\n    tooltip: str | bool | float | TooltipContentKwds | None\n    url: str\n    width: float\n    x: float | Literal[\"width\"]\n    x2: float | Literal[\"width\"]\n    y: float | Literal[\"height\"]\n    y2: float | Literal[\"height\"]\n\n\nclass LineStringKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.LineString` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    coordinates\n\n    type\n        Specifies the type of GeoJSON object.\n    bbox\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    coordinates: Sequence[Sequence[float]]\n    type: Literal[\"LineString\"]\n    bbox: Sequence[float]\n\n\nclass LinearGradientKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.LinearGradient` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    gradient\n        The type of gradient. Use ``\"linear\"`` for a linear gradient.\n    stops\n        An array of gradient stops defining the gradient color sequence.\n    id\n\n    x1\n        The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n        **Default value:** ``0``\n    x2\n        The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n        **Default value:** ``1``\n    y1\n        The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n        **Default value:** ``0``\n    y2\n        The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n        **Default value:** ``0``\n    \"\"\"\n\n    gradient: Literal[\"linear\"]\n    stops: Sequence[GradientStopKwds]\n    id: str\n    x1: float\n    x2: float\n    y1: float\n    y2: float\n\n\nclass LocaleKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.Locale` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    number\n        Locale definition for formatting numbers.\n    time\n        Locale definition for formatting dates and times.\n    \"\"\"\n\n    number: NumberLocaleKwds\n    time: TimeLocaleKwds\n\n\nclass MarkConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.MarkConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    align\n        The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).\n        One of ``\"left\"``, ``\"right\"``, ``\"center\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    angle\n        The rotation angle of the text, in degrees.\n    aria\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG element, removing the mark item from the ARIA accessibility tree.\n    ariaRole\n        Sets the type of user interface element of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"role\" attribute. Warning: this\n        property is experimental and may be changed in the future.\n    ariaRoleDescription\n        A human-readable, author-localized description for the role of the mark item for\n        `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"aria-roledescription\" attribute.\n        Warning: this property is experimental and may be changed in the future.\n    aspect\n        Whether to keep aspect ratio of image marks.\n    baseline\n        For text marks, the vertical text baseline. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, ``\"line-bottom\"``, or an\n        expression reference that provides one of the valid values. The ``\"line-top\"`` and\n        ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but are\n        calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.\n\n        For range marks, the vertical alignment of the marks. One of ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    blend\n        The color blend mode for drawing an item on its current background. Any valid `CSS\n        mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__\n        value can be used.\n\n        **Default value:** ``\"source-over\"``\n    color\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    cornerRadius\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cornerRadiusBottomLeft\n        The radius in pixels of rounded rectangles' bottom left corner.\n\n        **Default value:** ``0``\n    cornerRadiusBottomRight\n        The radius in pixels of rounded rectangles' bottom right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopLeft\n        The radius in pixels of rounded rectangles' top right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopRight\n        The radius in pixels of rounded rectangles' top left corner.\n\n        **Default value:** ``0``\n    cursor\n        The mouse cursor used over the mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    description\n        A text description of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.\n    dir\n        The direction of the text. One of ``\"ltr\"`` (left-to-right) or ``\"rtl\"``\n        (right-to-left). This property determines on which side is truncated in response to\n        the limit parameter.\n\n        **Default value:** ``\"ltr\"``\n    dx\n        The horizontal offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    dy\n        The vertical offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    ellipsis\n        The ellipsis string for text truncated in response to the limit parameter.\n\n        **Default value:** ``\"…\"``\n    endAngle\n        The end angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    fill\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    fillOpacity\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    filled\n        Whether the mark's color should be used as fill color instead of stroke color.\n\n        **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well\n        as ``geoshape`` marks for `graticule\n        <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;\n        otherwise, ``true``.\n\n        **Note:** This property cannot be used in a `style config\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n    font\n        The typeface to set the text in (e.g., ``\"Helvetica Neue\"``).\n    fontSize\n        The font size, in pixels.\n\n        **Default value:** ``11``\n    fontStyle\n        The font style (e.g., ``\"italic\"``).\n    fontWeight\n        The font weight. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``) or a\n        number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400`` and\n        ``\"bold\"`` = ``700``).\n    height\n        Height of the marks.\n    href\n        A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\n    innerRadius\n        The inner radius in pixels of arc marks. ``innerRadius`` is an alias for\n        ``radius2``.\n\n        **Default value:** ``0``\n    interpolate\n        The line interpolation method to use for line and area marks. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"step-before\"``: alternate between vertical and horizontal segments, as in a\n          step function.\n        * ``\"step-after\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    invalid\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    limit\n        The maximum length of the text mark in pixels. The text value will be automatically\n        truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0`` -- indicating no limit\n    lineBreak\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property is ignored if the text is array-valued.\n    lineHeight\n        The line height in pixels (the spacing between subsequent lines of text) for\n        multi-line text marks.\n    opacity\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    order\n        For line and trail marks, this ``order`` property can be set to ``null`` or\n        ``false`` to make the lines use the original order in the data sources.\n    orient\n        The orientation of a non-stacked bar, tick, area, and line charts. The value is\n        either horizontal (default) or vertical.\n\n        * For bar, rule and tick, this determines whether the size of the bar and tick\n          should be applied to x or y dimension.\n        * For area, this property determines the orient property of the Vega output.\n        * For line and trail marks, this property determines the sort order of the points in\n          the line if ``config.sortLineBy`` is not specified. For stacked charts, this is\n          always determined by the orientation of the stack; therefore explicitly specified\n          value will be ignored.\n    outerRadius\n        The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.\n\n        **Default value:** ``0``\n    padAngle\n        The angular padding applied to sides of the arc, in radians.\n    radius\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    radius2\n        The secondary (inner) radius in pixels of arc marks.\n\n        **Default value:** ``0``\n    shape\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    size\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    smooth\n        A boolean flag (default true) indicating if the image should be smoothed when\n        resized. If false, individual pixels should be scaled directly rather than\n        interpolated with smoothing. For SVG rendering, this option may not work in some\n        browsers due to lack of standardization.\n    startAngle\n        The start angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    stroke\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    strokeCap\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit\n        The miter limit at which to bevel a line join.\n    strokeOffset\n        The offset in pixels at which to draw the group stroke and fill. If unspecified, the\n        default behavior is to dynamically offset stroked groups such that 1 pixel stroke\n        widths align with the pixel grid.\n    strokeOpacity\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth\n        The stroke width, in pixels.\n    tension\n        Depending on the interpolation type, sets the tension parameter (for line and area\n        marks).\n    text\n        Placeholder text if the ``text`` channel is not specified\n    theta\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    time\n\n    timeUnitBandPosition\n        Default relative band position for a time unit. If set to ``0``, the marks will be\n        positioned at the beginning of the time unit band step. If set to ``0.5``, the marks\n        will be positioned in the middle of the time unit band step.\n    timeUnitBandSize\n        Default relative band size for a time unit. If set to ``1``, the bandwidth of the\n        marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the\n        marks will be half of the time unit band step.\n    tooltip\n        The tooltip text string to show upon mouse hover or an object defining which fields\n        should the tooltip be derived from.\n\n        * If ``tooltip`` is ``true`` or ``{\"content\": \"encoding\"}``, then all fields from\n          ``encoding`` will be used.\n        * If ``tooltip`` is ``{\"content\": \"data\"}``, then all fields that appear in the\n          highlighted data point will be used.\n        * If set to ``null`` or ``false``, then no tooltip will be used.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n        **Default value:** ``null``\n    url\n        The URL of the image file for image marks.\n    width\n        Width of the marks.\n    x\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    y\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    \"\"\"\n\n    align: Align_T\n    angle: float\n    aria: bool\n    ariaRole: str\n    ariaRoleDescription: str\n    aspect: bool\n    baseline: TextBaseline_T\n    blend: Blend_T\n    color: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T\n    cornerRadius: float\n    cornerRadiusBottomLeft: float\n    cornerRadiusBottomRight: float\n    cornerRadiusTopLeft: float\n    cornerRadiusTopRight: float\n    cursor: Cursor_T\n    description: str\n    dir: TextDirection_T\n    dx: float\n    dy: float\n    ellipsis: str\n    endAngle: float\n    fill: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None\n    fillOpacity: float\n    filled: bool\n    font: str\n    fontSize: float\n    fontStyle: str\n    fontWeight: FontWeight_T\n    height: float\n    href: str\n    innerRadius: float\n    interpolate: Interpolate_T\n    invalid: MarkInvalidDataMode_T | None\n    limit: float\n    lineBreak: str\n    lineHeight: float\n    opacity: float\n    order: bool | None\n    orient: Orientation_T\n    outerRadius: float\n    padAngle: float\n    radius: float\n    radius2: float\n    shape: str\n    size: float\n    smooth: bool\n    startAngle: float\n    stroke: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None\n    strokeCap: StrokeCap_T\n    strokeDash: Sequence[float]\n    strokeDashOffset: float\n    strokeJoin: StrokeJoin_T\n    strokeMiterLimit: float\n    strokeOffset: float\n    strokeOpacity: float\n    strokeWidth: float\n    tension: float\n    text: str | Sequence[str]\n    theta: float\n    theta2: float\n    time: float\n    timeUnitBandPosition: float\n    timeUnitBandSize: float\n    tooltip: str | bool | float | TooltipContentKwds | None\n    url: str\n    width: float\n    x: float | Literal[\"width\"]\n    x2: float | Literal[\"width\"]\n    y: float | Literal[\"height\"]\n    y2: float | Literal[\"height\"]\n\n\nclass MergedStreamKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.MergedStream` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    merge\n\n    between\n\n    consume\n\n    debounce\n\n    filter\n\n    markname\n\n    marktype\n\n    throttle\n\n    \"\"\"\n\n    merge: Sequence[MergedStreamKwds | DerivedStreamKwds]\n    between: Sequence[MergedStreamKwds | DerivedStreamKwds]\n    consume: bool\n    debounce: float\n    filter: str | Sequence[str]\n    markname: str\n    marktype: MarkType_T\n    throttle: float\n\n\nclass MultiLineStringKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.MultiLineString` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    coordinates\n\n    type\n        Specifies the type of GeoJSON object.\n    bbox\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    coordinates: Sequence[Sequence[Sequence[float]]]\n    type: Literal[\"MultiLineString\"]\n    bbox: Sequence[float]\n\n\nclass MultiPointKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.MultiPoint` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    coordinates\n\n    type\n        Specifies the type of GeoJSON object.\n    bbox\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    coordinates: Sequence[Sequence[float]]\n    type: Literal[\"MultiPoint\"]\n    bbox: Sequence[float]\n\n\nclass MultiPolygonKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.MultiPolygon` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    coordinates\n\n    type\n        Specifies the type of GeoJSON object.\n    bbox\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    coordinates: Sequence[Sequence[Sequence[Sequence[float]]]]\n    type: Literal[\"MultiPolygon\"]\n    bbox: Sequence[float]\n\n\nclass NumberLocaleKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.NumberLocale` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    currency\n        The currency prefix and suffix (e.g., [\"$\", \"\"]).\n    decimal\n        The decimal point (e.g., \".\").\n    grouping\n        The array of group sizes (e.g., [3]), cycled as needed.\n    thousands\n        The group separator (e.g., \",\").\n    minus\n        The minus sign (defaults to hyphen-minus, \"-\").\n    nan\n        The not-a-number value (defaults to \"NaN\").\n    numerals\n        An array of ten strings to replace the numerals 0-9.\n    percent\n        The percent sign (defaults to \"%\").\n    \"\"\"\n\n    currency: Sequence[str]\n    decimal: str\n    grouping: Sequence[float]\n    thousands: str\n    minus: str\n    nan: str\n    numerals: Sequence[str]\n    percent: str\n\n\nclass OverlayMarkDefKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.OverlayMarkDef` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    align\n        The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).\n        One of ``\"left\"``, ``\"right\"``, ``\"center\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    angle\n        The rotation angle of the text, in degrees.\n    aria\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG element, removing the mark item from the ARIA accessibility tree.\n    ariaRole\n        Sets the type of user interface element of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"role\" attribute. Warning: this\n        property is experimental and may be changed in the future.\n    ariaRoleDescription\n        A human-readable, author-localized description for the role of the mark item for\n        `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"aria-roledescription\" attribute.\n        Warning: this property is experimental and may be changed in the future.\n    aspect\n        Whether to keep aspect ratio of image marks.\n    baseline\n        For text marks, the vertical text baseline. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, ``\"line-bottom\"``, or an\n        expression reference that provides one of the valid values. The ``\"line-top\"`` and\n        ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but are\n        calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.\n\n        For range marks, the vertical alignment of the marks. One of ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    blend\n        The color blend mode for drawing an item on its current background. Any valid `CSS\n        mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__\n        value can be used.\n\n        **Default value:** ``\"source-over\"``\n    clip\n        Whether a mark be clipped to the enclosing group's width and height.\n    color\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    cornerRadius\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cornerRadiusBottomLeft\n        The radius in pixels of rounded rectangles' bottom left corner.\n\n        **Default value:** ``0``\n    cornerRadiusBottomRight\n        The radius in pixels of rounded rectangles' bottom right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopLeft\n        The radius in pixels of rounded rectangles' top right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopRight\n        The radius in pixels of rounded rectangles' top left corner.\n\n        **Default value:** ``0``\n    cursor\n        The mouse cursor used over the mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    description\n        A text description of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.\n    dir\n        The direction of the text. One of ``\"ltr\"`` (left-to-right) or ``\"rtl\"``\n        (right-to-left). This property determines on which side is truncated in response to\n        the limit parameter.\n\n        **Default value:** ``\"ltr\"``\n    dx\n        The horizontal offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    dy\n        The vertical offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    ellipsis\n        The ellipsis string for text truncated in response to the limit parameter.\n\n        **Default value:** ``\"…\"``\n    endAngle\n        The end angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    fill\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    fillOpacity\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    filled\n        Whether the mark's color should be used as fill color instead of stroke color.\n\n        **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well\n        as ``geoshape`` marks for `graticule\n        <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;\n        otherwise, ``true``.\n\n        **Note:** This property cannot be used in a `style config\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n    font\n        The typeface to set the text in (e.g., ``\"Helvetica Neue\"``).\n    fontSize\n        The font size, in pixels.\n\n        **Default value:** ``11``\n    fontStyle\n        The font style (e.g., ``\"italic\"``).\n    fontWeight\n        The font weight. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``) or a\n        number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400`` and\n        ``\"bold\"`` = ``700``).\n    height\n        Height of the marks.\n    href\n        A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\n    innerRadius\n        The inner radius in pixels of arc marks. ``innerRadius`` is an alias for\n        ``radius2``.\n\n        **Default value:** ``0``\n    interpolate\n        The line interpolation method to use for line and area marks. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"step-before\"``: alternate between vertical and horizontal segments, as in a\n          step function.\n        * ``\"step-after\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    invalid\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    limit\n        The maximum length of the text mark in pixels. The text value will be automatically\n        truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0`` -- indicating no limit\n    lineBreak\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property is ignored if the text is array-valued.\n    lineHeight\n        The line height in pixels (the spacing between subsequent lines of text) for\n        multi-line text marks.\n    opacity\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    order\n        For line and trail marks, this ``order`` property can be set to ``null`` or\n        ``false`` to make the lines use the original order in the data sources.\n    orient\n        The orientation of a non-stacked bar, tick, area, and line charts. The value is\n        either horizontal (default) or vertical.\n\n        * For bar, rule and tick, this determines whether the size of the bar and tick\n          should be applied to x or y dimension.\n        * For area, this property determines the orient property of the Vega output.\n        * For line and trail marks, this property determines the sort order of the points in\n          the line if ``config.sortLineBy`` is not specified. For stacked charts, this is\n          always determined by the orientation of the stack; therefore explicitly specified\n          value will be ignored.\n    outerRadius\n        The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.\n\n        **Default value:** ``0``\n    padAngle\n        The angular padding applied to sides of the arc, in radians.\n    radius\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    radius2\n        The secondary (inner) radius in pixels of arc marks.\n\n        **Default value:** ``0``\n    radius2Offset\n        Offset for radius2.\n    radiusOffset\n        Offset for radius.\n    shape\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    size\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    smooth\n        A boolean flag (default true) indicating if the image should be smoothed when\n        resized. If false, individual pixels should be scaled directly rather than\n        interpolated with smoothing. For SVG rendering, this option may not work in some\n        browsers due to lack of standardization.\n    startAngle\n        The start angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    stroke\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    strokeCap\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit\n        The miter limit at which to bevel a line join.\n    strokeOffset\n        The offset in pixels at which to draw the group stroke and fill. If unspecified, the\n        default behavior is to dynamically offset stroked groups such that 1 pixel stroke\n        widths align with the pixel grid.\n    strokeOpacity\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth\n        The stroke width, in pixels.\n    style\n        A string or array of strings indicating the name of custom styles to apply to the\n        mark. A style is a named collection of mark property defaults defined within the\n        `style configuration\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an\n        array, later styles will override earlier styles. Any `mark properties\n        <https://vega.github.io/vega-lite/docs/encoding.html#mark-prop>`__ explicitly\n        defined within the ``encoding`` will override a style default.\n\n        **Default value:** The mark's name. For example, a bar mark will have style\n        ``\"bar\"`` by default. **Note:** Any specified style will augment the default style.\n        For example, a bar mark with ``\"style\": \"foo\"`` will receive from\n        ``config.style.bar`` and ``config.style.foo`` (the specified style ``\"foo\"`` has\n        higher precedence).\n    tension\n        Depending on the interpolation type, sets the tension parameter (for line and area\n        marks).\n    text\n        Placeholder text if the ``text`` channel is not specified\n    theta\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    theta2Offset\n        Offset for theta2.\n    thetaOffset\n        Offset for theta.\n    time\n\n    timeUnitBandPosition\n        Default relative band position for a time unit. If set to ``0``, the marks will be\n        positioned at the beginning of the time unit band step. If set to ``0.5``, the marks\n        will be positioned in the middle of the time unit band step.\n    timeUnitBandSize\n        Default relative band size for a time unit. If set to ``1``, the bandwidth of the\n        marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the\n        marks will be half of the time unit band step.\n    tooltip\n        The tooltip text string to show upon mouse hover or an object defining which fields\n        should the tooltip be derived from.\n\n        * If ``tooltip`` is ``true`` or ``{\"content\": \"encoding\"}``, then all fields from\n          ``encoding`` will be used.\n        * If ``tooltip`` is ``{\"content\": \"data\"}``, then all fields that appear in the\n          highlighted data point will be used.\n        * If set to ``null`` or ``false``, then no tooltip will be used.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n        **Default value:** ``null``\n    url\n        The URL of the image file for image marks.\n    width\n        Width of the marks.\n    x\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2Offset\n        Offset for x2-position.\n    xOffset\n        Offset for x-position.\n    y\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2Offset\n        Offset for y2-position.\n    yOffset\n        Offset for y-position.\n    \"\"\"\n\n    align: Align_T\n    angle: float\n    aria: bool\n    ariaRole: str\n    ariaRoleDescription: str\n    aspect: bool\n    baseline: TextBaseline_T\n    blend: Blend_T\n    clip: bool\n    color: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T\n    cornerRadius: float\n    cornerRadiusBottomLeft: float\n    cornerRadiusBottomRight: float\n    cornerRadiusTopLeft: float\n    cornerRadiusTopRight: float\n    cursor: Cursor_T\n    description: str\n    dir: TextDirection_T\n    dx: float\n    dy: float\n    ellipsis: str\n    endAngle: float\n    fill: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None\n    fillOpacity: float\n    filled: bool\n    font: str\n    fontSize: float\n    fontStyle: str\n    fontWeight: FontWeight_T\n    height: float\n    href: str\n    innerRadius: float\n    interpolate: Interpolate_T\n    invalid: MarkInvalidDataMode_T | None\n    limit: float\n    lineBreak: str\n    lineHeight: float\n    opacity: float\n    order: bool | None\n    orient: Orientation_T\n    outerRadius: float\n    padAngle: float\n    radius: float\n    radius2: float\n    radius2Offset: float\n    radiusOffset: float\n    shape: str\n    size: float\n    smooth: bool\n    startAngle: float\n    stroke: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None\n    strokeCap: StrokeCap_T\n    strokeDash: Sequence[float]\n    strokeDashOffset: float\n    strokeJoin: StrokeJoin_T\n    strokeMiterLimit: float\n    strokeOffset: float\n    strokeOpacity: float\n    strokeWidth: float\n    style: str | Sequence[str]\n    tension: float\n    text: str | Sequence[str]\n    theta: float\n    theta2: float\n    theta2Offset: float\n    thetaOffset: float\n    time: float\n    timeUnitBandPosition: float\n    timeUnitBandSize: float\n    tooltip: str | bool | float | TooltipContentKwds | None\n    url: str\n    width: float\n    x: float | Literal[\"width\"]\n    x2: float | Literal[\"width\"]\n    x2Offset: float\n    xOffset: float\n    y: float | Literal[\"height\"]\n    y2: float | Literal[\"height\"]\n    y2Offset: float\n    yOffset: float\n\n\nclass PointKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.Point` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    coordinates\n        A Position is an array of coordinates.\n        https://tools.ietf.org/html/rfc7946#section-3.1.1 Array should contain between two\n        and three elements. The previous GeoJSON specification allowed more elements (e.g.,\n        which could be used to represent M values), but the current specification only\n        allows X, Y, and (optionally) Z to be defined.\n\n        Note: the type will not be narrowed down to ``[number, number] | [number, number,\n        number]`` due to marginal benefits and the large impact of breaking change.\n\n        See previous discussions on the type narrowing:\n\n        * {@link  https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21590 Nov 2017 }\n        * {@link  https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/67773 Dec\n          2023 }\n        * {@link  https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/71441 Dec\n          2024 }\n\n        One can use a  {@link\n        https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates\n        user-defined type guard that returns a type predicate }  to determine if a position\n        is a 2D or 3D position.\n    type\n        Specifies the type of GeoJSON object.\n    bbox\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    coordinates: Sequence[float]\n    type: Literal[\"Point\"]\n    bbox: Sequence[float]\n\n\nclass PointSelectionConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.PointSelectionConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    type\n        Determines the default event processing and data query for the selection. Vega-Lite\n        currently supports two selection types:\n\n        * ``\"point\"`` -- to select multiple discrete data values; the first value is\n          selected on ``click`` and additional values toggled on shift-click.\n        * ``\"interval\"`` -- to select a continuous range of data values on ``drag``.\n    clear\n        Clears the selection, emptying it of all values. This property can be a `Event\n        Stream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable\n        clear.\n\n        **Default value:** ``dblclick``.\n\n        **See also:** `clear examples\n        <https://vega.github.io/vega-lite/docs/selection.html#clear>`__ in the\n        documentation.\n    encodings\n        An array of encoding channels. The corresponding data field values must match for a\n        data tuple to fall within the selection.\n\n        **See also:** The `projection with encodings and fields section\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the\n        documentation.\n    fields\n        An array of field names whose values must match for a data tuple to fall within the\n        selection.\n\n        **See also:** The `projection with encodings and fields section\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the\n        documentation.\n    nearest\n        When true, an invisible voronoi diagram is computed to accelerate discrete\n        selection. The data value *nearest* the mouse cursor is added to the selection.\n\n        **Default value:** ``false``, which means that data values must be interacted with\n        directly (e.g., clicked on) to be added to the selection.\n\n        **See also:** `nearest examples\n        <https://vega.github.io/vega-lite/docs/selection.html#nearest>`__ documentation.\n    on\n        A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or\n        selector) that triggers the selection. For interval selections, the event stream\n        must specify a `start and end\n        <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.\n\n        **See also:** `on examples\n        <https://vega.github.io/vega-lite/docs/selection.html#on>`__ in the documentation.\n    resolve\n        With layered and multi-view displays, a strategy that determines how selections'\n        data queries are resolved when applied in a filter transform, conditional encoding\n        rule, or scale domain.\n\n        One of:\n\n        * ``\"global\"`` -- only one brush exists for the entire SPLOM. When the user begins\n          to drag, any previous brushes are cleared, and a new one is constructed.\n        * ``\"union\"`` -- each cell contains its own brush, and points are highlighted if\n          they lie within *any* of these individual brushes.\n        * ``\"intersect\"`` -- each cell contains its own brush, and points are highlighted\n          only if they fall within *all* of these individual brushes.\n\n        **Default value:** ``global``.\n\n        **See also:** `resolve examples\n        <https://vega.github.io/vega-lite/docs/selection.html#resolve>`__ in the\n        documentation.\n    toggle\n        Controls whether data values should be toggled (inserted or removed from a point\n        selection) or only ever inserted into point selections.\n\n        One of:\n\n        * ``true`` -- the default behavior, which corresponds to ``\"event.shiftKey\"``.  As a\n          result, data values are toggled when the user interacts with the shift-key\n          pressed.\n        * ``false`` -- disables toggling behaviour; the selection will only ever contain a\n          single data value corresponding to the most recent interaction.\n        * A `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ which is\n          re-evaluated as the user interacts. If the expression evaluates to ``true``, the\n          data value is toggled into or out of the point selection. If the expression\n          evaluates to ``false``, the point selection is first cleared, and the data value\n          is then inserted. For example, setting the value to the Vega expression ``\"true\"``\n          will toggle data values without the user pressing the shift-key.\n\n        **Default value:** ``true``\n\n        **See also:** `toggle examples\n        <https://vega.github.io/vega-lite/docs/selection.html#toggle>`__ in the\n        documentation.\n    \"\"\"\n\n    type: Literal[\"point\"]\n    clear: str | bool | MergedStreamKwds | DerivedStreamKwds\n    encodings: Sequence[SingleDefUnitChannel_T]\n    fields: Sequence[str]\n    nearest: bool\n    on: str | MergedStreamKwds | DerivedStreamKwds\n    resolve: SelectionResolution_T\n    toggle: str | bool\n\n\nclass PointSelectionConfigWithoutTypeKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.PointSelectionConfigWithoutType` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    clear\n        Clears the selection, emptying it of all values. This property can be a `Event\n        Stream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable\n        clear.\n\n        **Default value:** ``dblclick``.\n\n        **See also:** `clear examples\n        <https://vega.github.io/vega-lite/docs/selection.html#clear>`__ in the\n        documentation.\n    encodings\n        An array of encoding channels. The corresponding data field values must match for a\n        data tuple to fall within the selection.\n\n        **See also:** The `projection with encodings and fields section\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the\n        documentation.\n    fields\n        An array of field names whose values must match for a data tuple to fall within the\n        selection.\n\n        **See also:** The `projection with encodings and fields section\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the\n        documentation.\n    nearest\n        When true, an invisible voronoi diagram is computed to accelerate discrete\n        selection. The data value *nearest* the mouse cursor is added to the selection.\n\n        **Default value:** ``false``, which means that data values must be interacted with\n        directly (e.g., clicked on) to be added to the selection.\n\n        **See also:** `nearest examples\n        <https://vega.github.io/vega-lite/docs/selection.html#nearest>`__ documentation.\n    on\n        A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or\n        selector) that triggers the selection. For interval selections, the event stream\n        must specify a `start and end\n        <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.\n\n        **See also:** `on examples\n        <https://vega.github.io/vega-lite/docs/selection.html#on>`__ in the documentation.\n    resolve\n        With layered and multi-view displays, a strategy that determines how selections'\n        data queries are resolved when applied in a filter transform, conditional encoding\n        rule, or scale domain.\n\n        One of:\n\n        * ``\"global\"`` -- only one brush exists for the entire SPLOM. When the user begins\n          to drag, any previous brushes are cleared, and a new one is constructed.\n        * ``\"union\"`` -- each cell contains its own brush, and points are highlighted if\n          they lie within *any* of these individual brushes.\n        * ``\"intersect\"`` -- each cell contains its own brush, and points are highlighted\n          only if they fall within *all* of these individual brushes.\n\n        **Default value:** ``global``.\n\n        **See also:** `resolve examples\n        <https://vega.github.io/vega-lite/docs/selection.html#resolve>`__ in the\n        documentation.\n    toggle\n        Controls whether data values should be toggled (inserted or removed from a point\n        selection) or only ever inserted into point selections.\n\n        One of:\n\n        * ``true`` -- the default behavior, which corresponds to ``\"event.shiftKey\"``.  As a\n          result, data values are toggled when the user interacts with the shift-key\n          pressed.\n        * ``false`` -- disables toggling behaviour; the selection will only ever contain a\n          single data value corresponding to the most recent interaction.\n        * A `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ which is\n          re-evaluated as the user interacts. If the expression evaluates to ``true``, the\n          data value is toggled into or out of the point selection. If the expression\n          evaluates to ``false``, the point selection is first cleared, and the data value\n          is then inserted. For example, setting the value to the Vega expression ``\"true\"``\n          will toggle data values without the user pressing the shift-key.\n\n        **Default value:** ``true``\n\n        **See also:** `toggle examples\n        <https://vega.github.io/vega-lite/docs/selection.html#toggle>`__ in the\n        documentation.\n    \"\"\"\n\n    clear: str | bool | MergedStreamKwds | DerivedStreamKwds\n    encodings: Sequence[SingleDefUnitChannel_T]\n    fields: Sequence[str]\n    nearest: bool\n    on: str | MergedStreamKwds | DerivedStreamKwds\n    resolve: SelectionResolution_T\n    toggle: str | bool\n\n\nclass PolygonKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.Polygon` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    coordinates\n\n    type\n        Specifies the type of GeoJSON object.\n    bbox\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    coordinates: Sequence[Sequence[Sequence[float]]]\n    type: Literal[\"Polygon\"]\n    bbox: Sequence[float]\n\n\nclass ProjectionKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.Projection` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    center\n        The projection's center, a two-element array of longitude and latitude in degrees.\n\n        **Default value:** ``[0, 0]``\n    clipAngle\n        The projection's clipping circle radius to the specified angle in degrees. If\n        ``null``, switches to `antimeridian <http://bl.ocks.org/mbostock/3788999>`__ cutting\n        rather than small-circle clipping.\n    clipExtent\n        The projection's viewport clip extent to the specified bounds in pixels. The extent\n        bounds are specified as an array ``[[x0, y0], [x1, y1]]``, where ``x0`` is the\n        left-side of the viewport, ``y0`` is the top, ``x1`` is the right and ``y1`` is the\n        bottom. If ``null``, no viewport clipping is performed.\n    coefficient\n        The coefficient parameter for the ``hammer`` projection.\n\n        **Default value:** ``2``\n    distance\n        For the ``satellite`` projection, the distance from the center of the sphere to the\n        point of view, as a proportion of the sphere's radius. The recommended maximum clip\n        angle for a given ``distance`` is acos(1 / distance) converted to degrees. If tilt\n        is also applied, then more conservative clipping may be necessary.\n\n        **Default value:** ``2.0``\n    extent\n\n    fit\n\n    fraction\n        The fraction parameter for the ``bottomley`` projection.\n\n        **Default value:** ``0.5``, corresponding to a sin(ψ) where ψ = π/6.\n    lobes\n        The number of lobes in projections that support multi-lobe views: ``berghaus``,\n        ``gingery``, or ``healpix``. The default value varies based on the projection type.\n    parallel\n        The parallel parameter for projections that support it: ``armadillo``, ``bonne``,\n        ``craig``, ``cylindricalEqualArea``, ``cylindricalStereographic``,\n        ``hammerRetroazimuthal``, ``loximuthal``, or ``rectangularPolyconic``. The default\n        value varies based on the projection type.\n    parallels\n        For conic projections, the `two standard parallels\n        <https://en.wikipedia.org/wiki/Map_projection#Conic>`__ that define the map layout.\n        The default depends on the specific conic projection used.\n    pointRadius\n        The default radius (in pixels) to use when drawing GeoJSON ``Point`` and\n        ``MultiPoint`` geometries. This parameter sets a constant default value. To modify\n        the point radius in response to data, see the corresponding parameter of the GeoPath\n        and GeoShape transforms.\n\n        **Default value:** ``4.5``\n    precision\n        The threshold for the projection's `adaptive resampling\n        <http://bl.ocks.org/mbostock/3795544>`__ to the specified value in pixels. This\n        value corresponds to the `Douglas-Peucker distance\n        <http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm>`__.\n        If precision is not specified, returns the projection's current resampling precision\n        which defaults to ``√0.5 ≅ 0.70710…``.\n    radius\n        The radius parameter for the ``airy`` or ``gingery`` projection. The default value\n        varies based on the projection type.\n    ratio\n        The ratio parameter for the ``hill``, ``hufnagel``, or ``wagner`` projections. The\n        default value varies based on the projection type.\n    reflectX\n        Sets whether or not the x-dimension is reflected (negated) in the output.\n    reflectY\n        Sets whether or not the y-dimension is reflected (negated) in the output.\n    rotate\n        The projection's three-axis rotation to the specified angles, which must be a two-\n        or three-element array of numbers [``lambda``, ``phi``, ``gamma``] specifying the\n        rotation angles in degrees about each spherical axis. (These correspond to yaw,\n        pitch and roll.)\n\n        **Default value:** ``[0, 0, 0]``\n    scale\n        The projection's scale (zoom) factor, overriding automatic fitting. The default\n        scale is projection-specific. The scale factor corresponds linearly to the distance\n        between projected points; however, scale factor values are not equivalent across\n        projections.\n    size\n        Used in conjunction with fit, provides the width and height in pixels of the area to\n        which the projection should be automatically fit.\n    spacing\n        The spacing parameter for the ``lagrange`` projection.\n\n        **Default value:** ``0.5``\n    tilt\n        The tilt angle (in degrees) for the ``satellite`` projection.\n\n        **Default value:** ``0``.\n    translate\n        The projection's translation offset as a two-element array ``[tx, ty]``.\n    type\n        The cartographic projection to use. This value is case-insensitive, for example\n        ``\"albers\"`` and ``\"Albers\"`` indicate the same projection type. You can find all\n        valid projection types `in the documentation\n        <https://vega.github.io/vega-lite/docs/projection.html#projection-types>`__.\n\n        **Default value:** ``equalEarth``\n    \"\"\"\n\n    center: Sequence[float]\n    clipAngle: float\n    clipExtent: Sequence[Sequence[float]]\n    coefficient: float\n    distance: float\n    extent: Sequence[Sequence[float]]\n    fit: (\n        GeoJsonFeatureKwds\n        | GeoJsonFeatureCollectionKwds\n        | Sequence[GeoJsonFeatureKwds]\n        | Sequence[\n            GeoJsonFeatureKwds\n            | GeoJsonFeatureCollectionKwds\n            | Sequence[GeoJsonFeatureKwds]\n        ]\n    )\n    fraction: float\n    lobes: float\n    parallel: float\n    parallels: Sequence[float]\n    pointRadius: float\n    precision: float\n    radius: float\n    ratio: float\n    reflectX: bool\n    reflectY: bool\n    rotate: Sequence[float]\n    scale: float\n    size: Sequence[float]\n    spacing: float\n    tilt: float\n    translate: Sequence[float]\n    type: ProjectionType_T\n\n\nclass ProjectionConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.ProjectionConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    center\n        The projection's center, a two-element array of longitude and latitude in degrees.\n\n        **Default value:** ``[0, 0]``\n    clipAngle\n        The projection's clipping circle radius to the specified angle in degrees. If\n        ``null``, switches to `antimeridian <http://bl.ocks.org/mbostock/3788999>`__ cutting\n        rather than small-circle clipping.\n    clipExtent\n        The projection's viewport clip extent to the specified bounds in pixels. The extent\n        bounds are specified as an array ``[[x0, y0], [x1, y1]]``, where ``x0`` is the\n        left-side of the viewport, ``y0`` is the top, ``x1`` is the right and ``y1`` is the\n        bottom. If ``null``, no viewport clipping is performed.\n    coefficient\n        The coefficient parameter for the ``hammer`` projection.\n\n        **Default value:** ``2``\n    distance\n        For the ``satellite`` projection, the distance from the center of the sphere to the\n        point of view, as a proportion of the sphere's radius. The recommended maximum clip\n        angle for a given ``distance`` is acos(1 / distance) converted to degrees. If tilt\n        is also applied, then more conservative clipping may be necessary.\n\n        **Default value:** ``2.0``\n    extent\n\n    fit\n\n    fraction\n        The fraction parameter for the ``bottomley`` projection.\n\n        **Default value:** ``0.5``, corresponding to a sin(ψ) where ψ = π/6.\n    lobes\n        The number of lobes in projections that support multi-lobe views: ``berghaus``,\n        ``gingery``, or ``healpix``. The default value varies based on the projection type.\n    parallel\n        The parallel parameter for projections that support it: ``armadillo``, ``bonne``,\n        ``craig``, ``cylindricalEqualArea``, ``cylindricalStereographic``,\n        ``hammerRetroazimuthal``, ``loximuthal``, or ``rectangularPolyconic``. The default\n        value varies based on the projection type.\n    parallels\n        For conic projections, the `two standard parallels\n        <https://en.wikipedia.org/wiki/Map_projection#Conic>`__ that define the map layout.\n        The default depends on the specific conic projection used.\n    pointRadius\n        The default radius (in pixels) to use when drawing GeoJSON ``Point`` and\n        ``MultiPoint`` geometries. This parameter sets a constant default value. To modify\n        the point radius in response to data, see the corresponding parameter of the GeoPath\n        and GeoShape transforms.\n\n        **Default value:** ``4.5``\n    precision\n        The threshold for the projection's `adaptive resampling\n        <http://bl.ocks.org/mbostock/3795544>`__ to the specified value in pixels. This\n        value corresponds to the `Douglas-Peucker distance\n        <http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm>`__.\n        If precision is not specified, returns the projection's current resampling precision\n        which defaults to ``√0.5 ≅ 0.70710…``.\n    radius\n        The radius parameter for the ``airy`` or ``gingery`` projection. The default value\n        varies based on the projection type.\n    ratio\n        The ratio parameter for the ``hill``, ``hufnagel``, or ``wagner`` projections. The\n        default value varies based on the projection type.\n    reflectX\n        Sets whether or not the x-dimension is reflected (negated) in the output.\n    reflectY\n        Sets whether or not the y-dimension is reflected (negated) in the output.\n    rotate\n        The projection's three-axis rotation to the specified angles, which must be a two-\n        or three-element array of numbers [``lambda``, ``phi``, ``gamma``] specifying the\n        rotation angles in degrees about each spherical axis. (These correspond to yaw,\n        pitch and roll.)\n\n        **Default value:** ``[0, 0, 0]``\n    scale\n        The projection's scale (zoom) factor, overriding automatic fitting. The default\n        scale is projection-specific. The scale factor corresponds linearly to the distance\n        between projected points; however, scale factor values are not equivalent across\n        projections.\n    size\n        Used in conjunction with fit, provides the width and height in pixels of the area to\n        which the projection should be automatically fit.\n    spacing\n        The spacing parameter for the ``lagrange`` projection.\n\n        **Default value:** ``0.5``\n    tilt\n        The tilt angle (in degrees) for the ``satellite`` projection.\n\n        **Default value:** ``0``.\n    translate\n        The projection's translation offset as a two-element array ``[tx, ty]``.\n    type\n        The cartographic projection to use. This value is case-insensitive, for example\n        ``\"albers\"`` and ``\"Albers\"`` indicate the same projection type. You can find all\n        valid projection types `in the documentation\n        <https://vega.github.io/vega-lite/docs/projection.html#projection-types>`__.\n\n        **Default value:** ``equalEarth``\n    \"\"\"\n\n    center: Sequence[float]\n    clipAngle: float\n    clipExtent: Sequence[Sequence[float]]\n    coefficient: float\n    distance: float\n    extent: Sequence[Sequence[float]]\n    fit: (\n        GeoJsonFeatureKwds\n        | GeoJsonFeatureCollectionKwds\n        | Sequence[GeoJsonFeatureKwds]\n        | Sequence[\n            GeoJsonFeatureKwds\n            | GeoJsonFeatureCollectionKwds\n            | Sequence[GeoJsonFeatureKwds]\n        ]\n    )\n    fraction: float\n    lobes: float\n    parallel: float\n    parallels: Sequence[float]\n    pointRadius: float\n    precision: float\n    radius: float\n    ratio: float\n    reflectX: bool\n    reflectY: bool\n    rotate: Sequence[float]\n    scale: float\n    size: Sequence[float]\n    spacing: float\n    tilt: float\n    translate: Sequence[float]\n    type: ProjectionType_T\n\n\nclass RadialGradientKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.RadialGradient` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    gradient\n        The type of gradient. Use ``\"radial\"`` for a radial gradient.\n    stops\n        An array of gradient stops defining the gradient color sequence.\n    id\n\n    r1\n        The radius length, in normalized [0, 1] coordinates, of the inner circle for the\n        gradient.\n\n        **Default value:** ``0``\n    r2\n        The radius length, in normalized [0, 1] coordinates, of the outer circle for the\n        gradient.\n\n        **Default value:** ``0.5``\n    x1\n        The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner\n        circle for the gradient.\n\n        **Default value:** ``0.5``\n    x2\n        The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer\n        circle for the gradient.\n\n        **Default value:** ``0.5``\n    y1\n        The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner\n        circle for the gradient.\n\n        **Default value:** ``0.5``\n    y2\n        The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer\n        circle for the gradient.\n\n        **Default value:** ``0.5``\n    \"\"\"\n\n    gradient: Literal[\"radial\"]\n    stops: Sequence[GradientStopKwds]\n    id: str\n    r1: float\n    r2: float\n    x1: float\n    x2: float\n    y1: float\n    y2: float\n\n\nclass RangeConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.RangeConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    category\n        Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for categorical\n        data.\n    diverging\n        Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for diverging\n        quantitative ramps.\n    heatmap\n        Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for\n        quantitative heatmaps.\n    ordinal\n        Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for\n        rank-ordered data.\n    ramp\n        Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for sequential\n        quantitative ramps.\n    symbol\n        Array of `symbol <https://vega.github.io/vega/docs/marks/symbol/>`__ names or paths\n        for the default shape palette.\n    \"\"\"\n\n    category: (\n        Sequence[ColorHex | ColorName_T]\n        | Sequence[str | bool | float | Sequence[float] | None]\n        | RangeEnum_T\n    )\n    diverging: (\n        Sequence[ColorHex | ColorName_T]\n        | Sequence[str | bool | float | Sequence[float] | None]\n        | RangeEnum_T\n    )\n    heatmap: (\n        Sequence[ColorHex | ColorName_T]\n        | Sequence[str | bool | float | Sequence[float] | None]\n        | RangeEnum_T\n    )\n    ordinal: (\n        Sequence[ColorHex | ColorName_T]\n        | Sequence[str | bool | float | Sequence[float] | None]\n        | RangeEnum_T\n    )\n    ramp: (\n        Sequence[ColorHex | ColorName_T]\n        | Sequence[str | bool | float | Sequence[float] | None]\n        | RangeEnum_T\n    )\n    symbol: Sequence[str]\n\n\nclass RectConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.RectConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    align\n        The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).\n        One of ``\"left\"``, ``\"right\"``, ``\"center\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    angle\n        The rotation angle of the text, in degrees.\n    aria\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG element, removing the mark item from the ARIA accessibility tree.\n    ariaRole\n        Sets the type of user interface element of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"role\" attribute. Warning: this\n        property is experimental and may be changed in the future.\n    ariaRoleDescription\n        A human-readable, author-localized description for the role of the mark item for\n        `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"aria-roledescription\" attribute.\n        Warning: this property is experimental and may be changed in the future.\n    aspect\n        Whether to keep aspect ratio of image marks.\n    baseline\n        For text marks, the vertical text baseline. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, ``\"line-bottom\"``, or an\n        expression reference that provides one of the valid values. The ``\"line-top\"`` and\n        ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but are\n        calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.\n\n        For range marks, the vertical alignment of the marks. One of ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    binSpacing\n        Offset between bars for binned field. The ideal value for this is either 0\n        (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n        **Default value:** ``1``\n    blend\n        The color blend mode for drawing an item on its current background. Any valid `CSS\n        mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__\n        value can be used.\n\n        **Default value:** ``\"source-over\"``\n    color\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    continuousBandSize\n        The default size of the bars on continuous scales.\n\n        **Default value:** ``5``\n    cornerRadius\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cornerRadiusBottomLeft\n        The radius in pixels of rounded rectangles' bottom left corner.\n\n        **Default value:** ``0``\n    cornerRadiusBottomRight\n        The radius in pixels of rounded rectangles' bottom right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopLeft\n        The radius in pixels of rounded rectangles' top right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopRight\n        The radius in pixels of rounded rectangles' top left corner.\n\n        **Default value:** ``0``\n    cursor\n        The mouse cursor used over the mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    description\n        A text description of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.\n    dir\n        The direction of the text. One of ``\"ltr\"`` (left-to-right) or ``\"rtl\"``\n        (right-to-left). This property determines on which side is truncated in response to\n        the limit parameter.\n\n        **Default value:** ``\"ltr\"``\n    discreteBandSize\n        The default size of the bars with discrete dimensions. If unspecified, the default\n        size is  ``step-2``, which provides 2 pixel offset between bars.\n    dx\n        The horizontal offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    dy\n        The vertical offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    ellipsis\n        The ellipsis string for text truncated in response to the limit parameter.\n\n        **Default value:** ``\"…\"``\n    endAngle\n        The end angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    fill\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    fillOpacity\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    filled\n        Whether the mark's color should be used as fill color instead of stroke color.\n\n        **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well\n        as ``geoshape`` marks for `graticule\n        <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;\n        otherwise, ``true``.\n\n        **Note:** This property cannot be used in a `style config\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n    font\n        The typeface to set the text in (e.g., ``\"Helvetica Neue\"``).\n    fontSize\n        The font size, in pixels.\n\n        **Default value:** ``11``\n    fontStyle\n        The font style (e.g., ``\"italic\"``).\n    fontWeight\n        The font weight. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``) or a\n        number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400`` and\n        ``\"bold\"`` = ``700``).\n    height\n        Height of the marks.\n    href\n        A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\n    innerRadius\n        The inner radius in pixels of arc marks. ``innerRadius`` is an alias for\n        ``radius2``.\n\n        **Default value:** ``0``\n    interpolate\n        The line interpolation method to use for line and area marks. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"step-before\"``: alternate between vertical and horizontal segments, as in a\n          step function.\n        * ``\"step-after\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    invalid\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    limit\n        The maximum length of the text mark in pixels. The text value will be automatically\n        truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0`` -- indicating no limit\n    lineBreak\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property is ignored if the text is array-valued.\n    lineHeight\n        The line height in pixels (the spacing between subsequent lines of text) for\n        multi-line text marks.\n    minBandSize\n        The minimum band size for bar and rectangle marks. **Default value:** ``0.25``\n    opacity\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    order\n        For line and trail marks, this ``order`` property can be set to ``null`` or\n        ``false`` to make the lines use the original order in the data sources.\n    orient\n        The orientation of a non-stacked bar, tick, area, and line charts. The value is\n        either horizontal (default) or vertical.\n\n        * For bar, rule and tick, this determines whether the size of the bar and tick\n          should be applied to x or y dimension.\n        * For area, this property determines the orient property of the Vega output.\n        * For line and trail marks, this property determines the sort order of the points in\n          the line if ``config.sortLineBy`` is not specified. For stacked charts, this is\n          always determined by the orientation of the stack; therefore explicitly specified\n          value will be ignored.\n    outerRadius\n        The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.\n\n        **Default value:** ``0``\n    padAngle\n        The angular padding applied to sides of the arc, in radians.\n    radius\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    radius2\n        The secondary (inner) radius in pixels of arc marks.\n\n        **Default value:** ``0``\n    shape\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    size\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    smooth\n        A boolean flag (default true) indicating if the image should be smoothed when\n        resized. If false, individual pixels should be scaled directly rather than\n        interpolated with smoothing. For SVG rendering, this option may not work in some\n        browsers due to lack of standardization.\n    startAngle\n        The start angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    stroke\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    strokeCap\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit\n        The miter limit at which to bevel a line join.\n    strokeOffset\n        The offset in pixels at which to draw the group stroke and fill. If unspecified, the\n        default behavior is to dynamically offset stroked groups such that 1 pixel stroke\n        widths align with the pixel grid.\n    strokeOpacity\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth\n        The stroke width, in pixels.\n    tension\n        Depending on the interpolation type, sets the tension parameter (for line and area\n        marks).\n    text\n        Placeholder text if the ``text`` channel is not specified\n    theta\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    time\n\n    timeUnitBandPosition\n        Default relative band position for a time unit. If set to ``0``, the marks will be\n        positioned at the beginning of the time unit band step. If set to ``0.5``, the marks\n        will be positioned in the middle of the time unit band step.\n    timeUnitBandSize\n        Default relative band size for a time unit. If set to ``1``, the bandwidth of the\n        marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the\n        marks will be half of the time unit band step.\n    tooltip\n        The tooltip text string to show upon mouse hover or an object defining which fields\n        should the tooltip be derived from.\n\n        * If ``tooltip`` is ``true`` or ``{\"content\": \"encoding\"}``, then all fields from\n          ``encoding`` will be used.\n        * If ``tooltip`` is ``{\"content\": \"data\"}``, then all fields that appear in the\n          highlighted data point will be used.\n        * If set to ``null`` or ``false``, then no tooltip will be used.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n        **Default value:** ``null``\n    url\n        The URL of the image file for image marks.\n    width\n        Width of the marks.\n    x\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    y\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    \"\"\"\n\n    align: Align_T\n    angle: float\n    aria: bool\n    ariaRole: str\n    ariaRoleDescription: str\n    aspect: bool\n    baseline: TextBaseline_T\n    binSpacing: float\n    blend: Blend_T\n    color: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T\n    continuousBandSize: float\n    cornerRadius: float\n    cornerRadiusBottomLeft: float\n    cornerRadiusBottomRight: float\n    cornerRadiusTopLeft: float\n    cornerRadiusTopRight: float\n    cursor: Cursor_T\n    description: str\n    dir: TextDirection_T\n    discreteBandSize: float\n    dx: float\n    dy: float\n    ellipsis: str\n    endAngle: float\n    fill: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None\n    fillOpacity: float\n    filled: bool\n    font: str\n    fontSize: float\n    fontStyle: str\n    fontWeight: FontWeight_T\n    height: float\n    href: str\n    innerRadius: float\n    interpolate: Interpolate_T\n    invalid: MarkInvalidDataMode_T | None\n    limit: float\n    lineBreak: str\n    lineHeight: float\n    minBandSize: float\n    opacity: float\n    order: bool | None\n    orient: Orientation_T\n    outerRadius: float\n    padAngle: float\n    radius: float\n    radius2: float\n    shape: str\n    size: float\n    smooth: bool\n    startAngle: float\n    stroke: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None\n    strokeCap: StrokeCap_T\n    strokeDash: Sequence[float]\n    strokeDashOffset: float\n    strokeJoin: StrokeJoin_T\n    strokeMiterLimit: float\n    strokeOffset: float\n    strokeOpacity: float\n    strokeWidth: float\n    tension: float\n    text: str | Sequence[str]\n    theta: float\n    theta2: float\n    time: float\n    timeUnitBandPosition: float\n    timeUnitBandSize: float\n    tooltip: str | bool | float | TooltipContentKwds | None\n    url: str\n    width: float\n    x: float | Literal[\"width\"]\n    x2: float | Literal[\"width\"]\n    y: float | Literal[\"height\"]\n    y2: float | Literal[\"height\"]\n\n\nclass ResolveKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.Resolve` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    axis\n\n    legend\n\n    scale\n\n    \"\"\"\n\n    axis: AxisResolveMapKwds\n    legend: LegendResolveMapKwds\n    scale: ScaleResolveMapKwds\n\n\nclass ScaleConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.ScaleConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    animationDuration\n        Default animation duration (in seconds) for time encodings, except for `band\n        <https://vega.github.io/vega-lite/docs/scale.html#band>`__ scales.\n\n        **Default value:** ``5``\n    bandPaddingInner\n        Default inner padding for ``x`` and ``y`` band scales.\n\n        **Default value:**\n\n        * ``nestedOffsetPaddingInner`` for x/y scales with nested x/y offset scales.\n        * ``barBandPaddingInner`` for bar marks (``0.1`` by default)\n        * ``rectBandPaddingInner`` for rect and other marks (``0`` by default)\n    bandPaddingOuter\n        Default outer padding for ``x`` and ``y`` band scales.\n\n        **Default value:** ``paddingInner/2`` (which makes *width/height = number of unique\n        values * step*)\n    bandWithNestedOffsetPaddingInner\n        Default inner padding for ``x`` and ``y`` band scales with nested ``xOffset`` and\n        ``yOffset`` encoding.\n\n        **Default value:** ``0.2``\n    bandWithNestedOffsetPaddingOuter\n        Default outer padding for ``x`` and ``y`` band scales with nested ``xOffset`` and\n        ``yOffset`` encoding.\n\n        **Default value:** ``0.2``\n    barBandPaddingInner\n        Default inner padding for ``x`` and ``y`` band-ordinal scales of ``\"bar\"`` marks.\n\n        **Default value:** ``0.1``\n    clamp\n        If true, values that exceed the data domain are clamped to either the minimum or\n        maximum range value\n    continuousPadding\n        Default padding for continuous x/y scales.\n\n        **Default:** The bar width for continuous x-scale of a vertical bar and continuous\n        y-scale of a horizontal bar.; ``0`` otherwise.\n    framesPerSecond\n        Default framerate (frames per second) for time `band\n        <https://vega.github.io/vega-lite/docs/scale.html#band>`__ scales.\n\n        **Default value:** ``2``\n    invalid\n        An object that defines scale outputs per channel for invalid values (nulls and NaNs\n        on a continuous scale).\n\n        * The keys in this object are the scale channels.\n        * The values is either ``\"zero-or-min\"`` (use zero if the scale includes zero or min\n          value otherwise) or a value definition ``{value: ...}``.\n\n        *Example:* Setting this ``config.scale.invalid`` property to ``{color: {value:\n        '#aaa'}}`` will make the visualization color all invalid values with '#aaa'.\n\n        See [https://vega.github.io/vega-lite/docs/invalid-data.html](Invalid Data Docs) for\n        more details.\n    maxBandSize\n        The default max value for mapping quantitative fields to bar's size/bandSize.\n\n        If undefined (default), we will use the axis's size (width or height) - 1.\n    maxFontSize\n        The default max value for mapping quantitative fields to text's size/fontSize scale.\n\n        **Default value:** ``40``\n    maxOpacity\n        Default max opacity for mapping a field to opacity.\n\n        **Default value:** ``0.8``\n    maxSize\n        Default max value for point size scale.\n    maxStrokeWidth\n        Default max strokeWidth for the scale of strokeWidth for rule and line marks and of\n        size for trail marks.\n\n        **Default value:** ``4``\n    minBandSize\n        The default min value for mapping quantitative fields to bar and tick's\n        size/bandSize scale.\n\n        **Default value:** ``2``\n    minFontSize\n        The default min value for mapping quantitative fields to text's size/fontSize scale.\n\n        **Default value:** ``8``\n    minOpacity\n        Default minimum opacity for mapping a field to opacity.\n\n        **Default value:** ``0.3``\n    minSize\n        Default minimum value for point size scale.\n\n        **Default value:** ``9``\n    minStrokeWidth\n        Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and\n        of size for trail marks.\n\n        **Default value:** ``1``\n    offsetBandPaddingInner\n        Default padding inner for xOffset/yOffset's band scales.\n\n        **Default Value:** ``0``\n    offsetBandPaddingOuter\n        Default padding outer for xOffset/yOffset's band scales.\n\n        **Default Value:** ``0``\n    pointPadding\n        Default outer padding for ``x`` and ``y`` point-ordinal scales.\n\n        **Default value:** ``0.5`` (which makes *width/height = number of unique values *\n        step*)\n    quantileCount\n        Default range cardinality for `quantile\n        <https://vega.github.io/vega-lite/docs/scale.html#quantile>`__ scale.\n\n        **Default value:** ``4``\n    quantizeCount\n        Default range cardinality for `quantize\n        <https://vega.github.io/vega-lite/docs/scale.html#quantize>`__ scale.\n\n        **Default value:** ``4``\n    rectBandPaddingInner\n        Default inner padding for ``x`` and ``y`` band-ordinal scales of ``\"rect\"`` marks.\n\n        **Default value:** ``0``\n    round\n        If true, rounds numeric output values to integers. This can be helpful for snapping\n        to the pixel grid. (Only available for ``x``, ``y``, and ``size`` scales.)\n    tickBandPaddingInner\n        Default inner padding for ``x`` and ``y`` band-ordinal scales of ``\"tick\"`` marks.\n\n        **Default value:** ``0.25``\n    useUnaggregatedDomain\n        Use the source data range before aggregation as scale domain instead of aggregated\n        data for aggregate axis.\n\n        This is equivalent to setting ``domain`` to ``\"unaggregate\"`` for aggregated\n        *quantitative* fields by default.\n\n        This property only works with aggregate functions that produce values within the raw\n        data domain (``\"mean\"``, ``\"average\"``, ``\"median\"``, ``\"q1\"``, ``\"q3\"``, ``\"min\"``,\n        ``\"max\"``). For other aggregations that produce values outside of the raw data\n        domain (e.g. ``\"count\"``, ``\"sum\"``), this property is ignored.\n\n        **Default value:** ``false``\n    xReverse\n        Reverse x-scale by default (useful for right-to-left charts).\n    zero\n        Default ``scale.zero`` for `continuous\n        <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ scales except for\n        (1) x/y-scales of non-ranged bar or area charts and (2) size scales.\n\n        **Default value:** ``true``\n    \"\"\"\n\n    animationDuration: float\n    bandPaddingInner: float\n    bandPaddingOuter: float\n    bandWithNestedOffsetPaddingInner: float\n    bandWithNestedOffsetPaddingOuter: float\n    barBandPaddingInner: float\n    clamp: bool\n    continuousPadding: float\n    framesPerSecond: float\n    invalid: ScaleInvalidDataConfigKwds\n    maxBandSize: float\n    maxFontSize: float\n    maxOpacity: float\n    maxSize: float\n    maxStrokeWidth: float\n    minBandSize: float\n    minFontSize: float\n    minOpacity: float\n    minSize: float\n    minStrokeWidth: float\n    offsetBandPaddingInner: float\n    offsetBandPaddingOuter: float\n    pointPadding: float\n    quantileCount: float\n    quantizeCount: float\n    rectBandPaddingInner: float\n    round: bool\n    tickBandPaddingInner: float\n    useUnaggregatedDomain: bool\n    xReverse: bool\n    zero: bool\n\n\nclass ScaleInvalidDataConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.ScaleInvalidDataConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    angle\n\n    color\n\n    fill\n\n    fillOpacity\n\n    opacity\n\n    radius\n\n    shape\n\n    size\n\n    stroke\n\n    strokeDash\n\n    strokeOpacity\n\n    strokeWidth\n\n    theta\n\n    time\n\n    x\n\n    xOffset\n\n    y\n\n    yOffset\n\n    \"\"\"\n\n    angle: Value[float] | Literal[\"zero-or-min\"]\n    color: (\n        Literal[\"zero-or-min\"]\n        | Value[ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T]\n    )\n    fill: (\n        Literal[\"zero-or-min\"]\n        | Value[ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None]\n    )\n    fillOpacity: Value[float] | Literal[\"zero-or-min\"]\n    opacity: Value[float] | Literal[\"zero-or-min\"]\n    radius: Value[float] | Literal[\"zero-or-min\"]\n    shape: Value[str] | Literal[\"zero-or-min\"]\n    size: Value[float] | Literal[\"zero-or-min\"]\n    stroke: (\n        Literal[\"zero-or-min\"]\n        | Value[ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None]\n    )\n    strokeDash: Literal[\"zero-or-min\"] | Value[Sequence[float]]\n    strokeOpacity: Value[float] | Literal[\"zero-or-min\"]\n    strokeWidth: Value[float] | Literal[\"zero-or-min\"]\n    theta: Value[float] | Literal[\"zero-or-min\"]\n    time: Value[float] | Literal[\"zero-or-min\"]\n    x: Literal[\"zero-or-min\"] | Value[float | Literal[\"width\"]]\n    xOffset: Value[float] | Literal[\"zero-or-min\"]\n    y: Literal[\"zero-or-min\"] | Value[float | Literal[\"height\"]]\n    yOffset: Value[float] | Literal[\"zero-or-min\"]\n\n\nclass ScaleResolveMapKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.ScaleResolveMap` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    angle\n\n    color\n\n    fill\n\n    fillOpacity\n\n    opacity\n\n    radius\n\n    shape\n\n    size\n\n    stroke\n\n    strokeDash\n\n    strokeOpacity\n\n    strokeWidth\n\n    theta\n\n    time\n\n    x\n\n    xOffset\n\n    y\n\n    yOffset\n\n    \"\"\"\n\n    angle: ResolveMode_T\n    color: ResolveMode_T\n    fill: ResolveMode_T\n    fillOpacity: ResolveMode_T\n    opacity: ResolveMode_T\n    radius: ResolveMode_T\n    shape: ResolveMode_T\n    size: ResolveMode_T\n    stroke: ResolveMode_T\n    strokeDash: ResolveMode_T\n    strokeOpacity: ResolveMode_T\n    strokeWidth: ResolveMode_T\n    theta: ResolveMode_T\n    time: ResolveMode_T\n    x: ResolveMode_T\n    xOffset: ResolveMode_T\n    y: ResolveMode_T\n    yOffset: ResolveMode_T\n\n\nclass SelectionConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.SelectionConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    interval\n        The default definition for an `interval\n        <https://vega.github.io/vega-lite/docs/parameter.html#select>`__ selection. All\n        properties and transformations for an interval selection definition (except\n        ``type``) may be specified here.\n\n        For instance, setting ``interval`` to ``{\"translate\": false}`` disables the ability\n        to move interval selections by default.\n    point\n        The default definition for a `point\n        <https://vega.github.io/vega-lite/docs/parameter.html#select>`__ selection. All\n        properties and transformations  for a point selection definition (except ``type``)\n        may be specified here.\n\n        For instance, setting ``point`` to ``{\"on\": \"dblclick\"}`` populates point selections\n        on double-click by default.\n    \"\"\"\n\n    interval: IntervalSelectionConfigWithoutTypeKwds\n    point: PointSelectionConfigWithoutTypeKwds\n\n\nclass StepKwds(TypedDict, closed=True, total=False):  # type: ignore[call-arg]\n    \"\"\"\n    :class:`altair.Step` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    step\n        The size (width/height) per discrete step.\n\n    Notes\n    -----\n    The following keys may be specified as string literals **only**:\n\n        ['for']\n\n    See `PEP728`_ for type checker compatibility.\n\n    .. _PEP728:\n        https://peps.python.org/pep-0728/#reference-implementation\n    \"\"\"\n\n    step: float\n    __extra_items__: StepFor_T\n\n\nclass StyleConfigIndexKwds(TypedDict, closed=True, total=False):  # type: ignore[call-arg]\n    \"\"\"\n    :class:`altair.StyleConfigIndex` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    arc\n        Arc-specific Config\n    area\n        Area-Specific Config\n    bar\n        Bar-Specific Config\n    circle\n        Circle-Specific Config\n    geoshape\n        Geoshape-Specific Config\n    image\n        Image-specific Config\n    line\n        Line-Specific Config\n    mark\n        Mark Config\n    point\n        Point-Specific Config\n    rect\n        Rect-Specific Config\n    rule\n        Rule-Specific Config\n    square\n        Square-Specific Config\n    text\n        Text-Specific Config\n    tick\n        Tick-Specific Config\n    trail\n        Trail-Specific Config\n\n    Notes\n    -----\n    The following keys may be specified as string literals **only**:\n\n        ['group-subtitle', 'group-title', 'guide-label', 'guide-title']\n\n    See `PEP728`_ for type checker compatibility.\n\n    .. _PEP728:\n        https://peps.python.org/pep-0728/#reference-implementation\n    \"\"\"\n\n    arc: RectConfigKwds\n    area: AreaConfigKwds\n    bar: BarConfigKwds\n    circle: MarkConfigKwds\n    geoshape: MarkConfigKwds\n    image: RectConfigKwds\n    line: LineConfigKwds\n    mark: MarkConfigKwds\n    point: MarkConfigKwds\n    rect: RectConfigKwds\n    rule: MarkConfigKwds\n    square: MarkConfigKwds\n    text: MarkConfigKwds\n    tick: TickConfigKwds\n    trail: LineConfigKwds\n    __extra_items__: MarkConfigKwds\n\n\nclass TickConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.TickConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    align\n        The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).\n        One of ``\"left\"``, ``\"right\"``, ``\"center\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    angle\n        The rotation angle of the text, in degrees.\n    aria\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG element, removing the mark item from the ARIA accessibility tree.\n    ariaRole\n        Sets the type of user interface element of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"role\" attribute. Warning: this\n        property is experimental and may be changed in the future.\n    ariaRoleDescription\n        A human-readable, author-localized description for the role of the mark item for\n        `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"aria-roledescription\" attribute.\n        Warning: this property is experimental and may be changed in the future.\n    aspect\n        Whether to keep aspect ratio of image marks.\n    bandSize\n        The width of the ticks.\n\n        **Default value:**  3/4 of step (width step for horizontal ticks and height step for\n        vertical ticks).\n    baseline\n        For text marks, the vertical text baseline. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, ``\"line-bottom\"``, or an\n        expression reference that provides one of the valid values. The ``\"line-top\"`` and\n        ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but are\n        calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.\n\n        For range marks, the vertical alignment of the marks. One of ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    binSpacing\n        Offset between bars for binned field. The ideal value for this is either 0\n        (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n        **Default value:** ``1``\n    blend\n        The color blend mode for drawing an item on its current background. Any valid `CSS\n        mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__\n        value can be used.\n\n        **Default value:** ``\"source-over\"``\n    color\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    continuousBandSize\n        The default size of the bars on continuous scales.\n\n        **Default value:** ``5``\n    cornerRadius\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cornerRadiusBottomLeft\n        The radius in pixels of rounded rectangles' bottom left corner.\n\n        **Default value:** ``0``\n    cornerRadiusBottomRight\n        The radius in pixels of rounded rectangles' bottom right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopLeft\n        The radius in pixels of rounded rectangles' top right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopRight\n        The radius in pixels of rounded rectangles' top left corner.\n\n        **Default value:** ``0``\n    cursor\n        The mouse cursor used over the mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    description\n        A text description of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.\n    dir\n        The direction of the text. One of ``\"ltr\"`` (left-to-right) or ``\"rtl\"``\n        (right-to-left). This property determines on which side is truncated in response to\n        the limit parameter.\n\n        **Default value:** ``\"ltr\"``\n    discreteBandSize\n        The default size of the bars with discrete dimensions. If unspecified, the default\n        size is  ``step-2``, which provides 2 pixel offset between bars.\n    dx\n        The horizontal offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    dy\n        The vertical offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    ellipsis\n        The ellipsis string for text truncated in response to the limit parameter.\n\n        **Default value:** ``\"…\"``\n    endAngle\n        The end angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    fill\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    fillOpacity\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    filled\n        Whether the mark's color should be used as fill color instead of stroke color.\n\n        **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well\n        as ``geoshape`` marks for `graticule\n        <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;\n        otherwise, ``true``.\n\n        **Note:** This property cannot be used in a `style config\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n    font\n        The typeface to set the text in (e.g., ``\"Helvetica Neue\"``).\n    fontSize\n        The font size, in pixels.\n\n        **Default value:** ``11``\n    fontStyle\n        The font style (e.g., ``\"italic\"``).\n    fontWeight\n        The font weight. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``) or a\n        number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400`` and\n        ``\"bold\"`` = ``700``).\n    height\n        Height of the marks.\n    href\n        A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\n    innerRadius\n        The inner radius in pixels of arc marks. ``innerRadius`` is an alias for\n        ``radius2``.\n\n        **Default value:** ``0``\n    interpolate\n        The line interpolation method to use for line and area marks. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"step-before\"``: alternate between vertical and horizontal segments, as in a\n          step function.\n        * ``\"step-after\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    invalid\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    limit\n        The maximum length of the text mark in pixels. The text value will be automatically\n        truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0`` -- indicating no limit\n    lineBreak\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property is ignored if the text is array-valued.\n    lineHeight\n        The line height in pixels (the spacing between subsequent lines of text) for\n        multi-line text marks.\n    minBandSize\n        The minimum band size for bar and rectangle marks. **Default value:** ``0.25``\n    opacity\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    order\n        For line and trail marks, this ``order`` property can be set to ``null`` or\n        ``false`` to make the lines use the original order in the data sources.\n    orient\n        The orientation of a non-stacked bar, tick, area, and line charts. The value is\n        either horizontal (default) or vertical.\n\n        * For bar, rule and tick, this determines whether the size of the bar and tick\n          should be applied to x or y dimension.\n        * For area, this property determines the orient property of the Vega output.\n        * For line and trail marks, this property determines the sort order of the points in\n          the line if ``config.sortLineBy`` is not specified. For stacked charts, this is\n          always determined by the orientation of the stack; therefore explicitly specified\n          value will be ignored.\n    outerRadius\n        The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.\n\n        **Default value:** ``0``\n    padAngle\n        The angular padding applied to sides of the arc, in radians.\n    radius\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    radius2\n        The secondary (inner) radius in pixels of arc marks.\n\n        **Default value:** ``0``\n    shape\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    size\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    smooth\n        A boolean flag (default true) indicating if the image should be smoothed when\n        resized. If false, individual pixels should be scaled directly rather than\n        interpolated with smoothing. For SVG rendering, this option may not work in some\n        browsers due to lack of standardization.\n    startAngle\n        The start angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    stroke\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    strokeCap\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit\n        The miter limit at which to bevel a line join.\n    strokeOffset\n        The offset in pixels at which to draw the group stroke and fill. If unspecified, the\n        default behavior is to dynamically offset stroked groups such that 1 pixel stroke\n        widths align with the pixel grid.\n    strokeOpacity\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth\n        The stroke width, in pixels.\n    tension\n        Depending on the interpolation type, sets the tension parameter (for line and area\n        marks).\n    text\n        Placeholder text if the ``text`` channel is not specified\n    theta\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    thickness\n        Thickness of the tick mark.\n\n        **Default value:**  ``1``\n    time\n\n    timeUnitBandPosition\n        Default relative band position for a time unit. If set to ``0``, the marks will be\n        positioned at the beginning of the time unit band step. If set to ``0.5``, the marks\n        will be positioned in the middle of the time unit band step.\n    timeUnitBandSize\n        Default relative band size for a time unit. If set to ``1``, the bandwidth of the\n        marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the\n        marks will be half of the time unit band step.\n    tooltip\n        The tooltip text string to show upon mouse hover or an object defining which fields\n        should the tooltip be derived from.\n\n        * If ``tooltip`` is ``true`` or ``{\"content\": \"encoding\"}``, then all fields from\n          ``encoding`` will be used.\n        * If ``tooltip`` is ``{\"content\": \"data\"}``, then all fields that appear in the\n          highlighted data point will be used.\n        * If set to ``null`` or ``false``, then no tooltip will be used.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n        **Default value:** ``null``\n    url\n        The URL of the image file for image marks.\n    width\n        Width of the marks.\n    x\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    y\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    \"\"\"\n\n    align: Align_T\n    angle: float\n    aria: bool\n    ariaRole: str\n    ariaRoleDescription: str\n    aspect: bool\n    bandSize: float\n    baseline: TextBaseline_T\n    binSpacing: float\n    blend: Blend_T\n    color: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T\n    continuousBandSize: float\n    cornerRadius: float\n    cornerRadiusBottomLeft: float\n    cornerRadiusBottomRight: float\n    cornerRadiusTopLeft: float\n    cornerRadiusTopRight: float\n    cursor: Cursor_T\n    description: str\n    dir: TextDirection_T\n    discreteBandSize: float\n    dx: float\n    dy: float\n    ellipsis: str\n    endAngle: float\n    fill: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None\n    fillOpacity: float\n    filled: bool\n    font: str\n    fontSize: float\n    fontStyle: str\n    fontWeight: FontWeight_T\n    height: float\n    href: str\n    innerRadius: float\n    interpolate: Interpolate_T\n    invalid: MarkInvalidDataMode_T | None\n    limit: float\n    lineBreak: str\n    lineHeight: float\n    minBandSize: float\n    opacity: float\n    order: bool | None\n    orient: Orientation_T\n    outerRadius: float\n    padAngle: float\n    radius: float\n    radius2: float\n    shape: str\n    size: float\n    smooth: bool\n    startAngle: float\n    stroke: ColorHex | LinearGradientKwds | RadialGradientKwds | ColorName_T | None\n    strokeCap: StrokeCap_T\n    strokeDash: Sequence[float]\n    strokeDashOffset: float\n    strokeJoin: StrokeJoin_T\n    strokeMiterLimit: float\n    strokeOffset: float\n    strokeOpacity: float\n    strokeWidth: float\n    tension: float\n    text: str | Sequence[str]\n    theta: float\n    theta2: float\n    thickness: float\n    time: float\n    timeUnitBandPosition: float\n    timeUnitBandSize: float\n    tooltip: str | bool | float | TooltipContentKwds | None\n    url: str\n    width: float\n    x: float | Literal[\"width\"]\n    x2: float | Literal[\"width\"]\n    y: float | Literal[\"height\"]\n    y2: float | Literal[\"height\"]\n\n\nclass TimeFormatSpecifierKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.TimeFormatSpecifier` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    date\n\n    day\n\n    hours\n\n    milliseconds\n\n    minutes\n\n    month\n\n    quarter\n\n    seconds\n\n    week\n\n    year\n\n    \"\"\"\n\n    date: str\n    day: str\n    hours: str\n    milliseconds: str\n    minutes: str\n    month: str\n    quarter: str\n    seconds: str\n    week: str\n    year: str\n\n\nclass TimeIntervalStepKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.TimeIntervalStep` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    interval\n\n    step\n\n    \"\"\"\n\n    interval: TimeInterval_T\n    step: float\n\n\nclass TimeLocaleKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.TimeLocale` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    date\n        The date (%x) format specifier (e.g., \"%m/%d/%Y\").\n    dateTime\n        The date and time (%c) format specifier (e.g., \"%a %b %e %X %Y\").\n    days\n        The full names of the weekdays, starting with Sunday.\n    months\n        The full names of the months (starting with January).\n    periods\n        The A.M. and P.M. equivalents (e.g., [\"AM\", \"PM\"]).\n    shortDays\n        The abbreviated names of the weekdays, starting with Sunday.\n    shortMonths\n        The abbreviated names of the months (starting with January).\n    time\n        The time (%X) format specifier (e.g., \"%H:%M:%S\").\n    \"\"\"\n\n    date: str\n    dateTime: str\n    days: Sequence[str]\n    months: Sequence[str]\n    periods: Sequence[str]\n    shortDays: Sequence[str]\n    shortMonths: Sequence[str]\n    time: str\n\n\nclass TitleConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.TitleConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    align\n        Horizontal text alignment for title text. One of ``\"left\"``, ``\"center\"``, or\n        ``\"right\"``.\n    anchor\n        The anchor position for placing the title and subtitle text. One of ``\"start\"``,\n        ``\"middle\"``, or ``\"end\"``. For example, with an orientation of top these anchor\n        positions map to a left-, center-, or right-aligned title.\n    angle\n        Angle in degrees of title and subtitle text.\n    aria\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG group, removing the title from the ARIA accessibility tree.\n\n        **Default value:** ``true``\n    baseline\n        Vertical text baseline for title and subtitle text. One of ``\"alphabetic\"``\n        (default), ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or\n        ``\"line-bottom\"``. The ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly\n        to ``\"top\"`` and ``\"bottom\"``, but are calculated relative to the *lineHeight*\n        rather than *fontSize* alone.\n    color\n        Text color for title text.\n    dx\n        Delta offset for title and subtitle text x-coordinate.\n    dy\n        Delta offset for title and subtitle text y-coordinate.\n    font\n        Font name for title text.\n    fontSize\n        Font size in pixels for title text.\n    fontStyle\n        Font style for title text.\n    fontWeight\n        Font weight for title text. This can be either a string (e.g ``\"bold\"``,\n        ``\"normal\"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where\n        ``\"normal\"`` = ``400`` and ``\"bold\"`` = ``700``).\n    frame\n        The reference frame for the anchor position, one of ``\"bounds\"`` (to anchor relative\n        to the full bounding box) or ``\"group\"`` (to anchor relative to the group width or\n        height).\n    limit\n        The maximum allowed length in pixels of title and subtitle text.\n    lineHeight\n        Line height in pixels for multi-line title text or title text with ``\"line-top\"`` or\n        ``\"line-bottom\"`` baseline.\n    offset\n        The orthogonal offset in pixels by which to displace the title group from its\n        position along the edge of the chart.\n    orient\n        Default title orientation (``\"top\"``, ``\"bottom\"``, ``\"left\"``, or ``\"right\"``)\n    subtitleColor\n        Text color for subtitle text.\n    subtitleFont\n        Font name for subtitle text.\n    subtitleFontSize\n        Font size in pixels for subtitle text.\n    subtitleFontStyle\n        Font style for subtitle text.\n    subtitleFontWeight\n        Font weight for subtitle text. This can be either a string (e.g ``\"bold\"``,\n        ``\"normal\"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where\n        ``\"normal\"`` = ``400`` and ``\"bold\"`` = ``700``).\n    subtitleLineHeight\n        Line height in pixels for multi-line subtitle text.\n    subtitlePadding\n        The padding in pixels between title and subtitle text.\n    zindex\n        The integer z-index indicating the layering of the title group relative to other\n        axis, mark, and legend groups.\n\n        **Default value:** ``0``.\n    \"\"\"\n\n    align: Align_T\n    anchor: TitleAnchor_T\n    angle: float\n    aria: bool\n    baseline: TextBaseline_T\n    color: ColorHex | ColorName_T | None\n    dx: float\n    dy: float\n    font: str\n    fontSize: float\n    fontStyle: str\n    fontWeight: FontWeight_T\n    frame: str | TitleFrame_T\n    limit: float\n    lineHeight: float\n    offset: float\n    orient: TitleOrient_T\n    subtitleColor: ColorHex | ColorName_T | None\n    subtitleFont: str\n    subtitleFontSize: float\n    subtitleFontStyle: str\n    subtitleFontWeight: FontWeight_T\n    subtitleLineHeight: float\n    subtitlePadding: float\n    zindex: float\n\n\nclass TitleParamsKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.TitleParams` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    text\n        The title text.\n    align\n        Horizontal text alignment for title text. One of ``\"left\"``, ``\"center\"``, or\n        ``\"right\"``.\n    anchor\n        The anchor position for placing the title. One of ``\"start\"``, ``\"middle\"``, or\n        ``\"end\"``. For example, with an orientation of top these anchor positions map to a\n        left-, center-, or right-aligned title.\n\n        **Default value:** ``\"middle\"`` for `single\n        <https://vega.github.io/vega-lite/docs/spec.html>`__ and `layered\n        <https://vega.github.io/vega-lite/docs/layer.html>`__ views. ``\"start\"`` for other\n        composite views.\n\n        **Note:** `For now <https://github.com/vega/vega-lite/issues/2875>`__, ``anchor`` is\n        only customizable only for `single\n        <https://vega.github.io/vega-lite/docs/spec.html>`__ and `layered\n        <https://vega.github.io/vega-lite/docs/layer.html>`__ views. For other composite\n        views, ``anchor`` is always ``\"start\"``.\n    angle\n        Angle in degrees of title and subtitle text.\n    aria\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG group, removing the title from the ARIA accessibility tree.\n\n        **Default value:** ``true``\n    baseline\n        Vertical text baseline for title and subtitle text. One of ``\"alphabetic\"``\n        (default), ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or\n        ``\"line-bottom\"``. The ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly\n        to ``\"top\"`` and ``\"bottom\"``, but are calculated relative to the *lineHeight*\n        rather than *fontSize* alone.\n    color\n        Text color for title text.\n    dx\n        Delta offset for title and subtitle text x-coordinate.\n    dy\n        Delta offset for title and subtitle text y-coordinate.\n    font\n        Font name for title text.\n    fontSize\n        Font size in pixels for title text.\n    fontStyle\n        Font style for title text.\n    fontWeight\n        Font weight for title text. This can be either a string (e.g ``\"bold\"``,\n        ``\"normal\"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where\n        ``\"normal\"`` = ``400`` and ``\"bold\"`` = ``700``).\n    frame\n        The reference frame for the anchor position, one of ``\"bounds\"`` (to anchor relative\n        to the full bounding box) or ``\"group\"`` (to anchor relative to the group width or\n        height).\n    limit\n        The maximum allowed length in pixels of title and subtitle text.\n    lineHeight\n        Line height in pixels for multi-line title text or title text with ``\"line-top\"`` or\n        ``\"line-bottom\"`` baseline.\n    offset\n        The orthogonal offset in pixels by which to displace the title group from its\n        position along the edge of the chart.\n    orient\n        Default title orientation (``\"top\"``, ``\"bottom\"``, ``\"left\"``, or ``\"right\"``)\n    style\n        A `mark style property <https://vega.github.io/vega-lite/docs/config.html#style>`__\n        to apply to the title text mark.\n\n        **Default value:** ``\"group-title\"``.\n    subtitle\n        The subtitle Text.\n    subtitleColor\n        Text color for subtitle text.\n    subtitleFont\n        Font name for subtitle text.\n    subtitleFontSize\n        Font size in pixels for subtitle text.\n    subtitleFontStyle\n        Font style for subtitle text.\n    subtitleFontWeight\n        Font weight for subtitle text. This can be either a string (e.g ``\"bold\"``,\n        ``\"normal\"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where\n        ``\"normal\"`` = ``400`` and ``\"bold\"`` = ``700``).\n    subtitleLineHeight\n        Line height in pixels for multi-line subtitle text.\n    subtitlePadding\n        The padding in pixels between title and subtitle text.\n    zindex\n        The integer z-index indicating the layering of the title group relative to other\n        axis, mark and legend groups.\n\n        **Default value:** ``0``.\n    \"\"\"\n\n    text: str | Sequence[str]\n    align: Align_T\n    anchor: TitleAnchor_T\n    angle: float\n    aria: bool\n    baseline: TextBaseline_T\n    color: ColorHex | ColorName_T | None\n    dx: float\n    dy: float\n    font: str\n    fontSize: float\n    fontStyle: str\n    fontWeight: FontWeight_T\n    frame: str | TitleFrame_T\n    limit: float\n    lineHeight: float\n    offset: float\n    orient: TitleOrient_T\n    style: str | Sequence[str]\n    subtitle: str | Sequence[str]\n    subtitleColor: ColorHex | ColorName_T | None\n    subtitleFont: str\n    subtitleFontSize: float\n    subtitleFontStyle: str\n    subtitleFontWeight: FontWeight_T\n    subtitleLineHeight: float\n    subtitlePadding: float\n    zindex: float\n\n\nclass TooltipContentKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.TooltipContent` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    content\n\n    \"\"\"\n\n    content: Literal[\"encoding\", \"data\"]\n\n\nclass TopLevelSelectionParameterKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.TopLevelSelectionParameter` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    name\n        Required. A unique name for the selection parameter. Selection names should be valid\n        JavaScript identifiers: they should contain only alphanumeric characters (or \"$\", or\n        \"_\") and may not start with a digit. Reserved keywords that may not be used as\n        parameter names are \"datum\", \"event\", \"item\", and \"parent\".\n    select\n        Determines the default event processing and data query for the selection. Vega-Lite\n        currently supports two selection types:\n\n        * ``\"point\"`` -- to select multiple discrete data values; the first value is\n          selected on ``click`` and additional values toggled on shift-click.\n        * ``\"interval\"`` -- to select a continuous range of data values on ``drag``.\n    bind\n        When set, a selection is populated by input elements (also known as dynamic query\n        widgets) or by interacting with the corresponding legend. Direct manipulation\n        interaction is disabled by default; to re-enable it, set the selection's `on\n        <https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties>`__\n        property.\n\n        Legend bindings are restricted to selections that only specify a single field or\n        encoding.\n\n        Query widget binding takes the form of Vega's `input element binding definition\n        <https://vega.github.io/vega/docs/signals/#bind>`__ or can be a mapping between\n        projected field/encodings and binding definitions.\n\n        **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__\n        documentation.\n    value\n        Initialize the selection with a mapping between `projected channels or field names\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ and initial\n        values.\n\n        **See also:** `init <https://vega.github.io/vega-lite/docs/value.html>`__\n        documentation.\n    views\n        By default, top-level selections are applied to every view in the visualization. If\n        this property is specified, selections will only be applied to views with the given\n        names.\n    \"\"\"\n\n    name: str\n    select: PointSelectionConfigKwds | IntervalSelectionConfigKwds | SelectionType_T\n    bind: (\n        BindInputKwds\n        | BindRangeKwds\n        | BindDirectKwds\n        | BindCheckboxKwds\n        | BindRadioSelectKwds\n        | LegendStreamBindingKwds\n        | Literal[\"legend\", \"scales\"]\n    )\n    value: DateTimeKwds | Sequence[Map] | PrimitiveValue_T\n    views: Sequence[str]\n\n\nclass VariableParameterKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.VariableParameter` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    name\n        A unique name for the variable parameter. Parameter names should be valid JavaScript\n        identifiers: they should contain only alphanumeric characters (or \"$\", or \"_\") and\n        may not start with a digit. Reserved keywords that may not be used as parameter\n        names are \"datum\", \"event\", \"item\", and \"parent\".\n    bind\n        Binds the parameter to an external input element such as a slider, selection list or\n        radio button group.\n    expr\n        An expression for the value of the parameter. This expression may include other\n        parameters, in which case the parameter will automatically update in response to\n        upstream parameter changes.\n    react\n        A boolean flag (default ``true``) indicating if the update expression should be\n        automatically re-evaluated when any upstream signal dependencies update. If\n        ``false``, the update expression will not register any dependencies on other\n        signals, even for initialization.\n\n        **Default value:** ``true``\n    value\n        The `initial value <http://vega.github.io/vega-lite/docs/value.html>`__ of the\n        parameter.\n\n        **Default value:** ``undefined``\n    \"\"\"\n\n    name: str\n    bind: (\n        BindInputKwds\n        | BindRangeKwds\n        | BindDirectKwds\n        | BindCheckboxKwds\n        | BindRadioSelectKwds\n    )\n    expr: str\n    react: bool\n    value: Any\n\n\nclass ViewBackgroundKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.ViewBackground` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    cornerRadius\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cursor\n        The mouse cursor used over the view. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    fill\n        The fill color.\n\n        **Default value:** ``undefined``\n    fillOpacity\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    opacity\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    stroke\n        The stroke color.\n\n        **Default value:** ``\"#ddd\"``\n    strokeCap\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit\n        The miter limit at which to bevel a line join.\n    strokeOpacity\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth\n        The stroke width, in pixels.\n    style\n        A string or array of strings indicating the name of custom styles to apply to the\n        view background. A style is a named collection of mark property defaults defined\n        within the `style configuration\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an\n        array, later styles will override earlier styles.\n\n        **Default value:** ``\"cell\"`` **Note:** Any specified view background properties\n        will augment the default style.\n    \"\"\"\n\n    cornerRadius: float\n    cursor: Cursor_T\n    fill: ColorHex | ColorName_T | None\n    fillOpacity: float\n    opacity: float\n    stroke: ColorHex | ColorName_T | None\n    strokeCap: StrokeCap_T\n    strokeDash: Sequence[float]\n    strokeDashOffset: float\n    strokeJoin: StrokeJoin_T\n    strokeMiterLimit: float\n    strokeOpacity: float\n    strokeWidth: float\n    style: str | Sequence[str]\n\n\nclass ViewConfigKwds(TypedDict, total=False):\n    \"\"\"\n    :class:`altair.ViewConfig` ``TypedDict`` wrapper.\n\n    Parameters\n    ----------\n    clip\n        Whether the view should be clipped.\n    continuousHeight\n        The default height when the plot has a continuous y-field for x or latitude, or has\n        arc marks.\n\n        **Default value:** ``300``\n    continuousWidth\n        The default width when the plot has a continuous field for x or longitude, or has\n        arc marks.\n\n        **Default value:** ``300``\n    cornerRadius\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cursor\n        The mouse cursor used over the view. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    discreteHeight\n        The default height when the plot has non arc marks and either a discrete y-field or\n        no y-field. The height can be either a number indicating a fixed height or an object\n        in the form of ``{step: number}`` defining the height per discrete step.\n\n        **Default value:** a step size based on ``config.view.step``.\n    discreteWidth\n        The default width when the plot has non-arc marks and either a discrete x-field or\n        no x-field. The width can be either a number indicating a fixed width or an object\n        in the form of ``{step: number}`` defining the width per discrete step.\n\n        **Default value:** a step size based on ``config.view.step``.\n    fill\n        The fill color.\n\n        **Default value:** ``undefined``\n    fillOpacity\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    opacity\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    step\n        Default step size for x-/y- discrete fields.\n    stroke\n        The stroke color.\n\n        **Default value:** ``\"#ddd\"``\n    strokeCap\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit\n        The miter limit at which to bevel a line join.\n    strokeOpacity\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth\n        The stroke width, in pixels.\n    \"\"\"\n\n    clip: bool\n    continuousHeight: float\n    continuousWidth: float\n    cornerRadius: float\n    cursor: Cursor_T\n    discreteHeight: float\n    discreteWidth: float\n    fill: ColorHex | ColorName_T | None\n    fillOpacity: float\n    opacity: float\n    step: float\n    stroke: ColorHex | ColorName_T | None\n    strokeCap: StrokeCap_T\n    strokeDash: Sequence[float]\n    strokeDashOffset: float\n    strokeJoin: StrokeJoin_T\n    strokeMiterLimit: float\n    strokeOpacity: float\n    strokeWidth: float\n\n\nclass ThemeConfig(TypedDict, total=False):\n    \"\"\"\n    Top-Level Configuration ``TypedDict`` for creating a consistent theme.\n\n    Parameters\n    ----------\n    align\n        The alignment to apply to grid rows and columns. The supported string values are\n        ``\"all\"``, ``\"each\"``, and ``\"none\"``.\n\n        * For ``\"none\"``, a flow layout will be used, in which adjacent subviews are simply\n          placed one after the other.\n        * For ``\"each\"``, subviews will be aligned into a clean grid structure, but each row\n          or column may be of variable size.\n        * For ``\"all\"``, subviews will be aligned and each row or column will be sized\n          identically based on the maximum observed size. String values for this property\n          will be applied to both grid rows and columns.\n\n        Alternatively, an object value of the form ``{\"row\": string, \"column\": string}`` can\n        be used to supply different alignments for rows and columns.\n\n        **Default value:** ``\"all\"``.\n    autosize\n        How the visualization size should be determined. If a string, should be one of\n        ``\"pad\"``, ``\"fit\"`` or ``\"none\"``. Object values can additionally specify\n        parameters for content sizing and automatic resizing.\n\n        **Default value**: ``pad``\n    background\n        CSS color property to use as the background of the entire view.\n\n        **Default value:** ``\"white\"``\n    bounds\n        The bounds calculation method to use for determining the extent of a sub-plot. One\n        of ``full`` (the default) or ``flush``.\n\n        * If set to ``full``, the entire calculated bounds (including axes, title, and\n          legend) will be used.\n        * If set to ``flush``, only the specified width and height values for the sub-view\n          will be used. The ``flush`` setting can be useful when attempting to place\n          sub-plots without axes or legends into a uniform grid structure.\n\n        **Default value:** ``\"full\"``\n    center\n        Boolean flag indicating if subviews should be centered relative to their respective\n        rows or columns.\n\n        An object value of the form ``{\"row\": boolean, \"column\": boolean}`` can be used to\n        supply different centering values for rows and columns.\n\n        **Default value:** ``false``\n    config\n        Vega-Lite configuration object. This property can only be defined at the top-level\n        of a specification.\n    description\n        Description of this mark for commenting purpose.\n    height\n        The height of a visualization.\n\n        * For a plot with a continuous y-field, height should be a number.\n        * For a plot with either a discrete y-field or no y-field, height can be either a\n          number indicating a fixed height or an object in the form of ``{step: number}``\n          defining the height per discrete step. (No y-field is equivalent to having one\n          discrete step.)\n        * To enable responsive sizing on height, it should be set to ``\"container\"``.\n\n        **Default value:** Based on ``config.view.continuousHeight`` for a plot with a\n        continuous y-field and ``config.view.discreteHeight`` otherwise.\n\n        **Note:** For plots with `row and column channels\n        <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the\n        height of a single view and the ``\"container\"`` option cannot be used.\n\n        **See also:** `height <https://vega.github.io/vega-lite/docs/size.html>`__\n        documentation.\n    name\n        Name of the visualization for later reference.\n    padding\n        The default visualization padding, in pixels, from the edge of the visualization\n        canvas to the data rectangle. If a number, specifies padding for all sides. If an\n        object, the value should have the format ``{\"left\": 5, \"top\": 5, \"right\": 5,\n        \"bottom\": 5}`` to specify padding for each side of the visualization.\n\n        **Default value**: ``5``\n    params\n        An array of parameters that may either be simple variables, or more complex\n        selections that map user input to data queries.\n    projection\n        An object defining properties of geographic projection, which will be applied to\n        ``shape`` path for ``\"geoshape\"`` marks and to ``latitude`` and ``\"longitude\"``\n        channels for other marks.\n    resolve\n        Scale, axis, and legend resolutions for view composition specifications.\n    spacing\n        The spacing in pixels between sub-views of the composition operator. An object of\n        the form ``{\"row\": number, \"column\": number}`` can be used to set different spacing\n        values for rows and columns.\n\n        **Default value**: Depends on ``\"spacing\"`` property of `the view composition\n        configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__\n        (``20`` by default)\n    title\n        Title for the plot.\n    usermeta\n        Optional metadata that will be passed to Vega. This object is completely ignored by\n        Vega and Vega-Lite and can be used for custom metadata.\n    view\n        An object defining the view background's fill and stroke.\n\n        **Default value:** none (transparent)\n    width\n        The width of a visualization.\n\n        * For a plot with a continuous x-field, width should be a number.\n        * For a plot with either a discrete x-field or no x-field, width can be either a\n          number indicating a fixed width or an object in the form of ``{step: number}``\n          defining the width per discrete step. (No x-field is equivalent to having one\n          discrete step.)\n        * To enable responsive sizing on width, it should be set to ``\"container\"``.\n\n        **Default value:** Based on ``config.view.continuousWidth`` for a plot with a\n        continuous x-field and ``config.view.discreteWidth`` otherwise.\n\n        **Note:** For plots with `row and column channels\n        <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the\n        width of a single view and the ``\"container\"`` option cannot be used.\n\n        **See also:** `width <https://vega.github.io/vega-lite/docs/size.html>`__\n        documentation.\n    \"\"\"\n\n    align: RowColKwds[LayoutAlign_T] | LayoutAlign_T\n    autosize: AutoSizeParamsKwds | AutosizeType_T\n    background: ColorHex | ColorName_T\n    bounds: Literal[\"full\", \"flush\"]\n    center: bool | RowColKwds[bool]\n    config: ConfigKwds\n    description: str\n    height: float | StepKwds | Literal[\"container\"]\n    name: str\n    padding: float | PaddingKwds\n    params: Sequence[VariableParameterKwds | TopLevelSelectionParameterKwds]\n    projection: ProjectionKwds\n    resolve: ResolveKwds\n    spacing: float | RowColKwds[float]\n    title: str | Sequence[str] | TitleParamsKwds\n    usermeta: Map\n    view: ViewBackgroundKwds\n    width: float | StepKwds | Literal[\"container\"]\n"
  },
  {
    "path": "altair/vegalite/v6/schema/_typing.py",
    "content": "# The contents of this file are automatically written by\n# tools/generate_schema_wrapper.py. Do not modify directly.\n\nfrom __future__ import annotations\n\nimport re\nimport sys\nfrom collections.abc import Mapping, Sequence\nfrom datetime import date, datetime\nfrom typing import Annotated, Any, Generic, Literal, TypeAlias, TypeVar, get_args\n\nif sys.version_info >= (3, 15):  # https://peps.python.org/pep-0728/\n    from typing import TypedDict\nelse:\n    from typing_extensions import TypedDict\n\nif sys.version_info >= (3, 13):\n    from typing import TypeIs\nelse:\n    from typing_extensions import TypeIs\n\nif sys.version_info >= (3, 12):\n    from typing import TypeAliasType\nelse:\n    from typing_extensions import TypeAliasType\n\nif sys.version_info >= (3, 11):\n    from typing import LiteralString\nelse:\n    from typing_extensions import LiteralString\n\n\n__all__ = [\n    \"AggregateOp_T\",\n    \"Align_T\",\n    \"AllSortString_T\",\n    \"AutosizeType_T\",\n    \"AxisOrient_T\",\n    \"BinnedTimeUnit_T\",\n    \"Blend_T\",\n    \"BoxPlot_T\",\n    \"ColorHex\",\n    \"ColorName_T\",\n    \"ColorScheme_T\",\n    \"CompositeMark_T\",\n    \"Cursor_T\",\n    \"ErrorBand_T\",\n    \"ErrorBarExtent_T\",\n    \"ErrorBar_T\",\n    \"FontWeight_T\",\n    \"ImputeMethod_T\",\n    \"Interpolate_T\",\n    \"LayoutAlign_T\",\n    \"LegendOrient_T\",\n    \"Map\",\n    \"MarkInvalidDataMode_T\",\n    \"MarkType_T\",\n    \"Mark_T\",\n    \"MultiTimeUnit_T\",\n    \"NonArgAggregateOp_T\",\n    \"OneOrSeq\",\n    \"Orient_T\",\n    \"Orientation_T\",\n    \"PaddingKwds\",\n    \"PrimitiveValue_T\",\n    \"ProjectionType_T\",\n    \"RangeEnum_T\",\n    \"ResolveMode_T\",\n    \"RowColKwds\",\n    \"ScaleInterpolateEnum_T\",\n    \"ScaleType_T\",\n    \"SelectionResolution_T\",\n    \"SelectionType_T\",\n    \"SingleDefUnitChannel_T\",\n    \"SingleTimeUnit_T\",\n    \"SortByChannel_T\",\n    \"SortOrder_T\",\n    \"StackOffset_T\",\n    \"StandardType_T\",\n    \"StepFor_T\",\n    \"StrokeCap_T\",\n    \"StrokeJoin_T\",\n    \"Temporal\",\n    \"TextBaseline_T\",\n    \"TextDirection_T\",\n    \"TimeInterval_T\",\n    \"TitleAnchor_T\",\n    \"TitleFrame_T\",\n    \"TitleOrient_T\",\n    \"TypeForShape_T\",\n    \"Type_T\",\n    \"Value\",\n    \"VegaThemes\",\n    \"WindowOnlyOp_T\",\n    \"is_color_hex\",\n]\n\n\nT = TypeVar(\"T\")\nOneOrSeq = TypeAliasType(\"OneOrSeq\", T | Sequence[T], type_params=(T,))\n\"\"\"\nOne of ``T`` specified type(s), or a `Sequence` of such.\n\nExamples\n--------\nThe parameters ``short``, ``long`` accept the same range of types::\n\n    # ruff: noqa: UP006, UP007\n\n    def func(\n        short: OneOrSeq[str | bool | float],\n        long: str | bool | float | Sequence[str | bool | float],\n    ): ...\n\"\"\"\n\n\nclass Value(TypedDict, Generic[T]):\n    \"\"\"\n    A `Generic`_ single item ``dict``.\n\n    Parameters\n    ----------\n    value: T\n        Wrapped value.\n\n    Returns\n    -------\n    dict\n\n    .. _Generic:\n        https://typing.readthedocs.io/en/latest/spec/generics.html#generics\n    \"\"\"\n\n    value: T\n\n\nColorHex = Annotated[\n    LiteralString,\n    re.compile(r\"#[0-9a-f]{2}[0-9a-f]{2}[0-9a-f]{2}([0-9a-f]{2})?\", re.IGNORECASE),\n]\n\"\"\"\nA `hexadecimal`_ color code.\n\nCorresponds to the ``json-schema`` string format:\n\n    {\"format\": \"color-hex\", \"type\": \"string\"}\n\nExamples\n--------\n:\n\n    \"#f0f8ff\"\n    \"#7fffd4\"\n    \"#000000\"\n    \"#0000FF\"\n    \"#0000ff80\"\n\n.. _hexadecimal:\n    https://www.w3schools.com/html/html_colors_hex.asp\n\"\"\"\n\n\ndef is_color_hex(obj: Any) -> TypeIs[ColorHex]:\n    \"\"\"Return ``True`` if the object is a hexadecimal color code.\"\"\"\n    # NOTE: Extracts compiled pattern from metadata,\n    # to avoid defining in multiple places.\n    it = iter(get_args(ColorHex))\n    next(it)\n    pattern: re.Pattern[str] = next(it)\n    return bool(pattern.fullmatch(obj))\n\n\nclass RowColKwds(TypedDict, Generic[T], total=False):\n    \"\"\"\n    A `Generic`_ two-item ``dict``.\n\n    Parameters\n    ----------\n    column: T\n    row: T\n\n    Returns\n    -------\n    dict\n\n    .. _Generic:\n        https://typing.readthedocs.io/en/latest/spec/generics.html#generics\n    \"\"\"\n\n    column: T\n    row: T\n\n\nclass PaddingKwds(TypedDict, total=False):\n    bottom: float\n    left: float\n    right: float\n    top: float\n\n\nTemporal: TypeAlias = date | datetime\n\nVegaThemes: TypeAlias = Literal[\n    \"carbong10\",\n    \"carbong100\",\n    \"carbong90\",\n    \"carbonwhite\",\n    \"dark\",\n    \"excel\",\n    \"fivethirtyeight\",\n    \"ggplot2\",\n    \"googlecharts\",\n    \"latimes\",\n    \"powerbi\",\n    \"quartz\",\n    \"urbaninstitute\",\n    \"vox\",\n]\nMap: TypeAlias = Mapping[str, Any]\nPrimitiveValue_T: TypeAlias = str | bool | float | None\nAggregateOp_T: TypeAlias = Literal[\n    \"argmax\",\n    \"argmin\",\n    \"average\",\n    \"count\",\n    \"distinct\",\n    \"max\",\n    \"mean\",\n    \"median\",\n    \"min\",\n    \"missing\",\n    \"product\",\n    \"q1\",\n    \"q3\",\n    \"ci0\",\n    \"ci1\",\n    \"stderr\",\n    \"stdev\",\n    \"stdevp\",\n    \"sum\",\n    \"valid\",\n    \"values\",\n    \"variance\",\n    \"variancep\",\n    \"exponential\",\n    \"exponentialb\",\n]\nAlign_T: TypeAlias = Literal[\"left\", \"center\", \"right\"]\nAllSortString_T: TypeAlias = Literal[\n    \"ascending\",\n    \"descending\",\n    \"x\",\n    \"y\",\n    \"color\",\n    \"fill\",\n    \"stroke\",\n    \"strokeWidth\",\n    \"size\",\n    \"shape\",\n    \"fillOpacity\",\n    \"strokeOpacity\",\n    \"opacity\",\n    \"text\",\n    \"-x\",\n    \"-y\",\n    \"-color\",\n    \"-fill\",\n    \"-stroke\",\n    \"-strokeWidth\",\n    \"-size\",\n    \"-shape\",\n    \"-fillOpacity\",\n    \"-strokeOpacity\",\n    \"-opacity\",\n    \"-text\",\n]\nAutosizeType_T: TypeAlias = Literal[\"pad\", \"none\", \"fit\", \"fit-x\", \"fit-y\"]\nAxisOrient_T: TypeAlias = Literal[\"top\", \"bottom\", \"left\", \"right\"]\nBinnedTimeUnit_T: TypeAlias = Literal[\n    \"binnedyear\",\n    \"binnedyearquarter\",\n    \"binnedyearquartermonth\",\n    \"binnedyearmonth\",\n    \"binnedyearmonthdate\",\n    \"binnedyearmonthdatehours\",\n    \"binnedyearmonthdatehoursminutes\",\n    \"binnedyearmonthdatehoursminutesseconds\",\n    \"binnedyearweek\",\n    \"binnedyearweekday\",\n    \"binnedyearweekdayhours\",\n    \"binnedyearweekdayhoursminutes\",\n    \"binnedyearweekdayhoursminutesseconds\",\n    \"binnedyeardayofyear\",\n    \"binnedutcyear\",\n    \"binnedutcyearquarter\",\n    \"binnedutcyearquartermonth\",\n    \"binnedutcyearmonth\",\n    \"binnedutcyearmonthdate\",\n    \"binnedutcyearmonthdatehours\",\n    \"binnedutcyearmonthdatehoursminutes\",\n    \"binnedutcyearmonthdatehoursminutesseconds\",\n    \"binnedutcyearweek\",\n    \"binnedutcyearweekday\",\n    \"binnedutcyearweekdayhours\",\n    \"binnedutcyearweekdayhoursminutes\",\n    \"binnedutcyearweekdayhoursminutesseconds\",\n    \"binnedutcyeardayofyear\",\n]\nBlend_T: TypeAlias = Literal[\n    None,\n    \"multiply\",\n    \"screen\",\n    \"overlay\",\n    \"darken\",\n    \"lighten\",\n    \"color-dodge\",\n    \"color-burn\",\n    \"hard-light\",\n    \"soft-light\",\n    \"difference\",\n    \"exclusion\",\n    \"hue\",\n    \"saturation\",\n    \"color\",\n    \"luminosity\",\n]\nBoxPlot_T: TypeAlias = Literal[\"boxplot\"]\nColorName_T: TypeAlias = Literal[\n    \"black\",\n    \"silver\",\n    \"gray\",\n    \"white\",\n    \"maroon\",\n    \"red\",\n    \"purple\",\n    \"fuchsia\",\n    \"green\",\n    \"lime\",\n    \"olive\",\n    \"yellow\",\n    \"navy\",\n    \"blue\",\n    \"teal\",\n    \"aqua\",\n    \"orange\",\n    \"aliceblue\",\n    \"antiquewhite\",\n    \"aquamarine\",\n    \"azure\",\n    \"beige\",\n    \"bisque\",\n    \"blanchedalmond\",\n    \"blueviolet\",\n    \"brown\",\n    \"burlywood\",\n    \"cadetblue\",\n    \"chartreuse\",\n    \"chocolate\",\n    \"coral\",\n    \"cornflowerblue\",\n    \"cornsilk\",\n    \"crimson\",\n    \"cyan\",\n    \"darkblue\",\n    \"darkcyan\",\n    \"darkgoldenrod\",\n    \"darkgray\",\n    \"darkgreen\",\n    \"darkgrey\",\n    \"darkkhaki\",\n    \"darkmagenta\",\n    \"darkolivegreen\",\n    \"darkorange\",\n    \"darkorchid\",\n    \"darkred\",\n    \"darksalmon\",\n    \"darkseagreen\",\n    \"darkslateblue\",\n    \"darkslategray\",\n    \"darkslategrey\",\n    \"darkturquoise\",\n    \"darkviolet\",\n    \"deeppink\",\n    \"deepskyblue\",\n    \"dimgray\",\n    \"dimgrey\",\n    \"dodgerblue\",\n    \"firebrick\",\n    \"floralwhite\",\n    \"forestgreen\",\n    \"gainsboro\",\n    \"ghostwhite\",\n    \"gold\",\n    \"goldenrod\",\n    \"greenyellow\",\n    \"grey\",\n    \"honeydew\",\n    \"hotpink\",\n    \"indianred\",\n    \"indigo\",\n    \"ivory\",\n    \"khaki\",\n    \"lavender\",\n    \"lavenderblush\",\n    \"lawngreen\",\n    \"lemonchiffon\",\n    \"lightblue\",\n    \"lightcoral\",\n    \"lightcyan\",\n    \"lightgoldenrodyellow\",\n    \"lightgray\",\n    \"lightgreen\",\n    \"lightgrey\",\n    \"lightpink\",\n    \"lightsalmon\",\n    \"lightseagreen\",\n    \"lightskyblue\",\n    \"lightslategray\",\n    \"lightslategrey\",\n    \"lightsteelblue\",\n    \"lightyellow\",\n    \"limegreen\",\n    \"linen\",\n    \"magenta\",\n    \"mediumaquamarine\",\n    \"mediumblue\",\n    \"mediumorchid\",\n    \"mediumpurple\",\n    \"mediumseagreen\",\n    \"mediumslateblue\",\n    \"mediumspringgreen\",\n    \"mediumturquoise\",\n    \"mediumvioletred\",\n    \"midnightblue\",\n    \"mintcream\",\n    \"mistyrose\",\n    \"moccasin\",\n    \"navajowhite\",\n    \"oldlace\",\n    \"olivedrab\",\n    \"orangered\",\n    \"orchid\",\n    \"palegoldenrod\",\n    \"palegreen\",\n    \"paleturquoise\",\n    \"palevioletred\",\n    \"papayawhip\",\n    \"peachpuff\",\n    \"peru\",\n    \"pink\",\n    \"plum\",\n    \"powderblue\",\n    \"rosybrown\",\n    \"royalblue\",\n    \"saddlebrown\",\n    \"salmon\",\n    \"sandybrown\",\n    \"seagreen\",\n    \"seashell\",\n    \"sienna\",\n    \"skyblue\",\n    \"slateblue\",\n    \"slategray\",\n    \"slategrey\",\n    \"snow\",\n    \"springgreen\",\n    \"steelblue\",\n    \"tan\",\n    \"thistle\",\n    \"tomato\",\n    \"turquoise\",\n    \"violet\",\n    \"wheat\",\n    \"whitesmoke\",\n    \"yellowgreen\",\n    \"rebeccapurple\",\n]\nColorScheme_T: TypeAlias = Literal[\n    \"accent\",\n    \"category10\",\n    \"category20\",\n    \"category20b\",\n    \"category20c\",\n    \"dark2\",\n    \"paired\",\n    \"pastel1\",\n    \"pastel2\",\n    \"set1\",\n    \"set2\",\n    \"set3\",\n    \"tableau10\",\n    \"tableau20\",\n    \"observable10\",\n    \"blues\",\n    \"tealblues\",\n    \"teals\",\n    \"greens\",\n    \"browns\",\n    \"greys\",\n    \"purples\",\n    \"warmgreys\",\n    \"reds\",\n    \"oranges\",\n    \"turbo\",\n    \"viridis\",\n    \"inferno\",\n    \"magma\",\n    \"plasma\",\n    \"cividis\",\n    \"bluegreen\",\n    \"bluegreen-3\",\n    \"bluegreen-4\",\n    \"bluegreen-5\",\n    \"bluegreen-6\",\n    \"bluegreen-7\",\n    \"bluegreen-8\",\n    \"bluegreen-9\",\n    \"bluepurple\",\n    \"bluepurple-3\",\n    \"bluepurple-4\",\n    \"bluepurple-5\",\n    \"bluepurple-6\",\n    \"bluepurple-7\",\n    \"bluepurple-8\",\n    \"bluepurple-9\",\n    \"goldgreen\",\n    \"goldgreen-3\",\n    \"goldgreen-4\",\n    \"goldgreen-5\",\n    \"goldgreen-6\",\n    \"goldgreen-7\",\n    \"goldgreen-8\",\n    \"goldgreen-9\",\n    \"goldorange\",\n    \"goldorange-3\",\n    \"goldorange-4\",\n    \"goldorange-5\",\n    \"goldorange-6\",\n    \"goldorange-7\",\n    \"goldorange-8\",\n    \"goldorange-9\",\n    \"goldred\",\n    \"goldred-3\",\n    \"goldred-4\",\n    \"goldred-5\",\n    \"goldred-6\",\n    \"goldred-7\",\n    \"goldred-8\",\n    \"goldred-9\",\n    \"greenblue\",\n    \"greenblue-3\",\n    \"greenblue-4\",\n    \"greenblue-5\",\n    \"greenblue-6\",\n    \"greenblue-7\",\n    \"greenblue-8\",\n    \"greenblue-9\",\n    \"orangered\",\n    \"orangered-3\",\n    \"orangered-4\",\n    \"orangered-5\",\n    \"orangered-6\",\n    \"orangered-7\",\n    \"orangered-8\",\n    \"orangered-9\",\n    \"purplebluegreen\",\n    \"purplebluegreen-3\",\n    \"purplebluegreen-4\",\n    \"purplebluegreen-5\",\n    \"purplebluegreen-6\",\n    \"purplebluegreen-7\",\n    \"purplebluegreen-8\",\n    \"purplebluegreen-9\",\n    \"purpleblue\",\n    \"purpleblue-3\",\n    \"purpleblue-4\",\n    \"purpleblue-5\",\n    \"purpleblue-6\",\n    \"purpleblue-7\",\n    \"purpleblue-8\",\n    \"purpleblue-9\",\n    \"purplered\",\n    \"purplered-3\",\n    \"purplered-4\",\n    \"purplered-5\",\n    \"purplered-6\",\n    \"purplered-7\",\n    \"purplered-8\",\n    \"purplered-9\",\n    \"redpurple\",\n    \"redpurple-3\",\n    \"redpurple-4\",\n    \"redpurple-5\",\n    \"redpurple-6\",\n    \"redpurple-7\",\n    \"redpurple-8\",\n    \"redpurple-9\",\n    \"yellowgreenblue\",\n    \"yellowgreenblue-3\",\n    \"yellowgreenblue-4\",\n    \"yellowgreenblue-5\",\n    \"yellowgreenblue-6\",\n    \"yellowgreenblue-7\",\n    \"yellowgreenblue-8\",\n    \"yellowgreenblue-9\",\n    \"yellowgreen\",\n    \"yellowgreen-3\",\n    \"yellowgreen-4\",\n    \"yellowgreen-5\",\n    \"yellowgreen-6\",\n    \"yellowgreen-7\",\n    \"yellowgreen-8\",\n    \"yellowgreen-9\",\n    \"yelloworangebrown\",\n    \"yelloworangebrown-3\",\n    \"yelloworangebrown-4\",\n    \"yelloworangebrown-5\",\n    \"yelloworangebrown-6\",\n    \"yelloworangebrown-7\",\n    \"yelloworangebrown-8\",\n    \"yelloworangebrown-9\",\n    \"yelloworangered\",\n    \"yelloworangered-3\",\n    \"yelloworangered-4\",\n    \"yelloworangered-5\",\n    \"yelloworangered-6\",\n    \"yelloworangered-7\",\n    \"yelloworangered-8\",\n    \"yelloworangered-9\",\n    \"darkblue\",\n    \"darkblue-3\",\n    \"darkblue-4\",\n    \"darkblue-5\",\n    \"darkblue-6\",\n    \"darkblue-7\",\n    \"darkblue-8\",\n    \"darkblue-9\",\n    \"darkgold\",\n    \"darkgold-3\",\n    \"darkgold-4\",\n    \"darkgold-5\",\n    \"darkgold-6\",\n    \"darkgold-7\",\n    \"darkgold-8\",\n    \"darkgold-9\",\n    \"darkgreen\",\n    \"darkgreen-3\",\n    \"darkgreen-4\",\n    \"darkgreen-5\",\n    \"darkgreen-6\",\n    \"darkgreen-7\",\n    \"darkgreen-8\",\n    \"darkgreen-9\",\n    \"darkmulti\",\n    \"darkmulti-3\",\n    \"darkmulti-4\",\n    \"darkmulti-5\",\n    \"darkmulti-6\",\n    \"darkmulti-7\",\n    \"darkmulti-8\",\n    \"darkmulti-9\",\n    \"darkred\",\n    \"darkred-3\",\n    \"darkred-4\",\n    \"darkred-5\",\n    \"darkred-6\",\n    \"darkred-7\",\n    \"darkred-8\",\n    \"darkred-9\",\n    \"lightgreyred\",\n    \"lightgreyred-3\",\n    \"lightgreyred-4\",\n    \"lightgreyred-5\",\n    \"lightgreyred-6\",\n    \"lightgreyred-7\",\n    \"lightgreyred-8\",\n    \"lightgreyred-9\",\n    \"lightgreyteal\",\n    \"lightgreyteal-3\",\n    \"lightgreyteal-4\",\n    \"lightgreyteal-5\",\n    \"lightgreyteal-6\",\n    \"lightgreyteal-7\",\n    \"lightgreyteal-8\",\n    \"lightgreyteal-9\",\n    \"lightmulti\",\n    \"lightmulti-3\",\n    \"lightmulti-4\",\n    \"lightmulti-5\",\n    \"lightmulti-6\",\n    \"lightmulti-7\",\n    \"lightmulti-8\",\n    \"lightmulti-9\",\n    \"lightorange\",\n    \"lightorange-3\",\n    \"lightorange-4\",\n    \"lightorange-5\",\n    \"lightorange-6\",\n    \"lightorange-7\",\n    \"lightorange-8\",\n    \"lightorange-9\",\n    \"lighttealblue\",\n    \"lighttealblue-3\",\n    \"lighttealblue-4\",\n    \"lighttealblue-5\",\n    \"lighttealblue-6\",\n    \"lighttealblue-7\",\n    \"lighttealblue-8\",\n    \"lighttealblue-9\",\n    \"blueorange\",\n    \"blueorange-3\",\n    \"blueorange-4\",\n    \"blueorange-5\",\n    \"blueorange-6\",\n    \"blueorange-7\",\n    \"blueorange-8\",\n    \"blueorange-9\",\n    \"blueorange-10\",\n    \"blueorange-11\",\n    \"brownbluegreen\",\n    \"brownbluegreen-3\",\n    \"brownbluegreen-4\",\n    \"brownbluegreen-5\",\n    \"brownbluegreen-6\",\n    \"brownbluegreen-7\",\n    \"brownbluegreen-8\",\n    \"brownbluegreen-9\",\n    \"brownbluegreen-10\",\n    \"brownbluegreen-11\",\n    \"purplegreen\",\n    \"purplegreen-3\",\n    \"purplegreen-4\",\n    \"purplegreen-5\",\n    \"purplegreen-6\",\n    \"purplegreen-7\",\n    \"purplegreen-8\",\n    \"purplegreen-9\",\n    \"purplegreen-10\",\n    \"purplegreen-11\",\n    \"pinkyellowgreen\",\n    \"pinkyellowgreen-3\",\n    \"pinkyellowgreen-4\",\n    \"pinkyellowgreen-5\",\n    \"pinkyellowgreen-6\",\n    \"pinkyellowgreen-7\",\n    \"pinkyellowgreen-8\",\n    \"pinkyellowgreen-9\",\n    \"pinkyellowgreen-10\",\n    \"pinkyellowgreen-11\",\n    \"purpleorange\",\n    \"purpleorange-3\",\n    \"purpleorange-4\",\n    \"purpleorange-5\",\n    \"purpleorange-6\",\n    \"purpleorange-7\",\n    \"purpleorange-8\",\n    \"purpleorange-9\",\n    \"purpleorange-10\",\n    \"purpleorange-11\",\n    \"redblue\",\n    \"redblue-3\",\n    \"redblue-4\",\n    \"redblue-5\",\n    \"redblue-6\",\n    \"redblue-7\",\n    \"redblue-8\",\n    \"redblue-9\",\n    \"redblue-10\",\n    \"redblue-11\",\n    \"redgrey\",\n    \"redgrey-3\",\n    \"redgrey-4\",\n    \"redgrey-5\",\n    \"redgrey-6\",\n    \"redgrey-7\",\n    \"redgrey-8\",\n    \"redgrey-9\",\n    \"redgrey-10\",\n    \"redgrey-11\",\n    \"redyellowblue\",\n    \"redyellowblue-3\",\n    \"redyellowblue-4\",\n    \"redyellowblue-5\",\n    \"redyellowblue-6\",\n    \"redyellowblue-7\",\n    \"redyellowblue-8\",\n    \"redyellowblue-9\",\n    \"redyellowblue-10\",\n    \"redyellowblue-11\",\n    \"redyellowgreen\",\n    \"redyellowgreen-3\",\n    \"redyellowgreen-4\",\n    \"redyellowgreen-5\",\n    \"redyellowgreen-6\",\n    \"redyellowgreen-7\",\n    \"redyellowgreen-8\",\n    \"redyellowgreen-9\",\n    \"redyellowgreen-10\",\n    \"redyellowgreen-11\",\n    \"spectral\",\n    \"spectral-3\",\n    \"spectral-4\",\n    \"spectral-5\",\n    \"spectral-6\",\n    \"spectral-7\",\n    \"spectral-8\",\n    \"spectral-9\",\n    \"spectral-10\",\n    \"spectral-11\",\n    \"rainbow\",\n    \"sinebow\",\n]\nCompositeMark_T: TypeAlias = Literal[\"boxplot\", \"errorbar\", \"errorband\"]\nCursor_T: TypeAlias = Literal[\n    \"auto\",\n    \"default\",\n    \"none\",\n    \"context-menu\",\n    \"help\",\n    \"pointer\",\n    \"progress\",\n    \"wait\",\n    \"cell\",\n    \"crosshair\",\n    \"text\",\n    \"vertical-text\",\n    \"alias\",\n    \"copy\",\n    \"move\",\n    \"no-drop\",\n    \"not-allowed\",\n    \"e-resize\",\n    \"n-resize\",\n    \"ne-resize\",\n    \"nw-resize\",\n    \"s-resize\",\n    \"se-resize\",\n    \"sw-resize\",\n    \"w-resize\",\n    \"ew-resize\",\n    \"ns-resize\",\n    \"nesw-resize\",\n    \"nwse-resize\",\n    \"col-resize\",\n    \"row-resize\",\n    \"all-scroll\",\n    \"zoom-in\",\n    \"zoom-out\",\n    \"grab\",\n    \"grabbing\",\n]\nErrorBand_T: TypeAlias = Literal[\"errorband\"]\nErrorBarExtent_T: TypeAlias = Literal[\"ci\", \"iqr\", \"stderr\", \"stdev\"]\nErrorBar_T: TypeAlias = Literal[\"errorbar\"]\nFontWeight_T: TypeAlias = Literal[\n    \"normal\", \"bold\", \"lighter\", \"bolder\", 100, 200, 300, 400, 500, 600, 700, 800, 900\n]\nImputeMethod_T: TypeAlias = Literal[\"value\", \"median\", \"max\", \"min\", \"mean\"]\nInterpolate_T: TypeAlias = Literal[\n    \"basis\",\n    \"basis-open\",\n    \"basis-closed\",\n    \"bundle\",\n    \"cardinal\",\n    \"cardinal-open\",\n    \"cardinal-closed\",\n    \"catmull-rom\",\n    \"linear\",\n    \"linear-closed\",\n    \"monotone\",\n    \"natural\",\n    \"step\",\n    \"step-before\",\n    \"step-after\",\n]\nLayoutAlign_T: TypeAlias = Literal[\"all\", \"each\", \"none\"]\nLegendOrient_T: TypeAlias = Literal[\n    \"none\",\n    \"left\",\n    \"right\",\n    \"top\",\n    \"bottom\",\n    \"top-left\",\n    \"top-right\",\n    \"bottom-left\",\n    \"bottom-right\",\n]\nMarkInvalidDataMode_T: TypeAlias = Literal[\n    \"filter\",\n    \"break-paths-filter-domains\",\n    \"break-paths-show-domains\",\n    \"break-paths-show-path-domains\",\n    \"show\",\n]\nMarkType_T: TypeAlias = Literal[\n    \"arc\",\n    \"area\",\n    \"image\",\n    \"group\",\n    \"line\",\n    \"path\",\n    \"rect\",\n    \"rule\",\n    \"shape\",\n    \"symbol\",\n    \"text\",\n    \"trail\",\n]\nMark_T: TypeAlias = Literal[\n    \"arc\",\n    \"area\",\n    \"bar\",\n    \"image\",\n    \"line\",\n    \"point\",\n    \"rect\",\n    \"rule\",\n    \"text\",\n    \"tick\",\n    \"trail\",\n    \"circle\",\n    \"square\",\n    \"geoshape\",\n]\nMultiTimeUnit_T: TypeAlias = Literal[\n    \"yearquarter\",\n    \"yearquartermonth\",\n    \"yearmonth\",\n    \"yearmonthdate\",\n    \"yearmonthdatehours\",\n    \"yearmonthdatehoursminutes\",\n    \"yearmonthdatehoursminutesseconds\",\n    \"yearweek\",\n    \"yearweekday\",\n    \"yearweekdayhours\",\n    \"yearweekdayhoursminutes\",\n    \"yearweekdayhoursminutesseconds\",\n    \"yeardayofyear\",\n    \"quartermonth\",\n    \"monthdate\",\n    \"monthdatehours\",\n    \"monthdatehoursminutes\",\n    \"monthdatehoursminutesseconds\",\n    \"weekday\",\n    \"weekdayhours\",\n    \"weekdayhoursminutes\",\n    \"weekdayhoursminutesseconds\",\n    \"dayhours\",\n    \"dayhoursminutes\",\n    \"dayhoursminutesseconds\",\n    \"hoursminutes\",\n    \"hoursminutesseconds\",\n    \"minutesseconds\",\n    \"secondsmilliseconds\",\n    \"utcyearquarter\",\n    \"utcyearquartermonth\",\n    \"utcyearmonth\",\n    \"utcyearmonthdate\",\n    \"utcyearmonthdatehours\",\n    \"utcyearmonthdatehoursminutes\",\n    \"utcyearmonthdatehoursminutesseconds\",\n    \"utcyearweek\",\n    \"utcyearweekday\",\n    \"utcyearweekdayhours\",\n    \"utcyearweekdayhoursminutes\",\n    \"utcyearweekdayhoursminutesseconds\",\n    \"utcyeardayofyear\",\n    \"utcquartermonth\",\n    \"utcmonthdate\",\n    \"utcmonthdatehours\",\n    \"utcmonthdatehoursminutes\",\n    \"utcmonthdatehoursminutesseconds\",\n    \"utcweekday\",\n    \"utcweekdayhours\",\n    \"utcweekdayhoursminutes\",\n    \"utcweekdayhoursminutesseconds\",\n    \"utcdayhours\",\n    \"utcdayhoursminutes\",\n    \"utcdayhoursminutesseconds\",\n    \"utchoursminutes\",\n    \"utchoursminutesseconds\",\n    \"utcminutesseconds\",\n    \"utcsecondsmilliseconds\",\n]\nNonArgAggregateOp_T: TypeAlias = Literal[\n    \"average\",\n    \"count\",\n    \"distinct\",\n    \"max\",\n    \"mean\",\n    \"median\",\n    \"min\",\n    \"missing\",\n    \"product\",\n    \"q1\",\n    \"q3\",\n    \"ci0\",\n    \"ci1\",\n    \"stderr\",\n    \"stdev\",\n    \"stdevp\",\n    \"sum\",\n    \"valid\",\n    \"values\",\n    \"variance\",\n    \"variancep\",\n    \"exponential\",\n    \"exponentialb\",\n]\nOrient_T: TypeAlias = Literal[\"left\", \"right\", \"top\", \"bottom\"]\nOrientation_T: TypeAlias = Literal[\"horizontal\", \"vertical\"]\nProjectionType_T: TypeAlias = Literal[\n    \"albers\",\n    \"albersUsa\",\n    \"azimuthalEqualArea\",\n    \"azimuthalEquidistant\",\n    \"conicConformal\",\n    \"conicEqualArea\",\n    \"conicEquidistant\",\n    \"equalEarth\",\n    \"equirectangular\",\n    \"gnomonic\",\n    \"identity\",\n    \"mercator\",\n    \"naturalEarth1\",\n    \"orthographic\",\n    \"stereographic\",\n    \"transverseMercator\",\n]\nRangeEnum_T: TypeAlias = Literal[\n    \"width\", \"height\", \"symbol\", \"category\", \"ordinal\", \"ramp\", \"diverging\", \"heatmap\"\n]\nResolveMode_T: TypeAlias = Literal[\"independent\", \"shared\"]\nScaleInterpolateEnum_T: TypeAlias = Literal[\n    \"rgb\", \"lab\", \"hcl\", \"hsl\", \"hsl-long\", \"hcl-long\", \"cubehelix\", \"cubehelix-long\"\n]\nScaleType_T: TypeAlias = Literal[\n    \"linear\",\n    \"log\",\n    \"pow\",\n    \"sqrt\",\n    \"symlog\",\n    \"identity\",\n    \"sequential\",\n    \"time\",\n    \"utc\",\n    \"quantile\",\n    \"quantize\",\n    \"threshold\",\n    \"bin-ordinal\",\n    \"ordinal\",\n    \"point\",\n    \"band\",\n]\nSelectionResolution_T: TypeAlias = Literal[\"global\", \"union\", \"intersect\"]\nSelectionType_T: TypeAlias = Literal[\"point\", \"interval\"]\nSingleDefUnitChannel_T: TypeAlias = Literal[\n    \"text\",\n    \"shape\",\n    \"x\",\n    \"y\",\n    \"xOffset\",\n    \"yOffset\",\n    \"x2\",\n    \"y2\",\n    \"longitude\",\n    \"latitude\",\n    \"longitude2\",\n    \"latitude2\",\n    \"theta\",\n    \"theta2\",\n    \"radius\",\n    \"radius2\",\n    \"time\",\n    \"color\",\n    \"fill\",\n    \"stroke\",\n    \"opacity\",\n    \"fillOpacity\",\n    \"strokeOpacity\",\n    \"strokeWidth\",\n    \"strokeDash\",\n    \"size\",\n    \"angle\",\n    \"key\",\n    \"href\",\n    \"url\",\n    \"description\",\n]\nSingleTimeUnit_T: TypeAlias = Literal[\n    \"year\",\n    \"quarter\",\n    \"month\",\n    \"week\",\n    \"day\",\n    \"dayofyear\",\n    \"date\",\n    \"hours\",\n    \"minutes\",\n    \"seconds\",\n    \"milliseconds\",\n    \"utcyear\",\n    \"utcquarter\",\n    \"utcmonth\",\n    \"utcweek\",\n    \"utcday\",\n    \"utcdayofyear\",\n    \"utcdate\",\n    \"utchours\",\n    \"utcminutes\",\n    \"utcseconds\",\n    \"utcmilliseconds\",\n]\nSortByChannel_T: TypeAlias = Literal[\n    \"x\",\n    \"y\",\n    \"color\",\n    \"fill\",\n    \"stroke\",\n    \"strokeWidth\",\n    \"size\",\n    \"shape\",\n    \"fillOpacity\",\n    \"strokeOpacity\",\n    \"opacity\",\n    \"text\",\n]\nSortOrder_T: TypeAlias = Literal[\"ascending\", \"descending\"]\nStackOffset_T: TypeAlias = Literal[\"zero\", \"center\", \"normalize\"]\nStandardType_T: TypeAlias = Literal[\"quantitative\", \"ordinal\", \"temporal\", \"nominal\"]\nStepFor_T: TypeAlias = Literal[\"position\", \"offset\"]\nStrokeCap_T: TypeAlias = Literal[\"butt\", \"round\", \"square\"]\nStrokeJoin_T: TypeAlias = Literal[\"miter\", \"round\", \"bevel\"]\nTextBaseline_T: TypeAlias = Literal[\n    \"alphabetic\", \"top\", \"middle\", \"bottom\", \"line-top\", \"line-bottom\"\n]\nTextDirection_T: TypeAlias = Literal[\"ltr\", \"rtl\"]\nTimeInterval_T: TypeAlias = Literal[\n    \"millisecond\", \"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"year\"\n]\nTitleAnchor_T: TypeAlias = Literal[None, \"start\", \"middle\", \"end\"]\nTitleFrame_T: TypeAlias = Literal[\"bounds\", \"group\"]\nTitleOrient_T: TypeAlias = Literal[\"none\", \"left\", \"right\", \"top\", \"bottom\"]\nTypeForShape_T: TypeAlias = Literal[\"nominal\", \"ordinal\", \"geojson\"]\nType_T: TypeAlias = Literal[\"quantitative\", \"ordinal\", \"temporal\", \"nominal\", \"geojson\"]\nWindowOnlyOp_T: TypeAlias = Literal[\n    \"row_number\",\n    \"rank\",\n    \"dense_rank\",\n    \"percent_rank\",\n    \"cume_dist\",\n    \"ntile\",\n    \"lag\",\n    \"lead\",\n    \"first_value\",\n    \"last_value\",\n    \"nth_value\",\n]\n"
  },
  {
    "path": "altair/vegalite/v6/schema/channels.py",
    "content": "# The contents of this file are automatically written by\n# tools/generate_schema_wrapper.py. Do not modify directly.\n\nfrom __future__ import annotations\n\n# These errors need to be ignored as they come from the overload methods\n# which trigger two kind of errors in mypy:\n# * all of them do not have an implementation in this file\n# * some of them are the only overload methods -> overloads usually only make\n#   sense if there are multiple ones\n# However, we need these overloads due to how the propertysetter works\n# mypy: disable-error-code=\"no-overload-impl, empty-body, misc\"\nfrom typing import TYPE_CHECKING, Any, Literal, TypedDict, Union, overload\n\nimport narwhals.stable.v1 as nw\n\nfrom altair.utils import infer_encoding_types as _infer_encoding_types\nfrom altair.utils import parse_shorthand\nfrom altair.utils.schemapi import Undefined, with_property_setters\n\nfrom . import core\nfrom ._typing import *  # noqa: F403\n\nif TYPE_CHECKING:\n    # ruff: noqa: F405\n    import sys\n    from collections.abc import Sequence\n    from typing import TypeAlias\n\n    from altair import Parameter, SchemaBase\n    from altair.typing import Optional\n    from altair.vegalite.v6.api import Bin, Impute, IntoCondition\n    from altair.vegalite.v6.schema.core import (\n        Axis,\n        DateTime,\n        EncodingSortField,\n        Header,\n        Legend,\n        RepeatRef,\n        Scale,\n        TimeUnitParams,\n    )\n\n    if sys.version_info >= (3, 11):\n        from typing import Self\n    else:\n        from typing_extensions import Self\n\n\n__all__ = [\n    \"X2\",\n    \"Y2\",\n    \"Angle\",\n    \"AngleDatum\",\n    \"AngleValue\",\n    \"Color\",\n    \"ColorDatum\",\n    \"ColorValue\",\n    \"Column\",\n    \"DatumChannelMixin\",\n    \"Description\",\n    \"DescriptionValue\",\n    \"Detail\",\n    \"Facet\",\n    \"FieldChannelMixin\",\n    \"Fill\",\n    \"FillDatum\",\n    \"FillOpacity\",\n    \"FillOpacityDatum\",\n    \"FillOpacityValue\",\n    \"FillValue\",\n    \"Href\",\n    \"HrefValue\",\n    \"Key\",\n    \"Latitude\",\n    \"Latitude2\",\n    \"Latitude2Datum\",\n    \"Latitude2Value\",\n    \"LatitudeDatum\",\n    \"Longitude\",\n    \"Longitude2\",\n    \"Longitude2Datum\",\n    \"Longitude2Value\",\n    \"LongitudeDatum\",\n    \"Opacity\",\n    \"OpacityDatum\",\n    \"OpacityValue\",\n    \"Order\",\n    \"OrderValue\",\n    \"Radius\",\n    \"Radius2\",\n    \"Radius2Datum\",\n    \"Radius2Value\",\n    \"RadiusDatum\",\n    \"RadiusValue\",\n    \"Row\",\n    \"Shape\",\n    \"ShapeDatum\",\n    \"ShapeValue\",\n    \"Size\",\n    \"SizeDatum\",\n    \"SizeValue\",\n    \"Stroke\",\n    \"StrokeDash\",\n    \"StrokeDashDatum\",\n    \"StrokeDashValue\",\n    \"StrokeDatum\",\n    \"StrokeOpacity\",\n    \"StrokeOpacityDatum\",\n    \"StrokeOpacityValue\",\n    \"StrokeValue\",\n    \"StrokeWidth\",\n    \"StrokeWidthDatum\",\n    \"StrokeWidthValue\",\n    \"Text\",\n    \"TextDatum\",\n    \"TextValue\",\n    \"Theta\",\n    \"Theta2\",\n    \"Theta2Datum\",\n    \"Theta2Value\",\n    \"ThetaDatum\",\n    \"ThetaValue\",\n    \"Time\",\n    \"Tooltip\",\n    \"TooltipValue\",\n    \"Url\",\n    \"UrlValue\",\n    \"ValueChannelMixin\",\n    \"X\",\n    \"X2Datum\",\n    \"X2Value\",\n    \"XDatum\",\n    \"XError\",\n    \"XError2\",\n    \"XError2Value\",\n    \"XErrorValue\",\n    \"XOffset\",\n    \"XOffsetDatum\",\n    \"XOffsetValue\",\n    \"XValue\",\n    \"Y\",\n    \"Y2Datum\",\n    \"Y2Value\",\n    \"YDatum\",\n    \"YError\",\n    \"YError2\",\n    \"YError2Value\",\n    \"YErrorValue\",\n    \"YOffset\",\n    \"YOffsetDatum\",\n    \"YOffsetValue\",\n    \"YValue\",\n    \"with_property_setters\",\n]\n\n\nclass FieldChannelMixin:\n    _encoding_name: str\n\n    def to_dict(\n        self,\n        validate: bool = True,\n        ignore: list[str] | None = None,\n        context: dict[str, Any] | None = None,\n    ) -> dict | list[dict]:\n        context = context or {}\n        ignore = ignore or []\n        shorthand = self._get(\"shorthand\")  # type: ignore[attr-defined]\n        field = self._get(\"field\")  # type: ignore[attr-defined]\n\n        if shorthand is not Undefined and field is not Undefined:\n            msg = f\"{self.__class__.__name__} specifies both shorthand={shorthand} and field={field}. \"\n            raise ValueError(msg)\n\n        if isinstance(shorthand, (tuple, list)):\n            # If given a list of shorthands, then transform it to a list of classes\n            kwds = self._kwds.copy()  # type: ignore[attr-defined]\n            kwds.pop(\"shorthand\")\n            return [\n                self.__class__(sh, **kwds).to_dict(  # type: ignore[call-arg]\n                    validate=validate, ignore=ignore, context=context\n                )\n                for sh in shorthand\n            ]\n\n        if shorthand is Undefined:\n            parsed = {}\n        elif isinstance(shorthand, str):\n            data: nw.DataFrame | Any = context.get(\"data\", None)\n            parsed = parse_shorthand(shorthand, data=data)\n            type_required = \"type\" in self._kwds  # type: ignore[attr-defined]\n            type_in_shorthand = \"type\" in parsed\n            type_defined_explicitly = self._get(\"type\") is not Undefined  # type: ignore[attr-defined]\n            if not type_required:\n                # Secondary field names don't require a type argument in VegaLite 3+.\n                # We still parse it out of the shorthand, but drop it here.\n                parsed.pop(\"type\", None)\n            elif not (type_in_shorthand or type_defined_explicitly):\n                if isinstance(data, nw.DataFrame):\n                    msg = (\n                        f'Unable to determine data type for the field \"{shorthand}\";'\n                        \" verify that the field name is not misspelled.\"\n                        \" If you are referencing a field from a transform,\"\n                        \" also confirm that the data type is specified correctly.\"\n                    )\n                    raise ValueError(msg)\n                else:\n                    msg = (\n                        f\"{shorthand} encoding field is specified without a type; \"\n                        \"the type cannot be automatically inferred because \"\n                        \"the data is not specified as a pandas.DataFrame.\"\n                    )\n                    raise ValueError(msg)\n        else:\n            # Shorthand is not a string; we pass the definition to field,\n            # and do not do any parsing.\n            parsed = {\"field\": shorthand}\n        context[\"parsed_shorthand\"] = parsed\n\n        return super().to_dict(validate=validate, ignore=ignore, context=context)\n\n\nclass ValueChannelMixin:\n    _encoding_name: str\n\n    def to_dict(\n        self,\n        validate: bool = True,\n        ignore: list[str] | None = None,\n        context: dict[str, Any] | None = None,\n    ) -> dict:\n        context = context or {}\n        ignore = ignore or []\n        condition = self._get(\"condition\", Undefined)  # type: ignore[attr-defined]\n        copy = self  # don't copy unless we need to\n        if condition is not Undefined:\n            if isinstance(condition, core.SchemaBase):\n                pass\n            elif \"field\" in condition and \"type\" not in condition:\n                kwds = parse_shorthand(condition[\"field\"], context.get(\"data\", None))\n                copy = self.copy(deep=[\"condition\"])  # type: ignore[attr-defined]\n                copy[\"condition\"].update(kwds)\n        return super(ValueChannelMixin, copy).to_dict(\n            validate=validate, ignore=ignore, context=context\n        )\n\n\nclass DatumChannelMixin:\n    _encoding_name: str\n\n    def to_dict(\n        self,\n        validate: bool = True,\n        ignore: list[str] | None = None,\n        context: dict[str, Any] | None = None,\n    ) -> dict:\n        context = context or {}\n        ignore = ignore or []\n        datum = self._get(\"datum\", Undefined)  # type: ignore[attr-defined] # noqa\n        copy = self  # don't copy unless we need to\n        return super(DatumChannelMixin, copy).to_dict(\n            validate=validate, ignore=ignore, context=context\n        )\n\n\n@with_property_setters\nclass Angle(FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber):\n    r\"\"\"\n    Angle schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    legend : dict, :class:`Legend`, None\n        An object defining properties of the legend. If ``null``, the legend for the\n        encoding channel will be removed.\n\n        **Default value:** If undefined, default `legend properties\n        <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.\n\n        **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"angle\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Angle: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Angle: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Angle: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Angle: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> Angle: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Angle: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Angle: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Angle: ...\n    @overload\n    def condition(self, _: list[core.ConditionalValueDefnumberExprRef], /) -> Angle: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Angle: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Angle: ...\n    @overload\n    def legend(self, _: Legend | None, /) -> Angle: ...\n    @overload\n    def legend(\n        self,\n        *,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columns: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        direction: Optional[SchemaBase | Orientation_T] = Undefined,\n        fillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[SchemaBase | LegendOrient_T] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolFillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        type: Optional[Literal[\"symbol\", \"gradient\"]] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n    ) -> Angle: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> Angle: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Angle: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> Angle: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Angle: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Angle: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Angle: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Angle: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Angle: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Angle: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            legend=legend,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass AngleDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber):\n    \"\"\"\n    AngleDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"angle\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> AngleDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> AngleDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> AngleDatum: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberExprRef], /\n    ) -> AngleDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> AngleDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> AngleDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            bandPosition=bandPosition,\n            condition=condition,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass AngleValue(\n    ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber\n):\n    \"\"\"\n    AngleValue schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : dict, float, :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"angle\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> AngleValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> AngleValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> AngleValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        empty: Optional[bool] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> AngleValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> AngleValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> AngleValue: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberExprRef], /\n    ) -> AngleValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass Color(\n    FieldChannelMixin,\n    core.FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull,\n):\n    r\"\"\"\n    Color schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    legend : dict, :class:`Legend`, None\n        An object defining properties of the legend. If ``null``, the legend for the\n        encoding channel will be removed.\n\n        **Default value:** If undefined, default `legend properties\n        <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.\n\n        **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"color\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Color: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Color: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Color: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Color: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> Color: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Color: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> Color: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> Color: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefGradientstringnullExprRef], /\n    ) -> Color: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Color: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Color: ...\n    @overload\n    def legend(self, _: Legend | None, /) -> Color: ...\n    @overload\n    def legend(\n        self,\n        *,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columns: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        direction: Optional[SchemaBase | Orientation_T] = Undefined,\n        fillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[SchemaBase | LegendOrient_T] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolFillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        type: Optional[Literal[\"symbol\", \"gradient\"]] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n    ) -> Color: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> Color: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Color: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> Color: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Color: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Color: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Color: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Color: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Color: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Color: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            legend=legend,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass ColorDatum(\n    DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefGradientstringnull\n):\n    \"\"\"\n    ColorDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"color\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> ColorDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> ColorDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> ColorDatum: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefGradientstringnullExprRef], /\n    ) -> ColorDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> ColorDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> ColorDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            bandPosition=bandPosition,\n            condition=condition,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass ColorValue(\n    ValueChannelMixin,\n    core.ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull,\n):\n    \"\"\"\n    ColorValue schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : str, dict, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`, None\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"color\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> ColorValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> ColorValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> ColorValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        empty: Optional[bool] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> ColorValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> ColorValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> ColorValue: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefGradientstringnullExprRef], /\n    ) -> ColorValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass Column(FieldChannelMixin, core.RowColumnEncodingFieldDef):\n    r\"\"\"\n    Column schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    align : :class:`LayoutAlign`, Literal['all', 'each', 'none']\n        The alignment to apply to row/column facet's subplot. The supported string values\n        are ``\"all\"``, ``\"each\"``, and ``\"none\"``.\n\n        * For ``\"none\"``, a flow layout will be used, in which adjacent subviews are simply\n          placed one after the other.\n        * For ``\"each\"``, subviews will be aligned into a clean grid structure, but each row\n          or column may be of variable size.\n        * For ``\"all\"``, subviews will be aligned and each row or column will be sized\n          identically based on the maximum observed size. String values for this property\n          will be applied to both grid rows and columns.\n\n        **Default value:** ``\"all\"``.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    center : bool\n        Boolean flag indicating if facet's subviews should be centered relative to their\n        respective rows or columns.\n\n        **Default value:** ``false``\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    header : dict, :class:`Header`, None\n        An object defining properties of a facet's header.\n    sort : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` is not supported for ``row`` and ``column``.\n    spacing : float\n        The spacing in pixels between facet's sub-views.\n\n        **Default value**: Depends on ``\"spacing\"`` property of `the view composition\n        configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__\n        (``20`` by default)\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"column\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Column: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> Column: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> Column: ...\n    @overload\n    def align(self, _: LayoutAlign_T, /) -> Column: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Column: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> Column: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Column: ...\n    @overload\n    def center(self, _: bool, /) -> Column: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Column: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Column: ...\n    @overload\n    def header(self, _: Header | None, /) -> Column: ...\n    @overload\n    def header(\n        self,\n        *,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined,\n        labelAngle: Optional[float] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOrient: Optional[SchemaBase | Orient_T] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labels: Optional[bool] = Undefined,\n        orient: Optional[SchemaBase | Orient_T] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined,\n        titleAngle: Optional[float] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[SchemaBase | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Column: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | EncodingSortField\n        | Sequence[DateTime | Temporal]\n        | SortOrder_T\n        | None,\n        /,\n    ) -> Column: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Column: ...\n    @overload\n    def spacing(self, _: float, /) -> Column: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Column: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Column: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Column: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Column: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        align: Optional[SchemaBase | LayoutAlign_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        center: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        header: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | SortOrder_T\n            | None\n        ] = Undefined,\n        spacing: Optional[float] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            align=align,\n            bandPosition=bandPosition,\n            bin=bin,\n            center=center,\n            field=field,\n            header=header,\n            sort=sort,\n            spacing=spacing,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass Description(FieldChannelMixin, core.StringFieldDefWithCondition):\n    r\"\"\"\n    Description schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"description\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Description: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> Description: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> Description: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Description: ...\n    @overload\n    def bin(self, _: bool | Bin | Literal[\"binned\"] | None, /) -> Description: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Description: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Description: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Description: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefstringExprRef], /\n    ) -> Description: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Description: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Description: ...\n    @overload\n    def format(self, _: str, /) -> Description: ...\n    @overload\n    def format(\n        self,\n        *,\n        date: Optional[str] = Undefined,\n        day: Optional[str] = Undefined,\n        hours: Optional[str] = Undefined,\n        milliseconds: Optional[str] = Undefined,\n        minutes: Optional[str] = Undefined,\n        month: Optional[str] = Undefined,\n        quarter: Optional[str] = Undefined,\n        seconds: Optional[str] = Undefined,\n        week: Optional[str] = Undefined,\n        year: Optional[str] = Undefined,\n    ) -> Description: ...\n    @overload\n    def format(self, _: Map, /) -> Description: ...\n    @overload\n    def formatType(self, _: str, /) -> Description: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Description: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Description: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Description: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Description: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            format=format,\n            formatType=formatType,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass DescriptionValue(ValueChannelMixin, core.StringValueDefWithCondition):\n    \"\"\"\n    DescriptionValue schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : str, dict, :class:`ExprRef`, None\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"description\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> DescriptionValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> DescriptionValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> DescriptionValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        empty: Optional[bool] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> DescriptionValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> DescriptionValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> DescriptionValue: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefstringnullExprRef], /\n    ) -> DescriptionValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass Detail(FieldChannelMixin, core.FieldDefWithoutScale):\n    r\"\"\"\n    Detail schema wrapper.\n\n    Definition object for a data field, its type and transformation of an encoding channel.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"detail\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Detail: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> Detail: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> Detail: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Detail: ...\n    @overload\n    def bin(self, _: bool | Bin | Literal[\"binned\"] | None, /) -> Detail: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Detail: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Detail: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Detail: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Detail: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Detail: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Detail: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Detail: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass Facet(FieldChannelMixin, core.FacetEncodingFieldDef):\n    r\"\"\"\n    Facet schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']\n        The alignment to apply to grid rows and columns. The supported string values are\n        ``\"all\"``, ``\"each\"``, and ``\"none\"``.\n\n        * For ``\"none\"``, a flow layout will be used, in which adjacent subviews are simply\n          placed one after the other.\n        * For ``\"each\"``, subviews will be aligned into a clean grid structure, but each row\n          or column may be of variable size.\n        * For ``\"all\"``, subviews will be aligned and each row or column will be sized\n          identically based on the maximum observed size. String values for this property\n          will be applied to both grid rows and columns.\n\n        Alternatively, an object value of the form ``{\"row\": string, \"column\": string}`` can\n        be used to supply different alignments for rows and columns.\n\n        **Default value:** ``\"all\"``.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    bounds : Literal['full', 'flush']\n        The bounds calculation method to use for determining the extent of a sub-plot. One\n        of ``full`` (the default) or ``flush``.\n\n        * If set to ``full``, the entire calculated bounds (including axes, title, and\n          legend) will be used.\n        * If set to ``flush``, only the specified width and height values for the sub-view\n          will be used. The ``flush`` setting can be useful when attempting to place\n          sub-plots without axes or legends into a uniform grid structure.\n\n        **Default value:** ``\"full\"``\n    center : bool, dict, :class:`RowColboolean`\n        Boolean flag indicating if subviews should be centered relative to their respective\n        rows or columns.\n\n        An object value of the form ``{\"row\": boolean, \"column\": boolean}`` can be used to\n        supply different centering values for rows and columns.\n\n        **Default value:** ``false``\n    columns : float\n        The number of columns to include in the view composition layout.\n\n        **Default value**: ``undefined`` -- An infinite number of columns (a single row)\n        will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the\n        ``column`` channel (for ``facet`` and ``repeat``).\n\n        **Note**:\n\n        1) This property is only for:\n\n        * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)\n        * the ``facet`` and ``repeat`` operator with one field/repetition definition\n          (without row/column nesting)\n\n        2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)\n        and to using the ``row`` channel (for ``facet`` and ``repeat``).\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    header : dict, :class:`Header`, None\n        An object defining properties of a facet's header.\n    sort : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` is not supported for ``row`` and ``column``.\n    spacing : dict, float, :class:`RowColnumber`\n        The spacing in pixels between sub-views of the composition operator. An object of\n        the form ``{\"row\": number, \"column\": number}`` can be used to set different spacing\n        values for rows and columns.\n\n        **Default value**: Depends on ``\"spacing\"`` property of `the view composition\n        configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__\n        (``20`` by default)\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"facet\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Facet: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Facet: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Facet: ...\n    @overload\n    def align(self, _: RowColKwds[LayoutAlign_T] | LayoutAlign_T, /) -> Facet: ...\n    @overload\n    def align(\n        self,\n        *,\n        column: Optional[SchemaBase | LayoutAlign_T] = Undefined,\n        row: Optional[SchemaBase | LayoutAlign_T] = Undefined,\n    ) -> Facet: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Facet: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> Facet: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Facet: ...\n    @overload\n    def bounds(self, _: Literal[\"full\", \"flush\"], /) -> Facet: ...\n    @overload\n    def center(self, _: bool | RowColKwds[bool], /) -> Facet: ...\n    @overload\n    def center(\n        self, *, column: Optional[bool] = Undefined, row: Optional[bool] = Undefined\n    ) -> Facet: ...\n    @overload\n    def columns(self, _: float, /) -> Facet: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Facet: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Facet: ...\n    @overload\n    def header(self, _: Header | None, /) -> Facet: ...\n    @overload\n    def header(\n        self,\n        *,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined,\n        labelAngle: Optional[float] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOrient: Optional[SchemaBase | Orient_T] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labels: Optional[bool] = Undefined,\n        orient: Optional[SchemaBase | Orient_T] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined,\n        titleAngle: Optional[float] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[SchemaBase | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Facet: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | EncodingSortField\n        | Sequence[DateTime | Temporal]\n        | SortOrder_T\n        | None,\n        /,\n    ) -> Facet: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Facet: ...\n    @overload\n    def spacing(self, _: float | RowColKwds[float], /) -> Facet: ...\n    @overload\n    def spacing(\n        self, *, column: Optional[float] = Undefined, row: Optional[float] = Undefined\n    ) -> Facet: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Facet: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Facet: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Facet: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Facet: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        bounds: Optional[Literal[\"full\", \"flush\"]] = Undefined,\n        center: Optional[bool | SchemaBase | Map] = Undefined,\n        columns: Optional[float] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        header: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | SortOrder_T\n            | None\n        ] = Undefined,\n        spacing: Optional[float | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            align=align,\n            bandPosition=bandPosition,\n            bin=bin,\n            bounds=bounds,\n            center=center,\n            columns=columns,\n            field=field,\n            header=header,\n            sort=sort,\n            spacing=spacing,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass Fill(\n    FieldChannelMixin,\n    core.FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull,\n):\n    r\"\"\"\n    Fill schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    legend : dict, :class:`Legend`, None\n        An object defining properties of the legend. If ``null``, the legend for the\n        encoding channel will be removed.\n\n        **Default value:** If undefined, default `legend properties\n        <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.\n\n        **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"fill\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Fill: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Fill: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Fill: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Fill: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> Fill: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Fill: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> Fill: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> Fill: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefGradientstringnullExprRef], /\n    ) -> Fill: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Fill: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Fill: ...\n    @overload\n    def legend(self, _: Legend | None, /) -> Fill: ...\n    @overload\n    def legend(\n        self,\n        *,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columns: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        direction: Optional[SchemaBase | Orientation_T] = Undefined,\n        fillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[SchemaBase | LegendOrient_T] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolFillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        type: Optional[Literal[\"symbol\", \"gradient\"]] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n    ) -> Fill: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> Fill: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Fill: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> Fill: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Fill: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Fill: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Fill: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Fill: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Fill: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Fill: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            legend=legend,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass FillDatum(\n    DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefGradientstringnull\n):\n    \"\"\"\n    FillDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"fill\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> FillDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> FillDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> FillDatum: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefGradientstringnullExprRef], /\n    ) -> FillDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> FillDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> FillDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            bandPosition=bandPosition,\n            condition=condition,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass FillValue(\n    ValueChannelMixin,\n    core.ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull,\n):\n    \"\"\"\n    FillValue schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : str, dict, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`, None\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"fill\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> FillValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> FillValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> FillValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        empty: Optional[bool] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> FillValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> FillValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> FillValue: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefGradientstringnullExprRef], /\n    ) -> FillValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass FillOpacity(\n    FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber\n):\n    r\"\"\"\n    FillOpacity schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    legend : dict, :class:`Legend`, None\n        An object defining properties of the legend. If ``null``, the legend for the\n        encoding channel will be removed.\n\n        **Default value:** If undefined, default `legend properties\n        <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.\n\n        **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"fillOpacity\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> FillOpacity: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> FillOpacity: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> FillOpacity: ...\n    @overload\n    def bandPosition(self, _: float, /) -> FillOpacity: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> FillOpacity: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> FillOpacity: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> FillOpacity: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> FillOpacity: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberExprRef], /\n    ) -> FillOpacity: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> FillOpacity: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> FillOpacity: ...\n    @overload\n    def legend(self, _: Legend | None, /) -> FillOpacity: ...\n    @overload\n    def legend(\n        self,\n        *,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columns: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        direction: Optional[SchemaBase | Orientation_T] = Undefined,\n        fillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[SchemaBase | LegendOrient_T] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolFillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        type: Optional[Literal[\"symbol\", \"gradient\"]] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n    ) -> FillOpacity: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> FillOpacity: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> FillOpacity: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> FillOpacity: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> FillOpacity: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> FillOpacity: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> FillOpacity: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> FillOpacity: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> FillOpacity: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> FillOpacity: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            legend=legend,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass FillOpacityDatum(\n    DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber\n):\n    \"\"\"\n    FillOpacityDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"fillOpacity\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> FillOpacityDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> FillOpacityDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> FillOpacityDatum: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberExprRef], /\n    ) -> FillOpacityDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> FillOpacityDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> FillOpacityDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            bandPosition=bandPosition,\n            condition=condition,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass FillOpacityValue(\n    ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber\n):\n    \"\"\"\n    FillOpacityValue schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : dict, float, :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"fillOpacity\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> FillOpacityValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> FillOpacityValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> FillOpacityValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        empty: Optional[bool] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> FillOpacityValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> FillOpacityValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> FillOpacityValue: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberExprRef], /\n    ) -> FillOpacityValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass Href(FieldChannelMixin, core.StringFieldDefWithCondition):\n    r\"\"\"\n    Href schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"href\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Href: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Href: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Href: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Href: ...\n    @overload\n    def bin(self, _: bool | Bin | Literal[\"binned\"] | None, /) -> Href: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Href: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Href: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Href: ...\n    @overload\n    def condition(self, _: list[core.ConditionalValueDefstringExprRef], /) -> Href: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Href: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Href: ...\n    @overload\n    def format(self, _: str, /) -> Href: ...\n    @overload\n    def format(\n        self,\n        *,\n        date: Optional[str] = Undefined,\n        day: Optional[str] = Undefined,\n        hours: Optional[str] = Undefined,\n        milliseconds: Optional[str] = Undefined,\n        minutes: Optional[str] = Undefined,\n        month: Optional[str] = Undefined,\n        quarter: Optional[str] = Undefined,\n        seconds: Optional[str] = Undefined,\n        week: Optional[str] = Undefined,\n        year: Optional[str] = Undefined,\n    ) -> Href: ...\n    @overload\n    def format(self, _: Map, /) -> Href: ...\n    @overload\n    def formatType(self, _: str, /) -> Href: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Href: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Href: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Href: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Href: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            format=format,\n            formatType=formatType,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass HrefValue(ValueChannelMixin, core.StringValueDefWithCondition):\n    \"\"\"\n    HrefValue schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : str, dict, :class:`ExprRef`, None\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"href\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> HrefValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> HrefValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> HrefValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        empty: Optional[bool] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> HrefValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> HrefValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> HrefValue: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefstringnullExprRef], /\n    ) -> HrefValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass Key(FieldChannelMixin, core.FieldDefWithoutScale):\n    r\"\"\"\n    Key schema wrapper.\n\n    Definition object for a data field, its type and transformation of an encoding channel.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"key\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Key: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Key: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Key: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Key: ...\n    @overload\n    def bin(self, _: bool | Bin | Literal[\"binned\"] | None, /) -> Key: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Key: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Key: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Key: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Key: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Key: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Key: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Key: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass Latitude(FieldChannelMixin, core.LatLongFieldDef):\n    r\"\"\"\n    Latitude schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : Literal['quantitative']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"latitude\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Latitude: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> Latitude: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> Latitude: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Latitude: ...\n    @overload\n    def bin(self, _: None, /) -> Latitude: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Latitude: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Latitude: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Latitude: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Latitude: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Latitude: ...\n    @overload\n    def type(self, _: Literal[\"quantitative\"], /) -> Latitude: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[Literal[\"quantitative\"]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass LatitudeDatum(DatumChannelMixin, core.DatumDef):\n    \"\"\"\n    LatitudeDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"latitude\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> LatitudeDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> LatitudeDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> LatitudeDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum, bandPosition=bandPosition, title=title, type=type, **kwds\n        )\n\n\n@with_property_setters\nclass Latitude2(FieldChannelMixin, core.SecondaryFieldDef):\n    r\"\"\"\n    Latitude2 schema wrapper.\n\n    A field definition of a secondary channel that shares a scale with another primary channel.\n    For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"latitude2\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Latitude2: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> Latitude2: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> Latitude2: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Latitude2: ...\n    @overload\n    def bin(self, _: None, /) -> Latitude2: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Latitude2: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Latitude2: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Latitude2: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Latitude2: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Latitude2: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass Latitude2Datum(DatumChannelMixin, core.DatumDef):\n    \"\"\"\n    Latitude2Datum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"latitude2\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> Latitude2Datum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Latitude2Datum: ...\n    @overload\n    def type(self, _: Type_T, /) -> Latitude2Datum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum, bandPosition=bandPosition, title=title, type=type, **kwds\n        )\n\n\n@with_property_setters\nclass Latitude2Value(ValueChannelMixin, core.PositionValueDef):\n    \"\"\"\n    Latitude2Value schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : dict, float, :class:`ExprRef`, Literal['height', 'width']\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"latitude2\"\n\n    def __init__(self, value, **kwds):\n        super().__init__(value=value, **kwds)\n\n\n@with_property_setters\nclass Longitude(FieldChannelMixin, core.LatLongFieldDef):\n    r\"\"\"\n    Longitude schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : Literal['quantitative']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"longitude\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Longitude: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> Longitude: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> Longitude: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Longitude: ...\n    @overload\n    def bin(self, _: None, /) -> Longitude: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Longitude: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Longitude: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Longitude: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Longitude: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Longitude: ...\n    @overload\n    def type(self, _: Literal[\"quantitative\"], /) -> Longitude: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[Literal[\"quantitative\"]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass LongitudeDatum(DatumChannelMixin, core.DatumDef):\n    \"\"\"\n    LongitudeDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"longitude\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> LongitudeDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> LongitudeDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> LongitudeDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum, bandPosition=bandPosition, title=title, type=type, **kwds\n        )\n\n\n@with_property_setters\nclass Longitude2(FieldChannelMixin, core.SecondaryFieldDef):\n    r\"\"\"\n    Longitude2 schema wrapper.\n\n    A field definition of a secondary channel that shares a scale with another primary channel.\n    For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"longitude2\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Longitude2: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> Longitude2: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> Longitude2: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Longitude2: ...\n    @overload\n    def bin(self, _: None, /) -> Longitude2: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Longitude2: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Longitude2: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Longitude2: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Longitude2: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Longitude2: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass Longitude2Datum(DatumChannelMixin, core.DatumDef):\n    \"\"\"\n    Longitude2Datum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"longitude2\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> Longitude2Datum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Longitude2Datum: ...\n    @overload\n    def type(self, _: Type_T, /) -> Longitude2Datum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum, bandPosition=bandPosition, title=title, type=type, **kwds\n        )\n\n\n@with_property_setters\nclass Longitude2Value(ValueChannelMixin, core.PositionValueDef):\n    \"\"\"\n    Longitude2Value schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : dict, float, :class:`ExprRef`, Literal['height', 'width']\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"longitude2\"\n\n    def __init__(self, value, **kwds):\n        super().__init__(value=value, **kwds)\n\n\n@with_property_setters\nclass Opacity(\n    FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber\n):\n    r\"\"\"\n    Opacity schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    legend : dict, :class:`Legend`, None\n        An object defining properties of the legend. If ``null``, the legend for the\n        encoding channel will be removed.\n\n        **Default value:** If undefined, default `legend properties\n        <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.\n\n        **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"opacity\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Opacity: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> Opacity: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> Opacity: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Opacity: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> Opacity: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Opacity: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Opacity: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Opacity: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberExprRef], /\n    ) -> Opacity: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Opacity: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Opacity: ...\n    @overload\n    def legend(self, _: Legend | None, /) -> Opacity: ...\n    @overload\n    def legend(\n        self,\n        *,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columns: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        direction: Optional[SchemaBase | Orientation_T] = Undefined,\n        fillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[SchemaBase | LegendOrient_T] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolFillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        type: Optional[Literal[\"symbol\", \"gradient\"]] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n    ) -> Opacity: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> Opacity: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Opacity: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> Opacity: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Opacity: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Opacity: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Opacity: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Opacity: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Opacity: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Opacity: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            legend=legend,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass OpacityDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber):\n    \"\"\"\n    OpacityDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"opacity\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> OpacityDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> OpacityDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> OpacityDatum: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberExprRef], /\n    ) -> OpacityDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> OpacityDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> OpacityDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            bandPosition=bandPosition,\n            condition=condition,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass OpacityValue(\n    ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber\n):\n    \"\"\"\n    OpacityValue schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : dict, float, :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"opacity\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> OpacityValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> OpacityValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> OpacityValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        empty: Optional[bool] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> OpacityValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> OpacityValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> OpacityValue: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberExprRef], /\n    ) -> OpacityValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass Order(FieldChannelMixin, core.OrderFieldDef):\n    r\"\"\"\n    Order schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    sort : :class:`SortOrder`, Literal['ascending', 'descending']\n        The sort order. One of ``\"ascending\"`` (default) or ``\"descending\"``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"order\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Order: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Order: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Order: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Order: ...\n    @overload\n    def bin(self, _: bool | Bin | Literal[\"binned\"] | None, /) -> Order: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Order: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Order: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Order: ...\n    @overload\n    def sort(self, _: SortOrder_T, /) -> Order: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Order: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Order: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Order: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Order: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        sort: Optional[SchemaBase | SortOrder_T] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass OrderValue(ValueChannelMixin, core.OrderValueDef):\n    \"\"\"\n    OrderValue schema wrapper.\n\n    Parameters\n    ----------\n    value : dict, float, :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    condition : dict, :class:`ConditionalValueDefnumber`, :class:`ConditionalParameterValueDefnumber`, :class:`ConditionalPredicateValueDefnumber`, Sequence[dict, :class:`ConditionalValueDefnumber`, :class:`ConditionalParameterValueDefnumber`, :class:`ConditionalPredicateValueDefnumber`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"order\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float] = Undefined,\n    ) -> OrderValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float] = Undefined,\n    ) -> OrderValue: ...\n    @overload\n    def condition(self, _: list[core.ConditionalValueDefnumber], /) -> OrderValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass Radius(FieldChannelMixin, core.PositionFieldDefBase):\n    r\"\"\"\n    Radius schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None\n        Type of stacking offset if the field should be stacked. ``stack`` is only applicable\n        for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For\n        example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar\n        chart.\n\n        ``stack`` can be one of the following values:\n\n        * ``\"zero\"`` or ``true``: stacking with baseline offset at zero value of the scale\n          (for creating typical stacked `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area\n          <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).\n        * ``\"normalize\"`` - stacking with normalized domain (for creating `normalized\n          stacked bar and area charts\n          <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts\n          `with percentage tooltip\n          <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).\n        * ``\"center\"`` - stacking with center baseline (for `streamgraph\n          <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).\n        * ``null`` or ``false`` - No-stacking. This will produce layered `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area\n          chart.\n\n        **Default value:** ``zero`` for plots with all of the following conditions are true:\n        (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or\n        y) has a linear scale; (3) At least one of non-position channels mapped to an\n        unaggregated field that is different from x and y. Otherwise, ``null`` by default.\n\n        **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"radius\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Radius: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> Radius: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> Radius: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Radius: ...\n    @overload\n    def bin(self, _: bool | Bin | Literal[\"binned\"] | None, /) -> Radius: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Radius: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Radius: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Radius: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> Radius: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Radius: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> Radius: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Radius: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Radius: ...\n    @overload\n    def stack(self, _: bool | StackOffset_T | None, /) -> Radius: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Radius: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Radius: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Radius: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Radius: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            scale=scale,\n            sort=sort,\n            stack=stack,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass RadiusDatum(DatumChannelMixin, core.PositionDatumDefBase):\n    \"\"\"\n    RadiusDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None\n        Type of stacking offset if the field should be stacked. ``stack`` is only applicable\n        for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For\n        example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar\n        chart.\n\n        ``stack`` can be one of the following values:\n\n        * ``\"zero\"`` or ``true``: stacking with baseline offset at zero value of the scale\n          (for creating typical stacked `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area\n          <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).\n        * ``\"normalize\"`` - stacking with normalized domain (for creating `normalized\n          stacked bar and area charts\n          <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts\n          `with percentage tooltip\n          <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).\n        * ``\"center\"`` - stacking with center baseline (for `streamgraph\n          <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).\n        * ``null`` or ``false`` - No-stacking. This will produce layered `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area\n          chart.\n\n        **Default value:** ``zero`` for plots with all of the following conditions are true:\n        (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or\n        y) has a linear scale; (3) At least one of non-position channels mapped to an\n        unaggregated field that is different from x and y. Otherwise, ``null`` by default.\n\n        **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"radius\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> RadiusDatum: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> RadiusDatum: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> RadiusDatum: ...\n    @overload\n    def stack(self, _: bool | StackOffset_T | None, /) -> RadiusDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> RadiusDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> RadiusDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            bandPosition=bandPosition,\n            scale=scale,\n            stack=stack,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass RadiusValue(ValueChannelMixin, core.PositionValueDef):\n    \"\"\"\n    RadiusValue schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : dict, float, :class:`ExprRef`, Literal['height', 'width']\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"radius\"\n\n    def __init__(self, value, **kwds):\n        super().__init__(value=value, **kwds)\n\n\n@with_property_setters\nclass Radius2(FieldChannelMixin, core.SecondaryFieldDef):\n    r\"\"\"\n    Radius2 schema wrapper.\n\n    A field definition of a secondary channel that shares a scale with another primary channel.\n    For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"radius2\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Radius2: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> Radius2: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> Radius2: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Radius2: ...\n    @overload\n    def bin(self, _: None, /) -> Radius2: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Radius2: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Radius2: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Radius2: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Radius2: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Radius2: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass Radius2Datum(DatumChannelMixin, core.DatumDef):\n    \"\"\"\n    Radius2Datum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"radius2\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> Radius2Datum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Radius2Datum: ...\n    @overload\n    def type(self, _: Type_T, /) -> Radius2Datum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum, bandPosition=bandPosition, title=title, type=type, **kwds\n        )\n\n\n@with_property_setters\nclass Radius2Value(ValueChannelMixin, core.PositionValueDef):\n    \"\"\"\n    Radius2Value schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : dict, float, :class:`ExprRef`, Literal['height', 'width']\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"radius2\"\n\n    def __init__(self, value, **kwds):\n        super().__init__(value=value, **kwds)\n\n\n@with_property_setters\nclass Row(FieldChannelMixin, core.RowColumnEncodingFieldDef):\n    r\"\"\"\n    Row schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    align : :class:`LayoutAlign`, Literal['all', 'each', 'none']\n        The alignment to apply to row/column facet's subplot. The supported string values\n        are ``\"all\"``, ``\"each\"``, and ``\"none\"``.\n\n        * For ``\"none\"``, a flow layout will be used, in which adjacent subviews are simply\n          placed one after the other.\n        * For ``\"each\"``, subviews will be aligned into a clean grid structure, but each row\n          or column may be of variable size.\n        * For ``\"all\"``, subviews will be aligned and each row or column will be sized\n          identically based on the maximum observed size. String values for this property\n          will be applied to both grid rows and columns.\n\n        **Default value:** ``\"all\"``.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    center : bool\n        Boolean flag indicating if facet's subviews should be centered relative to their\n        respective rows or columns.\n\n        **Default value:** ``false``\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    header : dict, :class:`Header`, None\n        An object defining properties of a facet's header.\n    sort : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` is not supported for ``row`` and ``column``.\n    spacing : float\n        The spacing in pixels between facet's sub-views.\n\n        **Default value**: Depends on ``\"spacing\"`` property of `the view composition\n        configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__\n        (``20`` by default)\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"row\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Row: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Row: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Row: ...\n    @overload\n    def align(self, _: LayoutAlign_T, /) -> Row: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Row: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> Row: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Row: ...\n    @overload\n    def center(self, _: bool, /) -> Row: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Row: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Row: ...\n    @overload\n    def header(self, _: Header | None, /) -> Row: ...\n    @overload\n    def header(\n        self,\n        *,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined,\n        labelAngle: Optional[float] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOrient: Optional[SchemaBase | Orient_T] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labels: Optional[bool] = Undefined,\n        orient: Optional[SchemaBase | Orient_T] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined,\n        titleAngle: Optional[float] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[SchemaBase | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Row: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | EncodingSortField\n        | Sequence[DateTime | Temporal]\n        | SortOrder_T\n        | None,\n        /,\n    ) -> Row: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Row: ...\n    @overload\n    def spacing(self, _: float, /) -> Row: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Row: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Row: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Row: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Row: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        align: Optional[SchemaBase | LayoutAlign_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        center: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        header: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | SortOrder_T\n            | None\n        ] = Undefined,\n        spacing: Optional[float] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            align=align,\n            bandPosition=bandPosition,\n            bin=bin,\n            center=center,\n            field=field,\n            header=header,\n            sort=sort,\n            spacing=spacing,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass Shape(\n    FieldChannelMixin,\n    core.FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull,\n):\n    r\"\"\"\n    Shape schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    legend : dict, :class:`Legend`, None\n        An object defining properties of the legend. If ``null``, the legend for the\n        encoding channel will be removed.\n\n        **Default value:** If undefined, default `legend properties\n        <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.\n\n        **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`TypeForShape`, Literal['nominal', 'ordinal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"shape\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Shape: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Shape: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Shape: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Shape: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> Shape: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Shape: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> Shape: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> Shape: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefstringnullExprRef], /\n    ) -> Shape: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Shape: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Shape: ...\n    @overload\n    def legend(self, _: Legend | None, /) -> Shape: ...\n    @overload\n    def legend(\n        self,\n        *,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columns: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        direction: Optional[SchemaBase | Orientation_T] = Undefined,\n        fillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[SchemaBase | LegendOrient_T] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolFillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        type: Optional[Literal[\"symbol\", \"gradient\"]] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n    ) -> Shape: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> Shape: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Shape: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> Shape: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Shape: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Shape: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Shape: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Shape: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Shape: ...\n    @overload\n    def type(self, _: TypeForShape_T, /) -> Shape: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | TypeForShape_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            legend=legend,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass ShapeDatum(\n    DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefstringnull\n):\n    \"\"\"\n    ShapeDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"shape\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> ShapeDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> ShapeDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> ShapeDatum: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefstringnullExprRef], /\n    ) -> ShapeDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> ShapeDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> ShapeDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            bandPosition=bandPosition,\n            condition=condition,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass ShapeValue(\n    ValueChannelMixin,\n    core.ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull,\n):\n    \"\"\"\n    ShapeValue schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, :class:`ConditionalMarkPropFieldOrDatumDefTypeForShape`, :class:`ConditionalParameterMarkPropFieldOrDatumDefTypeForShape`, :class:`ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : str, dict, :class:`ExprRef`, None\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"shape\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | TypeForShape_T] = Undefined,\n    ) -> ShapeValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> ShapeValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | TypeForShape_T] = Undefined,\n    ) -> ShapeValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        empty: Optional[bool] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> ShapeValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> ShapeValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> ShapeValue: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefstringnullExprRef], /\n    ) -> ShapeValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass Size(FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber):\n    r\"\"\"\n    Size schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    legend : dict, :class:`Legend`, None\n        An object defining properties of the legend. If ``null``, the legend for the\n        encoding channel will be removed.\n\n        **Default value:** If undefined, default `legend properties\n        <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.\n\n        **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"size\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Size: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Size: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Size: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Size: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> Size: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Size: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Size: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Size: ...\n    @overload\n    def condition(self, _: list[core.ConditionalValueDefnumberExprRef], /) -> Size: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Size: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Size: ...\n    @overload\n    def legend(self, _: Legend | None, /) -> Size: ...\n    @overload\n    def legend(\n        self,\n        *,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columns: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        direction: Optional[SchemaBase | Orientation_T] = Undefined,\n        fillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[SchemaBase | LegendOrient_T] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolFillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        type: Optional[Literal[\"symbol\", \"gradient\"]] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n    ) -> Size: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> Size: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Size: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> Size: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Size: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Size: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Size: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Size: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Size: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Size: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            legend=legend,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass SizeDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber):\n    \"\"\"\n    SizeDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"size\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> SizeDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> SizeDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> SizeDatum: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberExprRef], /\n    ) -> SizeDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> SizeDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> SizeDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            bandPosition=bandPosition,\n            condition=condition,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass SizeValue(\n    ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber\n):\n    \"\"\"\n    SizeValue schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : dict, float, :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"size\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> SizeValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> SizeValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> SizeValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        empty: Optional[bool] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> SizeValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> SizeValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> SizeValue: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberExprRef], /\n    ) -> SizeValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass Stroke(\n    FieldChannelMixin,\n    core.FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull,\n):\n    r\"\"\"\n    Stroke schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    legend : dict, :class:`Legend`, None\n        An object defining properties of the legend. If ``null``, the legend for the\n        encoding channel will be removed.\n\n        **Default value:** If undefined, default `legend properties\n        <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.\n\n        **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"stroke\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Stroke: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> Stroke: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> Stroke: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Stroke: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> Stroke: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Stroke: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> Stroke: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> Stroke: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefGradientstringnullExprRef], /\n    ) -> Stroke: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Stroke: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Stroke: ...\n    @overload\n    def legend(self, _: Legend | None, /) -> Stroke: ...\n    @overload\n    def legend(\n        self,\n        *,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columns: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        direction: Optional[SchemaBase | Orientation_T] = Undefined,\n        fillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[SchemaBase | LegendOrient_T] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolFillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        type: Optional[Literal[\"symbol\", \"gradient\"]] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n    ) -> Stroke: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> Stroke: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Stroke: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> Stroke: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Stroke: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Stroke: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Stroke: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Stroke: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Stroke: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Stroke: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            legend=legend,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass StrokeDatum(\n    DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefGradientstringnull\n):\n    \"\"\"\n    StrokeDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"stroke\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> StrokeDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> StrokeDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> StrokeDatum: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefGradientstringnullExprRef], /\n    ) -> StrokeDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> StrokeDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> StrokeDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            bandPosition=bandPosition,\n            condition=condition,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass StrokeValue(\n    ValueChannelMixin,\n    core.ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull,\n):\n    \"\"\"\n    StrokeValue schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : str, dict, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`, None\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"stroke\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> StrokeValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> StrokeValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> StrokeValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        empty: Optional[bool] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> StrokeValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> StrokeValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> StrokeValue: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefGradientstringnullExprRef], /\n    ) -> StrokeValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass StrokeDash(\n    FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray\n):\n    r\"\"\"\n    StrokeDash schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    legend : dict, :class:`Legend`, None\n        An object defining properties of the legend. If ``null``, the legend for the\n        encoding channel will be removed.\n\n        **Default value:** If undefined, default `legend properties\n        <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.\n\n        **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"strokeDash\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> StrokeDash: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> StrokeDash: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> StrokeDash: ...\n    @overload\n    def bandPosition(self, _: float, /) -> StrokeDash: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> StrokeDash: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> StrokeDash: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n    ) -> StrokeDash: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n    ) -> StrokeDash: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberArrayExprRef], /\n    ) -> StrokeDash: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> StrokeDash: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> StrokeDash: ...\n    @overload\n    def legend(self, _: Legend | None, /) -> StrokeDash: ...\n    @overload\n    def legend(\n        self,\n        *,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columns: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        direction: Optional[SchemaBase | Orientation_T] = Undefined,\n        fillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[SchemaBase | LegendOrient_T] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolFillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        type: Optional[Literal[\"symbol\", \"gradient\"]] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n    ) -> StrokeDash: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> StrokeDash: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> StrokeDash: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> StrokeDash: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> StrokeDash: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> StrokeDash: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> StrokeDash: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> StrokeDash: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> StrokeDash: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> StrokeDash: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            legend=legend,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass StrokeDashDatum(\n    DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumberArray\n):\n    \"\"\"\n    StrokeDashDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"strokeDash\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> StrokeDashDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n    ) -> StrokeDashDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n    ) -> StrokeDashDatum: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberArrayExprRef], /\n    ) -> StrokeDashDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> StrokeDashDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> StrokeDashDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            bandPosition=bandPosition,\n            condition=condition,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass StrokeDashValue(\n    ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray\n):\n    \"\"\"\n    StrokeDashValue schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : dict, Sequence[float], :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"strokeDash\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> StrokeDashValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> StrokeDashValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> StrokeDashValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        empty: Optional[bool] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> StrokeDashValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n    ) -> StrokeDashValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n    ) -> StrokeDashValue: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberArrayExprRef], /\n    ) -> StrokeDashValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass StrokeOpacity(\n    FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber\n):\n    r\"\"\"\n    StrokeOpacity schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    legend : dict, :class:`Legend`, None\n        An object defining properties of the legend. If ``null``, the legend for the\n        encoding channel will be removed.\n\n        **Default value:** If undefined, default `legend properties\n        <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.\n\n        **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"strokeOpacity\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> StrokeOpacity: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> StrokeOpacity: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> StrokeOpacity: ...\n    @overload\n    def bandPosition(self, _: float, /) -> StrokeOpacity: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> StrokeOpacity: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> StrokeOpacity: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> StrokeOpacity: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> StrokeOpacity: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberExprRef], /\n    ) -> StrokeOpacity: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> StrokeOpacity: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> StrokeOpacity: ...\n    @overload\n    def legend(self, _: Legend | None, /) -> StrokeOpacity: ...\n    @overload\n    def legend(\n        self,\n        *,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columns: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        direction: Optional[SchemaBase | Orientation_T] = Undefined,\n        fillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[SchemaBase | LegendOrient_T] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolFillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        type: Optional[Literal[\"symbol\", \"gradient\"]] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n    ) -> StrokeOpacity: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> StrokeOpacity: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> StrokeOpacity: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> StrokeOpacity: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> StrokeOpacity: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> StrokeOpacity: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> StrokeOpacity: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> StrokeOpacity: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> StrokeOpacity: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> StrokeOpacity: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            legend=legend,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass StrokeOpacityDatum(\n    DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber\n):\n    \"\"\"\n    StrokeOpacityDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"strokeOpacity\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> StrokeOpacityDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> StrokeOpacityDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> StrokeOpacityDatum: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberExprRef], /\n    ) -> StrokeOpacityDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> StrokeOpacityDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> StrokeOpacityDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            bandPosition=bandPosition,\n            condition=condition,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass StrokeOpacityValue(\n    ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber\n):\n    \"\"\"\n    StrokeOpacityValue schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : dict, float, :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"strokeOpacity\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> StrokeOpacityValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> StrokeOpacityValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> StrokeOpacityValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        empty: Optional[bool] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> StrokeOpacityValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> StrokeOpacityValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> StrokeOpacityValue: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberExprRef], /\n    ) -> StrokeOpacityValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass StrokeWidth(\n    FieldChannelMixin, core.FieldOrDatumDefWithConditionMarkPropFieldDefnumber\n):\n    r\"\"\"\n    StrokeWidth schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    legend : dict, :class:`Legend`, None\n        An object defining properties of the legend. If ``null``, the legend for the\n        encoding channel will be removed.\n\n        **Default value:** If undefined, default `legend properties\n        <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.\n\n        **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"strokeWidth\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> StrokeWidth: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> StrokeWidth: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> StrokeWidth: ...\n    @overload\n    def bandPosition(self, _: float, /) -> StrokeWidth: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> StrokeWidth: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> StrokeWidth: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> StrokeWidth: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> StrokeWidth: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberExprRef], /\n    ) -> StrokeWidth: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> StrokeWidth: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> StrokeWidth: ...\n    @overload\n    def legend(self, _: Legend | None, /) -> StrokeWidth: ...\n    @overload\n    def legend(\n        self,\n        *,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columns: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        direction: Optional[SchemaBase | Orientation_T] = Undefined,\n        fillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[SchemaBase | LegendOrient_T] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolFillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        type: Optional[Literal[\"symbol\", \"gradient\"]] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n    ) -> StrokeWidth: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> StrokeWidth: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> StrokeWidth: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> StrokeWidth: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> StrokeWidth: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> StrokeWidth: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> StrokeWidth: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> StrokeWidth: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> StrokeWidth: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> StrokeWidth: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            legend=legend,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass StrokeWidthDatum(\n    DatumChannelMixin, core.FieldOrDatumDefWithConditionDatumDefnumber\n):\n    \"\"\"\n    StrokeWidthDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"strokeWidth\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> StrokeWidthDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> StrokeWidthDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> StrokeWidthDatum: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberExprRef], /\n    ) -> StrokeWidthDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> StrokeWidthDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> StrokeWidthDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            bandPosition=bandPosition,\n            condition=condition,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass StrokeWidthValue(\n    ValueChannelMixin, core.ValueDefWithConditionMarkPropFieldOrDatumDefnumber\n):\n    \"\"\"\n    StrokeWidthValue schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : dict, float, :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"strokeWidth\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> StrokeWidthValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> StrokeWidthValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> StrokeWidthValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        empty: Optional[bool] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> StrokeWidthValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> StrokeWidthValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n    ) -> StrokeWidthValue: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefnumberExprRef], /\n    ) -> StrokeWidthValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass Text(FieldChannelMixin, core.FieldOrDatumDefWithConditionStringFieldDefText):\n    r\"\"\"\n    Text schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"text\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Text: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Text: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Text: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Text: ...\n    @overload\n    def bin(self, _: bool | Bin | Literal[\"binned\"] | None, /) -> Text: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Text: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n    ) -> Text: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n    ) -> Text: ...\n    @overload\n    def condition(self, _: list[core.ConditionalValueDefTextExprRef], /) -> Text: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Text: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Text: ...\n    @overload\n    def format(self, _: str, /) -> Text: ...\n    @overload\n    def format(\n        self,\n        *,\n        date: Optional[str] = Undefined,\n        day: Optional[str] = Undefined,\n        hours: Optional[str] = Undefined,\n        milliseconds: Optional[str] = Undefined,\n        minutes: Optional[str] = Undefined,\n        month: Optional[str] = Undefined,\n        quarter: Optional[str] = Undefined,\n        seconds: Optional[str] = Undefined,\n        week: Optional[str] = Undefined,\n        year: Optional[str] = Undefined,\n    ) -> Text: ...\n    @overload\n    def format(self, _: Map, /) -> Text: ...\n    @overload\n    def formatType(self, _: str, /) -> Text: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Text: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Text: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Text: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Text: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            format=format,\n            formatType=formatType,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass TextDatum(DatumChannelMixin, core.FieldOrDatumDefWithConditionStringDatumDefText):\n    \"\"\"\n    TextDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"text\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> TextDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n    ) -> TextDatum: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n    ) -> TextDatum: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefTextExprRef], /\n    ) -> TextDatum: ...\n    @overload\n    def format(self, _: str, /) -> TextDatum: ...\n    @overload\n    def format(\n        self,\n        *,\n        date: Optional[str] = Undefined,\n        day: Optional[str] = Undefined,\n        hours: Optional[str] = Undefined,\n        milliseconds: Optional[str] = Undefined,\n        minutes: Optional[str] = Undefined,\n        month: Optional[str] = Undefined,\n        quarter: Optional[str] = Undefined,\n        seconds: Optional[str] = Undefined,\n        week: Optional[str] = Undefined,\n        year: Optional[str] = Undefined,\n    ) -> TextDatum: ...\n    @overload\n    def format(self, _: Map, /) -> TextDatum: ...\n    @overload\n    def formatType(self, _: str, /) -> TextDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> TextDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> TextDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            bandPosition=bandPosition,\n            condition=condition,\n            format=format,\n            formatType=formatType,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass TextValue(ValueChannelMixin, core.ValueDefWithConditionStringFieldDefText):\n    \"\"\"\n    TextValue schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalStringFieldDef`, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterStringFieldDef`, :class:`ConditionalPredicateStringFieldDef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"text\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> TextValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> TextValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n    ) -> TextValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n    ) -> TextValue: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefTextExprRef], /\n    ) -> TextValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass Theta(FieldChannelMixin, core.PositionFieldDefBase):\n    r\"\"\"\n    Theta schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None\n        Type of stacking offset if the field should be stacked. ``stack`` is only applicable\n        for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For\n        example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar\n        chart.\n\n        ``stack`` can be one of the following values:\n\n        * ``\"zero\"`` or ``true``: stacking with baseline offset at zero value of the scale\n          (for creating typical stacked `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area\n          <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).\n        * ``\"normalize\"`` - stacking with normalized domain (for creating `normalized\n          stacked bar and area charts\n          <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts\n          `with percentage tooltip\n          <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).\n        * ``\"center\"`` - stacking with center baseline (for `streamgraph\n          <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).\n        * ``null`` or ``false`` - No-stacking. This will produce layered `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area\n          chart.\n\n        **Default value:** ``zero`` for plots with all of the following conditions are true:\n        (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or\n        y) has a linear scale; (3) At least one of non-position channels mapped to an\n        unaggregated field that is different from x and y. Otherwise, ``null`` by default.\n\n        **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"theta\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Theta: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Theta: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Theta: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Theta: ...\n    @overload\n    def bin(self, _: bool | Bin | Literal[\"binned\"] | None, /) -> Theta: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Theta: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Theta: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Theta: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> Theta: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Theta: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> Theta: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Theta: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Theta: ...\n    @overload\n    def stack(self, _: bool | StackOffset_T | None, /) -> Theta: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Theta: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Theta: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Theta: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Theta: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            scale=scale,\n            sort=sort,\n            stack=stack,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass ThetaDatum(DatumChannelMixin, core.PositionDatumDefBase):\n    \"\"\"\n    ThetaDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None\n        Type of stacking offset if the field should be stacked. ``stack`` is only applicable\n        for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For\n        example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar\n        chart.\n\n        ``stack`` can be one of the following values:\n\n        * ``\"zero\"`` or ``true``: stacking with baseline offset at zero value of the scale\n          (for creating typical stacked `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area\n          <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).\n        * ``\"normalize\"`` - stacking with normalized domain (for creating `normalized\n          stacked bar and area charts\n          <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts\n          `with percentage tooltip\n          <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).\n        * ``\"center\"`` - stacking with center baseline (for `streamgraph\n          <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).\n        * ``null`` or ``false`` - No-stacking. This will produce layered `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area\n          chart.\n\n        **Default value:** ``zero`` for plots with all of the following conditions are true:\n        (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or\n        y) has a linear scale; (3) At least one of non-position channels mapped to an\n        unaggregated field that is different from x and y. Otherwise, ``null`` by default.\n\n        **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"theta\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> ThetaDatum: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> ThetaDatum: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> ThetaDatum: ...\n    @overload\n    def stack(self, _: bool | StackOffset_T | None, /) -> ThetaDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> ThetaDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> ThetaDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            bandPosition=bandPosition,\n            scale=scale,\n            stack=stack,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass ThetaValue(ValueChannelMixin, core.PositionValueDef):\n    \"\"\"\n    ThetaValue schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : dict, float, :class:`ExprRef`, Literal['height', 'width']\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"theta\"\n\n    def __init__(self, value, **kwds):\n        super().__init__(value=value, **kwds)\n\n\n@with_property_setters\nclass Theta2(FieldChannelMixin, core.SecondaryFieldDef):\n    r\"\"\"\n    Theta2 schema wrapper.\n\n    A field definition of a secondary channel that shares a scale with another primary channel.\n    For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"theta2\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Theta2: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> Theta2: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> Theta2: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Theta2: ...\n    @overload\n    def bin(self, _: None, /) -> Theta2: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Theta2: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Theta2: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Theta2: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Theta2: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Theta2: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass Theta2Datum(DatumChannelMixin, core.DatumDef):\n    \"\"\"\n    Theta2Datum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"theta2\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> Theta2Datum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Theta2Datum: ...\n    @overload\n    def type(self, _: Type_T, /) -> Theta2Datum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum, bandPosition=bandPosition, title=title, type=type, **kwds\n        )\n\n\n@with_property_setters\nclass Theta2Value(ValueChannelMixin, core.PositionValueDef):\n    \"\"\"\n    Theta2Value schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : dict, float, :class:`ExprRef`, Literal['height', 'width']\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"theta2\"\n\n    def __init__(self, value, **kwds):\n        super().__init__(value=value, **kwds)\n\n\n@with_property_setters\nclass Time(FieldChannelMixin, core.TimeDef):\n    r\"\"\"\n    Time schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    rescale : bool\n\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"time\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Time: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Time: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Time: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Time: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> Time: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Time: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Time: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Time: ...\n    @overload\n    def rescale(self, _: bool, /) -> Time: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> Time: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Time: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> Time: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Time: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Time: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Time: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Time: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Time: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Time: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        rescale: Optional[bool] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            rescale=rescale,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass Tooltip(FieldChannelMixin, core.StringFieldDefWithCondition):\n    r\"\"\"\n    Tooltip schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"tooltip\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Tooltip: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> Tooltip: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> Tooltip: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Tooltip: ...\n    @overload\n    def bin(self, _: bool | Bin | Literal[\"binned\"] | None, /) -> Tooltip: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Tooltip: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Tooltip: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Tooltip: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefstringExprRef], /\n    ) -> Tooltip: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Tooltip: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Tooltip: ...\n    @overload\n    def format(self, _: str, /) -> Tooltip: ...\n    @overload\n    def format(\n        self,\n        *,\n        date: Optional[str] = Undefined,\n        day: Optional[str] = Undefined,\n        hours: Optional[str] = Undefined,\n        milliseconds: Optional[str] = Undefined,\n        minutes: Optional[str] = Undefined,\n        month: Optional[str] = Undefined,\n        quarter: Optional[str] = Undefined,\n        seconds: Optional[str] = Undefined,\n        week: Optional[str] = Undefined,\n        year: Optional[str] = Undefined,\n    ) -> Tooltip: ...\n    @overload\n    def format(self, _: Map, /) -> Tooltip: ...\n    @overload\n    def formatType(self, _: str, /) -> Tooltip: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Tooltip: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Tooltip: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Tooltip: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Tooltip: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            format=format,\n            formatType=formatType,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass TooltipValue(ValueChannelMixin, core.StringValueDefWithCondition):\n    \"\"\"\n    TooltipValue schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : str, dict, :class:`ExprRef`, None\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"tooltip\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> TooltipValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> TooltipValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> TooltipValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        empty: Optional[bool] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> TooltipValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> TooltipValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> TooltipValue: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefstringnullExprRef], /\n    ) -> TooltipValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass Url(FieldChannelMixin, core.StringFieldDefWithCondition):\n    r\"\"\"\n    Url schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"url\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Url: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Url: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Url: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Url: ...\n    @overload\n    def bin(self, _: bool | Bin | Literal[\"binned\"] | None, /) -> Url: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Url: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Url: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Url: ...\n    @overload\n    def condition(self, _: list[core.ConditionalValueDefstringExprRef], /) -> Url: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Url: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Url: ...\n    @overload\n    def format(self, _: str, /) -> Url: ...\n    @overload\n    def format(\n        self,\n        *,\n        date: Optional[str] = Undefined,\n        day: Optional[str] = Undefined,\n        hours: Optional[str] = Undefined,\n        milliseconds: Optional[str] = Undefined,\n        minutes: Optional[str] = Undefined,\n        month: Optional[str] = Undefined,\n        quarter: Optional[str] = Undefined,\n        seconds: Optional[str] = Undefined,\n        week: Optional[str] = Undefined,\n        year: Optional[str] = Undefined,\n    ) -> Url: ...\n    @overload\n    def format(self, _: Map, /) -> Url: ...\n    @overload\n    def formatType(self, _: str, /) -> Url: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Url: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Url: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Url: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Url: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            format=format,\n            formatType=formatType,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass UrlValue(ValueChannelMixin, core.StringValueDefWithCondition):\n    \"\"\"\n    UrlValue schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : str, dict, :class:`ExprRef`, None\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"url\"\n\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> UrlValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> UrlValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n    ) -> UrlValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        empty: Optional[bool] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n    ) -> UrlValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> UrlValue: ...\n    @overload\n    def condition(\n        self,\n        *,\n        empty: Optional[bool] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n    ) -> UrlValue: ...\n    @overload\n    def condition(\n        self, _: list[core.ConditionalValueDefstringnullExprRef], /\n    ) -> UrlValue: ...\n\n    def __init__(\n        self,\n        value,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\n@with_property_setters\nclass X(FieldChannelMixin, core.PositionFieldDef):\n    r\"\"\"\n    X schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    axis : dict, :class:`Axis`, None\n        An object defining properties of axis's gridlines, ticks and labels. If ``null``,\n        the axis for the encoding channel will be removed.\n\n        **Default value:** If undefined, default `axis properties\n        <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.\n\n        **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    impute : dict, :class:`ImputeParams`, None\n        An object defining the properties of the Impute Operation to be applied. The field\n        value of the other positional channel is taken as ``key`` of the ``Impute``\n        Operation. The field of the ``color`` channel if specified is used as ``groupby`` of\n        the ``Impute`` Operation.\n\n        **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None\n        Type of stacking offset if the field should be stacked. ``stack`` is only applicable\n        for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For\n        example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar\n        chart.\n\n        ``stack`` can be one of the following values:\n\n        * ``\"zero\"`` or ``true``: stacking with baseline offset at zero value of the scale\n          (for creating typical stacked `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area\n          <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).\n        * ``\"normalize\"`` - stacking with normalized domain (for creating `normalized\n          stacked bar and area charts\n          <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts\n          `with percentage tooltip\n          <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).\n        * ``\"center\"`` - stacking with center baseline (for `streamgraph\n          <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).\n        * ``null`` or ``false`` - No-stacking. This will produce layered `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area\n          chart.\n\n        **Default value:** ``zero`` for plots with all of the following conditions are true:\n        (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or\n        y) has a linear scale; (3) At least one of non-position channels mapped to an\n        unaggregated field that is different from x and y. Otherwise, ``null`` by default.\n\n        **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"x\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> X: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> X: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> X: ...\n    @overload\n    def axis(self, _: Axis | None, /) -> X: ...\n    @overload\n    def axis(\n        self,\n        *,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        bandPosition: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[bool] = Undefined,\n        domainCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        domainColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        domainDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        domainDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        grid: Optional[bool] = Undefined,\n        gridCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        gridColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gridDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        gridDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelBound: Optional[bool | float | Parameter | SchemaBase | Map] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFlush: Optional[bool | float] = Undefined,\n        labelFlushOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labels: Optional[bool] = Undefined,\n        maxExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        minExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[Parameter | SchemaBase | Map | AxisOrient_T] = Undefined,\n        position: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        style: Optional[str | Sequence[str]] = Undefined,\n        tickBand: Optional[\n            Parameter | SchemaBase | Literal[\"center\", \"extent\"] | Map\n        ] = Undefined,\n        tickCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        tickColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        tickDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickExtra: Optional[bool] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickRound: Optional[bool] = Undefined,\n        tickSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ticks: Optional[bool] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        translate: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n    ) -> X: ...\n    @overload\n    def bandPosition(self, _: float, /) -> X: ...\n    @overload\n    def bin(self, _: bool | Bin | Literal[\"binned\"] | None, /) -> X: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> X: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> X: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> X: ...\n    @overload\n    def impute(self, _: Impute | None, /) -> X: ...\n    @overload\n    def impute(\n        self,\n        *,\n        frame: Optional[Sequence[float | None]] = Undefined,\n        keyvals: Optional[SchemaBase | Sequence[Any] | Map] = Undefined,\n        method: Optional[SchemaBase | ImputeMethod_T] = Undefined,\n        value: Optional[Any] = Undefined,\n    ) -> X: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> X: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> X: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> X: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> X: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> X: ...\n    @overload\n    def stack(self, _: bool | StackOffset_T | None, /) -> X: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> X: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> X: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> X: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> X: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        axis: Optional[SchemaBase | Map | None] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        impute: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            axis=axis,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            impute=impute,\n            scale=scale,\n            sort=sort,\n            stack=stack,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass XDatum(DatumChannelMixin, core.PositionDatumDef):\n    \"\"\"\n    XDatum schema wrapper.\n\n    Parameters\n    ----------\n    axis : dict, :class:`Axis`, None\n        An object defining properties of axis's gridlines, ticks and labels. If ``null``,\n        the axis for the encoding channel will be removed.\n\n        **Default value:** If undefined, default `axis properties\n        <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.\n\n        **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    impute : dict, :class:`ImputeParams`, None\n        An object defining the properties of the Impute Operation to be applied. The field\n        value of the other positional channel is taken as ``key`` of the ``Impute``\n        Operation. The field of the ``color`` channel if specified is used as ``groupby`` of\n        the ``Impute`` Operation.\n\n        **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None\n        Type of stacking offset if the field should be stacked. ``stack`` is only applicable\n        for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For\n        example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar\n        chart.\n\n        ``stack`` can be one of the following values:\n\n        * ``\"zero\"`` or ``true``: stacking with baseline offset at zero value of the scale\n          (for creating typical stacked `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area\n          <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).\n        * ``\"normalize\"`` - stacking with normalized domain (for creating `normalized\n          stacked bar and area charts\n          <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts\n          `with percentage tooltip\n          <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).\n        * ``\"center\"`` - stacking with center baseline (for `streamgraph\n          <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).\n        * ``null`` or ``false`` - No-stacking. This will produce layered `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area\n          chart.\n\n        **Default value:** ``zero`` for plots with all of the following conditions are true:\n        (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or\n        y) has a linear scale; (3) At least one of non-position channels mapped to an\n        unaggregated field that is different from x and y. Otherwise, ``null`` by default.\n\n        **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"x\"\n\n    @overload\n    def axis(self, _: Axis | None, /) -> XDatum: ...\n    @overload\n    def axis(\n        self,\n        *,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        bandPosition: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[bool] = Undefined,\n        domainCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        domainColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        domainDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        domainDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        grid: Optional[bool] = Undefined,\n        gridCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        gridColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gridDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        gridDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelBound: Optional[bool | float | Parameter | SchemaBase | Map] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFlush: Optional[bool | float] = Undefined,\n        labelFlushOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labels: Optional[bool] = Undefined,\n        maxExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        minExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[Parameter | SchemaBase | Map | AxisOrient_T] = Undefined,\n        position: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        style: Optional[str | Sequence[str]] = Undefined,\n        tickBand: Optional[\n            Parameter | SchemaBase | Literal[\"center\", \"extent\"] | Map\n        ] = Undefined,\n        tickCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        tickColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        tickDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickExtra: Optional[bool] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickRound: Optional[bool] = Undefined,\n        tickSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ticks: Optional[bool] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        translate: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n    ) -> XDatum: ...\n    @overload\n    def bandPosition(self, _: float, /) -> XDatum: ...\n    @overload\n    def impute(self, _: Impute | None, /) -> XDatum: ...\n    @overload\n    def impute(\n        self,\n        *,\n        frame: Optional[Sequence[float | None]] = Undefined,\n        keyvals: Optional[SchemaBase | Sequence[Any] | Map] = Undefined,\n        method: Optional[SchemaBase | ImputeMethod_T] = Undefined,\n        value: Optional[Any] = Undefined,\n    ) -> XDatum: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> XDatum: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> XDatum: ...\n    @overload\n    def stack(self, _: bool | StackOffset_T | None, /) -> XDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> XDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> XDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        axis: Optional[SchemaBase | Map | None] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        impute: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            axis=axis,\n            bandPosition=bandPosition,\n            impute=impute,\n            scale=scale,\n            stack=stack,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass XValue(ValueChannelMixin, core.PositionValueDef):\n    \"\"\"\n    XValue schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : dict, float, :class:`ExprRef`, Literal['height', 'width']\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"x\"\n\n    def __init__(self, value, **kwds):\n        super().__init__(value=value, **kwds)\n\n\n@with_property_setters\nclass X2(FieldChannelMixin, core.SecondaryFieldDef):\n    r\"\"\"\n    X2 schema wrapper.\n\n    A field definition of a secondary channel that shares a scale with another primary channel.\n    For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"x2\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> X2: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> X2: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> X2: ...\n    @overload\n    def bandPosition(self, _: float, /) -> X2: ...\n    @overload\n    def bin(self, _: None, /) -> X2: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> X2: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> X2: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> X2: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> X2: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> X2: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass X2Datum(DatumChannelMixin, core.DatumDef):\n    \"\"\"\n    X2Datum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"x2\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> X2Datum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> X2Datum: ...\n    @overload\n    def type(self, _: Type_T, /) -> X2Datum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum, bandPosition=bandPosition, title=title, type=type, **kwds\n        )\n\n\n@with_property_setters\nclass X2Value(ValueChannelMixin, core.PositionValueDef):\n    \"\"\"\n    X2Value schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : dict, float, :class:`ExprRef`, Literal['height', 'width']\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"x2\"\n\n    def __init__(self, value, **kwds):\n        super().__init__(value=value, **kwds)\n\n\n@with_property_setters\nclass XError(FieldChannelMixin, core.SecondaryFieldDef):\n    r\"\"\"\n    XError schema wrapper.\n\n    A field definition of a secondary channel that shares a scale with another primary channel.\n    For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"xError\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> XError: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> XError: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> XError: ...\n    @overload\n    def bandPosition(self, _: float, /) -> XError: ...\n    @overload\n    def bin(self, _: None, /) -> XError: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> XError: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> XError: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> XError: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> XError: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> XError: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass XErrorValue(ValueChannelMixin, core.ValueDefnumber):\n    \"\"\"\n    XErrorValue schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : float\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"xError\"\n\n    def __init__(self, value, **kwds):\n        super().__init__(value=value, **kwds)\n\n\n@with_property_setters\nclass XError2(FieldChannelMixin, core.SecondaryFieldDef):\n    r\"\"\"\n    XError2 schema wrapper.\n\n    A field definition of a secondary channel that shares a scale with another primary channel.\n    For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"xError2\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> XError2: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> XError2: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> XError2: ...\n    @overload\n    def bandPosition(self, _: float, /) -> XError2: ...\n    @overload\n    def bin(self, _: None, /) -> XError2: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> XError2: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> XError2: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> XError2: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> XError2: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> XError2: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass XError2Value(ValueChannelMixin, core.ValueDefnumber):\n    \"\"\"\n    XError2Value schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : float\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"xError2\"\n\n    def __init__(self, value, **kwds):\n        super().__init__(value=value, **kwds)\n\n\n@with_property_setters\nclass XOffset(FieldChannelMixin, core.ScaleFieldDef):\n    r\"\"\"\n    XOffset schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"xOffset\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> XOffset: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> XOffset: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> XOffset: ...\n    @overload\n    def bandPosition(self, _: float, /) -> XOffset: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> XOffset: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> XOffset: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> XOffset: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> XOffset: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> XOffset: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> XOffset: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> XOffset: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> XOffset: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> XOffset: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> XOffset: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> XOffset: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> XOffset: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> XOffset: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass XOffsetDatum(DatumChannelMixin, core.ScaleDatumDef):\n    \"\"\"\n    XOffsetDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"xOffset\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> XOffsetDatum: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> XOffsetDatum: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> XOffsetDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> XOffsetDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> XOffsetDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            bandPosition=bandPosition,\n            scale=scale,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass XOffsetValue(ValueChannelMixin, core.ValueDefnumber):\n    \"\"\"\n    XOffsetValue schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : float\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"xOffset\"\n\n    def __init__(self, value, **kwds):\n        super().__init__(value=value, **kwds)\n\n\n@with_property_setters\nclass Y(FieldChannelMixin, core.PositionFieldDef):\n    r\"\"\"\n    Y schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    axis : dict, :class:`Axis`, None\n        An object defining properties of axis's gridlines, ticks and labels. If ``null``,\n        the axis for the encoding channel will be removed.\n\n        **Default value:** If undefined, default `axis properties\n        <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.\n\n        **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    impute : dict, :class:`ImputeParams`, None\n        An object defining the properties of the Impute Operation to be applied. The field\n        value of the other positional channel is taken as ``key`` of the ``Impute``\n        Operation. The field of the ``color`` channel if specified is used as ``groupby`` of\n        the ``Impute`` Operation.\n\n        **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None\n        Type of stacking offset if the field should be stacked. ``stack`` is only applicable\n        for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For\n        example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar\n        chart.\n\n        ``stack`` can be one of the following values:\n\n        * ``\"zero\"`` or ``true``: stacking with baseline offset at zero value of the scale\n          (for creating typical stacked `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area\n          <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).\n        * ``\"normalize\"`` - stacking with normalized domain (for creating `normalized\n          stacked bar and area charts\n          <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts\n          `with percentage tooltip\n          <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).\n        * ``\"center\"`` - stacking with center baseline (for `streamgraph\n          <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).\n        * ``null`` or ``false`` - No-stacking. This will produce layered `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area\n          chart.\n\n        **Default value:** ``zero`` for plots with all of the following conditions are true:\n        (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or\n        y) has a linear scale; (3) At least one of non-position channels mapped to an\n        unaggregated field that is different from x and y. Otherwise, ``null`` by default.\n\n        **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"y\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Y: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Y: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Y: ...\n    @overload\n    def axis(self, _: Axis | None, /) -> Y: ...\n    @overload\n    def axis(\n        self,\n        *,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        bandPosition: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[bool] = Undefined,\n        domainCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        domainColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        domainDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        domainDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        grid: Optional[bool] = Undefined,\n        gridCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        gridColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gridDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        gridDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelBound: Optional[bool | float | Parameter | SchemaBase | Map] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFlush: Optional[bool | float] = Undefined,\n        labelFlushOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labels: Optional[bool] = Undefined,\n        maxExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        minExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[Parameter | SchemaBase | Map | AxisOrient_T] = Undefined,\n        position: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        style: Optional[str | Sequence[str]] = Undefined,\n        tickBand: Optional[\n            Parameter | SchemaBase | Literal[\"center\", \"extent\"] | Map\n        ] = Undefined,\n        tickCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        tickColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        tickDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickExtra: Optional[bool] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickRound: Optional[bool] = Undefined,\n        tickSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ticks: Optional[bool] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        translate: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n    ) -> Y: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Y: ...\n    @overload\n    def bin(self, _: bool | Bin | Literal[\"binned\"] | None, /) -> Y: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> Y: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Y: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Y: ...\n    @overload\n    def impute(self, _: Impute | None, /) -> Y: ...\n    @overload\n    def impute(\n        self,\n        *,\n        frame: Optional[Sequence[float | None]] = Undefined,\n        keyvals: Optional[SchemaBase | Sequence[Any] | Map] = Undefined,\n        method: Optional[SchemaBase | ImputeMethod_T] = Undefined,\n        value: Optional[Any] = Undefined,\n    ) -> Y: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> Y: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> Y: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> Y: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Y: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> Y: ...\n    @overload\n    def stack(self, _: bool | StackOffset_T | None, /) -> Y: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Y: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Y: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Y: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> Y: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        axis: Optional[SchemaBase | Map | None] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        impute: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            axis=axis,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            impute=impute,\n            scale=scale,\n            sort=sort,\n            stack=stack,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass YDatum(DatumChannelMixin, core.PositionDatumDef):\n    \"\"\"\n    YDatum schema wrapper.\n\n    Parameters\n    ----------\n    axis : dict, :class:`Axis`, None\n        An object defining properties of axis's gridlines, ticks and labels. If ``null``,\n        the axis for the encoding channel will be removed.\n\n        **Default value:** If undefined, default `axis properties\n        <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.\n\n        **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    impute : dict, :class:`ImputeParams`, None\n        An object defining the properties of the Impute Operation to be applied. The field\n        value of the other positional channel is taken as ``key`` of the ``Impute``\n        Operation. The field of the ``color`` channel if specified is used as ``groupby`` of\n        the ``Impute`` Operation.\n\n        **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None\n        Type of stacking offset if the field should be stacked. ``stack`` is only applicable\n        for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For\n        example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar\n        chart.\n\n        ``stack`` can be one of the following values:\n\n        * ``\"zero\"`` or ``true``: stacking with baseline offset at zero value of the scale\n          (for creating typical stacked `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area\n          <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).\n        * ``\"normalize\"`` - stacking with normalized domain (for creating `normalized\n          stacked bar and area charts\n          <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts\n          `with percentage tooltip\n          <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).\n        * ``\"center\"`` - stacking with center baseline (for `streamgraph\n          <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).\n        * ``null`` or ``false`` - No-stacking. This will produce layered `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area\n          chart.\n\n        **Default value:** ``zero`` for plots with all of the following conditions are true:\n        (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or\n        y) has a linear scale; (3) At least one of non-position channels mapped to an\n        unaggregated field that is different from x and y. Otherwise, ``null`` by default.\n\n        **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"y\"\n\n    @overload\n    def axis(self, _: Axis | None, /) -> YDatum: ...\n    @overload\n    def axis(\n        self,\n        *,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        bandPosition: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[bool] = Undefined,\n        domainCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        domainColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        domainDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        domainDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        grid: Optional[bool] = Undefined,\n        gridCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        gridColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gridDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        gridDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelBound: Optional[bool | float | Parameter | SchemaBase | Map] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFlush: Optional[bool | float] = Undefined,\n        labelFlushOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labels: Optional[bool] = Undefined,\n        maxExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        minExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[Parameter | SchemaBase | Map | AxisOrient_T] = Undefined,\n        position: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        style: Optional[str | Sequence[str]] = Undefined,\n        tickBand: Optional[\n            Parameter | SchemaBase | Literal[\"center\", \"extent\"] | Map\n        ] = Undefined,\n        tickCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        tickColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        tickDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickExtra: Optional[bool] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickRound: Optional[bool] = Undefined,\n        tickSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ticks: Optional[bool] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        translate: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n    ) -> YDatum: ...\n    @overload\n    def bandPosition(self, _: float, /) -> YDatum: ...\n    @overload\n    def impute(self, _: Impute | None, /) -> YDatum: ...\n    @overload\n    def impute(\n        self,\n        *,\n        frame: Optional[Sequence[float | None]] = Undefined,\n        keyvals: Optional[SchemaBase | Sequence[Any] | Map] = Undefined,\n        method: Optional[SchemaBase | ImputeMethod_T] = Undefined,\n        value: Optional[Any] = Undefined,\n    ) -> YDatum: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> YDatum: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> YDatum: ...\n    @overload\n    def stack(self, _: bool | StackOffset_T | None, /) -> YDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> YDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> YDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        axis: Optional[SchemaBase | Map | None] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        impute: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            axis=axis,\n            bandPosition=bandPosition,\n            impute=impute,\n            scale=scale,\n            stack=stack,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass YValue(ValueChannelMixin, core.PositionValueDef):\n    \"\"\"\n    YValue schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : dict, float, :class:`ExprRef`, Literal['height', 'width']\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"y\"\n\n    def __init__(self, value, **kwds):\n        super().__init__(value=value, **kwds)\n\n\n@with_property_setters\nclass Y2(FieldChannelMixin, core.SecondaryFieldDef):\n    r\"\"\"\n    Y2 schema wrapper.\n\n    A field definition of a secondary channel that shares a scale with another primary channel.\n    For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"y2\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> Y2: ...\n    @overload\n    def aggregate(self, *, argmax: Optional[str | SchemaBase] = Undefined) -> Y2: ...\n    @overload\n    def aggregate(self, *, argmin: Optional[str | SchemaBase] = Undefined) -> Y2: ...\n    @overload\n    def bandPosition(self, _: float, /) -> Y2: ...\n    @overload\n    def bin(self, _: None, /) -> Y2: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> Y2: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> Y2: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> Y2: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> Y2: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Y2: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass Y2Datum(DatumChannelMixin, core.DatumDef):\n    \"\"\"\n    Y2Datum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"y2\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> Y2Datum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> Y2Datum: ...\n    @overload\n    def type(self, _: Type_T, /) -> Y2Datum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum, bandPosition=bandPosition, title=title, type=type, **kwds\n        )\n\n\n@with_property_setters\nclass Y2Value(ValueChannelMixin, core.PositionValueDef):\n    \"\"\"\n    Y2Value schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : dict, float, :class:`ExprRef`, Literal['height', 'width']\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"y2\"\n\n    def __init__(self, value, **kwds):\n        super().__init__(value=value, **kwds)\n\n\n@with_property_setters\nclass YError(FieldChannelMixin, core.SecondaryFieldDef):\n    r\"\"\"\n    YError schema wrapper.\n\n    A field definition of a secondary channel that shares a scale with another primary channel.\n    For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"yError\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> YError: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> YError: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> YError: ...\n    @overload\n    def bandPosition(self, _: float, /) -> YError: ...\n    @overload\n    def bin(self, _: None, /) -> YError: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> YError: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> YError: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> YError: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> YError: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> YError: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass YErrorValue(ValueChannelMixin, core.ValueDefnumber):\n    \"\"\"\n    YErrorValue schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : float\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"yError\"\n\n    def __init__(self, value, **kwds):\n        super().__init__(value=value, **kwds)\n\n\n@with_property_setters\nclass YError2(FieldChannelMixin, core.SecondaryFieldDef):\n    r\"\"\"\n    YError2 schema wrapper.\n\n    A field definition of a secondary channel that shares a scale with another primary channel.\n    For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"yError2\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> YError2: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> YError2: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> YError2: ...\n    @overload\n    def bandPosition(self, _: float, /) -> YError2: ...\n    @overload\n    def bin(self, _: None, /) -> YError2: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> YError2: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> YError2: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> YError2: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> YError2: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> YError2: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass YError2Value(ValueChannelMixin, core.ValueDefnumber):\n    \"\"\"\n    YError2Value schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : float\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"yError2\"\n\n    def __init__(self, value, **kwds):\n        super().__init__(value=value, **kwds)\n\n\n@with_property_setters\nclass YOffset(FieldChannelMixin, core.ScaleFieldDef):\n    r\"\"\"\n    YOffset schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"yOffset\"\n\n    @overload\n    def aggregate(self, _: NonArgAggregateOp_T, /) -> YOffset: ...\n    @overload\n    def aggregate(\n        self, *, argmax: Optional[str | SchemaBase] = Undefined\n    ) -> YOffset: ...\n    @overload\n    def aggregate(\n        self, *, argmin: Optional[str | SchemaBase] = Undefined\n    ) -> YOffset: ...\n    @overload\n    def bandPosition(self, _: float, /) -> YOffset: ...\n    @overload\n    def bin(self, _: bool | Bin | None, /) -> YOffset: ...\n    @overload\n    def bin(\n        self,\n        *,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n    ) -> YOffset: ...\n    @overload\n    def field(self, _: str | RepeatRef, /) -> YOffset: ...\n    @overload\n    def field(\n        self,\n        *,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n    ) -> YOffset: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> YOffset: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> YOffset: ...\n    @overload\n    def sort(\n        self,\n        _: Sequence[str]\n        | Sequence[bool]\n        | Sequence[float]\n        | Sequence[DateTime | Temporal]\n        | AllSortString_T\n        | None,\n        /,\n    ) -> YOffset: ...\n    @overload\n    def sort(\n        self,\n        *,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> YOffset: ...\n    @overload\n    def sort(\n        self,\n        *,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n    ) -> YOffset: ...\n    @overload\n    def timeUnit(\n        self,\n        _: TimeUnitParams | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T,\n        /,\n    ) -> YOffset: ...\n    @overload\n    def timeUnit(\n        self,\n        *,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n    ) -> YOffset: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> YOffset: ...\n    @overload\n    def type(self, _: StandardType_T, /) -> YOffset: ...\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass YOffsetDatum(DatumChannelMixin, core.ScaleDatumDef):\n    \"\"\"\n    YOffsetDatum schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"yOffset\"\n\n    @overload\n    def bandPosition(self, _: float, /) -> YOffsetDatum: ...\n    @overload\n    def scale(self, _: Scale | None, /) -> YOffsetDatum: ...\n    @overload\n    def scale(\n        self,\n        *,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n    ) -> YOffsetDatum: ...\n    @overload\n    def title(self, _: str | Sequence[str] | None, /) -> YOffsetDatum: ...\n    @overload\n    def type(self, _: Type_T, /) -> YOffsetDatum: ...\n\n    def __init__(\n        self,\n        datum,\n        bandPosition: Optional[float] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            datum=datum,\n            bandPosition=bandPosition,\n            scale=scale,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\n@with_property_setters\nclass YOffsetValue(ValueChannelMixin, core.ValueDefnumber):\n    \"\"\"\n    YOffsetValue schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : float\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _class_is_valid_at_instantiation = False\n    _encoding_name = \"yOffset\"\n\n    def __init__(self, value, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nAnyAngle: TypeAlias = Angle | AngleDatum | AngleValue\nAnyColor: TypeAlias = Color | ColorDatum | ColorValue\nAnyDescription: TypeAlias = Description | DescriptionValue\nAnyFill: TypeAlias = Fill | FillDatum | FillValue\nAnyFillOpacity: TypeAlias = FillOpacity | FillOpacityDatum | FillOpacityValue\nAnyHref: TypeAlias = Href | HrefValue\nAnyLatitude: TypeAlias = Latitude | LatitudeDatum\nAnyLatitude2: TypeAlias = Latitude2 | Latitude2Datum | Latitude2Value\nAnyLongitude: TypeAlias = Longitude | LongitudeDatum\nAnyLongitude2: TypeAlias = Longitude2 | Longitude2Datum | Longitude2Value\nAnyOpacity: TypeAlias = Opacity | OpacityDatum | OpacityValue\nAnyOrder: TypeAlias = Order | OrderValue\nAnyRadius: TypeAlias = Radius | RadiusDatum | RadiusValue\nAnyRadius2: TypeAlias = Radius2 | Radius2Datum | Radius2Value\nAnyShape: TypeAlias = Shape | ShapeDatum | ShapeValue\nAnySize: TypeAlias = Size | SizeDatum | SizeValue\nAnyStroke: TypeAlias = Stroke | StrokeDatum | StrokeValue\nAnyStrokeDash: TypeAlias = StrokeDash | StrokeDashDatum | StrokeDashValue\nAnyStrokeOpacity: TypeAlias = StrokeOpacity | StrokeOpacityDatum | StrokeOpacityValue\nAnyStrokeWidth: TypeAlias = StrokeWidth | StrokeWidthDatum | StrokeWidthValue\nAnyText: TypeAlias = Text | TextDatum | TextValue\nAnyTheta: TypeAlias = Theta | ThetaDatum | ThetaValue\nAnyTheta2: TypeAlias = Theta2 | Theta2Datum | Theta2Value\nAnyTooltip: TypeAlias = Tooltip | TooltipValue\nAnyUrl: TypeAlias = Url | UrlValue\nAnyX: TypeAlias = X | XDatum | XValue\nAnyX2: TypeAlias = X2 | X2Datum | X2Value\nAnyXError: TypeAlias = XError | XErrorValue\nAnyXError2: TypeAlias = XError2 | XError2Value\nAnyXOffset: TypeAlias = XOffset | XOffsetDatum | XOffsetValue\nAnyY: TypeAlias = Y | YDatum | YValue\nAnyY2: TypeAlias = Y2 | Y2Datum | Y2Value\nAnyYError: TypeAlias = YError | YErrorValue\nAnyYError2: TypeAlias = YError2 | YError2Value\nAnyYOffset: TypeAlias = YOffset | YOffsetDatum | YOffsetValue\n\nChannelAngle: TypeAlias = Union[str, AnyAngle, \"IntoCondition\", Map]\nChannelColor: TypeAlias = Union[str, AnyColor, \"IntoCondition\", Map]\nChannelColumn: TypeAlias = Union[str, Column, \"IntoCondition\", Map]\nChannelDescription: TypeAlias = Union[str, AnyDescription, \"IntoCondition\", Map]\nChannelDetail: TypeAlias = OneOrSeq[Union[str, Detail, \"IntoCondition\", Map]]\nChannelFacet: TypeAlias = Union[str, Facet, \"IntoCondition\", Map]\nChannelFill: TypeAlias = Union[str, AnyFill, \"IntoCondition\", Map]\nChannelFillOpacity: TypeAlias = Union[str, AnyFillOpacity, \"IntoCondition\", Map]\nChannelHref: TypeAlias = Union[str, AnyHref, \"IntoCondition\", Map]\nChannelKey: TypeAlias = Union[str, Key, \"IntoCondition\", Map]\nChannelLatitude: TypeAlias = Union[str, AnyLatitude, \"IntoCondition\", Map]\nChannelLatitude2: TypeAlias = Union[str, AnyLatitude2, \"IntoCondition\", Map]\nChannelLongitude: TypeAlias = Union[str, AnyLongitude, \"IntoCondition\", Map]\nChannelLongitude2: TypeAlias = Union[str, AnyLongitude2, \"IntoCondition\", Map]\nChannelOpacity: TypeAlias = Union[str, AnyOpacity, \"IntoCondition\", Map]\nChannelOrder: TypeAlias = OneOrSeq[Union[str, AnyOrder, \"IntoCondition\", Map]]\nChannelRadius: TypeAlias = Union[str, AnyRadius, \"IntoCondition\", Map]\nChannelRadius2: TypeAlias = Union[str, AnyRadius2, \"IntoCondition\", Map]\nChannelRow: TypeAlias = Union[str, Row, \"IntoCondition\", Map]\nChannelShape: TypeAlias = Union[str, AnyShape, \"IntoCondition\", Map]\nChannelSize: TypeAlias = Union[str, AnySize, \"IntoCondition\", Map]\nChannelStroke: TypeAlias = Union[str, AnyStroke, \"IntoCondition\", Map]\nChannelStrokeDash: TypeAlias = Union[str, AnyStrokeDash, \"IntoCondition\", Map]\nChannelStrokeOpacity: TypeAlias = Union[str, AnyStrokeOpacity, \"IntoCondition\", Map]\nChannelStrokeWidth: TypeAlias = Union[str, AnyStrokeWidth, \"IntoCondition\", Map]\nChannelText: TypeAlias = Union[str, AnyText, \"IntoCondition\", Map]\nChannelTheta: TypeAlias = Union[str, AnyTheta, \"IntoCondition\", Map]\nChannelTheta2: TypeAlias = Union[str, AnyTheta2, \"IntoCondition\", Map]\nChannelTime: TypeAlias = Union[str, Time, \"IntoCondition\", Map]\nChannelTooltip: TypeAlias = OneOrSeq[Union[str, AnyTooltip, \"IntoCondition\", Map]]\nChannelUrl: TypeAlias = Union[str, AnyUrl, \"IntoCondition\", Map]\nChannelX: TypeAlias = Union[str, AnyX, \"IntoCondition\", Map]\nChannelX2: TypeAlias = Union[str, AnyX2, \"IntoCondition\", Map]\nChannelXError: TypeAlias = Union[str, AnyXError, \"IntoCondition\", Map]\nChannelXError2: TypeAlias = Union[str, AnyXError2, \"IntoCondition\", Map]\nChannelXOffset: TypeAlias = Union[str, AnyXOffset, \"IntoCondition\", Map]\nChannelY: TypeAlias = Union[str, AnyY, \"IntoCondition\", Map]\nChannelY2: TypeAlias = Union[str, AnyY2, \"IntoCondition\", Map]\nChannelYError: TypeAlias = Union[str, AnyYError, \"IntoCondition\", Map]\nChannelYError2: TypeAlias = Union[str, AnyYError2, \"IntoCondition\", Map]\nChannelYOffset: TypeAlias = Union[str, AnyYOffset, \"IntoCondition\", Map]\n\n\nclass _EncodingMixin:\n    def encode(\n        self,\n        *args: Any,\n        angle: Optional[str | AnyAngle | IntoCondition | Map] = Undefined,\n        color: Optional[str | AnyColor | IntoCondition | Map] = Undefined,\n        column: Optional[str | Column | IntoCondition | Map] = Undefined,\n        description: Optional[str | AnyDescription | IntoCondition | Map] = Undefined,\n        detail: Optional[OneOrSeq[str | Detail | IntoCondition | Map]] = Undefined,\n        facet: Optional[str | Facet | IntoCondition | Map] = Undefined,\n        fill: Optional[str | AnyFill | IntoCondition | Map] = Undefined,\n        fillOpacity: Optional[str | AnyFillOpacity | IntoCondition | Map] = Undefined,\n        href: Optional[str | AnyHref | IntoCondition | Map] = Undefined,\n        key: Optional[str | Key | IntoCondition | Map] = Undefined,\n        latitude: Optional[str | AnyLatitude | IntoCondition | Map] = Undefined,\n        latitude2: Optional[str | AnyLatitude2 | IntoCondition | Map] = Undefined,\n        longitude: Optional[str | AnyLongitude | IntoCondition | Map] = Undefined,\n        longitude2: Optional[str | AnyLongitude2 | IntoCondition | Map] = Undefined,\n        opacity: Optional[str | AnyOpacity | IntoCondition | Map] = Undefined,\n        order: Optional[OneOrSeq[str | AnyOrder | IntoCondition | Map]] = Undefined,\n        radius: Optional[str | AnyRadius | IntoCondition | Map] = Undefined,\n        radius2: Optional[str | AnyRadius2 | IntoCondition | Map] = Undefined,\n        row: Optional[str | Row | IntoCondition | Map] = Undefined,\n        shape: Optional[str | AnyShape | IntoCondition | Map] = Undefined,\n        size: Optional[str | AnySize | IntoCondition | Map] = Undefined,\n        stroke: Optional[str | AnyStroke | IntoCondition | Map] = Undefined,\n        strokeDash: Optional[str | AnyStrokeDash | IntoCondition | Map] = Undefined,\n        strokeOpacity: Optional[\n            str | AnyStrokeOpacity | IntoCondition | Map\n        ] = Undefined,\n        strokeWidth: Optional[str | AnyStrokeWidth | IntoCondition | Map] = Undefined,\n        text: Optional[str | AnyText | IntoCondition | Map] = Undefined,\n        theta: Optional[str | AnyTheta | IntoCondition | Map] = Undefined,\n        theta2: Optional[str | AnyTheta2 | IntoCondition | Map] = Undefined,\n        time: Optional[str | Time | IntoCondition | Map] = Undefined,\n        tooltip: Optional[OneOrSeq[str | AnyTooltip | IntoCondition | Map]] = Undefined,\n        url: Optional[str | AnyUrl | IntoCondition | Map] = Undefined,\n        x: Optional[str | AnyX | IntoCondition | Map] = Undefined,\n        x2: Optional[str | AnyX2 | IntoCondition | Map] = Undefined,\n        xError: Optional[str | AnyXError | IntoCondition | Map] = Undefined,\n        xError2: Optional[str | AnyXError2 | IntoCondition | Map] = Undefined,\n        xOffset: Optional[str | AnyXOffset | IntoCondition | Map] = Undefined,\n        y: Optional[str | AnyY | IntoCondition | Map] = Undefined,\n        y2: Optional[str | AnyY2 | IntoCondition | Map] = Undefined,\n        yError: Optional[str | AnyYError | IntoCondition | Map] = Undefined,\n        yError2: Optional[str | AnyYError2 | IntoCondition | Map] = Undefined,\n        yOffset: Optional[str | AnyYOffset | IntoCondition | Map] = Undefined,\n    ) -> Self:\n        \"\"\"\n        Map properties of the data to visual properties of the chart (see :class:`FacetedEncoding`).\n\n        Parameters\n        ----------\n        angle : str, :class:`Angle`, Dict, :class:`AngleDatum`, :class:`AngleValue`\n            Rotation angle of point and text marks.\n        color : str, :class:`Color`, Dict, :class:`ColorDatum`, :class:`ColorValue`\n            Color of the marks - either fill or stroke color based on  the ``filled``\n            property of mark definition. By default, ``color`` represents fill color for\n            ``\"area\"``, ``\"bar\"``, ``\"tick\"``, ``\"text\"``, ``\"trail\"``, ``\"circle\"``,\n            and ``\"square\"`` / stroke color for ``\"line\"`` and ``\"point\"``.\n\n            **Default value:** If undefined, the default color depends on `mark config\n            <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s\n            ``color`` property.\n\n            *Note:* 1) For fine-grained control over both fill and stroke colors of the\n            marks, please use the ``fill`` and ``stroke`` channels. The ``fill`` or\n            ``stroke`` encodings have higher precedence than ``color``, thus may\n            override the ``color`` encoding if conflicting encodings are specified. 2)\n            See the scale documentation for more information about customizing `color\n            scheme <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__.\n        column : str, :class:`Column`, Dict\n            A field definition for the horizontal facet of trellis plots.\n        description : str, :class:`Description`, Dict, :class:`DescriptionValue`\n            A text description of this mark for ARIA accessibility (SVG output only).\n            For SVG output the ``\"aria-label\"`` attribute will be set to this\n            description.\n        detail : str, :class:`Detail`, Dict, List\n            Additional levels of detail for grouping data in aggregate views and in\n            line, trail, and area marks without mapping data to a specific visual\n            channel.\n        facet : str, :class:`Facet`, Dict\n            A field definition for the (flexible) facet of trellis plots.\n\n            If either ``row`` or ``column`` is specified, this channel will be ignored.\n        fill : str, :class:`Fill`, Dict, :class:`FillDatum`, :class:`FillValue`\n            Fill color of the marks. **Default value:** If undefined, the default color\n            depends on `mark config\n            <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s\n            ``color`` property.\n\n            *Note:* The ``fill`` encoding has higher precedence than ``color``, thus may\n            override the ``color`` encoding if conflicting encodings are specified.\n        fillOpacity : str, :class:`FillOpacity`, Dict, :class:`FillOpacityDatum`, :class:`FillOpacityValue`\n            Fill opacity of the marks.\n\n            **Default value:** If undefined, the default opacity depends on `mark config\n            <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s\n            ``fillOpacity`` property.\n        href : str, :class:`Href`, Dict, :class:`HrefValue`\n            A URL to load upon mouse click.\n        key : str, :class:`Key`, Dict\n            A data field to use as a unique key for data binding. When a visualization's\n            data is updated, the key value will be used to match data elements to\n            existing mark instances. Use a key channel to enable object constancy for\n            transitions over dynamic data.\n        latitude : str, :class:`Latitude`, Dict, :class:`LatitudeDatum`\n            Latitude position of geographically projected marks.\n        latitude2 : str, :class:`Latitude2`, Dict, :class:`Latitude2Datum`, :class:`Latitude2Value`\n            Latitude-2 position for geographically projected ranged ``\"area\"``,\n            ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n        longitude : str, :class:`Longitude`, Dict, :class:`LongitudeDatum`\n            Longitude position of geographically projected marks.\n        longitude2 : str, :class:`Longitude2`, Dict, :class:`Longitude2Datum`, :class:`Longitude2Value`\n            Longitude-2 position for geographically projected ranged ``\"area\"``,\n            ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n        opacity : str, :class:`Opacity`, Dict, :class:`OpacityDatum`, :class:`OpacityValue`\n            Opacity of the marks.\n\n            **Default value:** If undefined, the default opacity depends on `mark config\n            <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s\n            ``opacity`` property.\n        order : str, :class:`Order`, Dict, List, :class:`OrderValue`\n            Order of the marks.\n\n            * For stacked marks, this ``order`` channel encodes `stack order\n              <https://vega.github.io/vega-lite/docs/stack.html#order>`__.\n            * For line and trail marks, this ``order`` channel encodes order of data\n              points in the lines. This can be useful for creating `a connected\n              scatterplot\n              <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__.\n              Setting ``order`` to ``{\"value\": null}`` makes the line marks use the\n              original order in the data sources.\n            * Otherwise, this ``order`` channel encodes layer order of the marks.\n\n            **Note**: In aggregate plots, ``order`` field should be aggregated to avoid\n            creating additional aggregation grouping.\n        radius : str, :class:`Radius`, Dict, :class:`RadiusDatum`, :class:`RadiusValue`\n            The outer radius in pixels of arc marks.\n        radius2 : str, :class:`Radius2`, Dict, :class:`Radius2Datum`, :class:`Radius2Value`\n            The inner radius in pixels of arc marks.\n        row : str, :class:`Row`, Dict\n            A field definition for the vertical facet of trellis plots.\n        shape : str, :class:`Shape`, Dict, :class:`ShapeDatum`, :class:`ShapeValue`\n            Shape of the mark.\n\n            1. For ``point`` marks the supported values include:   - plotting shapes:\n            ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``, ``\"triangle-up\"``,\n            ``\"triangle-down\"``, ``\"triangle-right\"``, or ``\"triangle-left\"``.   - the\n            line symbol ``\"stroke\"``   - centered directional shapes ``\"arrow\"``,\n            ``\"wedge\"``, or ``\"triangle\"``   - a custom `SVG path string\n            <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For\n            correct sizing, custom shape paths should be defined within a square\n            bounding box with coordinates ranging from -1 to 1 along both the x and y\n            dimensions.)\n\n            2. For ``geoshape`` marks it should be a field definition of the geojson\n            data\n\n            **Default value:** If undefined, the default shape depends on `mark config\n            <https://vega.github.io/vega-lite/docs/config.html#point-config>`__'s\n            ``shape`` property. (``\"circle\"`` if unset.)\n        size : str, :class:`Size`, Dict, :class:`SizeDatum`, :class:`SizeValue`\n            Size of the mark.\n\n            * For ``\"point\"``, ``\"square\"`` and ``\"circle\"``, - the symbol size, or\n              pixel area of the mark.\n            * For ``\"bar\"`` and ``\"tick\"`` - the bar and tick's size.\n            * For ``\"text\"`` - the text's font size.\n            * Size is unsupported for ``\"line\"``, ``\"area\"``, and ``\"rect\"``. (Use\n              ``\"trail\"`` instead of line with varying size)\n        stroke : str, :class:`Stroke`, Dict, :class:`StrokeDatum`, :class:`StrokeValue`\n            Stroke color of the marks. **Default value:** If undefined, the default\n            color depends on `mark config\n            <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s\n            ``color`` property.\n\n            *Note:* The ``stroke`` encoding has higher precedence than ``color``, thus\n            may override the ``color`` encoding if conflicting encodings are specified.\n        strokeDash : str, :class:`StrokeDash`, Dict, :class:`StrokeDashDatum`, :class:`StrokeDashValue`\n            Stroke dash of the marks.\n\n            **Default value:** ``[1,0]`` (No dash).\n        strokeOpacity : str, :class:`StrokeOpacity`, Dict, :class:`StrokeOpacityDatum`, :class:`StrokeOpacityValue`\n            Stroke opacity of the marks.\n\n            **Default value:** If undefined, the default opacity depends on `mark config\n            <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s\n            ``strokeOpacity`` property.\n        strokeWidth : str, :class:`StrokeWidth`, Dict, :class:`StrokeWidthDatum`, :class:`StrokeWidthValue`\n            Stroke width of the marks.\n\n            **Default value:** If undefined, the default stroke width depends on `mark\n            config <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s\n            ``strokeWidth`` property.\n        text : str, :class:`Text`, Dict, :class:`TextDatum`, :class:`TextValue`\n            Text of the ``text`` mark.\n        theta : str, :class:`Theta`, Dict, :class:`ThetaDatum`, :class:`ThetaValue`\n            * For arc marks, the arc length in radians if theta2 is not specified,\n              otherwise the start arc angle. (A value of 0 indicates up or “north”,\n              increasing values proceed clockwise.)\n\n            * For text marks, polar coordinate angle in radians.\n        theta2 : str, :class:`Theta2`, Dict, :class:`Theta2Datum`, :class:`Theta2Value`\n            The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n            increasing values proceed clockwise.\n        time : str, :class:`Time`, Dict\n\n        tooltip : str, :class:`Tooltip`, Dict, List, :class:`TooltipValue`\n            The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding\n            overrides `the tooltip property in the mark definition\n            <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.\n\n            See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n            documentation for a detailed discussion about tooltip in Vega-Lite.\n        url : str, :class:`Url`, Dict, :class:`UrlValue`\n            The URL of an image mark.\n        x : str, :class:`X`, Dict, :class:`XDatum`, :class:`XValue`\n            X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"``\n            without specified ``x2`` or ``width``.\n\n            The ``value`` of this channel can be a number or a string ``\"width\"`` for\n            the width of the plot.\n        x2 : str, :class:`X2`, Dict, :class:`X2Datum`, :class:`X2Value`\n            X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and\n            ``\"rule\"``.\n\n            The ``value`` of this channel can be a number or a string ``\"width\"`` for\n            the width of the plot.\n        xError : str, :class:`XError`, Dict, :class:`XErrorValue`\n            Error value of x coordinates for error specified ``\"errorbar\"`` and\n            ``\"errorband\"``.\n        xError2 : str, :class:`XError2`, Dict, :class:`XError2Value`\n            Secondary error value of x coordinates for error specified ``\"errorbar\"``\n            and ``\"errorband\"``.\n        xOffset : str, :class:`XOffset`, Dict, :class:`XOffsetDatum`, :class:`XOffsetValue`\n            Offset of x-position of the marks\n        y : str, :class:`Y`, Dict, :class:`YDatum`, :class:`YValue`\n            Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"``\n            without specified ``y2`` or ``height``.\n\n            The ``value`` of this channel can be a number or a string ``\"height\"`` for\n            the height of the plot.\n        y2 : str, :class:`Y2`, Dict, :class:`Y2Datum`, :class:`Y2Value`\n            Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and\n            ``\"rule\"``.\n\n            The ``value`` of this channel can be a number or a string ``\"height\"`` for\n            the height of the plot.\n        yError : str, :class:`YError`, Dict, :class:`YErrorValue`\n            Error value of y coordinates for error specified ``\"errorbar\"`` and\n            ``\"errorband\"``.\n        yError2 : str, :class:`YError2`, Dict, :class:`YError2Value`\n            Secondary error value of y coordinates for error specified ``\"errorbar\"``\n            and ``\"errorband\"``.\n        yOffset : str, :class:`YOffset`, Dict, :class:`YOffsetDatum`, :class:`YOffsetValue`\n            Offset of y-position of the marks\n        \"\"\"\n        kwargs = {\n            \"angle\": angle,\n            \"color\": color,\n            \"column\": column,\n            \"description\": description,\n            \"detail\": detail,\n            \"facet\": facet,\n            \"fill\": fill,\n            \"fillOpacity\": fillOpacity,\n            \"href\": href,\n            \"key\": key,\n            \"latitude\": latitude,\n            \"latitude2\": latitude2,\n            \"longitude\": longitude,\n            \"longitude2\": longitude2,\n            \"opacity\": opacity,\n            \"order\": order,\n            \"radius\": radius,\n            \"radius2\": radius2,\n            \"row\": row,\n            \"shape\": shape,\n            \"size\": size,\n            \"stroke\": stroke,\n            \"strokeDash\": strokeDash,\n            \"strokeOpacity\": strokeOpacity,\n            \"strokeWidth\": strokeWidth,\n            \"text\": text,\n            \"theta\": theta,\n            \"theta2\": theta2,\n            \"time\": time,\n            \"tooltip\": tooltip,\n            \"url\": url,\n            \"x\": x,\n            \"x2\": x2,\n            \"xError\": xError,\n            \"xError2\": xError2,\n            \"xOffset\": xOffset,\n            \"y\": y,\n            \"y2\": y2,\n            \"yError\": yError,\n            \"yError2\": yError2,\n            \"yOffset\": yOffset,\n        }\n        if args:\n            kwargs = {k: v for k, v in kwargs.items() if v is not Undefined}\n\n        # Convert args to kwargs based on their types.\n        kwargs = _infer_encoding_types(args, kwargs)\n        # get a copy of the dict representation of the previous encoding\n        # ignore type as copy method comes from SchemaBase\n        copy = self.copy(deep=[\"encoding\"])  # type: ignore[attr-defined]\n        encoding = copy._get(\"encoding\", {})\n        if isinstance(encoding, core.VegaLiteSchema):\n            encoding = {k: v for k, v in encoding._kwds.items() if v is not Undefined}\n        # update with the new encodings, and apply them to the copy\n        encoding.update(kwargs)\n        copy.encoding = core.FacetedEncoding(**encoding)\n        return copy\n\n\nclass EncodeKwds(TypedDict, total=False):\n    \"\"\"\n    Encoding channels map properties of the data to visual properties of the chart.\n\n    Parameters\n    ----------\n    angle\n        Rotation angle of point and text marks.\n    color\n        Color of the marks - either fill or stroke color based on  the ``filled`` property\n        of mark definition. By default, ``color`` represents fill color for ``\"area\"``,\n        ``\"bar\"``, ``\"tick\"``, ``\"text\"``, ``\"trail\"``, ``\"circle\"``, and ``\"square\"`` /\n        stroke color for ``\"line\"`` and ``\"point\"``.\n\n        **Default value:** If undefined, the default color depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``color``\n        property.\n\n        *Note:* 1) For fine-grained control over both fill and stroke colors of the marks,\n        please use the ``fill`` and ``stroke`` channels. The ``fill`` or ``stroke``\n        encodings have higher precedence than ``color``, thus may override the ``color``\n        encoding if conflicting encodings are specified. 2) See the scale documentation for\n        more information about customizing `color scheme\n        <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__.\n    column\n        A field definition for the horizontal facet of trellis plots.\n    description\n        A text description of this mark for ARIA accessibility (SVG output only). For SVG\n        output the ``\"aria-label\"`` attribute will be set to this description.\n    detail\n        Additional levels of detail for grouping data in aggregate views and in line, trail,\n        and area marks without mapping data to a specific visual channel.\n    facet\n        A field definition for the (flexible) facet of trellis plots.\n\n        If either ``row`` or ``column`` is specified, this channel will be ignored.\n    fill\n        Fill color of the marks. **Default value:** If undefined, the default color depends\n        on `mark config <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s\n        ``color`` property.\n\n        *Note:* The ``fill`` encoding has higher precedence than ``color``, thus may\n        override the ``color`` encoding if conflicting encodings are specified.\n    fillOpacity\n        Fill opacity of the marks.\n\n        **Default value:** If undefined, the default opacity depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``fillOpacity``\n        property.\n    href\n        A URL to load upon mouse click.\n    key\n        A data field to use as a unique key for data binding. When a visualization's data is\n        updated, the key value will be used to match data elements to existing mark\n        instances. Use a key channel to enable object constancy for transitions over dynamic\n        data.\n    latitude\n        Latitude position of geographically projected marks.\n    latitude2\n        Latitude-2 position for geographically projected ranged ``\"area\"``, ``\"bar\"``,\n        ``\"rect\"``, and  ``\"rule\"``.\n    longitude\n        Longitude position of geographically projected marks.\n    longitude2\n        Longitude-2 position for geographically projected ranged ``\"area\"``, ``\"bar\"``,\n        ``\"rect\"``, and  ``\"rule\"``.\n    opacity\n        Opacity of the marks.\n\n        **Default value:** If undefined, the default opacity depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``opacity``\n        property.\n    order\n        Order of the marks.\n\n        * For stacked marks, this ``order`` channel encodes `stack order\n          <https://vega.github.io/vega-lite/docs/stack.html#order>`__.\n        * For line and trail marks, this ``order`` channel encodes order of data points in\n          the lines. This can be useful for creating `a connected scatterplot\n          <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__. Setting\n          ``order`` to ``{\"value\": null}`` makes the line marks use the original order in\n          the data sources.\n        * Otherwise, this ``order`` channel encodes layer order of the marks.\n\n        **Note**: In aggregate plots, ``order`` field should be aggregated to avoid creating\n        additional aggregation grouping.\n    radius\n        The outer radius in pixels of arc marks.\n    radius2\n        The inner radius in pixels of arc marks.\n    row\n        A field definition for the vertical facet of trellis plots.\n    shape\n        Shape of the mark.\n\n        1. For ``point`` marks the supported values include:   - plotting shapes:\n        ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``, ``\"triangle-up\"``,\n        ``\"triangle-down\"``, ``\"triangle-right\"``, or ``\"triangle-left\"``.   - the line\n        symbol ``\"stroke\"``   - centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or\n        ``\"triangle\"``   - a custom `SVG path string\n        <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n        sizing, custom shape paths should be defined within a square bounding box with\n        coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        2. For ``geoshape`` marks it should be a field definition of the geojson data\n\n        **Default value:** If undefined, the default shape depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#point-config>`__'s ``shape``\n        property. (``\"circle\"`` if unset.)\n    size\n        Size of the mark.\n\n        * For ``\"point\"``, ``\"square\"`` and ``\"circle\"``, - the symbol size, or pixel area\n          of the mark.\n        * For ``\"bar\"`` and ``\"tick\"`` - the bar and tick's size.\n        * For ``\"text\"`` - the text's font size.\n        * Size is unsupported for ``\"line\"``, ``\"area\"``, and ``\"rect\"``. (Use ``\"trail\"``\n          instead of line with varying size)\n    stroke\n        Stroke color of the marks. **Default value:** If undefined, the default color\n        depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``color``\n        property.\n\n        *Note:* The ``stroke`` encoding has higher precedence than ``color``, thus may\n        override the ``color`` encoding if conflicting encodings are specified.\n    strokeDash\n        Stroke dash of the marks.\n\n        **Default value:** ``[1,0]`` (No dash).\n    strokeOpacity\n        Stroke opacity of the marks.\n\n        **Default value:** If undefined, the default opacity depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s\n        ``strokeOpacity`` property.\n    strokeWidth\n        Stroke width of the marks.\n\n        **Default value:** If undefined, the default stroke width depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``strokeWidth``\n        property.\n    text\n        Text of the ``text`` mark.\n    theta\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    time\n\n    tooltip\n        The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding overrides\n        `the tooltip property in the mark definition\n        <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip in Vega-Lite.\n    url\n        The URL of an image mark.\n    x\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    xError\n        Error value of x coordinates for error specified ``\"errorbar\"`` and ``\"errorband\"``.\n    xError2\n        Secondary error value of x coordinates for error specified ``\"errorbar\"`` and\n        ``\"errorband\"``.\n    xOffset\n        Offset of x-position of the marks\n    y\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    yError\n        Error value of y coordinates for error specified ``\"errorbar\"`` and ``\"errorband\"``.\n    yError2\n        Secondary error value of y coordinates for error specified ``\"errorbar\"`` and\n        ``\"errorband\"``.\n    yOffset\n        Offset of y-position of the marks\n    \"\"\"\n\n    angle: str | AnyAngle | IntoCondition | Map\n    color: str | AnyColor | IntoCondition | Map\n    column: str | Column | IntoCondition | Map\n    description: str | AnyDescription | IntoCondition | Map\n    detail: OneOrSeq[str | Detail | IntoCondition | Map]\n    facet: str | Facet | IntoCondition | Map\n    fill: str | AnyFill | IntoCondition | Map\n    fillOpacity: str | AnyFillOpacity | IntoCondition | Map\n    href: str | AnyHref | IntoCondition | Map\n    key: str | Key | IntoCondition | Map\n    latitude: str | AnyLatitude | IntoCondition | Map\n    latitude2: str | AnyLatitude2 | IntoCondition | Map\n    longitude: str | AnyLongitude | IntoCondition | Map\n    longitude2: str | AnyLongitude2 | IntoCondition | Map\n    opacity: str | AnyOpacity | IntoCondition | Map\n    order: OneOrSeq[str | AnyOrder | IntoCondition | Map]\n    radius: str | AnyRadius | IntoCondition | Map\n    radius2: str | AnyRadius2 | IntoCondition | Map\n    row: str | Row | IntoCondition | Map\n    shape: str | AnyShape | IntoCondition | Map\n    size: str | AnySize | IntoCondition | Map\n    stroke: str | AnyStroke | IntoCondition | Map\n    strokeDash: str | AnyStrokeDash | IntoCondition | Map\n    strokeOpacity: str | AnyStrokeOpacity | IntoCondition | Map\n    strokeWidth: str | AnyStrokeWidth | IntoCondition | Map\n    text: str | AnyText | IntoCondition | Map\n    theta: str | AnyTheta | IntoCondition | Map\n    theta2: str | AnyTheta2 | IntoCondition | Map\n    time: str | Time | IntoCondition | Map\n    tooltip: OneOrSeq[str | AnyTooltip | IntoCondition | Map]\n    url: str | AnyUrl | IntoCondition | Map\n    x: str | AnyX | IntoCondition | Map\n    x2: str | AnyX2 | IntoCondition | Map\n    xError: str | AnyXError | IntoCondition | Map\n    xError2: str | AnyXError2 | IntoCondition | Map\n    xOffset: str | AnyXOffset | IntoCondition | Map\n    y: str | AnyY | IntoCondition | Map\n    y2: str | AnyY2 | IntoCondition | Map\n    yError: str | AnyYError | IntoCondition | Map\n    yError2: str | AnyYError2 | IntoCondition | Map\n    yOffset: str | AnyYOffset | IntoCondition | Map\n"
  },
  {
    "path": "altair/vegalite/v6/schema/core.py",
    "content": "# The contents of this file are automatically written by\n# tools/generate_schema_wrapper.py. Do not modify directly.\n\nfrom __future__ import annotations\n\nimport json\nimport pkgutil\nfrom typing import TYPE_CHECKING, Any, Literal\n\nfrom altair.utils.schemapi import (  # noqa: F401\n    SchemaBase,\n    Undefined,\n    UndefinedType,\n    _subclasses,\n)\n\nif TYPE_CHECKING:\n    # ruff: noqa: F405\n    from collections.abc import Iterator, Sequence\n\n    from altair import Parameter\n    from altair.typing import Optional\n    from altair.vegalite.v6.api import ChartDataType\n\n    from ._typing import *  # noqa: F403\n\n\n__all__ = [\n    \"URI\",\n    \"Aggregate\",\n    \"AggregateOp\",\n    \"AggregateTransform\",\n    \"AggregatedFieldDef\",\n    \"Align\",\n    \"AllSortString\",\n    \"AnyMark\",\n    \"AnyMarkConfig\",\n    \"AreaConfig\",\n    \"ArgmaxDef\",\n    \"ArgminDef\",\n    \"AutoSizeParams\",\n    \"AutosizeType\",\n    \"Axis\",\n    \"AxisConfig\",\n    \"AxisOrient\",\n    \"AxisResolveMap\",\n    \"BBox\",\n    \"BarConfig\",\n    \"BaseTitleNoValueRefs\",\n    \"Baseline\",\n    \"BinExtent\",\n    \"BinParams\",\n    \"BinTransform\",\n    \"BindCheckbox\",\n    \"BindDirect\",\n    \"BindInput\",\n    \"BindRadioSelect\",\n    \"BindRange\",\n    \"Binding\",\n    \"BinnedTimeUnit\",\n    \"Blend\",\n    \"BoxPlot\",\n    \"BoxPlotConfig\",\n    \"BoxPlotDef\",\n    \"BrushConfig\",\n    \"CalculateTransform\",\n    \"Categorical\",\n    \"ColorDef\",\n    \"ColorName\",\n    \"ColorScheme\",\n    \"CompositeMark\",\n    \"CompositeMarkDef\",\n    \"CompositionConfig\",\n    \"ConcatSpecGenericSpec\",\n    \"ConditionalAxisColor\",\n    \"ConditionalAxisLabelAlign\",\n    \"ConditionalAxisLabelBaseline\",\n    \"ConditionalAxisLabelFontStyle\",\n    \"ConditionalAxisLabelFontWeight\",\n    \"ConditionalAxisNumber\",\n    \"ConditionalAxisNumberArray\",\n    \"ConditionalAxisPropertyAlignnull\",\n    \"ConditionalAxisPropertyColornull\",\n    \"ConditionalAxisPropertyFontStylenull\",\n    \"ConditionalAxisPropertyFontWeightnull\",\n    \"ConditionalAxisPropertyTextBaselinenull\",\n    \"ConditionalAxisPropertynumberArraynull\",\n    \"ConditionalAxisPropertynumbernull\",\n    \"ConditionalAxisPropertystringnull\",\n    \"ConditionalAxisString\",\n    \"ConditionalMarkPropFieldOrDatumDef\",\n    \"ConditionalMarkPropFieldOrDatumDefTypeForShape\",\n    \"ConditionalParameterMarkPropFieldOrDatumDef\",\n    \"ConditionalParameterMarkPropFieldOrDatumDefTypeForShape\",\n    \"ConditionalParameterStringFieldDef\",\n    \"ConditionalParameterValueDefGradientstringnullExprRef\",\n    \"ConditionalParameterValueDefTextExprRef\",\n    \"ConditionalParameterValueDefnumber\",\n    \"ConditionalParameterValueDefnumberArrayExprRef\",\n    \"ConditionalParameterValueDefnumberExprRef\",\n    \"ConditionalParameterValueDefstringExprRef\",\n    \"ConditionalParameterValueDefstringnullExprRef\",\n    \"ConditionalPredicateMarkPropFieldOrDatumDef\",\n    \"ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape\",\n    \"ConditionalPredicateStringFieldDef\",\n    \"ConditionalPredicateValueDefAlignnullExprRef\",\n    \"ConditionalPredicateValueDefColornullExprRef\",\n    \"ConditionalPredicateValueDefFontStylenullExprRef\",\n    \"ConditionalPredicateValueDefFontWeightnullExprRef\",\n    \"ConditionalPredicateValueDefGradientstringnullExprRef\",\n    \"ConditionalPredicateValueDefTextBaselinenullExprRef\",\n    \"ConditionalPredicateValueDefTextExprRef\",\n    \"ConditionalPredicateValueDefnumber\",\n    \"ConditionalPredicateValueDefnumberArrayExprRef\",\n    \"ConditionalPredicateValueDefnumberArraynullExprRef\",\n    \"ConditionalPredicateValueDefnumberExprRef\",\n    \"ConditionalPredicateValueDefnumbernullExprRef\",\n    \"ConditionalPredicateValueDefstringExprRef\",\n    \"ConditionalPredicateValueDefstringnullExprRef\",\n    \"ConditionalStringFieldDef\",\n    \"ConditionalValueDefGradientstringnullExprRef\",\n    \"ConditionalValueDefTextExprRef\",\n    \"ConditionalValueDefnumber\",\n    \"ConditionalValueDefnumberArrayExprRef\",\n    \"ConditionalValueDefnumberExprRef\",\n    \"ConditionalValueDefstringExprRef\",\n    \"ConditionalValueDefstringnullExprRef\",\n    \"Config\",\n    \"CsvDataFormat\",\n    \"Cursor\",\n    \"Cyclical\",\n    \"Data\",\n    \"DataFormat\",\n    \"DataSource\",\n    \"Datasets\",\n    \"DateTime\",\n    \"DatumDef\",\n    \"Day\",\n    \"DensityTransform\",\n    \"DerivedStream\",\n    \"DictInlineDataset\",\n    \"DictSelectionInit\",\n    \"DictSelectionInitInterval\",\n    \"Diverging\",\n    \"DomainUnionWith\",\n    \"DsvDataFormat\",\n    \"Element\",\n    \"Encoding\",\n    \"EncodingSortField\",\n    \"ErrorBand\",\n    \"ErrorBandConfig\",\n    \"ErrorBandDef\",\n    \"ErrorBar\",\n    \"ErrorBarConfig\",\n    \"ErrorBarDef\",\n    \"ErrorBarExtent\",\n    \"EventStream\",\n    \"EventType\",\n    \"Expr\",\n    \"ExprRef\",\n    \"ExtentTransform\",\n    \"FacetEncodingFieldDef\",\n    \"FacetFieldDef\",\n    \"FacetSpec\",\n    \"FacetedEncoding\",\n    \"FacetedUnitSpec\",\n    \"Feature\",\n    \"FeatureCollection\",\n    \"FeatureGeometryGeoJsonProperties\",\n    \"Field\",\n    \"FieldDefWithoutScale\",\n    \"FieldEqualPredicate\",\n    \"FieldGTEPredicate\",\n    \"FieldGTPredicate\",\n    \"FieldLTEPredicate\",\n    \"FieldLTPredicate\",\n    \"FieldName\",\n    \"FieldOneOfPredicate\",\n    \"FieldOrDatumDefWithConditionDatumDefGradientstringnull\",\n    \"FieldOrDatumDefWithConditionDatumDefnumber\",\n    \"FieldOrDatumDefWithConditionDatumDefnumberArray\",\n    \"FieldOrDatumDefWithConditionDatumDefstringnull\",\n    \"FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull\",\n    \"FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull\",\n    \"FieldOrDatumDefWithConditionMarkPropFieldDefnumber\",\n    \"FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray\",\n    \"FieldOrDatumDefWithConditionStringDatumDefText\",\n    \"FieldOrDatumDefWithConditionStringFieldDefText\",\n    \"FieldOrDatumDefWithConditionStringFieldDefstring\",\n    \"FieldRange\",\n    \"FieldRangePredicate\",\n    \"FieldValidPredicate\",\n    \"FilterTransform\",\n    \"Fit\",\n    \"FlattenTransform\",\n    \"FoldTransform\",\n    \"FontStyle\",\n    \"FontWeight\",\n    \"Format\",\n    \"FormatConfig\",\n    \"Generator\",\n    \"GenericUnitSpecEncodingAnyMark\",\n    \"GeoJsonFeature\",\n    \"GeoJsonFeatureCollection\",\n    \"GeoJsonProperties\",\n    \"Geometry\",\n    \"GeometryCollection\",\n    \"Gradient\",\n    \"GradientStop\",\n    \"GraticuleGenerator\",\n    \"GraticuleParams\",\n    \"HConcatSpecGenericSpec\",\n    \"Header\",\n    \"HeaderConfig\",\n    \"HexColor\",\n    \"ImputeMethod\",\n    \"ImputeParams\",\n    \"ImputeSequence\",\n    \"ImputeTransform\",\n    \"InlineData\",\n    \"InlineDataset\",\n    \"Interpolate\",\n    \"IntervalSelectionConfig\",\n    \"IntervalSelectionConfigWithoutType\",\n    \"JoinAggregateFieldDef\",\n    \"JoinAggregateTransform\",\n    \"JsonDataFormat\",\n    \"LabelOverlap\",\n    \"LatLongDef\",\n    \"LatLongFieldDef\",\n    \"LayerRepeatMapping\",\n    \"LayerRepeatSpec\",\n    \"LayerSpec\",\n    \"LayoutAlign\",\n    \"Legend\",\n    \"LegendBinding\",\n    \"LegendConfig\",\n    \"LegendOrient\",\n    \"LegendResolveMap\",\n    \"LegendStreamBinding\",\n    \"LineConfig\",\n    \"LineString\",\n    \"LinearGradient\",\n    \"LocalMultiTimeUnit\",\n    \"LocalSingleTimeUnit\",\n    \"Locale\",\n    \"LoessTransform\",\n    \"LogicalAndPredicate\",\n    \"LogicalNotPredicate\",\n    \"LogicalOrPredicate\",\n    \"LookupSelection\",\n    \"LookupTransform\",\n    \"Mark\",\n    \"MarkConfig\",\n    \"MarkDef\",\n    \"MarkInvalidDataMode\",\n    \"MarkPropDefGradientstringnull\",\n    \"MarkPropDefnumber\",\n    \"MarkPropDefnumberArray\",\n    \"MarkPropDefstringnullTypeForShape\",\n    \"MarkType\",\n    \"MergedStream\",\n    \"Month\",\n    \"MultiLineString\",\n    \"MultiPoint\",\n    \"MultiPolygon\",\n    \"MultiTimeUnit\",\n    \"NamedData\",\n    \"NonArgAggregateOp\",\n    \"NonLayerRepeatSpec\",\n    \"NonNormalizedSpec\",\n    \"NumberLocale\",\n    \"NumericArrayMarkPropDef\",\n    \"NumericMarkPropDef\",\n    \"OffsetDef\",\n    \"OrderFieldDef\",\n    \"OrderOnlyDef\",\n    \"OrderValueDef\",\n    \"Orient\",\n    \"Orientation\",\n    \"OverlayMarkDef\",\n    \"Padding\",\n    \"ParameterExtent\",\n    \"ParameterName\",\n    \"ParameterPredicate\",\n    \"Parse\",\n    \"ParseValue\",\n    \"PivotTransform\",\n    \"Point\",\n    \"PointSelectionConfig\",\n    \"PointSelectionConfigWithoutType\",\n    \"PolarDef\",\n    \"Polygon\",\n    \"Position\",\n    \"Position2Def\",\n    \"PositionDatumDef\",\n    \"PositionDatumDefBase\",\n    \"PositionDef\",\n    \"PositionFieldDef\",\n    \"PositionFieldDefBase\",\n    \"PositionValueDef\",\n    \"Predicate\",\n    \"PredicateComposition\",\n    \"PrimitiveValue\",\n    \"Projection\",\n    \"ProjectionConfig\",\n    \"ProjectionType\",\n    \"QuantileTransform\",\n    \"RadialGradient\",\n    \"RangeConfig\",\n    \"RangeEnum\",\n    \"RangeRaw\",\n    \"RangeRawArray\",\n    \"RangeScheme\",\n    \"RectConfig\",\n    \"RegressionTransform\",\n    \"RelativeBandSize\",\n    \"RepeatMapping\",\n    \"RepeatRef\",\n    \"RepeatSpec\",\n    \"Resolve\",\n    \"ResolveMode\",\n    \"Root\",\n    \"RowColLayoutAlign\",\n    \"RowColboolean\",\n    \"RowColnumber\",\n    \"RowColumnEncodingFieldDef\",\n    \"SampleTransform\",\n    \"Scale\",\n    \"ScaleBinParams\",\n    \"ScaleBins\",\n    \"ScaleConfig\",\n    \"ScaleDatumDef\",\n    \"ScaleFieldDef\",\n    \"ScaleInterpolateEnum\",\n    \"ScaleInterpolateParams\",\n    \"ScaleInvalidDataConfig\",\n    \"ScaleInvalidDataShowAsValueangle\",\n    \"ScaleInvalidDataShowAsValuecolor\",\n    \"ScaleInvalidDataShowAsValuefill\",\n    \"ScaleInvalidDataShowAsValuefillOpacity\",\n    \"ScaleInvalidDataShowAsValueopacity\",\n    \"ScaleInvalidDataShowAsValueradius\",\n    \"ScaleInvalidDataShowAsValueshape\",\n    \"ScaleInvalidDataShowAsValuesize\",\n    \"ScaleInvalidDataShowAsValuestroke\",\n    \"ScaleInvalidDataShowAsValuestrokeDash\",\n    \"ScaleInvalidDataShowAsValuestrokeOpacity\",\n    \"ScaleInvalidDataShowAsValuestrokeWidth\",\n    \"ScaleInvalidDataShowAsValuetheta\",\n    \"ScaleInvalidDataShowAsValuetime\",\n    \"ScaleInvalidDataShowAsValuex\",\n    \"ScaleInvalidDataShowAsValuexOffset\",\n    \"ScaleInvalidDataShowAsValuey\",\n    \"ScaleInvalidDataShowAsValueyOffset\",\n    \"ScaleInvalidDataShowAsangle\",\n    \"ScaleInvalidDataShowAscolor\",\n    \"ScaleInvalidDataShowAsfill\",\n    \"ScaleInvalidDataShowAsfillOpacity\",\n    \"ScaleInvalidDataShowAsopacity\",\n    \"ScaleInvalidDataShowAsradius\",\n    \"ScaleInvalidDataShowAsshape\",\n    \"ScaleInvalidDataShowAssize\",\n    \"ScaleInvalidDataShowAsstroke\",\n    \"ScaleInvalidDataShowAsstrokeDash\",\n    \"ScaleInvalidDataShowAsstrokeOpacity\",\n    \"ScaleInvalidDataShowAsstrokeWidth\",\n    \"ScaleInvalidDataShowAstheta\",\n    \"ScaleInvalidDataShowAstime\",\n    \"ScaleInvalidDataShowAsx\",\n    \"ScaleInvalidDataShowAsxOffset\",\n    \"ScaleInvalidDataShowAsy\",\n    \"ScaleInvalidDataShowAsyOffset\",\n    \"ScaleResolveMap\",\n    \"ScaleType\",\n    \"SchemaBase\",\n    \"SchemeParams\",\n    \"SecondaryFieldDef\",\n    \"SelectionConfig\",\n    \"SelectionInit\",\n    \"SelectionInitInterval\",\n    \"SelectionInitIntervalMapping\",\n    \"SelectionInitMapping\",\n    \"SelectionParameter\",\n    \"SelectionResolution\",\n    \"SelectionType\",\n    \"SequenceGenerator\",\n    \"SequenceParams\",\n    \"SequentialMultiHue\",\n    \"SequentialSingleHue\",\n    \"ShapeDef\",\n    \"SharedEncoding\",\n    \"SingleDefUnitChannel\",\n    \"SingleTimeUnit\",\n    \"Sort\",\n    \"SortArray\",\n    \"SortByChannel\",\n    \"SortByChannelDesc\",\n    \"SortByEncoding\",\n    \"SortField\",\n    \"SortOrder\",\n    \"Spec\",\n    \"SphereGenerator\",\n    \"StackOffset\",\n    \"StackTransform\",\n    \"StandardType\",\n    \"Step\",\n    \"StepFor\",\n    \"Stream\",\n    \"StringFieldDef\",\n    \"StringFieldDefWithCondition\",\n    \"StringValueDefWithCondition\",\n    \"StrokeCap\",\n    \"StrokeJoin\",\n    \"StyleConfigIndex\",\n    \"SymbolShape\",\n    \"TextBaseline\",\n    \"TextDef\",\n    \"TextDirection\",\n    \"TickConfig\",\n    \"TickCount\",\n    \"TimeDef\",\n    \"TimeFieldDef\",\n    \"TimeFormatSpecifier\",\n    \"TimeInterval\",\n    \"TimeIntervalStep\",\n    \"TimeLocale\",\n    \"TimeUnit\",\n    \"TimeUnitParams\",\n    \"TimeUnitTransform\",\n    \"TimeUnitTransformParams\",\n    \"TitleAnchor\",\n    \"TitleConfig\",\n    \"TitleFrame\",\n    \"TitleOrient\",\n    \"TitleParams\",\n    \"TooltipContent\",\n    \"TopLevelConcatSpec\",\n    \"TopLevelFacetSpec\",\n    \"TopLevelHConcatSpec\",\n    \"TopLevelLayerSpec\",\n    \"TopLevelParameter\",\n    \"TopLevelRepeatSpec\",\n    \"TopLevelSelectionParameter\",\n    \"TopLevelSpec\",\n    \"TopLevelUnitSpec\",\n    \"TopLevelVConcatSpec\",\n    \"TopoDataFormat\",\n    \"Transform\",\n    \"Type\",\n    \"TypeForShape\",\n    \"TypedFieldDef\",\n    \"UnitSpec\",\n    \"UnitSpecWithFrame\",\n    \"UrlData\",\n    \"UtcMultiTimeUnit\",\n    \"UtcSingleTimeUnit\",\n    \"VConcatSpecGenericSpec\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefnumber\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray\",\n    \"ValueDefWithConditionMarkPropFieldOrDatumDefstringnull\",\n    \"ValueDefWithConditionStringFieldDefText\",\n    \"ValueDefnumber\",\n    \"ValueDefnumberwidthheightExprRef\",\n    \"VariableParameter\",\n    \"Vector2DateTime\",\n    \"Vector2Vector2number\",\n    \"Vector2boolean\",\n    \"Vector2number\",\n    \"Vector2string\",\n    \"Vector3number\",\n    \"Vector7string\",\n    \"Vector10string\",\n    \"Vector12string\",\n    \"VegaLiteSchema\",\n    \"ViewBackground\",\n    \"ViewConfig\",\n    \"WindowEventType\",\n    \"WindowFieldDef\",\n    \"WindowOnlyOp\",\n    \"WindowTransform\",\n    \"load_schema\",\n]\n\n\ndef load_schema() -> dict:\n    \"\"\"Load the json schema associated with this module's functions.\"\"\"\n    schema_bytes = pkgutil.get_data(__name__, \"vega-lite-schema.json\")\n    if schema_bytes is None:\n        msg = \"Unable to load vega-lite-schema.json\"\n        raise ValueError(msg)\n    return json.loads(schema_bytes.decode(\"utf-8\"))\n\n\nclass VegaLiteSchema(SchemaBase):\n    _rootschema = load_schema()\n\n    @classmethod\n    def _default_wrapper_classes(cls) -> Iterator[type[Any]]:\n        return _subclasses(VegaLiteSchema)\n\n\nclass Root(VegaLiteSchema):\n    \"\"\"\n    Root schema wrapper.\n\n    A Vega-Lite top-level specification. This is the root class for all Vega-Lite\n    specifications. (The json schema is generated from this type.)\n    \"\"\"\n\n    _schema = VegaLiteSchema._rootschema\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass Aggregate(VegaLiteSchema):\n    \"\"\"Aggregate schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Aggregate\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass AggregateOp(VegaLiteSchema):\n    \"\"\"AggregateOp schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/AggregateOp\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass AggregatedFieldDef(VegaLiteSchema):\n    \"\"\"\n    AggregatedFieldDef schema wrapper.\n\n    Parameters\n    ----------\n    op : :class:`AggregateOp`, Literal['argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        The aggregation operation to apply to the fields (e.g., ``\"sum\"``, ``\"average\"``, or\n        ``\"count\"``). See the `full list of supported aggregation operations\n        <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__ for more information.\n    field : str, :class:`FieldName`\n        The data field for which to compute aggregate function. This is required for all\n        aggregation operations except ``\"count\"``.\n    as : str, :class:`FieldName`\n        The output field names to use for each aggregated field.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/AggregatedFieldDef\"}\n\n    def __init__(\n        self,\n        op: Optional[SchemaBase | AggregateOp_T] = Undefined,\n        field: Optional[str | SchemaBase] = Undefined,\n        **kwds,\n    ):\n        super().__init__(op=op, field=field, **kwds)\n\n\nclass Align(VegaLiteSchema):\n    \"\"\"Align schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Align\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass AnyMark(VegaLiteSchema):\n    \"\"\"AnyMark schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/AnyMark\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass AnyMarkConfig(VegaLiteSchema):\n    \"\"\"AnyMarkConfig schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/AnyMarkConfig\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass AreaConfig(AnyMarkConfig):\n    \"\"\"\n    AreaConfig schema wrapper.\n\n    Parameters\n    ----------\n    align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).\n        One of ``\"left\"``, ``\"right\"``, ``\"center\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    angle : dict, float, :class:`ExprRef`\n        The rotation angle of the text, in degrees.\n    aria : bool, dict, :class:`ExprRef`\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG element, removing the mark item from the ARIA accessibility tree.\n    ariaRole : str, dict, :class:`ExprRef`\n        Sets the type of user interface element of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"role\" attribute. Warning: this\n        property is experimental and may be changed in the future.\n    ariaRoleDescription : str, dict, :class:`ExprRef`\n        A human-readable, author-localized description for the role of the mark item for\n        `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"aria-roledescription\" attribute.\n        Warning: this property is experimental and may be changed in the future.\n    aspect : bool, dict, :class:`ExprRef`\n        Whether to keep aspect ratio of image marks.\n    baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        For text marks, the vertical text baseline. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, ``\"line-bottom\"``, or an\n        expression reference that provides one of the valid values. The ``\"line-top\"`` and\n        ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but are\n        calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.\n\n        For range marks, the vertical alignment of the marks. One of ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    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']\n        The color blend mode for drawing an item on its current background. Any valid `CSS\n        mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__\n        value can be used.\n\n        **Default value:** ``\"source-over\"``\n    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']\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    cornerRadius : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cornerRadiusBottomLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom left corner.\n\n        **Default value:** ``0``\n    cornerRadiusBottomRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top left corner.\n\n        **Default value:** ``0``\n    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']\n        The mouse cursor used over the mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    description : str, dict, :class:`ExprRef`\n        A text description of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.\n    dir : dict, :class:`ExprRef`, Literal['ltr', 'rtl'], :class:`TextDirection`\n        The direction of the text. One of ``\"ltr\"`` (left-to-right) or ``\"rtl\"``\n        (right-to-left). This property determines on which side is truncated in response to\n        the limit parameter.\n\n        **Default value:** ``\"ltr\"``\n    dx : dict, float, :class:`ExprRef`\n        The horizontal offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    dy : dict, float, :class:`ExprRef`\n        The vertical offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    ellipsis : str, dict, :class:`ExprRef`\n        The ellipsis string for text truncated in response to the limit parameter.\n\n        **Default value:** ``\"…\"``\n    endAngle : dict, float, :class:`ExprRef`\n        The end angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    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\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    fillOpacity : dict, float, :class:`ExprRef`\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    filled : bool\n        Whether the mark's color should be used as fill color instead of stroke color.\n\n        **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well\n        as ``geoshape`` marks for `graticule\n        <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;\n        otherwise, ``true``.\n\n        **Note:** This property cannot be used in a `style config\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n    font : str, dict, :class:`ExprRef`\n        The typeface to set the text in (e.g., ``\"Helvetica Neue\"``).\n    fontSize : dict, float, :class:`ExprRef`\n        The font size, in pixels.\n\n        **Default value:** ``11``\n    fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style (e.g., ``\"italic\"``).\n    fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        The font weight. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``) or a\n        number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400`` and\n        ``\"bold\"`` = ``700``).\n    height : dict, float, :class:`ExprRef`\n        Height of the marks.\n    href : str, dict, :class:`URI`, :class:`ExprRef`\n        A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\n    innerRadius : dict, float, :class:`ExprRef`\n        The inner radius in pixels of arc marks. ``innerRadius`` is an alias for\n        ``radius2``.\n\n        **Default value:** ``0``\n    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']\n        The line interpolation method to use for line and area marks. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"step-before\"``: alternate between vertical and horizontal segments, as in a\n          step function.\n        * ``\"step-after\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    limit : dict, float, :class:`ExprRef`\n        The maximum length of the text mark in pixels. The text value will be automatically\n        truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0`` -- indicating no limit\n    line : bool, dict, :class:`OverlayMarkDef`\n        A flag for overlaying line on top of area marks, or an object defining the\n        properties of the overlayed lines.\n\n        * If this value is an empty object (``{}``) or ``true``, lines with default\n          properties will be used.\n\n        * If this value is ``false``, no lines would be automatically added to area marks.\n\n        **Default value:** ``false``.\n    lineBreak : str, dict, :class:`ExprRef`\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property is ignored if the text is array-valued.\n    lineHeight : dict, float, :class:`ExprRef`\n        The line height in pixels (the spacing between subsequent lines of text) for\n        multi-line text marks.\n    opacity : dict, float, :class:`ExprRef`\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    order : bool, None\n        For line and trail marks, this ``order`` property can be set to ``null`` or\n        ``false`` to make the lines use the original order in the data sources.\n    orient : :class:`Orientation`, Literal['horizontal', 'vertical']\n        The orientation of a non-stacked bar, tick, area, and line charts. The value is\n        either horizontal (default) or vertical.\n\n        * For bar, rule and tick, this determines whether the size of the bar and tick\n          should be applied to x or y dimension.\n        * For area, this property determines the orient property of the Vega output.\n        * For line and trail marks, this property determines the sort order of the points in\n          the line if ``config.sortLineBy`` is not specified. For stacked charts, this is\n          always determined by the orientation of the stack; therefore explicitly specified\n          value will be ignored.\n    outerRadius : dict, float, :class:`ExprRef`\n        The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.\n\n        **Default value:** ``0``\n    padAngle : dict, float, :class:`ExprRef`\n        The angular padding applied to sides of the arc, in radians.\n    point : bool, dict, Literal['transparent'], :class:`OverlayMarkDef`\n        A flag for overlaying points on top of line or area marks, or an object defining the\n        properties of the overlayed points.\n\n        * If this property is ``\"transparent\"``, transparent points will be used (for\n          enhancing tooltips and selections).\n\n        * If this property is an empty object (``{}``) or ``true``, filled points with\n          default properties will be used.\n\n        * If this property is ``false``, no points would be automatically added to line or\n          area marks.\n\n        **Default value:** ``false``.\n    radius : dict, float, :class:`ExprRef`\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    radius2 : dict, float, :class:`ExprRef`\n        The secondary (inner) radius in pixels of arc marks.\n\n        **Default value:** ``0``\n    shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    size : dict, float, :class:`ExprRef`\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    smooth : bool, dict, :class:`ExprRef`\n        A boolean flag (default true) indicating if the image should be smoothed when\n        resized. If false, individual pixels should be scaled directly rather than\n        interpolated with smoothing. For SVG rendering, this option may not work in some\n        browsers due to lack of standardization.\n    startAngle : dict, float, :class:`ExprRef`\n        The start angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    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\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash : dict, Sequence[float], :class:`ExprRef`\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset : dict, float, :class:`ExprRef`\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit : dict, float, :class:`ExprRef`\n        The miter limit at which to bevel a line join.\n    strokeOffset : dict, float, :class:`ExprRef`\n        The offset in pixels at which to draw the group stroke and fill. If unspecified, the\n        default behavior is to dynamically offset stroked groups such that 1 pixel stroke\n        widths align with the pixel grid.\n    strokeOpacity : dict, float, :class:`ExprRef`\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth : dict, float, :class:`ExprRef`\n        The stroke width, in pixels.\n    tension : dict, float, :class:`ExprRef`\n        Depending on the interpolation type, sets the tension parameter (for line and area\n        marks).\n    text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`\n        Placeholder text if the ``text`` channel is not specified\n    theta : dict, float, :class:`ExprRef`\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2 : dict, float, :class:`ExprRef`\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    time : dict, float, :class:`ExprRef`\n\n    timeUnitBandPosition : float\n        Default relative band position for a time unit. If set to ``0``, the marks will be\n        positioned at the beginning of the time unit band step. If set to ``0.5``, the marks\n        will be positioned in the middle of the time unit band step.\n    timeUnitBandSize : float\n        Default relative band size for a time unit. If set to ``1``, the bandwidth of the\n        marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the\n        marks will be half of the time unit band step.\n    tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None\n        The tooltip text string to show upon mouse hover or an object defining which fields\n        should the tooltip be derived from.\n\n        * If ``tooltip`` is ``true`` or ``{\"content\": \"encoding\"}``, then all fields from\n          ``encoding`` will be used.\n        * If ``tooltip`` is ``{\"content\": \"data\"}``, then all fields that appear in the\n          highlighted data point will be used.\n        * If set to ``null`` or ``false``, then no tooltip will be used.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n        **Default value:** ``null``\n    url : str, dict, :class:`URI`, :class:`ExprRef`\n        The URL of the image file for image marks.\n    width : dict, float, :class:`ExprRef`\n        Width of the marks.\n    x : dict, float, :class:`ExprRef`, Literal['width']\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2 : dict, float, :class:`ExprRef`, Literal['width']\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    y : dict, float, :class:`ExprRef`, Literal['height']\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2 : dict, float, :class:`ExprRef`, Literal['height']\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/AreaConfig\"}\n\n    def __init__(\n        self,\n        align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        angle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined,\n        blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined,\n        color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusBottomLeft: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusBottomRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusTopRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined,\n        dx: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        dy: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        endAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fill: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        filled: Optional[bool] = Undefined,\n        font: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined,\n        height: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        href: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined,\n        invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined,\n        limit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        line: Optional[bool | SchemaBase | Map] = Undefined,\n        lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        order: Optional[bool | None] = Undefined,\n        orient: Optional[SchemaBase | Orientation_T] = Undefined,\n        outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        point: Optional[bool | SchemaBase | Literal[\"transparent\"] | Map] = Undefined,\n        radius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        shape: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        size: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        startAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        stroke: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        strokeDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined,\n        strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tension: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n        theta: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        time: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        timeUnitBandPosition: Optional[float] = Undefined,\n        timeUnitBandSize: Optional[float] = Undefined,\n        tooltip: Optional[\n            str | bool | float | Parameter | SchemaBase | Map | None\n        ] = Undefined,\n        url: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        width: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        x: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        x2: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        y: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        y2: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            align=align,\n            angle=angle,\n            aria=aria,\n            ariaRole=ariaRole,\n            ariaRoleDescription=ariaRoleDescription,\n            aspect=aspect,\n            baseline=baseline,\n            blend=blend,\n            color=color,\n            cornerRadius=cornerRadius,\n            cornerRadiusBottomLeft=cornerRadiusBottomLeft,\n            cornerRadiusBottomRight=cornerRadiusBottomRight,\n            cornerRadiusTopLeft=cornerRadiusTopLeft,\n            cornerRadiusTopRight=cornerRadiusTopRight,\n            cursor=cursor,\n            description=description,\n            dir=dir,\n            dx=dx,\n            dy=dy,\n            ellipsis=ellipsis,\n            endAngle=endAngle,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            filled=filled,\n            font=font,\n            fontSize=fontSize,\n            fontStyle=fontStyle,\n            fontWeight=fontWeight,\n            height=height,\n            href=href,\n            innerRadius=innerRadius,\n            interpolate=interpolate,\n            invalid=invalid,\n            limit=limit,\n            line=line,\n            lineBreak=lineBreak,\n            lineHeight=lineHeight,\n            opacity=opacity,\n            order=order,\n            orient=orient,\n            outerRadius=outerRadius,\n            padAngle=padAngle,\n            point=point,\n            radius=radius,\n            radius2=radius2,\n            shape=shape,\n            size=size,\n            smooth=smooth,\n            startAngle=startAngle,\n            stroke=stroke,\n            strokeCap=strokeCap,\n            strokeDash=strokeDash,\n            strokeDashOffset=strokeDashOffset,\n            strokeJoin=strokeJoin,\n            strokeMiterLimit=strokeMiterLimit,\n            strokeOffset=strokeOffset,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            tension=tension,\n            text=text,\n            theta=theta,\n            theta2=theta2,\n            time=time,\n            timeUnitBandPosition=timeUnitBandPosition,\n            timeUnitBandSize=timeUnitBandSize,\n            tooltip=tooltip,\n            url=url,\n            width=width,\n            x=x,\n            x2=x2,\n            y=y,\n            y2=y2,\n            **kwds,\n        )\n\n\nclass ArgmaxDef(Aggregate):\n    \"\"\"\n    ArgmaxDef schema wrapper.\n\n    Parameters\n    ----------\n    argmax : str, :class:`FieldName`\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ArgmaxDef\"}\n\n    def __init__(self, argmax: Optional[str | SchemaBase] = Undefined, **kwds):\n        super().__init__(argmax=argmax, **kwds)\n\n\nclass ArgminDef(Aggregate):\n    \"\"\"\n    ArgminDef schema wrapper.\n\n    Parameters\n    ----------\n    argmin : str, :class:`FieldName`\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ArgminDef\"}\n\n    def __init__(self, argmin: Optional[str | SchemaBase] = Undefined, **kwds):\n        super().__init__(argmin=argmin, **kwds)\n\n\nclass AutoSizeParams(VegaLiteSchema):\n    \"\"\"\n    AutoSizeParams schema wrapper.\n\n    Parameters\n    ----------\n    contains : Literal['content', 'padding']\n        Determines how size calculation should be performed, one of ``\"content\"`` or\n        ``\"padding\"``. The default setting (``\"content\"``) interprets the width and height\n        settings as the data rectangle (plotting) dimensions, to which padding is then\n        added. In contrast, the ``\"padding\"`` setting includes the padding within the view\n        size calculations, such that the width and height settings indicate the **total**\n        intended size of the view.\n\n        **Default value**: ``\"content\"``\n    resize : bool\n        A boolean flag indicating if autosize layout should be re-calculated on every view\n        update.\n\n        **Default value**: ``false``\n    type : :class:`AutosizeType`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y']\n        The sizing format type. One of ``\"pad\"``, ``\"fit\"``, ``\"fit-x\"``, ``\"fit-y\"``,  or\n        ``\"none\"``. See the `autosize type\n        <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ documentation for\n        descriptions of each.\n\n        **Default value**: ``\"pad\"``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/AutoSizeParams\"}\n\n    def __init__(\n        self,\n        contains: Optional[Literal[\"content\", \"padding\"]] = Undefined,\n        resize: Optional[bool] = Undefined,\n        type: Optional[SchemaBase | AutosizeType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(contains=contains, resize=resize, type=type, **kwds)\n\n\nclass AutosizeType(VegaLiteSchema):\n    \"\"\"AutosizeType schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/AutosizeType\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Axis(VegaLiteSchema):\n    \"\"\"\n    Axis schema wrapper.\n\n    Parameters\n    ----------\n    aria : bool, dict, :class:`ExprRef`\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG group, removing the axis from the ARIA accessibility tree.\n\n        **Default value:** ``true``\n    bandPosition : dict, float, :class:`ExprRef`\n        An interpolation fraction indicating where, for ``band`` scales, axis ticks should\n        be positioned. A value of ``0`` places ticks at the left edge of their bands. A\n        value of ``0.5`` places ticks in the middle of their bands.\n\n        **Default value:** ``0.5``\n    description : str, dict, :class:`ExprRef`\n        A text description of this axis for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If the ``aria`` property is true, for SVG output the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__\n        will be set to this description. If the description is unspecified it will be\n        automatically generated.\n    domain : bool\n        A boolean flag indicating if the domain (the axis baseline) should be included as\n        part of the axis.\n\n        **Default value:** ``true``\n    domainCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for the domain line's ending style. One of ``\"butt\"``, ``\"round\"`` or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    domainColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Color of axis domain line.\n\n        **Default value:** ``\"gray\"``.\n    domainDash : dict, Sequence[float], :class:`ExprRef`\n        An array of alternating [stroke, space] lengths for dashed domain lines.\n    domainDashOffset : dict, float, :class:`ExprRef`\n        The pixel offset at which to start drawing with the domain dash array.\n    domainOpacity : dict, float, :class:`ExprRef`\n        Opacity of the axis domain line.\n    domainWidth : dict, float, :class:`ExprRef`\n        Stroke width of axis domain line\n\n        **Default value:** ``1``\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    grid : bool\n        A boolean flag indicating if grid lines should be included as part of the axis\n\n        **Default value:** ``true`` for `continuous scales\n        <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ that are not\n        binned; otherwise, ``false``.\n    gridCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for grid lines' ending style. One of ``\"butt\"``, ``\"round\"`` or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    gridColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, 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\n        Color of gridlines.\n\n        **Default value:** ``\"lightGray\"``.\n    gridDash : dict, Sequence[float], :class:`ExprRef`, :class:`ConditionalAxisNumberArray`\n        An array of alternating [stroke, space] lengths for dashed grid lines.\n    gridDashOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The pixel offset at which to start drawing with the grid dash array.\n    gridOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The stroke opacity of grid (value between [0,1])\n\n        **Default value:** ``1``\n    gridWidth : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The grid width, in pixels.\n\n        **Default value:** ``1``\n    labelAlign : dict, :class:`Align`, :class:`ExprRef`, :class:`ConditionalAxisLabelAlign`, Literal['left', 'center', 'right']\n        Horizontal text alignment of axis tick labels, overriding the default setting for\n        the current axis orientation.\n    labelAngle : dict, float, :class:`ExprRef`\n        The rotation angle of the axis labels.\n\n        **Default value:** ``-90`` for nominal and ordinal fields; ``0`` otherwise.\n    labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, :class:`ConditionalAxisLabelBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        Vertical text baseline of axis tick labels, overriding the default setting for the\n        current axis orientation. One of ``\"alphabetic\"`` (default), ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or ``\"line-bottom\"``. The ``\"line-top\"``\n        and ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but\n        are calculated relative to the *lineHeight* rather than *fontSize* alone.\n    labelBound : bool, dict, float, :class:`ExprRef`\n        Indicates if labels should be hidden if they exceed the axis range. If ``false``\n        (the default) no bounds overlap analysis is performed. If ``true``, labels will be\n        hidden if they exceed the axis range by more than 1 pixel. If this property is a\n        number, it specifies the pixel tolerance: the maximum amount by which a label\n        bounding box may exceed the axis range.\n\n        **Default value:** ``false``.\n    labelColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, 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\n        The color of the tick label, can be in hex color code or regular color name.\n    labelExpr : str\n        `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing\n        labels.\n\n        **Note:** The label text and value can be assessed via the ``label`` and ``value``\n        properties of the axis's backing ``datum`` object.\n    labelFlush : bool, float\n        Indicates if the first and last axis labels should be aligned flush with the scale\n        range. Flush alignment for a horizontal axis will left-align the first label and\n        right-align the last label. For vertical axes, bottom and top text baselines are\n        applied instead. If this property is a number, it also indicates the number of\n        pixels by which to offset the first and last labels; for example, a value of 2 will\n        flush-align the first and last labels and also push them 2 pixels outward from the\n        center of the axis. The additional adjustment can sometimes help the labels better\n        visually group with corresponding axis ticks.\n\n        **Default value:** ``true`` for axis of a continuous x-scale. Otherwise, ``false``.\n    labelFlushOffset : dict, float, :class:`ExprRef`\n        Indicates the number of pixels by which to offset flush-adjusted labels. For\n        example, a value of ``2`` will push flush-adjusted labels 2 pixels outward from the\n        center of the axis. Offsets can help the labels better visually group with\n        corresponding axis ticks.\n\n        **Default value:** ``0``.\n    labelFont : str, dict, :class:`ExprRef`, :class:`ConditionalAxisString`\n        The font of the tick label.\n    labelFontSize : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The font size of the label, in pixels.\n    labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`, :class:`ConditionalAxisLabelFontStyle`\n        Font style of the title.\n    labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, :class:`ConditionalAxisLabelFontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        Font weight of axis tick labels.\n    labelLimit : dict, float, :class:`ExprRef`\n        Maximum allowed pixel width of axis tick labels.\n\n        **Default value:** ``180``\n    labelLineHeight : dict, float, :class:`ExprRef`\n        Line height in pixels for multi-line label text or label text with ``\"line-top\"`` or\n        ``\"line-bottom\"`` baseline.\n    labelOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        Position offset in pixels to apply to labels, in addition to tickOffset.\n\n        **Default value:** ``0``\n    labelOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The opacity of the labels.\n    labelOverlap : bool, dict, :class:`ExprRef`, :class:`LabelOverlap`, Literal['greedy', 'parity']\n        The strategy to use for resolving overlap of axis labels. If ``false`` (the\n        default), no overlap reduction is attempted. If set to ``true`` or ``\"parity\"``, a\n        strategy of removing every other label is used (this works well for standard linear\n        axes). If set to ``\"greedy\"``, a linear scan of the labels is performed, removing\n        any labels that overlaps with the last visible label (this often works better for\n        log-scaled axes).\n\n        **Default value:** ``true`` for non-nominal fields with non-log scales; ``\"greedy\"``\n        for log scales; otherwise ``false``.\n    labelPadding : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The padding in pixels between labels and ticks.\n\n        **Default value:** ``2``\n    labelSeparation : dict, float, :class:`ExprRef`\n        The minimum separation that must be between label bounding boxes for them to be\n        considered non-overlapping (default ``0``). This property is ignored if\n        *labelOverlap* resolution is not enabled.\n    labels : bool\n        A boolean flag indicating if labels should be included as part of the axis.\n\n        **Default value:** ``true``.\n    maxExtent : dict, float, :class:`ExprRef`\n        The maximum extent in pixels that axis ticks and labels should use. This determines\n        a maximum offset value for axis titles.\n\n        **Default value:** ``undefined``.\n    minExtent : dict, float, :class:`ExprRef`\n        The minimum extent in pixels that axis ticks and labels should use. This determines\n        a minimum offset value for axis titles.\n\n        **Default value:** ``30`` for y-axis; ``undefined`` for x-axis.\n    offset : dict, float, :class:`ExprRef`\n        The offset, in pixels, by which to displace the axis from the edge of the enclosing\n        group or data rectangle.\n\n        **Default value:** derived from the `axis config\n        <https://vega.github.io/vega-lite/docs/config.html#facet-scale-config>`__'s\n        ``offset`` (``0`` by default)\n    orient : dict, :class:`ExprRef`, :class:`AxisOrient`, Literal['top', 'bottom', 'left', 'right']\n        The orientation of the axis. One of ``\"top\"``, ``\"bottom\"``, ``\"left\"`` or\n        ``\"right\"``. The orientation can be used to further specialize the axis type (e.g.,\n        a y-axis oriented towards the right edge of the chart).\n\n        **Default value:** ``\"bottom\"`` for x-axes and ``\"left\"`` for y-axes.\n    position : dict, float, :class:`ExprRef`\n        The anchor position of the axis in pixels. For x-axes with top or bottom\n        orientation, this sets the axis group x coordinate. For y-axes with left or right\n        orientation, this sets the axis group y coordinate.\n\n        **Default value**: ``0``\n    style : str, Sequence[str]\n        A string or array of strings indicating the name of custom styles to apply to the\n        axis. A style is a named collection of axis property defined within the `style\n        configuration <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If\n        style is an array, later styles will override earlier styles.\n\n        **Default value:** (none) **Note:** Any specified style will augment the default\n        style. For example, an x-axis mark with ``\"style\": \"foo\"`` will use ``config.axisX``\n        and ``config.style.foo`` (the specified style ``\"foo\"`` has higher precedence).\n    tickBand : dict, :class:`ExprRef`, Literal['center', 'extent']\n        For band scales, indicates if ticks and grid lines should be placed at the\n        ``\"center\"`` of a band (default) or at the band extents to indicate intervals\n    tickCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for the tick lines' ending style. One of ``\"butt\"``, ``\"round\"`` or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    tickColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, 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\n        The color of the axis's tick.\n\n        **Default value:** ``\"gray\"``\n    tickCount : dict, float, :class:`ExprRef`, :class:`TimeInterval`, :class:`TimeIntervalStep`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year']\n        A desired number of ticks, for axes visualizing quantitative scales. The resulting\n        number may be different so that values are \"nice\" (multiples of 2, 5, 10) and lie\n        within the underlying scale's range.\n\n        For scales of type ``\"time\"`` or ``\"utc\"``, the tick count can instead be a time\n        interval specifier. Legal string values are ``\"millisecond\"``, ``\"second\"``,\n        ``\"minute\"``, ``\"hour\"``, ``\"day\"``, ``\"week\"``, ``\"month\"``, and ``\"year\"``.\n        Alternatively, an object-valued interval specifier of the form ``{\"interval\":\n        \"month\", \"step\": 3}`` includes a desired number of interval steps. Here, ticks are\n        generated for each quarter (Jan, Apr, Jul, Oct) boundary.\n\n        **Default value**: Determine using a formula ``ceil(width/40)`` for x and\n        ``ceil(height/40)`` for y.\n    tickDash : dict, Sequence[float], :class:`ExprRef`, :class:`ConditionalAxisNumberArray`\n        An array of alternating [stroke, space] lengths for dashed tick mark lines.\n    tickDashOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The pixel offset at which to start drawing with the tick mark dash array.\n    tickExtra : bool\n        Boolean flag indicating if an extra axis tick should be added for the initial\n        position of the axis. This flag is useful for styling axes for ``band`` scales such\n        that ticks are placed on band boundaries rather in the middle of a band. Use in\n        conjunction with ``\"bandPosition\": 1`` and an axis ``\"padding\"`` value of ``0``.\n    tickMinStep : dict, float, :class:`ExprRef`\n        The minimum desired step between axis ticks, in terms of scale domain values. For\n        example, a value of ``1`` indicates that ticks should not be less than 1 unit apart.\n        If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if\n        necessary, to enforce the minimum step value.\n    tickOffset : dict, float, :class:`ExprRef`\n        Position offset in pixels to apply to ticks, labels, and gridlines.\n    tickOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        Opacity of the ticks.\n    tickRound : bool\n        Boolean flag indicating if pixel position values should be rounded to the nearest\n        integer.\n\n        **Default value:** ``true``\n    tickSize : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The size in pixels of axis ticks.\n\n        **Default value:** ``5``\n    tickWidth : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The width, in pixels, of ticks.\n\n        **Default value:** ``1``\n    ticks : bool\n        Boolean value that determines whether the axis should include ticks.\n\n        **Default value:** ``true``\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        Horizontal text alignment of axis titles.\n    titleAnchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']\n        Text anchor position for placing axis titles.\n    titleAngle : dict, float, :class:`ExprRef`\n        Angle in degrees of axis titles.\n    titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        Vertical text baseline for axis titles. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or ``\"line-bottom\"``. The\n        ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and\n        ``\"bottom\"``, but are calculated relative to the *lineHeight* rather than *fontSize*\n        alone.\n    titleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Color of the title, can be in hex color code or regular color name.\n    titleFont : str, dict, :class:`ExprRef`\n        Font of the title. (e.g., ``\"Helvetica Neue\"``).\n    titleFontSize : dict, float, :class:`ExprRef`\n        Font size of the title.\n    titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        Font style of the title.\n    titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        Font weight of the title. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``)\n        or a number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400``\n        and ``\"bold\"`` = ``700``).\n    titleLimit : dict, float, :class:`ExprRef`\n        Maximum allowed pixel width of axis titles.\n    titleLineHeight : dict, float, :class:`ExprRef`\n        Line height in pixels for multi-line title text or title text with ``\"line-top\"`` or\n        ``\"line-bottom\"`` baseline.\n    titleOpacity : dict, float, :class:`ExprRef`\n        Opacity of the axis title.\n    titlePadding : dict, float, :class:`ExprRef`\n        The padding, in pixels, between title and axis.\n    titleX : dict, float, :class:`ExprRef`\n        X-coordinate of the axis title relative to the axis group.\n    titleY : dict, float, :class:`ExprRef`\n        Y-coordinate of the axis title relative to the axis group.\n    translate : dict, float, :class:`ExprRef`\n        Coordinate space translation offset for axis layout. By default, axes are translated\n        by a 0.5 pixel offset for both the x and y coordinates in order to align stroked\n        lines with the pixel grid. However, for vector graphics output these pixel-specific\n        adjustments may be undesirable, in which case translate can be changed (for example,\n        to zero).\n\n        **Default value:** ``0.5``\n    values : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`ExprRef`, Sequence[dict, :class:`DateTime`]\n        Explicitly set the visible axis tick values.\n    zindex : float\n        A non-negative integer indicating the z-index of the axis. If zindex is 0, axes\n        should be drawn behind all chart elements. To put them in front, set ``zindex`` to\n        ``1`` or more.\n\n        **Default value:** ``0`` (behind the marks).\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Axis\"}\n\n    def __init__(\n        self,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        bandPosition: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[bool] = Undefined,\n        domainCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        domainColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        domainDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        domainDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        grid: Optional[bool] = Undefined,\n        gridCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        gridColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gridDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        gridDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelBound: Optional[bool | float | Parameter | SchemaBase | Map] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFlush: Optional[bool | float] = Undefined,\n        labelFlushOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labels: Optional[bool] = Undefined,\n        maxExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        minExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[Parameter | SchemaBase | Map | AxisOrient_T] = Undefined,\n        position: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        style: Optional[str | Sequence[str]] = Undefined,\n        tickBand: Optional[\n            Parameter | SchemaBase | Literal[\"center\", \"extent\"] | Map\n        ] = Undefined,\n        tickCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        tickColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        tickDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickExtra: Optional[bool] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickRound: Optional[bool] = Undefined,\n        tickSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ticks: Optional[bool] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        translate: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            aria=aria,\n            bandPosition=bandPosition,\n            description=description,\n            domain=domain,\n            domainCap=domainCap,\n            domainColor=domainColor,\n            domainDash=domainDash,\n            domainDashOffset=domainDashOffset,\n            domainOpacity=domainOpacity,\n            domainWidth=domainWidth,\n            format=format,\n            formatType=formatType,\n            grid=grid,\n            gridCap=gridCap,\n            gridColor=gridColor,\n            gridDash=gridDash,\n            gridDashOffset=gridDashOffset,\n            gridOpacity=gridOpacity,\n            gridWidth=gridWidth,\n            labelAlign=labelAlign,\n            labelAngle=labelAngle,\n            labelBaseline=labelBaseline,\n            labelBound=labelBound,\n            labelColor=labelColor,\n            labelExpr=labelExpr,\n            labelFlush=labelFlush,\n            labelFlushOffset=labelFlushOffset,\n            labelFont=labelFont,\n            labelFontSize=labelFontSize,\n            labelFontStyle=labelFontStyle,\n            labelFontWeight=labelFontWeight,\n            labelLimit=labelLimit,\n            labelLineHeight=labelLineHeight,\n            labelOffset=labelOffset,\n            labelOpacity=labelOpacity,\n            labelOverlap=labelOverlap,\n            labelPadding=labelPadding,\n            labelSeparation=labelSeparation,\n            labels=labels,\n            maxExtent=maxExtent,\n            minExtent=minExtent,\n            offset=offset,\n            orient=orient,\n            position=position,\n            style=style,\n            tickBand=tickBand,\n            tickCap=tickCap,\n            tickColor=tickColor,\n            tickCount=tickCount,\n            tickDash=tickDash,\n            tickDashOffset=tickDashOffset,\n            tickExtra=tickExtra,\n            tickMinStep=tickMinStep,\n            tickOffset=tickOffset,\n            tickOpacity=tickOpacity,\n            tickRound=tickRound,\n            tickSize=tickSize,\n            tickWidth=tickWidth,\n            ticks=ticks,\n            title=title,\n            titleAlign=titleAlign,\n            titleAnchor=titleAnchor,\n            titleAngle=titleAngle,\n            titleBaseline=titleBaseline,\n            titleColor=titleColor,\n            titleFont=titleFont,\n            titleFontSize=titleFontSize,\n            titleFontStyle=titleFontStyle,\n            titleFontWeight=titleFontWeight,\n            titleLimit=titleLimit,\n            titleLineHeight=titleLineHeight,\n            titleOpacity=titleOpacity,\n            titlePadding=titlePadding,\n            titleX=titleX,\n            titleY=titleY,\n            translate=translate,\n            values=values,\n            zindex=zindex,\n            **kwds,\n        )\n\n\nclass AxisConfig(VegaLiteSchema):\n    \"\"\"\n    AxisConfig schema wrapper.\n\n    Parameters\n    ----------\n    aria : bool, dict, :class:`ExprRef`\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG group, removing the axis from the ARIA accessibility tree.\n\n        **Default value:** ``true``\n    bandPosition : dict, float, :class:`ExprRef`\n        An interpolation fraction indicating where, for ``band`` scales, axis ticks should\n        be positioned. A value of ``0`` places ticks at the left edge of their bands. A\n        value of ``0.5`` places ticks in the middle of their bands.\n\n        **Default value:** ``0.5``\n    description : str, dict, :class:`ExprRef`\n        A text description of this axis for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If the ``aria`` property is true, for SVG output the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__\n        will be set to this description. If the description is unspecified it will be\n        automatically generated.\n    disable : bool\n        Disable axis by default.\n    domain : bool\n        A boolean flag indicating if the domain (the axis baseline) should be included as\n        part of the axis.\n\n        **Default value:** ``true``\n    domainCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for the domain line's ending style. One of ``\"butt\"``, ``\"round\"`` or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    domainColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Color of axis domain line.\n\n        **Default value:** ``\"gray\"``.\n    domainDash : dict, Sequence[float], :class:`ExprRef`\n        An array of alternating [stroke, space] lengths for dashed domain lines.\n    domainDashOffset : dict, float, :class:`ExprRef`\n        The pixel offset at which to start drawing with the domain dash array.\n    domainOpacity : dict, float, :class:`ExprRef`\n        Opacity of the axis domain line.\n    domainWidth : dict, float, :class:`ExprRef`\n        Stroke width of axis domain line\n\n        **Default value:** ``1``\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    grid : bool\n        A boolean flag indicating if grid lines should be included as part of the axis\n\n        **Default value:** ``true`` for `continuous scales\n        <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ that are not\n        binned; otherwise, ``false``.\n    gridCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for grid lines' ending style. One of ``\"butt\"``, ``\"round\"`` or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    gridColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, 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\n        Color of gridlines.\n\n        **Default value:** ``\"lightGray\"``.\n    gridDash : dict, Sequence[float], :class:`ExprRef`, :class:`ConditionalAxisNumberArray`\n        An array of alternating [stroke, space] lengths for dashed grid lines.\n    gridDashOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The pixel offset at which to start drawing with the grid dash array.\n    gridOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The stroke opacity of grid (value between [0,1])\n\n        **Default value:** ``1``\n    gridWidth : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The grid width, in pixels.\n\n        **Default value:** ``1``\n    labelAlign : dict, :class:`Align`, :class:`ExprRef`, :class:`ConditionalAxisLabelAlign`, Literal['left', 'center', 'right']\n        Horizontal text alignment of axis tick labels, overriding the default setting for\n        the current axis orientation.\n    labelAngle : dict, float, :class:`ExprRef`\n        The rotation angle of the axis labels.\n\n        **Default value:** ``-90`` for nominal and ordinal fields; ``0`` otherwise.\n    labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, :class:`ConditionalAxisLabelBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        Vertical text baseline of axis tick labels, overriding the default setting for the\n        current axis orientation. One of ``\"alphabetic\"`` (default), ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or ``\"line-bottom\"``. The ``\"line-top\"``\n        and ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but\n        are calculated relative to the *lineHeight* rather than *fontSize* alone.\n    labelBound : bool, dict, float, :class:`ExprRef`\n        Indicates if labels should be hidden if they exceed the axis range. If ``false``\n        (the default) no bounds overlap analysis is performed. If ``true``, labels will be\n        hidden if they exceed the axis range by more than 1 pixel. If this property is a\n        number, it specifies the pixel tolerance: the maximum amount by which a label\n        bounding box may exceed the axis range.\n\n        **Default value:** ``false``.\n    labelColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, 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\n        The color of the tick label, can be in hex color code or regular color name.\n    labelExpr : str\n        `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing\n        labels.\n\n        **Note:** The label text and value can be assessed via the ``label`` and ``value``\n        properties of the axis's backing ``datum`` object.\n    labelFlush : bool, float\n        Indicates if the first and last axis labels should be aligned flush with the scale\n        range. Flush alignment for a horizontal axis will left-align the first label and\n        right-align the last label. For vertical axes, bottom and top text baselines are\n        applied instead. If this property is a number, it also indicates the number of\n        pixels by which to offset the first and last labels; for example, a value of 2 will\n        flush-align the first and last labels and also push them 2 pixels outward from the\n        center of the axis. The additional adjustment can sometimes help the labels better\n        visually group with corresponding axis ticks.\n\n        **Default value:** ``true`` for axis of a continuous x-scale. Otherwise, ``false``.\n    labelFlushOffset : dict, float, :class:`ExprRef`\n        Indicates the number of pixels by which to offset flush-adjusted labels. For\n        example, a value of ``2`` will push flush-adjusted labels 2 pixels outward from the\n        center of the axis. Offsets can help the labels better visually group with\n        corresponding axis ticks.\n\n        **Default value:** ``0``.\n    labelFont : str, dict, :class:`ExprRef`, :class:`ConditionalAxisString`\n        The font of the tick label.\n    labelFontSize : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The font size of the label, in pixels.\n    labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`, :class:`ConditionalAxisLabelFontStyle`\n        Font style of the title.\n    labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, :class:`ConditionalAxisLabelFontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        Font weight of axis tick labels.\n    labelLimit : dict, float, :class:`ExprRef`\n        Maximum allowed pixel width of axis tick labels.\n\n        **Default value:** ``180``\n    labelLineHeight : dict, float, :class:`ExprRef`\n        Line height in pixels for multi-line label text or label text with ``\"line-top\"`` or\n        ``\"line-bottom\"`` baseline.\n    labelOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        Position offset in pixels to apply to labels, in addition to tickOffset.\n\n        **Default value:** ``0``\n    labelOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The opacity of the labels.\n    labelOverlap : bool, dict, :class:`ExprRef`, :class:`LabelOverlap`, Literal['greedy', 'parity']\n        The strategy to use for resolving overlap of axis labels. If ``false`` (the\n        default), no overlap reduction is attempted. If set to ``true`` or ``\"parity\"``, a\n        strategy of removing every other label is used (this works well for standard linear\n        axes). If set to ``\"greedy\"``, a linear scan of the labels is performed, removing\n        any labels that overlaps with the last visible label (this often works better for\n        log-scaled axes).\n\n        **Default value:** ``true`` for non-nominal fields with non-log scales; ``\"greedy\"``\n        for log scales; otherwise ``false``.\n    labelPadding : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The padding in pixels between labels and ticks.\n\n        **Default value:** ``2``\n    labelSeparation : dict, float, :class:`ExprRef`\n        The minimum separation that must be between label bounding boxes for them to be\n        considered non-overlapping (default ``0``). This property is ignored if\n        *labelOverlap* resolution is not enabled.\n    labels : bool\n        A boolean flag indicating if labels should be included as part of the axis.\n\n        **Default value:** ``true``.\n    maxExtent : dict, float, :class:`ExprRef`\n        The maximum extent in pixels that axis ticks and labels should use. This determines\n        a maximum offset value for axis titles.\n\n        **Default value:** ``undefined``.\n    minExtent : dict, float, :class:`ExprRef`\n        The minimum extent in pixels that axis ticks and labels should use. This determines\n        a minimum offset value for axis titles.\n\n        **Default value:** ``30`` for y-axis; ``undefined`` for x-axis.\n    offset : dict, float, :class:`ExprRef`\n        The offset, in pixels, by which to displace the axis from the edge of the enclosing\n        group or data rectangle.\n\n        **Default value:** derived from the `axis config\n        <https://vega.github.io/vega-lite/docs/config.html#facet-scale-config>`__'s\n        ``offset`` (``0`` by default)\n    orient : dict, :class:`ExprRef`, :class:`AxisOrient`, Literal['top', 'bottom', 'left', 'right']\n        The orientation of the axis. One of ``\"top\"``, ``\"bottom\"``, ``\"left\"`` or\n        ``\"right\"``. The orientation can be used to further specialize the axis type (e.g.,\n        a y-axis oriented towards the right edge of the chart).\n\n        **Default value:** ``\"bottom\"`` for x-axes and ``\"left\"`` for y-axes.\n    position : dict, float, :class:`ExprRef`\n        The anchor position of the axis in pixels. For x-axes with top or bottom\n        orientation, this sets the axis group x coordinate. For y-axes with left or right\n        orientation, this sets the axis group y coordinate.\n\n        **Default value**: ``0``\n    style : str, Sequence[str]\n        A string or array of strings indicating the name of custom styles to apply to the\n        axis. A style is a named collection of axis property defined within the `style\n        configuration <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If\n        style is an array, later styles will override earlier styles.\n\n        **Default value:** (none) **Note:** Any specified style will augment the default\n        style. For example, an x-axis mark with ``\"style\": \"foo\"`` will use ``config.axisX``\n        and ``config.style.foo`` (the specified style ``\"foo\"`` has higher precedence).\n    tickBand : dict, :class:`ExprRef`, Literal['center', 'extent']\n        For band scales, indicates if ticks and grid lines should be placed at the\n        ``\"center\"`` of a band (default) or at the band extents to indicate intervals\n    tickCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for the tick lines' ending style. One of ``\"butt\"``, ``\"round\"`` or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    tickColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, :class:`ConditionalAxisColor`, 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\n        The color of the axis's tick.\n\n        **Default value:** ``\"gray\"``\n    tickCount : dict, float, :class:`ExprRef`, :class:`TimeInterval`, :class:`TimeIntervalStep`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year']\n        A desired number of ticks, for axes visualizing quantitative scales. The resulting\n        number may be different so that values are \"nice\" (multiples of 2, 5, 10) and lie\n        within the underlying scale's range.\n\n        For scales of type ``\"time\"`` or ``\"utc\"``, the tick count can instead be a time\n        interval specifier. Legal string values are ``\"millisecond\"``, ``\"second\"``,\n        ``\"minute\"``, ``\"hour\"``, ``\"day\"``, ``\"week\"``, ``\"month\"``, and ``\"year\"``.\n        Alternatively, an object-valued interval specifier of the form ``{\"interval\":\n        \"month\", \"step\": 3}`` includes a desired number of interval steps. Here, ticks are\n        generated for each quarter (Jan, Apr, Jul, Oct) boundary.\n\n        **Default value**: Determine using a formula ``ceil(width/40)`` for x and\n        ``ceil(height/40)`` for y.\n    tickDash : dict, Sequence[float], :class:`ExprRef`, :class:`ConditionalAxisNumberArray`\n        An array of alternating [stroke, space] lengths for dashed tick mark lines.\n    tickDashOffset : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The pixel offset at which to start drawing with the tick mark dash array.\n    tickExtra : bool\n        Boolean flag indicating if an extra axis tick should be added for the initial\n        position of the axis. This flag is useful for styling axes for ``band`` scales such\n        that ticks are placed on band boundaries rather in the middle of a band. Use in\n        conjunction with ``\"bandPosition\": 1`` and an axis ``\"padding\"`` value of ``0``.\n    tickMinStep : dict, float, :class:`ExprRef`\n        The minimum desired step between axis ticks, in terms of scale domain values. For\n        example, a value of ``1`` indicates that ticks should not be less than 1 unit apart.\n        If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if\n        necessary, to enforce the minimum step value.\n    tickOffset : dict, float, :class:`ExprRef`\n        Position offset in pixels to apply to ticks, labels, and gridlines.\n    tickOpacity : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        Opacity of the ticks.\n    tickRound : bool\n        Boolean flag indicating if pixel position values should be rounded to the nearest\n        integer.\n\n        **Default value:** ``true``\n    tickSize : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The size in pixels of axis ticks.\n\n        **Default value:** ``5``\n    tickWidth : dict, float, :class:`ExprRef`, :class:`ConditionalAxisNumber`\n        The width, in pixels, of ticks.\n\n        **Default value:** ``1``\n    ticks : bool\n        Boolean value that determines whether the axis should include ticks.\n\n        **Default value:** ``true``\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        Horizontal text alignment of axis titles.\n    titleAnchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']\n        Text anchor position for placing axis titles.\n    titleAngle : dict, float, :class:`ExprRef`\n        Angle in degrees of axis titles.\n    titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        Vertical text baseline for axis titles. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or ``\"line-bottom\"``. The\n        ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and\n        ``\"bottom\"``, but are calculated relative to the *lineHeight* rather than *fontSize*\n        alone.\n    titleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Color of the title, can be in hex color code or regular color name.\n    titleFont : str, dict, :class:`ExprRef`\n        Font of the title. (e.g., ``\"Helvetica Neue\"``).\n    titleFontSize : dict, float, :class:`ExprRef`\n        Font size of the title.\n    titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        Font style of the title.\n    titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        Font weight of the title. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``)\n        or a number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400``\n        and ``\"bold\"`` = ``700``).\n    titleLimit : dict, float, :class:`ExprRef`\n        Maximum allowed pixel width of axis titles.\n    titleLineHeight : dict, float, :class:`ExprRef`\n        Line height in pixels for multi-line title text or title text with ``\"line-top\"`` or\n        ``\"line-bottom\"`` baseline.\n    titleOpacity : dict, float, :class:`ExprRef`\n        Opacity of the axis title.\n    titlePadding : dict, float, :class:`ExprRef`\n        The padding, in pixels, between title and axis.\n    titleX : dict, float, :class:`ExprRef`\n        X-coordinate of the axis title relative to the axis group.\n    titleY : dict, float, :class:`ExprRef`\n        Y-coordinate of the axis title relative to the axis group.\n    translate : dict, float, :class:`ExprRef`\n        Coordinate space translation offset for axis layout. By default, axes are translated\n        by a 0.5 pixel offset for both the x and y coordinates in order to align stroked\n        lines with the pixel grid. However, for vector graphics output these pixel-specific\n        adjustments may be undesirable, in which case translate can be changed (for example,\n        to zero).\n\n        **Default value:** ``0.5``\n    values : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`ExprRef`, Sequence[dict, :class:`DateTime`]\n        Explicitly set the visible axis tick values.\n    zindex : float\n        A non-negative integer indicating the z-index of the axis. If zindex is 0, axes\n        should be drawn behind all chart elements. To put them in front, set ``zindex`` to\n        ``1`` or more.\n\n        **Default value:** ``0`` (behind the marks).\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/AxisConfig\"}\n\n    def __init__(\n        self,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        bandPosition: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        disable: Optional[bool] = Undefined,\n        domain: Optional[bool] = Undefined,\n        domainCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        domainColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        domainDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        domainDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        grid: Optional[bool] = Undefined,\n        gridCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        gridColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gridDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        gridDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelBound: Optional[bool | float | Parameter | SchemaBase | Map] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFlush: Optional[bool | float] = Undefined,\n        labelFlushOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labels: Optional[bool] = Undefined,\n        maxExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        minExtent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[Parameter | SchemaBase | Map | AxisOrient_T] = Undefined,\n        position: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        style: Optional[str | Sequence[str]] = Undefined,\n        tickBand: Optional[\n            Parameter | SchemaBase | Literal[\"center\", \"extent\"] | Map\n        ] = Undefined,\n        tickCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        tickColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickDash: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        tickDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickExtra: Optional[bool] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickRound: Optional[bool] = Undefined,\n        tickSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tickWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ticks: Optional[bool] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        translate: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            aria=aria,\n            bandPosition=bandPosition,\n            description=description,\n            disable=disable,\n            domain=domain,\n            domainCap=domainCap,\n            domainColor=domainColor,\n            domainDash=domainDash,\n            domainDashOffset=domainDashOffset,\n            domainOpacity=domainOpacity,\n            domainWidth=domainWidth,\n            format=format,\n            formatType=formatType,\n            grid=grid,\n            gridCap=gridCap,\n            gridColor=gridColor,\n            gridDash=gridDash,\n            gridDashOffset=gridDashOffset,\n            gridOpacity=gridOpacity,\n            gridWidth=gridWidth,\n            labelAlign=labelAlign,\n            labelAngle=labelAngle,\n            labelBaseline=labelBaseline,\n            labelBound=labelBound,\n            labelColor=labelColor,\n            labelExpr=labelExpr,\n            labelFlush=labelFlush,\n            labelFlushOffset=labelFlushOffset,\n            labelFont=labelFont,\n            labelFontSize=labelFontSize,\n            labelFontStyle=labelFontStyle,\n            labelFontWeight=labelFontWeight,\n            labelLimit=labelLimit,\n            labelLineHeight=labelLineHeight,\n            labelOffset=labelOffset,\n            labelOpacity=labelOpacity,\n            labelOverlap=labelOverlap,\n            labelPadding=labelPadding,\n            labelSeparation=labelSeparation,\n            labels=labels,\n            maxExtent=maxExtent,\n            minExtent=minExtent,\n            offset=offset,\n            orient=orient,\n            position=position,\n            style=style,\n            tickBand=tickBand,\n            tickCap=tickCap,\n            tickColor=tickColor,\n            tickCount=tickCount,\n            tickDash=tickDash,\n            tickDashOffset=tickDashOffset,\n            tickExtra=tickExtra,\n            tickMinStep=tickMinStep,\n            tickOffset=tickOffset,\n            tickOpacity=tickOpacity,\n            tickRound=tickRound,\n            tickSize=tickSize,\n            tickWidth=tickWidth,\n            ticks=ticks,\n            title=title,\n            titleAlign=titleAlign,\n            titleAnchor=titleAnchor,\n            titleAngle=titleAngle,\n            titleBaseline=titleBaseline,\n            titleColor=titleColor,\n            titleFont=titleFont,\n            titleFontSize=titleFontSize,\n            titleFontStyle=titleFontStyle,\n            titleFontWeight=titleFontWeight,\n            titleLimit=titleLimit,\n            titleLineHeight=titleLineHeight,\n            titleOpacity=titleOpacity,\n            titlePadding=titlePadding,\n            titleX=titleX,\n            titleY=titleY,\n            translate=translate,\n            values=values,\n            zindex=zindex,\n            **kwds,\n        )\n\n\nclass AxisOrient(VegaLiteSchema):\n    \"\"\"AxisOrient schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/AxisOrient\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass AxisResolveMap(VegaLiteSchema):\n    \"\"\"\n    AxisResolveMap schema wrapper.\n\n    Parameters\n    ----------\n    x : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    y : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/AxisResolveMap\"}\n\n    def __init__(\n        self,\n        x: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        y: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(x=x, y=y, **kwds)\n\n\nclass BBox(VegaLiteSchema):\n    \"\"\"\n    BBox schema wrapper.\n\n    Bounding box https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BBox\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass BarConfig(AnyMarkConfig):\n    \"\"\"\n    BarConfig schema wrapper.\n\n    Parameters\n    ----------\n    align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).\n        One of ``\"left\"``, ``\"right\"``, ``\"center\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    angle : dict, float, :class:`ExprRef`\n        The rotation angle of the text, in degrees.\n    aria : bool, dict, :class:`ExprRef`\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG element, removing the mark item from the ARIA accessibility tree.\n    ariaRole : str, dict, :class:`ExprRef`\n        Sets the type of user interface element of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"role\" attribute. Warning: this\n        property is experimental and may be changed in the future.\n    ariaRoleDescription : str, dict, :class:`ExprRef`\n        A human-readable, author-localized description for the role of the mark item for\n        `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"aria-roledescription\" attribute.\n        Warning: this property is experimental and may be changed in the future.\n    aspect : bool, dict, :class:`ExprRef`\n        Whether to keep aspect ratio of image marks.\n    baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        For text marks, the vertical text baseline. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, ``\"line-bottom\"``, or an\n        expression reference that provides one of the valid values. The ``\"line-top\"`` and\n        ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but are\n        calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.\n\n        For range marks, the vertical alignment of the marks. One of ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    binSpacing : float\n        Offset between bars for binned field. The ideal value for this is either 0\n        (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n        **Default value:** ``1``\n    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']\n        The color blend mode for drawing an item on its current background. Any valid `CSS\n        mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__\n        value can be used.\n\n        **Default value:** ``\"source-over\"``\n    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']\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    continuousBandSize : float\n        The default size of the bars on continuous scales.\n\n        **Default value:** ``5``\n    cornerRadius : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cornerRadiusBottomLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom left corner.\n\n        **Default value:** ``0``\n    cornerRadiusBottomRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom right corner.\n\n        **Default value:** ``0``\n    cornerRadiusEnd : dict, float, :class:`ExprRef`\n        * For vertical bars, top-left and top-right corner radius.\n\n        * For horizontal bars, top-right and bottom-right corner radius.\n    cornerRadiusTopLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top left corner.\n\n        **Default value:** ``0``\n    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']\n        The mouse cursor used over the mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    description : str, dict, :class:`ExprRef`\n        A text description of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.\n    dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl']\n        The direction of the text. One of ``\"ltr\"`` (left-to-right) or ``\"rtl\"``\n        (right-to-left). This property determines on which side is truncated in response to\n        the limit parameter.\n\n        **Default value:** ``\"ltr\"``\n    discreteBandSize : dict, float, :class:`RelativeBandSize`\n        The default size of the bars with discrete dimensions. If unspecified, the default\n        size is  ``step-2``, which provides 2 pixel offset between bars.\n    dx : dict, float, :class:`ExprRef`\n        The horizontal offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    dy : dict, float, :class:`ExprRef`\n        The vertical offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    ellipsis : str, dict, :class:`ExprRef`\n        The ellipsis string for text truncated in response to the limit parameter.\n\n        **Default value:** ``\"…\"``\n    endAngle : dict, float, :class:`ExprRef`\n        The end angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    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\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    fillOpacity : dict, float, :class:`ExprRef`\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    filled : bool\n        Whether the mark's color should be used as fill color instead of stroke color.\n\n        **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well\n        as ``geoshape`` marks for `graticule\n        <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;\n        otherwise, ``true``.\n\n        **Note:** This property cannot be used in a `style config\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n    font : str, dict, :class:`ExprRef`\n        The typeface to set the text in (e.g., ``\"Helvetica Neue\"``).\n    fontSize : dict, float, :class:`ExprRef`\n        The font size, in pixels.\n\n        **Default value:** ``11``\n    fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style (e.g., ``\"italic\"``).\n    fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        The font weight. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``) or a\n        number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400`` and\n        ``\"bold\"`` = ``700``).\n    height : dict, float, :class:`ExprRef`\n        Height of the marks.\n    href : str, dict, :class:`URI`, :class:`ExprRef`\n        A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\n    innerRadius : dict, float, :class:`ExprRef`\n        The inner radius in pixels of arc marks. ``innerRadius`` is an alias for\n        ``radius2``.\n\n        **Default value:** ``0``\n    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']\n        The line interpolation method to use for line and area marks. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"step-before\"``: alternate between vertical and horizontal segments, as in a\n          step function.\n        * ``\"step-after\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    limit : dict, float, :class:`ExprRef`\n        The maximum length of the text mark in pixels. The text value will be automatically\n        truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0`` -- indicating no limit\n    lineBreak : str, dict, :class:`ExprRef`\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property is ignored if the text is array-valued.\n    lineHeight : dict, float, :class:`ExprRef`\n        The line height in pixels (the spacing between subsequent lines of text) for\n        multi-line text marks.\n    minBandSize : dict, float, :class:`ExprRef`\n        The minimum band size for bar and rectangle marks. **Default value:** ``0.25``\n    opacity : dict, float, :class:`ExprRef`\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    order : bool, None\n        For line and trail marks, this ``order`` property can be set to ``null`` or\n        ``false`` to make the lines use the original order in the data sources.\n    orient : :class:`Orientation`, Literal['horizontal', 'vertical']\n        The orientation of a non-stacked bar, tick, area, and line charts. The value is\n        either horizontal (default) or vertical.\n\n        * For bar, rule and tick, this determines whether the size of the bar and tick\n          should be applied to x or y dimension.\n        * For area, this property determines the orient property of the Vega output.\n        * For line and trail marks, this property determines the sort order of the points in\n          the line if ``config.sortLineBy`` is not specified. For stacked charts, this is\n          always determined by the orientation of the stack; therefore explicitly specified\n          value will be ignored.\n    outerRadius : dict, float, :class:`ExprRef`\n        The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.\n\n        **Default value:** ``0``\n    padAngle : dict, float, :class:`ExprRef`\n        The angular padding applied to sides of the arc, in radians.\n    radius : dict, float, :class:`ExprRef`\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    radius2 : dict, float, :class:`ExprRef`\n        The secondary (inner) radius in pixels of arc marks.\n\n        **Default value:** ``0``\n    shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    size : dict, float, :class:`ExprRef`\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    smooth : bool, dict, :class:`ExprRef`\n        A boolean flag (default true) indicating if the image should be smoothed when\n        resized. If false, individual pixels should be scaled directly rather than\n        interpolated with smoothing. For SVG rendering, this option may not work in some\n        browsers due to lack of standardization.\n    startAngle : dict, float, :class:`ExprRef`\n        The start angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    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\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash : dict, Sequence[float], :class:`ExprRef`\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset : dict, float, :class:`ExprRef`\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit : dict, float, :class:`ExprRef`\n        The miter limit at which to bevel a line join.\n    strokeOffset : dict, float, :class:`ExprRef`\n        The offset in pixels at which to draw the group stroke and fill. If unspecified, the\n        default behavior is to dynamically offset stroked groups such that 1 pixel stroke\n        widths align with the pixel grid.\n    strokeOpacity : dict, float, :class:`ExprRef`\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth : dict, float, :class:`ExprRef`\n        The stroke width, in pixels.\n    tension : dict, float, :class:`ExprRef`\n        Depending on the interpolation type, sets the tension parameter (for line and area\n        marks).\n    text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`\n        Placeholder text if the ``text`` channel is not specified\n    theta : dict, float, :class:`ExprRef`\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2 : dict, float, :class:`ExprRef`\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    time : dict, float, :class:`ExprRef`\n\n    timeUnitBandPosition : float\n        Default relative band position for a time unit. If set to ``0``, the marks will be\n        positioned at the beginning of the time unit band step. If set to ``0.5``, the marks\n        will be positioned in the middle of the time unit band step.\n    timeUnitBandSize : float\n        Default relative band size for a time unit. If set to ``1``, the bandwidth of the\n        marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the\n        marks will be half of the time unit band step.\n    tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None\n        The tooltip text string to show upon mouse hover or an object defining which fields\n        should the tooltip be derived from.\n\n        * If ``tooltip`` is ``true`` or ``{\"content\": \"encoding\"}``, then all fields from\n          ``encoding`` will be used.\n        * If ``tooltip`` is ``{\"content\": \"data\"}``, then all fields that appear in the\n          highlighted data point will be used.\n        * If set to ``null`` or ``false``, then no tooltip will be used.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n        **Default value:** ``null``\n    url : str, dict, :class:`URI`, :class:`ExprRef`\n        The URL of the image file for image marks.\n    width : dict, float, :class:`ExprRef`\n        Width of the marks.\n    x : dict, float, :class:`ExprRef`, Literal['width']\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2 : dict, float, :class:`ExprRef`, Literal['width']\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    y : dict, float, :class:`ExprRef`, Literal['height']\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2 : dict, float, :class:`ExprRef`, Literal['height']\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BarConfig\"}\n\n    def __init__(\n        self,\n        align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        angle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined,\n        binSpacing: Optional[float] = Undefined,\n        blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined,\n        color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,\n        continuousBandSize: Optional[float] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusBottomLeft: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusBottomRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusEnd: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusTopRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined,\n        discreteBandSize: Optional[float | SchemaBase | Map] = Undefined,\n        dx: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        dy: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        endAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fill: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        filled: Optional[bool] = Undefined,\n        font: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined,\n        height: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        href: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined,\n        invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined,\n        limit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        minBandSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        order: Optional[bool | None] = Undefined,\n        orient: Optional[SchemaBase | Orientation_T] = Undefined,\n        outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        shape: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        size: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        startAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        stroke: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        strokeDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined,\n        strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tension: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n        theta: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        time: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        timeUnitBandPosition: Optional[float] = Undefined,\n        timeUnitBandSize: Optional[float] = Undefined,\n        tooltip: Optional[\n            str | bool | float | Parameter | SchemaBase | Map | None\n        ] = Undefined,\n        url: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        width: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        x: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        x2: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        y: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        y2: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            align=align,\n            angle=angle,\n            aria=aria,\n            ariaRole=ariaRole,\n            ariaRoleDescription=ariaRoleDescription,\n            aspect=aspect,\n            baseline=baseline,\n            binSpacing=binSpacing,\n            blend=blend,\n            color=color,\n            continuousBandSize=continuousBandSize,\n            cornerRadius=cornerRadius,\n            cornerRadiusBottomLeft=cornerRadiusBottomLeft,\n            cornerRadiusBottomRight=cornerRadiusBottomRight,\n            cornerRadiusEnd=cornerRadiusEnd,\n            cornerRadiusTopLeft=cornerRadiusTopLeft,\n            cornerRadiusTopRight=cornerRadiusTopRight,\n            cursor=cursor,\n            description=description,\n            dir=dir,\n            discreteBandSize=discreteBandSize,\n            dx=dx,\n            dy=dy,\n            ellipsis=ellipsis,\n            endAngle=endAngle,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            filled=filled,\n            font=font,\n            fontSize=fontSize,\n            fontStyle=fontStyle,\n            fontWeight=fontWeight,\n            height=height,\n            href=href,\n            innerRadius=innerRadius,\n            interpolate=interpolate,\n            invalid=invalid,\n            limit=limit,\n            lineBreak=lineBreak,\n            lineHeight=lineHeight,\n            minBandSize=minBandSize,\n            opacity=opacity,\n            order=order,\n            orient=orient,\n            outerRadius=outerRadius,\n            padAngle=padAngle,\n            radius=radius,\n            radius2=radius2,\n            shape=shape,\n            size=size,\n            smooth=smooth,\n            startAngle=startAngle,\n            stroke=stroke,\n            strokeCap=strokeCap,\n            strokeDash=strokeDash,\n            strokeDashOffset=strokeDashOffset,\n            strokeJoin=strokeJoin,\n            strokeMiterLimit=strokeMiterLimit,\n            strokeOffset=strokeOffset,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            tension=tension,\n            text=text,\n            theta=theta,\n            theta2=theta2,\n            time=time,\n            timeUnitBandPosition=timeUnitBandPosition,\n            timeUnitBandSize=timeUnitBandSize,\n            tooltip=tooltip,\n            url=url,\n            width=width,\n            x=x,\n            x2=x2,\n            y=y,\n            y2=y2,\n            **kwds,\n        )\n\n\nclass BaseTitleNoValueRefs(VegaLiteSchema):\n    \"\"\"\n    BaseTitleNoValueRefs schema wrapper.\n\n    Parameters\n    ----------\n    align : :class:`Align`, Literal['left', 'center', 'right']\n        Horizontal text alignment for title text. One of ``\"left\"``, ``\"center\"``, or\n        ``\"right\"``.\n    anchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']\n        The anchor position for placing the title and subtitle text. One of ``\"start\"``,\n        ``\"middle\"``, or ``\"end\"``. For example, with an orientation of top these anchor\n        positions map to a left-, center-, or right-aligned title.\n    angle : dict, float, :class:`ExprRef`\n        Angle in degrees of title and subtitle text.\n    aria : bool, dict, :class:`ExprRef`\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG group, removing the title from the ARIA accessibility tree.\n\n        **Default value:** ``true``\n    baseline : :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        Vertical text baseline for title and subtitle text. One of ``\"alphabetic\"``\n        (default), ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or\n        ``\"line-bottom\"``. The ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly\n        to ``\"top\"`` and ``\"bottom\"``, but are calculated relative to the *lineHeight*\n        rather than *fontSize* alone.\n    color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Text color for title text.\n    dx : dict, float, :class:`ExprRef`\n        Delta offset for title and subtitle text x-coordinate.\n    dy : dict, float, :class:`ExprRef`\n        Delta offset for title and subtitle text y-coordinate.\n    font : str, dict, :class:`ExprRef`\n        Font name for title text.\n    fontSize : dict, float, :class:`ExprRef`\n        Font size in pixels for title text.\n    fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        Font style for title text.\n    fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        Font weight for title text. This can be either a string (e.g ``\"bold\"``,\n        ``\"normal\"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where\n        ``\"normal\"`` = ``400`` and ``\"bold\"`` = ``700``).\n    frame : str, dict, :class:`ExprRef`, :class:`TitleFrame`, Literal['bounds', 'group']\n        The reference frame for the anchor position, one of ``\"bounds\"`` (to anchor relative\n        to the full bounding box) or ``\"group\"`` (to anchor relative to the group width or\n        height).\n    limit : dict, float, :class:`ExprRef`\n        The maximum allowed length in pixels of title and subtitle text.\n    lineHeight : dict, float, :class:`ExprRef`\n        Line height in pixels for multi-line title text or title text with ``\"line-top\"`` or\n        ``\"line-bottom\"`` baseline.\n    offset : dict, float, :class:`ExprRef`\n        The orthogonal offset in pixels by which to displace the title group from its\n        position along the edge of the chart.\n    orient : dict, :class:`ExprRef`, :class:`TitleOrient`, Literal['none', 'left', 'right', 'top', 'bottom']\n        Default title orientation (``\"top\"``, ``\"bottom\"``, ``\"left\"``, or ``\"right\"``)\n    subtitleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Text color for subtitle text.\n    subtitleFont : str, dict, :class:`ExprRef`\n        Font name for subtitle text.\n    subtitleFontSize : dict, float, :class:`ExprRef`\n        Font size in pixels for subtitle text.\n    subtitleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        Font style for subtitle text.\n    subtitleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        Font weight for subtitle text. This can be either a string (e.g ``\"bold\"``,\n        ``\"normal\"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where\n        ``\"normal\"`` = ``400`` and ``\"bold\"`` = ``700``).\n    subtitleLineHeight : dict, float, :class:`ExprRef`\n        Line height in pixels for multi-line subtitle text.\n    subtitlePadding : dict, float, :class:`ExprRef`\n        The padding in pixels between title and subtitle text.\n    zindex : dict, float, :class:`ExprRef`\n        The integer z-index indicating the layering of the title group relative to other\n        axis, mark, and legend groups.\n\n        **Default value:** ``0``.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BaseTitleNoValueRefs\"}\n\n    def __init__(\n        self,\n        align: Optional[SchemaBase | Align_T] = Undefined,\n        anchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        angle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        baseline: Optional[SchemaBase | TextBaseline_T] = Undefined,\n        color: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        dx: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        dy: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        font: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined,\n        frame: Optional[str | Parameter | SchemaBase | Map | TitleFrame_T] = Undefined,\n        limit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[Parameter | SchemaBase | Map | TitleOrient_T] = Undefined,\n        subtitleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        subtitleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        subtitleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        subtitleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        subtitleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        subtitleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        subtitlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        zindex: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            align=align,\n            anchor=anchor,\n            angle=angle,\n            aria=aria,\n            baseline=baseline,\n            color=color,\n            dx=dx,\n            dy=dy,\n            font=font,\n            fontSize=fontSize,\n            fontStyle=fontStyle,\n            fontWeight=fontWeight,\n            frame=frame,\n            limit=limit,\n            lineHeight=lineHeight,\n            offset=offset,\n            orient=orient,\n            subtitleColor=subtitleColor,\n            subtitleFont=subtitleFont,\n            subtitleFontSize=subtitleFontSize,\n            subtitleFontStyle=subtitleFontStyle,\n            subtitleFontWeight=subtitleFontWeight,\n            subtitleLineHeight=subtitleLineHeight,\n            subtitlePadding=subtitlePadding,\n            zindex=zindex,\n            **kwds,\n        )\n\n\nclass BinExtent(VegaLiteSchema):\n    \"\"\"BinExtent schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BinExtent\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass BinParams(VegaLiteSchema):\n    \"\"\"\n    BinParams schema wrapper.\n\n    Binning properties or boolean flag for determining whether to bin data or not.\n\n    Parameters\n    ----------\n    anchor : float\n        A value in the binned domain at which to anchor the bins, shifting the bin\n        boundaries if necessary to ensure that a boundary aligns with the anchor value.\n\n        **Default value:** the minimum bin extent value\n    base : float\n        The number base to use for automatic bin determination (default is base 10).\n\n        **Default value:** ``10``\n    binned : bool\n        When set to ``true``, Vega-Lite treats the input data as already binned.\n    divide : Sequence[float]\n        Scale factors indicating allowable subdivisions. The default value is [5, 2], which\n        indicates that for base 10 numbers (the default base), the method may consider\n        dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the\n        method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might\n        also satisfy the given constraints.\n\n        **Default value:** ``[5, 2]``\n    extent : dict, Sequence[float], :class:`BinExtent`, :class:`ParameterExtent`\n        A two-element (``[min, max]``) array indicating the range of desired bin values.\n    maxbins : float\n        Maximum number of bins.\n\n        **Default value:** ``6`` for ``row``, ``column`` and ``shape`` channels; ``10`` for\n        other channels\n    minstep : float\n        A minimum allowable step size (particularly useful for integer values).\n    nice : bool\n        If true, attempts to make the bin boundaries use human-friendly boundaries, such as\n        multiples of ten.\n\n        **Default value:** ``true``\n    step : float\n        An exact step size to use between bins.\n\n        **Note:** If provided, options such as maxbins will be ignored.\n    steps : Sequence[float]\n        An array of allowable step sizes to choose from.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BinParams\"}\n\n    def __init__(\n        self,\n        anchor: Optional[float] = Undefined,\n        base: Optional[float] = Undefined,\n        binned: Optional[bool] = Undefined,\n        divide: Optional[Sequence[float]] = Undefined,\n        extent: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        minstep: Optional[float] = Undefined,\n        nice: Optional[bool] = Undefined,\n        step: Optional[float] = Undefined,\n        steps: Optional[Sequence[float]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            anchor=anchor,\n            base=base,\n            binned=binned,\n            divide=divide,\n            extent=extent,\n            maxbins=maxbins,\n            minstep=minstep,\n            nice=nice,\n            step=step,\n            steps=steps,\n            **kwds,\n        )\n\n\nclass Binding(VegaLiteSchema):\n    \"\"\"Binding schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Binding\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass BindCheckbox(Binding):\n    \"\"\"\n    BindCheckbox schema wrapper.\n\n    Parameters\n    ----------\n    input : Literal['checkbox']\n\n    debounce : float\n        If defined, delays event handling until the specified milliseconds have elapsed\n        since the last event was fired.\n    element : str, :class:`Element`\n        An optional CSS selector string indicating the parent element to which the input\n        element should be added. By default, all input elements are added within the parent\n        container of the Vega view.\n    name : str\n        By default, the signal name is used to label input elements. This ``name`` property\n        can be used instead to specify a custom label for the bound signal.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BindCheckbox\"}\n\n    def __init__(\n        self,\n        input: Optional[Literal[\"checkbox\"]] = Undefined,\n        debounce: Optional[float] = Undefined,\n        element: Optional[str | SchemaBase] = Undefined,\n        name: Optional[str] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            input=input, debounce=debounce, element=element, name=name, **kwds\n        )\n\n\nclass BindDirect(Binding):\n    \"\"\"\n    BindDirect schema wrapper.\n\n    Parameters\n    ----------\n    element : str, dict, :class:`Element`\n        An input element that exposes a *value* property and supports the `EventTarget\n        <https://developer.mozilla.org/en-US/docs/Web/API/EventTarget>`__ interface, or a\n        CSS selector string to such an element. When the element updates and dispatches an\n        event, the *value* property will be used as the new, bound signal value. When the\n        signal updates independent of the element, the *value* property will be set to the\n        signal value and a new event will be dispatched on the element.\n    debounce : float\n        If defined, delays event handling until the specified milliseconds have elapsed\n        since the last event was fired.\n    event : str\n        The event (default ``\"input\"``) to listen for to track changes on the external\n        element.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BindDirect\"}\n\n    def __init__(\n        self,\n        element: Optional[str | SchemaBase | Map] = Undefined,\n        debounce: Optional[float] = Undefined,\n        event: Optional[str] = Undefined,\n        **kwds,\n    ):\n        super().__init__(element=element, debounce=debounce, event=event, **kwds)\n\n\nclass BindInput(Binding):\n    \"\"\"\n    BindInput schema wrapper.\n\n    Parameters\n    ----------\n    autocomplete : str\n        A hint for form autofill. See the `HTML autocomplete attribute\n        <https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete>`__ for\n        additional information.\n    debounce : float\n        If defined, delays event handling until the specified milliseconds have elapsed\n        since the last event was fired.\n    element : str, :class:`Element`\n        An optional CSS selector string indicating the parent element to which the input\n        element should be added. By default, all input elements are added within the parent\n        container of the Vega view.\n    input : str\n        The type of input element to use. The valid values are ``\"checkbox\"``, ``\"radio\"``,\n        ``\"range\"``, ``\"select\"``, and any other legal `HTML form input type\n        <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input>`__.\n    name : str\n        By default, the signal name is used to label input elements. This ``name`` property\n        can be used instead to specify a custom label for the bound signal.\n    placeholder : str\n        Text that appears in the form control when it has no value set.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BindInput\"}\n\n    def __init__(\n        self,\n        autocomplete: Optional[str] = Undefined,\n        debounce: Optional[float] = Undefined,\n        element: Optional[str | SchemaBase] = Undefined,\n        input: Optional[str] = Undefined,\n        name: Optional[str] = Undefined,\n        placeholder: Optional[str] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            autocomplete=autocomplete,\n            debounce=debounce,\n            element=element,\n            input=input,\n            name=name,\n            placeholder=placeholder,\n            **kwds,\n        )\n\n\nclass BindRadioSelect(Binding):\n    \"\"\"\n    BindRadioSelect schema wrapper.\n\n    Parameters\n    ----------\n    input : Literal['radio', 'select']\n\n    options : Sequence[Any]\n        An array of options to select from.\n    debounce : float\n        If defined, delays event handling until the specified milliseconds have elapsed\n        since the last event was fired.\n    element : str, :class:`Element`\n        An optional CSS selector string indicating the parent element to which the input\n        element should be added. By default, all input elements are added within the parent\n        container of the Vega view.\n    labels : Sequence[str]\n        An array of label strings to represent the ``options`` values. If unspecified, the\n        ``options`` value will be coerced to a string and used as the label.\n    name : str\n        By default, the signal name is used to label input elements. This ``name`` property\n        can be used instead to specify a custom label for the bound signal.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BindRadioSelect\"}\n\n    def __init__(\n        self,\n        input: Optional[Literal[\"radio\", \"select\"]] = Undefined,\n        options: Optional[Sequence[Any]] = Undefined,\n        debounce: Optional[float] = Undefined,\n        element: Optional[str | SchemaBase] = Undefined,\n        labels: Optional[Sequence[str]] = Undefined,\n        name: Optional[str] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            input=input,\n            options=options,\n            debounce=debounce,\n            element=element,\n            labels=labels,\n            name=name,\n            **kwds,\n        )\n\n\nclass BindRange(Binding):\n    \"\"\"\n    BindRange schema wrapper.\n\n    Parameters\n    ----------\n    input : Literal['range']\n\n    debounce : float\n        If defined, delays event handling until the specified milliseconds have elapsed\n        since the last event was fired.\n    element : str, :class:`Element`\n        An optional CSS selector string indicating the parent element to which the input\n        element should be added. By default, all input elements are added within the parent\n        container of the Vega view.\n    max : float\n        Sets the maximum slider value. Defaults to the larger of the signal value and\n        ``100``.\n    min : float\n        Sets the minimum slider value. Defaults to the smaller of the signal value and\n        ``0``.\n    name : str\n        By default, the signal name is used to label input elements. This ``name`` property\n        can be used instead to specify a custom label for the bound signal.\n    step : float\n        Sets the minimum slider increment. If undefined, the step size will be automatically\n        determined based on the ``min`` and ``max`` values.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BindRange\"}\n\n    def __init__(\n        self,\n        input: Optional[Literal[\"range\"]] = Undefined,\n        debounce: Optional[float] = Undefined,\n        element: Optional[str | SchemaBase] = Undefined,\n        max: Optional[float] = Undefined,\n        min: Optional[float] = Undefined,\n        name: Optional[str] = Undefined,\n        step: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            input=input,\n            debounce=debounce,\n            element=element,\n            max=max,\n            min=min,\n            name=name,\n            step=step,\n            **kwds,\n        )\n\n\nclass BinnedTimeUnit(VegaLiteSchema):\n    \"\"\"BinnedTimeUnit schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BinnedTimeUnit\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Blend(VegaLiteSchema):\n    \"\"\"Blend schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Blend\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass BoxPlotConfig(VegaLiteSchema):\n    \"\"\"\n    BoxPlotConfig schema wrapper.\n\n    Parameters\n    ----------\n    box : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    extent : float, Literal['min-max']\n        The extent of the whiskers. Available options include:\n\n        * ``\"min-max\"``: min and max are the lower and upper whiskers respectively.\n        * A number representing multiple of the interquartile range. This number will be\n          multiplied by the IQR to determine whisker boundary, which spans from the smallest\n          data to the largest data within the range *[Q1 - k * IQR, Q3 + k * IQR]* where\n          *Q1* and *Q3* are the first and third quartiles while *IQR* is the interquartile\n          range (*Q3-Q1*).\n\n        **Default value:** ``1.5``.\n    median : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    outliers : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    size : float\n        Size of the box and median tick of a box plot\n    ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BoxPlotConfig\"}\n\n    def __init__(\n        self,\n        box: Optional[bool | SchemaBase | Map] = Undefined,\n        extent: Optional[float | Literal[\"min-max\"]] = Undefined,\n        median: Optional[bool | SchemaBase | Map] = Undefined,\n        outliers: Optional[bool | SchemaBase | Map] = Undefined,\n        rule: Optional[bool | SchemaBase | Map] = Undefined,\n        size: Optional[float] = Undefined,\n        ticks: Optional[bool | SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            box=box,\n            extent=extent,\n            median=median,\n            outliers=outliers,\n            rule=rule,\n            size=size,\n            ticks=ticks,\n            **kwds,\n        )\n\n\nclass BrushConfig(VegaLiteSchema):\n    \"\"\"\n    BrushConfig schema wrapper.\n\n    Parameters\n    ----------\n    cursor : :class:`Cursor`, 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']\n        The mouse cursor used over the interval mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    fill : str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']\n        The fill color of the interval mark.\n\n        **Default value:** ``\"#333333\"``\n    fillOpacity : float\n        The fill opacity of the interval mark (a value between ``0`` and ``1``).\n\n        **Default value:** ``0.125``\n    stroke : str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']\n        The stroke color of the interval mark.\n\n        **Default value:** ``\"#ffffff\"``\n    strokeDash : Sequence[float]\n        An array of alternating stroke and space lengths, for creating dashed or dotted\n        lines.\n    strokeDashOffset : float\n        The offset (in pixels) with which to begin drawing the stroke dash array.\n    strokeOpacity : float\n        The stroke opacity of the interval mark (a value between ``0`` and ``1``).\n    strokeWidth : float\n        The stroke width of the interval mark.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BrushConfig\"}\n\n    def __init__(\n        self,\n        cursor: Optional[SchemaBase | Cursor_T] = Undefined,\n        fill: Optional[str | SchemaBase | ColorName_T] = Undefined,\n        fillOpacity: Optional[float] = Undefined,\n        stroke: Optional[str | SchemaBase | ColorName_T] = Undefined,\n        strokeDash: Optional[Sequence[float]] = Undefined,\n        strokeDashOffset: Optional[float] = Undefined,\n        strokeOpacity: Optional[float] = Undefined,\n        strokeWidth: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            cursor=cursor,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            stroke=stroke,\n            strokeDash=strokeDash,\n            strokeDashOffset=strokeDashOffset,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            **kwds,\n        )\n\n\nclass Color(VegaLiteSchema):\n    \"\"\"Color schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Color\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ColorDef(VegaLiteSchema):\n    \"\"\"ColorDef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ColorDef\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ColorName(Color):\n    \"\"\"ColorName schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ColorName\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass ColorScheme(VegaLiteSchema):\n    \"\"\"ColorScheme schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ColorScheme\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass Categorical(ColorScheme):\n    \"\"\"Categorical schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Categorical\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass CompositeMark(AnyMark):\n    \"\"\"CompositeMark schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/CompositeMark\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass BoxPlot(CompositeMark):\n    \"\"\"BoxPlot schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BoxPlot\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass CompositeMarkDef(AnyMark):\n    \"\"\"CompositeMarkDef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/CompositeMarkDef\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass BoxPlotDef(CompositeMarkDef):\n    \"\"\"\n    BoxPlotDef schema wrapper.\n\n    Parameters\n    ----------\n    type : :class:`BoxPlot`, Literal['boxplot']\n        The mark type. This could a primitive mark type (one of ``\"bar\"``, ``\"circle\"``,\n        ``\"square\"``, ``\"tick\"``, ``\"line\"``, ``\"area\"``, ``\"point\"``, ``\"geoshape\"``,\n        ``\"rule\"``, and ``\"text\"``) or a composite mark type (``\"boxplot\"``,\n        ``\"errorband\"``, ``\"errorbar\"``).\n    box : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    clip : bool\n        Whether a composite mark be clipped to the enclosing group's width and height.\n    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']\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    extent : float, Literal['min-max']\n        The extent of the whiskers. Available options include:\n\n        * ``\"min-max\"``: min and max are the lower and upper whiskers respectively.\n        * A number representing multiple of the interquartile range. This number will be\n          multiplied by the IQR to determine whisker boundary, which spans from the smallest\n          data to the largest data within the range *[Q1 - k * IQR, Q3 + k * IQR]* where\n          *Q1* and *Q3* are the first and third quartiles while *IQR* is the interquartile\n          range (*Q3-Q1*).\n\n        **Default value:** ``1.5``.\n    invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    median : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    opacity : float\n        The opacity (value between [0,1]) of the mark.\n    orient : :class:`Orientation`, Literal['horizontal', 'vertical']\n        Orientation of the box plot. This is normally automatically determined based on\n        types of fields on x and y channels. However, an explicit ``orient`` be specified\n        when the orientation is ambiguous.\n\n        **Default value:** ``\"vertical\"``.\n    outliers : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    size : float\n        Size of the box and median tick of a box plot\n    ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BoxPlotDef\"}\n\n    def __init__(\n        self,\n        type: Optional[SchemaBase | BoxPlot_T] = Undefined,\n        box: Optional[bool | SchemaBase | Map] = Undefined,\n        clip: Optional[bool] = Undefined,\n        color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,\n        extent: Optional[float | Literal[\"min-max\"]] = Undefined,\n        invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined,\n        median: Optional[bool | SchemaBase | Map] = Undefined,\n        opacity: Optional[float] = Undefined,\n        orient: Optional[SchemaBase | Orientation_T] = Undefined,\n        outliers: Optional[bool | SchemaBase | Map] = Undefined,\n        rule: Optional[bool | SchemaBase | Map] = Undefined,\n        size: Optional[float] = Undefined,\n        ticks: Optional[bool | SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            type=type,\n            box=box,\n            clip=clip,\n            color=color,\n            extent=extent,\n            invalid=invalid,\n            median=median,\n            opacity=opacity,\n            orient=orient,\n            outliers=outliers,\n            rule=rule,\n            size=size,\n            ticks=ticks,\n            **kwds,\n        )\n\n\nclass CompositionConfig(VegaLiteSchema):\n    \"\"\"\n    CompositionConfig schema wrapper.\n\n    Parameters\n    ----------\n    columns : float\n        The number of columns to include in the view composition layout.\n\n        **Default value**: ``undefined`` -- An infinite number of columns (a single row)\n        will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the\n        ``column`` channel (for ``facet`` and ``repeat``).\n\n        **Note**:\n\n        1) This property is only for:\n\n        * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)\n        * the ``facet`` and ``repeat`` operator with one field/repetition definition\n          (without row/column nesting)\n\n        2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)\n        and to using the ``row`` channel (for ``facet`` and ``repeat``).\n    spacing : float\n        The default spacing in pixels between composed sub-views.\n\n        **Default value**: ``20``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/CompositionConfig\"}\n\n    def __init__(\n        self,\n        columns: Optional[float] = Undefined,\n        spacing: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(columns=columns, spacing=spacing, **kwds)\n\n\nclass ConditionalAxisColor(VegaLiteSchema):\n    \"\"\"ConditionalAxisColor schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalAxisColor\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalAxisLabelAlign(VegaLiteSchema):\n    \"\"\"ConditionalAxisLabelAlign schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalAxisLabelAlign\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalAxisLabelBaseline(VegaLiteSchema):\n    \"\"\"ConditionalAxisLabelBaseline schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalAxisLabelBaseline\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalAxisLabelFontStyle(VegaLiteSchema):\n    \"\"\"ConditionalAxisLabelFontStyle schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalAxisLabelFontStyle\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalAxisLabelFontWeight(VegaLiteSchema):\n    \"\"\"ConditionalAxisLabelFontWeight schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalAxisLabelFontWeight\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalAxisNumber(VegaLiteSchema):\n    \"\"\"ConditionalAxisNumber schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalAxisNumber\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalAxisNumberArray(VegaLiteSchema):\n    \"\"\"ConditionalAxisNumberArray schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalAxisNumberArray\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalAxisPropertyAlignnull(VegaLiteSchema):\n    \"\"\"ConditionalAxisPropertyAlignnull schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalAxisProperty<(Align|null)>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalAxisPropertyColornull(VegaLiteSchema):\n    \"\"\"ConditionalAxisPropertyColornull schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalAxisProperty<(Color|null)>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalAxisPropertyFontStylenull(VegaLiteSchema):\n    \"\"\"ConditionalAxisPropertyFontStylenull schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalAxisProperty<(FontStyle|null)>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalAxisPropertyFontWeightnull(VegaLiteSchema):\n    \"\"\"ConditionalAxisPropertyFontWeightnull schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalAxisProperty<(FontWeight|null)>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalAxisPropertyTextBaselinenull(VegaLiteSchema):\n    \"\"\"ConditionalAxisPropertyTextBaselinenull schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalAxisProperty<(TextBaseline|null)>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalAxisPropertynumberArraynull(VegaLiteSchema):\n    \"\"\"ConditionalAxisPropertynumberArraynull schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalAxisProperty<(number[]|null)>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalAxisPropertynumbernull(VegaLiteSchema):\n    \"\"\"ConditionalAxisPropertynumbernull schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalAxisProperty<(number|null)>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalAxisPropertystringnull(VegaLiteSchema):\n    \"\"\"ConditionalAxisPropertystringnull schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalAxisProperty<(string|null)>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalAxisString(VegaLiteSchema):\n    \"\"\"ConditionalAxisString schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalAxisString\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalMarkPropFieldOrDatumDef(VegaLiteSchema):\n    \"\"\"ConditionalMarkPropFieldOrDatumDef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalMarkPropFieldOrDatumDefTypeForShape(VegaLiteSchema):\n    \"\"\"ConditionalMarkPropFieldOrDatumDefTypeForShape schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef<TypeForShape>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalParameterMarkPropFieldOrDatumDef(ConditionalMarkPropFieldOrDatumDef):\n    \"\"\"ConditionalParameterMarkPropFieldOrDatumDef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalParameter<MarkPropFieldOrDatumDef>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalParameterMarkPropFieldOrDatumDefTypeForShape(\n    ConditionalMarkPropFieldOrDatumDefTypeForShape\n):\n    \"\"\"ConditionalParameterMarkPropFieldOrDatumDefTypeForShape schema wrapper.\"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ConditionalParameter<MarkPropFieldOrDatumDef<TypeForShape>>\"\n    }\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalPredicateMarkPropFieldOrDatumDef(ConditionalMarkPropFieldOrDatumDef):\n    \"\"\"ConditionalPredicateMarkPropFieldOrDatumDef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalPredicate<MarkPropFieldOrDatumDef>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape(\n    ConditionalMarkPropFieldOrDatumDefTypeForShape\n):\n    \"\"\"ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape schema wrapper.\"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ConditionalPredicate<MarkPropFieldOrDatumDef<TypeForShape>>\"\n    }\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalPredicateValueDefAlignnullExprRef(VegaLiteSchema):\n    \"\"\"ConditionalPredicateValueDefAlignnullExprRef schema wrapper.\"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>\"\n    }\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalPredicateValueDefColornullExprRef(VegaLiteSchema):\n    \"\"\"ConditionalPredicateValueDefColornullExprRef schema wrapper.\"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>\"\n    }\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalPredicateValueDefFontStylenullExprRef(VegaLiteSchema):\n    \"\"\"ConditionalPredicateValueDefFontStylenullExprRef schema wrapper.\"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>\"\n    }\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalPredicateValueDefFontWeightnullExprRef(VegaLiteSchema):\n    \"\"\"ConditionalPredicateValueDefFontWeightnullExprRef schema wrapper.\"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>\"\n    }\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalPredicateValueDefTextBaselinenullExprRef(VegaLiteSchema):\n    \"\"\"ConditionalPredicateValueDefTextBaselinenullExprRef schema wrapper.\"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>\"\n    }\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalPredicateValueDefnumberArraynullExprRef(VegaLiteSchema):\n    \"\"\"ConditionalPredicateValueDefnumberArraynullExprRef schema wrapper.\"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>\"\n    }\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalPredicateValueDefnumbernullExprRef(VegaLiteSchema):\n    \"\"\"ConditionalPredicateValueDefnumbernullExprRef schema wrapper.\"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>\"\n    }\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalStringFieldDef(VegaLiteSchema):\n    \"\"\"ConditionalStringFieldDef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalStringFieldDef\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalParameterStringFieldDef(ConditionalStringFieldDef):\n    r\"\"\"\n    ConditionalParameterStringFieldDef schema wrapper.\n\n    Parameters\n    ----------\n    param : str, :class:`ParameterName`\n        Filter using a parameter name.\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    empty : bool\n        For selection parameters, the predicate of empty selections returns true by default.\n        Override this behavior, by setting this property ``empty: false``.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalParameter<StringFieldDef>\"}\n\n    def __init__(\n        self,\n        param: Optional[str | SchemaBase] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            param=param,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            empty=empty,\n            field=field,\n            format=format,\n            formatType=formatType,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass ConditionalPredicateStringFieldDef(ConditionalStringFieldDef):\n    r\"\"\"\n    ConditionalPredicateStringFieldDef schema wrapper.\n\n    Parameters\n    ----------\n    test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`\n        Predicate for triggering the condition\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalPredicate<StringFieldDef>\"}\n\n    def __init__(\n        self,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            test=test,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            format=format,\n            formatType=formatType,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass ConditionalValueDefGradientstringnullExprRef(VegaLiteSchema):\n    \"\"\"ConditionalValueDefGradientstringnullExprRef schema wrapper.\"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n    }\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalParameterValueDefGradientstringnullExprRef(\n    ConditionalValueDefGradientstringnullExprRef\n):\n    \"\"\"\n    ConditionalParameterValueDefGradientstringnullExprRef schema wrapper.\n\n    Parameters\n    ----------\n    param : str, :class:`ParameterName`\n        Filter using a parameter name.\n    value : str, dict, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`, None\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    empty : bool\n        For selection parameters, the predicate of empty selections returns true by default.\n        Override this behavior, by setting this property ``empty: false``.\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ConditionalParameter<ValueDef<(Gradient|string|null|ExprRef)>>\"\n    }\n\n    def __init__(\n        self,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(param=param, value=value, empty=empty, **kwds)\n\n\nclass ConditionalPredicateValueDefGradientstringnullExprRef(\n    ConditionalValueDefGradientstringnullExprRef\n):\n    \"\"\"\n    ConditionalPredicateValueDefGradientstringnullExprRef schema wrapper.\n\n    Parameters\n    ----------\n    test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`\n        Predicate for triggering the condition\n    value : str, dict, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`, None\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ConditionalPredicate<ValueDef<(Gradient|string|null|ExprRef)>>\"\n    }\n\n    def __init__(\n        self,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(test=test, value=value, **kwds)\n\n\nclass ConditionalValueDefTextExprRef(VegaLiteSchema):\n    \"\"\"ConditionalValueDefTextExprRef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalValueDef<(Text|ExprRef)>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalParameterValueDefTextExprRef(ConditionalValueDefTextExprRef):\n    \"\"\"\n    ConditionalParameterValueDefTextExprRef schema wrapper.\n\n    Parameters\n    ----------\n    param : str, :class:`ParameterName`\n        Filter using a parameter name.\n    value : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    empty : bool\n        For selection parameters, the predicate of empty selections returns true by default.\n        Override this behavior, by setting this property ``empty: false``.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalParameter<ValueDef<(Text|ExprRef)>>\"}\n\n    def __init__(\n        self,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n        empty: Optional[bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(param=param, value=value, empty=empty, **kwds)\n\n\nclass ConditionalPredicateValueDefTextExprRef(ConditionalValueDefTextExprRef):\n    \"\"\"\n    ConditionalPredicateValueDefTextExprRef schema wrapper.\n\n    Parameters\n    ----------\n    test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`\n        Predicate for triggering the condition\n    value : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalPredicate<ValueDef<(Text|ExprRef)>>\"}\n\n    def __init__(\n        self,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(test=test, value=value, **kwds)\n\n\nclass ConditionalValueDefnumber(VegaLiteSchema):\n    \"\"\"ConditionalValueDefnumber schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalValueDef<number>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalParameterValueDefnumber(ConditionalValueDefnumber):\n    \"\"\"\n    ConditionalParameterValueDefnumber schema wrapper.\n\n    Parameters\n    ----------\n    param : str, :class:`ParameterName`\n        Filter using a parameter name.\n    value : float\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    empty : bool\n        For selection parameters, the predicate of empty selections returns true by default.\n        Override this behavior, by setting this property ``empty: false``.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalParameter<ValueDef<number>>\"}\n\n    def __init__(\n        self,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float] = Undefined,\n        empty: Optional[bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(param=param, value=value, empty=empty, **kwds)\n\n\nclass ConditionalPredicateValueDefnumber(ConditionalValueDefnumber):\n    \"\"\"\n    ConditionalPredicateValueDefnumber schema wrapper.\n\n    Parameters\n    ----------\n    test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`\n        Predicate for triggering the condition\n    value : float\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalPredicate<ValueDef<number>>\"}\n\n    def __init__(\n        self,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(test=test, value=value, **kwds)\n\n\nclass ConditionalValueDefnumberArrayExprRef(VegaLiteSchema):\n    \"\"\"ConditionalValueDefnumberArrayExprRef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalValueDef<(number[]|ExprRef)>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalParameterValueDefnumberArrayExprRef(\n    ConditionalValueDefnumberArrayExprRef\n):\n    \"\"\"\n    ConditionalParameterValueDefnumberArrayExprRef schema wrapper.\n\n    Parameters\n    ----------\n    param : str, :class:`ParameterName`\n        Filter using a parameter name.\n    value : dict, Sequence[float], :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    empty : bool\n        For selection parameters, the predicate of empty selections returns true by default.\n        Override this behavior, by setting this property ``empty: false``.\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ConditionalParameter<ValueDef<(number[]|ExprRef)>>\"\n    }\n\n    def __init__(\n        self,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        empty: Optional[bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(param=param, value=value, empty=empty, **kwds)\n\n\nclass ConditionalPredicateValueDefnumberArrayExprRef(\n    ConditionalValueDefnumberArrayExprRef\n):\n    \"\"\"\n    ConditionalPredicateValueDefnumberArrayExprRef schema wrapper.\n\n    Parameters\n    ----------\n    test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`\n        Predicate for triggering the condition\n    value : dict, Sequence[float], :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ConditionalPredicate<ValueDef<(number[]|ExprRef)>>\"\n    }\n\n    def __init__(\n        self,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(test=test, value=value, **kwds)\n\n\nclass ConditionalValueDefnumberExprRef(VegaLiteSchema):\n    \"\"\"ConditionalValueDefnumberExprRef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalParameterValueDefnumberExprRef(ConditionalValueDefnumberExprRef):\n    \"\"\"\n    ConditionalParameterValueDefnumberExprRef schema wrapper.\n\n    Parameters\n    ----------\n    param : str, :class:`ParameterName`\n        Filter using a parameter name.\n    value : dict, float, :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    empty : bool\n        For selection parameters, the predicate of empty selections returns true by default.\n        Override this behavior, by setting this property ``empty: false``.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalParameter<ValueDef<(number|ExprRef)>>\"}\n\n    def __init__(\n        self,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        empty: Optional[bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(param=param, value=value, empty=empty, **kwds)\n\n\nclass ConditionalPredicateValueDefnumberExprRef(ConditionalValueDefnumberExprRef):\n    \"\"\"\n    ConditionalPredicateValueDefnumberExprRef schema wrapper.\n\n    Parameters\n    ----------\n    test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`\n        Predicate for triggering the condition\n    value : dict, float, :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalPredicate<ValueDef<(number|ExprRef)>>\"}\n\n    def __init__(\n        self,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(test=test, value=value, **kwds)\n\n\nclass ConditionalValueDefstringExprRef(VegaLiteSchema):\n    \"\"\"ConditionalValueDefstringExprRef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalValueDef<(string|ExprRef)>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalParameterValueDefstringExprRef(ConditionalValueDefstringExprRef):\n    \"\"\"\n    ConditionalParameterValueDefstringExprRef schema wrapper.\n\n    Parameters\n    ----------\n    param : str, :class:`ParameterName`\n        Filter using a parameter name.\n    value : str, dict, :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    empty : bool\n        For selection parameters, the predicate of empty selections returns true by default.\n        Override this behavior, by setting this property ``empty: false``.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalParameter<ValueDef<(string|ExprRef)>>\"}\n\n    def __init__(\n        self,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        empty: Optional[bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(param=param, value=value, empty=empty, **kwds)\n\n\nclass ConditionalPredicateValueDefstringExprRef(ConditionalValueDefstringExprRef):\n    \"\"\"\n    ConditionalPredicateValueDefstringExprRef schema wrapper.\n\n    Parameters\n    ----------\n    test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`\n        Predicate for triggering the condition\n    value : str, dict, :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalPredicate<ValueDef<(string|ExprRef)>>\"}\n\n    def __init__(\n        self,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(test=test, value=value, **kwds)\n\n\nclass ConditionalValueDefstringnullExprRef(VegaLiteSchema):\n    \"\"\"ConditionalValueDefstringnullExprRef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConditionalParameterValueDefstringnullExprRef(\n    ConditionalValueDefstringnullExprRef\n):\n    \"\"\"\n    ConditionalParameterValueDefstringnullExprRef schema wrapper.\n\n    Parameters\n    ----------\n    param : str, :class:`ParameterName`\n        Filter using a parameter name.\n    value : str, dict, :class:`ExprRef`, None\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    empty : bool\n        For selection parameters, the predicate of empty selections returns true by default.\n        Override this behavior, by setting this property ``empty: false``.\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ConditionalParameter<ValueDef<(string|null|ExprRef)>>\"\n    }\n\n    def __init__(\n        self,\n        param: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n        empty: Optional[bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(param=param, value=value, empty=empty, **kwds)\n\n\nclass ConditionalPredicateValueDefstringnullExprRef(\n    ConditionalValueDefstringnullExprRef\n):\n    \"\"\"\n    ConditionalPredicateValueDefstringnullExprRef schema wrapper.\n\n    Parameters\n    ----------\n    test : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`\n        Predicate for triggering the condition\n    value : str, dict, :class:`ExprRef`, None\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ConditionalPredicate<ValueDef<(string|null|ExprRef)>>\"\n    }\n\n    def __init__(\n        self,\n        test: Optional[str | SchemaBase | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(test=test, value=value, **kwds)\n\n\nclass Config(VegaLiteSchema):\n    \"\"\"\n    Config schema wrapper.\n\n    Parameters\n    ----------\n    arc : dict, :class:`RectConfig`\n        Arc-specific Config\n    area : dict, :class:`AreaConfig`\n        Area-Specific Config\n    aria : bool\n        A boolean flag indicating if ARIA default attributes should be included for marks\n        and guides (SVG output only). If false, the ``\"aria-hidden\"`` attribute will be set\n        for all guides, removing them from the ARIA accessibility tree and Vega-Lite will\n        not generate default descriptions for marks.\n\n        **Default value:** ``true``.\n    autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y']\n        How the visualization size should be determined. If a string, should be one of\n        ``\"pad\"``, ``\"fit\"`` or ``\"none\"``. Object values can additionally specify\n        parameters for content sizing and automatic resizing.\n\n        **Default value**: ``pad``\n    axis : dict, :class:`AxisConfig`\n        Axis configuration, which determines default properties for all ``x`` and ``y``\n        `axes <https://vega.github.io/vega-lite/docs/axis.html>`__. For a full list of axis\n        configuration options, please see the `corresponding section of the axis\n        documentation <https://vega.github.io/vega-lite/docs/axis.html#config>`__.\n    axisBand : dict, :class:`AxisConfig`\n        Config for axes with \"band\" scales.\n    axisBottom : dict, :class:`AxisConfig`\n        Config for x-axis along the bottom edge of the chart.\n    axisDiscrete : dict, :class:`AxisConfig`\n        Config for axes with \"point\" or \"band\" scales.\n    axisLeft : dict, :class:`AxisConfig`\n        Config for y-axis along the left edge of the chart.\n    axisPoint : dict, :class:`AxisConfig`\n        Config for axes with \"point\" scales.\n    axisQuantitative : dict, :class:`AxisConfig`\n        Config for quantitative axes.\n    axisRight : dict, :class:`AxisConfig`\n        Config for y-axis along the right edge of the chart.\n    axisTemporal : dict, :class:`AxisConfig`\n        Config for temporal axes.\n    axisTop : dict, :class:`AxisConfig`\n        Config for x-axis along the top edge of the chart.\n    axisX : dict, :class:`AxisConfig`\n        X-axis specific config.\n    axisXBand : dict, :class:`AxisConfig`\n        Config for x-axes with \"band\" scales.\n    axisXDiscrete : dict, :class:`AxisConfig`\n        Config for x-axes with \"point\" or \"band\" scales.\n    axisXPoint : dict, :class:`AxisConfig`\n        Config for x-axes with \"point\" scales.\n    axisXQuantitative : dict, :class:`AxisConfig`\n        Config for x-quantitative axes.\n    axisXTemporal : dict, :class:`AxisConfig`\n        Config for x-temporal axes.\n    axisY : dict, :class:`AxisConfig`\n        Y-axis specific config.\n    axisYBand : dict, :class:`AxisConfig`\n        Config for y-axes with \"band\" scales.\n    axisYDiscrete : dict, :class:`AxisConfig`\n        Config for y-axes with \"point\" or \"band\" scales.\n    axisYPoint : dict, :class:`AxisConfig`\n        Config for y-axes with \"point\" scales.\n    axisYQuantitative : dict, :class:`AxisConfig`\n        Config for y-quantitative axes.\n    axisYTemporal : dict, :class:`AxisConfig`\n        Config for y-temporal axes.\n    background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']\n        CSS color property to use as the background of the entire view.\n\n        **Default value:** ``\"white\"``\n    bar : dict, :class:`BarConfig`\n        Bar-Specific Config\n    boxplot : dict, :class:`BoxPlotConfig`\n        Box Config\n    circle : dict, :class:`MarkConfig`\n        Circle-Specific Config\n    concat : dict, :class:`CompositionConfig`\n        Default configuration for all concatenation and repeat view composition operators\n        (``concat``, ``hconcat``, ``vconcat``, and ``repeat``)\n    countTitle : str\n        Default axis and legend title for count fields.\n\n        **Default value:** ``'Count of Records``.\n    customFormatTypes : bool\n        Allow the ``formatType`` property for text marks and guides to accept a custom\n        formatter function `registered as a Vega expression\n        <https://vega.github.io/vega-lite/usage/compile.html#format-type>`__.\n    errorband : dict, :class:`ErrorBandConfig`\n        ErrorBand Config\n    errorbar : dict, :class:`ErrorBarConfig`\n        ErrorBar Config\n    facet : dict, :class:`CompositionConfig`\n        Default configuration for the ``facet`` view composition operator\n    fieldTitle : Literal['verbal', 'functional', 'plain']\n        Defines how Vega-Lite generates title for fields. There are three possible styles:\n\n        * ``\"verbal\"`` (Default) - displays function in a verbal style (e.g., \"Sum of\n          field\", \"Year-month of date\", \"field (binned)\").\n        * ``\"function\"`` - displays function using parentheses and capitalized texts (e.g.,\n          \"SUM(field)\", \"YEARMONTH(date)\", \"BIN(field)\").\n        * ``\"plain\"`` - displays only the field name without functions (e.g., \"field\",\n          \"date\", \"field\").\n    font : str\n        Default font for all text marks, titles, and labels.\n    geoshape : dict, :class:`MarkConfig`\n        Geoshape-Specific Config\n    header : dict, :class:`HeaderConfig`\n        Header configuration, which determines default properties for all `headers\n        <https://vega.github.io/vega-lite/docs/header.html>`__.\n\n        For a full list of header configuration options, please see the `corresponding\n        section of in the header documentation\n        <https://vega.github.io/vega-lite/docs/header.html#config>`__.\n    headerColumn : dict, :class:`HeaderConfig`\n        Header configuration, which determines default properties for column `headers\n        <https://vega.github.io/vega-lite/docs/header.html>`__.\n\n        For a full list of header configuration options, please see the `corresponding\n        section of in the header documentation\n        <https://vega.github.io/vega-lite/docs/header.html#config>`__.\n    headerFacet : dict, :class:`HeaderConfig`\n        Header configuration, which determines default properties for non-row/column facet\n        `headers <https://vega.github.io/vega-lite/docs/header.html>`__.\n\n        For a full list of header configuration options, please see the `corresponding\n        section of in the header documentation\n        <https://vega.github.io/vega-lite/docs/header.html#config>`__.\n    headerRow : dict, :class:`HeaderConfig`\n        Header configuration, which determines default properties for row `headers\n        <https://vega.github.io/vega-lite/docs/header.html>`__.\n\n        For a full list of header configuration options, please see the `corresponding\n        section of in the header documentation\n        <https://vega.github.io/vega-lite/docs/header.html#config>`__.\n    image : dict, :class:`RectConfig`\n        Image-specific Config\n    legend : dict, :class:`LegendConfig`\n        Legend configuration, which determines default properties for all `legends\n        <https://vega.github.io/vega-lite/docs/legend.html>`__. For a full list of legend\n        configuration options, please see the `corresponding section of in the legend\n        documentation <https://vega.github.io/vega-lite/docs/legend.html#config>`__.\n    line : dict, :class:`LineConfig`\n        Line-Specific Config\n    lineBreak : str, dict, :class:`ExprRef`\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property provides a global default for text marks, which is\n        overridden by mark or style config settings, and by the lineBreak mark encoding\n        channel. If signal-valued, either string or regular expression (regexp) values are\n        valid.\n    locale : dict, :class:`Locale`\n        Locale definitions for string parsing and formatting of number and date values. The\n        locale object should contain ``number`` and/or ``time`` properties with `locale\n        definitions <https://vega.github.io/vega/docs/api/locale/>`__. Locale definitions\n        provided in the config block may be overridden by the View constructor locale\n        option.\n    mark : dict, :class:`MarkConfig`\n        Mark Config\n    normalizedNumberFormat : str\n        If normalizedNumberFormatType is not specified, D3 number format for axis labels,\n        text marks, and tooltips of normalized stacked fields (fields with ``stack:\n        \"normalize\"``). For example ``\"s\"`` for SI units. Use `D3's number format pattern\n        <https://github.com/d3/d3-format#locale_format>`__.\n\n        If ``config.normalizedNumberFormatType`` is specified and\n        ``config.customFormatTypes`` is ``true``, this value will be passed as ``format``\n        alongside ``datum.value`` to the ``config.numberFormatType`` function. **Default\n        value:** ``%``\n    normalizedNumberFormatType : str\n        `Custom format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for\n        ``config.normalizedNumberFormat``.\n\n        **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is\n        exposed as `format in Vega-Expression\n        <https://vega.github.io/vega/docs/expressions/#format>`__. **Note:** You must also\n        set ``customFormatTypes`` to ``true`` to use this feature.\n    numberFormat : str\n        If numberFormatType is not specified, D3 number format for guide labels, text marks,\n        and tooltips of non-normalized fields (fields *without* ``stack: \"normalize\"``). For\n        example ``\"s\"`` for SI units. Use `D3's number format pattern\n        <https://github.com/d3/d3-format#locale_format>`__.\n\n        If ``config.numberFormatType`` is specified and ``config.customFormatTypes`` is\n        ``true``, this value will be passed as ``format`` alongside ``datum.value`` to the\n        ``config.numberFormatType`` function.\n    numberFormatType : str\n        `Custom format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for\n        ``config.numberFormat``.\n\n        **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is\n        exposed as `format in Vega-Expression\n        <https://vega.github.io/vega/docs/expressions/#format>`__. **Note:** You must also\n        set ``customFormatTypes`` to ``true`` to use this feature.\n    padding : dict, float, :class:`ExprRef`, :class:`Padding`\n        The default visualization padding, in pixels, from the edge of the visualization\n        canvas to the data rectangle. If a number, specifies padding for all sides. If an\n        object, the value should have the format ``{\"left\": 5, \"top\": 5, \"right\": 5,\n        \"bottom\": 5}`` to specify padding for each side of the visualization.\n\n        **Default value**: ``5``\n    params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`]\n        Dynamic variables or selections that parameterize a visualization.\n    point : dict, :class:`MarkConfig`\n        Point-Specific Config\n    projection : dict, :class:`ProjectionConfig`\n        Projection configuration, which determines default properties for all `projections\n        <https://vega.github.io/vega-lite/docs/projection.html>`__. For a full list of\n        projection configuration options, please see the `corresponding section of the\n        projection documentation\n        <https://vega.github.io/vega-lite/docs/projection.html#config>`__.\n    range : dict, :class:`RangeConfig`\n        An object hash that defines default range arrays or schemes for using with scales.\n        For a full list of scale range configuration options, please see the `corresponding\n        section of the scale documentation\n        <https://vega.github.io/vega-lite/docs/scale.html#config>`__.\n    rect : dict, :class:`RectConfig`\n        Rect-Specific Config\n    rule : dict, :class:`MarkConfig`\n        Rule-Specific Config\n    scale : dict, :class:`ScaleConfig`\n        Scale configuration determines default properties for all `scales\n        <https://vega.github.io/vega-lite/docs/scale.html>`__. For a full list of scale\n        configuration options, please see the `corresponding section of the scale\n        documentation <https://vega.github.io/vega-lite/docs/scale.html#config>`__.\n    selection : dict, :class:`SelectionConfig`\n        An object hash for defining default properties for each type of selections.\n    square : dict, :class:`MarkConfig`\n        Square-Specific Config\n    style : dict, :class:`StyleConfigIndex`\n        An object hash that defines key-value mappings to determine default properties for\n        marks with a given `style\n        <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__. The keys represent\n        styles names; the values have to be valid `mark configuration objects\n        <https://vega.github.io/vega-lite/docs/mark.html#config>`__.\n    text : dict, :class:`MarkConfig`\n        Text-Specific Config\n    tick : dict, :class:`TickConfig`\n        Tick-Specific Config\n    timeFormat : str\n        Default time format for raw time values (without time units) in text marks, legend\n        labels and header labels.\n\n        **Default value:** ``\"%b %d, %Y\"`` **Note:** Axes automatically determine the format\n        for each label automatically so this config does not affect axes.\n    timeFormatType : str\n        `Custom format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for\n        ``config.timeFormat``.\n\n        **Default value:** ``undefined`` -- This is equilvalent to call D3-time-format,\n        which is exposed as `timeFormat in Vega-Expression\n        <https://vega.github.io/vega/docs/expressions/#timeFormat>`__. **Note:** You must\n        also set ``customFormatTypes`` to ``true`` and there must *not* be a ``timeUnit``\n        defined to use this feature.\n    title : dict, :class:`TitleConfig`\n        Title configuration, which determines default properties for all `titles\n        <https://vega.github.io/vega-lite/docs/title.html>`__. For a full list of title\n        configuration options, please see the `corresponding section of the title\n        documentation <https://vega.github.io/vega-lite/docs/title.html#config>`__.\n    tooltipFormat : dict, :class:`FormatConfig`\n        Define `custom format configuration\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ for tooltips. If\n        unspecified, default format config will be applied.\n    trail : dict, :class:`LineConfig`\n        Trail-Specific Config\n    view : dict, :class:`ViewConfig`\n        Default properties for `single view plots\n        <https://vega.github.io/vega-lite/docs/spec.html#single>`__.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Config\"}\n\n    def __init__(\n        self,\n        arc: Optional[SchemaBase | Map] = Undefined,\n        area: Optional[SchemaBase | Map] = Undefined,\n        aria: Optional[bool] = Undefined,\n        autosize: Optional[SchemaBase | Map | AutosizeType_T] = Undefined,\n        axis: Optional[SchemaBase | Map] = Undefined,\n        axisBand: Optional[SchemaBase | Map] = Undefined,\n        axisBottom: Optional[SchemaBase | Map] = Undefined,\n        axisDiscrete: Optional[SchemaBase | Map] = Undefined,\n        axisLeft: Optional[SchemaBase | Map] = Undefined,\n        axisPoint: Optional[SchemaBase | Map] = Undefined,\n        axisQuantitative: Optional[SchemaBase | Map] = Undefined,\n        axisRight: Optional[SchemaBase | Map] = Undefined,\n        axisTemporal: Optional[SchemaBase | Map] = Undefined,\n        axisTop: Optional[SchemaBase | Map] = Undefined,\n        axisX: Optional[SchemaBase | Map] = Undefined,\n        axisXBand: Optional[SchemaBase | Map] = Undefined,\n        axisXDiscrete: Optional[SchemaBase | Map] = Undefined,\n        axisXPoint: Optional[SchemaBase | Map] = Undefined,\n        axisXQuantitative: Optional[SchemaBase | Map] = Undefined,\n        axisXTemporal: Optional[SchemaBase | Map] = Undefined,\n        axisY: Optional[SchemaBase | Map] = Undefined,\n        axisYBand: Optional[SchemaBase | Map] = Undefined,\n        axisYDiscrete: Optional[SchemaBase | Map] = Undefined,\n        axisYPoint: Optional[SchemaBase | Map] = Undefined,\n        axisYQuantitative: Optional[SchemaBase | Map] = Undefined,\n        axisYTemporal: Optional[SchemaBase | Map] = Undefined,\n        background: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        bar: Optional[SchemaBase | Map] = Undefined,\n        boxplot: Optional[SchemaBase | Map] = Undefined,\n        circle: Optional[SchemaBase | Map] = Undefined,\n        concat: Optional[SchemaBase | Map] = Undefined,\n        countTitle: Optional[str] = Undefined,\n        customFormatTypes: Optional[bool] = Undefined,\n        errorband: Optional[SchemaBase | Map] = Undefined,\n        errorbar: Optional[SchemaBase | Map] = Undefined,\n        facet: Optional[SchemaBase | Map] = Undefined,\n        fieldTitle: Optional[Literal[\"verbal\", \"functional\", \"plain\"]] = Undefined,\n        font: Optional[str] = Undefined,\n        geoshape: Optional[SchemaBase | Map] = Undefined,\n        header: Optional[SchemaBase | Map] = Undefined,\n        headerColumn: Optional[SchemaBase | Map] = Undefined,\n        headerFacet: Optional[SchemaBase | Map] = Undefined,\n        headerRow: Optional[SchemaBase | Map] = Undefined,\n        image: Optional[SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map] = Undefined,\n        line: Optional[SchemaBase | Map] = Undefined,\n        lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        locale: Optional[SchemaBase | Map] = Undefined,\n        mark: Optional[SchemaBase | Map] = Undefined,\n        normalizedNumberFormat: Optional[str] = Undefined,\n        normalizedNumberFormatType: Optional[str] = Undefined,\n        numberFormat: Optional[str] = Undefined,\n        numberFormatType: Optional[str] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        params: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        point: Optional[SchemaBase | Map] = Undefined,\n        projection: Optional[SchemaBase | Map] = Undefined,\n        range: Optional[SchemaBase | Map] = Undefined,\n        rect: Optional[SchemaBase | Map] = Undefined,\n        rule: Optional[SchemaBase | Map] = Undefined,\n        scale: Optional[SchemaBase | Map] = Undefined,\n        selection: Optional[SchemaBase | Map] = Undefined,\n        square: Optional[SchemaBase | Map] = Undefined,\n        style: Optional[SchemaBase | Map] = Undefined,\n        text: Optional[SchemaBase | Map] = Undefined,\n        tick: Optional[SchemaBase | Map] = Undefined,\n        timeFormat: Optional[str] = Undefined,\n        timeFormatType: Optional[str] = Undefined,\n        title: Optional[SchemaBase | Map] = Undefined,\n        tooltipFormat: Optional[SchemaBase | Map] = Undefined,\n        trail: Optional[SchemaBase | Map] = Undefined,\n        view: Optional[SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            arc=arc,\n            area=area,\n            aria=aria,\n            autosize=autosize,\n            axis=axis,\n            axisBand=axisBand,\n            axisBottom=axisBottom,\n            axisDiscrete=axisDiscrete,\n            axisLeft=axisLeft,\n            axisPoint=axisPoint,\n            axisQuantitative=axisQuantitative,\n            axisRight=axisRight,\n            axisTemporal=axisTemporal,\n            axisTop=axisTop,\n            axisX=axisX,\n            axisXBand=axisXBand,\n            axisXDiscrete=axisXDiscrete,\n            axisXPoint=axisXPoint,\n            axisXQuantitative=axisXQuantitative,\n            axisXTemporal=axisXTemporal,\n            axisY=axisY,\n            axisYBand=axisYBand,\n            axisYDiscrete=axisYDiscrete,\n            axisYPoint=axisYPoint,\n            axisYQuantitative=axisYQuantitative,\n            axisYTemporal=axisYTemporal,\n            background=background,\n            bar=bar,\n            boxplot=boxplot,\n            circle=circle,\n            concat=concat,\n            countTitle=countTitle,\n            customFormatTypes=customFormatTypes,\n            errorband=errorband,\n            errorbar=errorbar,\n            facet=facet,\n            fieldTitle=fieldTitle,\n            font=font,\n            geoshape=geoshape,\n            header=header,\n            headerColumn=headerColumn,\n            headerFacet=headerFacet,\n            headerRow=headerRow,\n            image=image,\n            legend=legend,\n            line=line,\n            lineBreak=lineBreak,\n            locale=locale,\n            mark=mark,\n            normalizedNumberFormat=normalizedNumberFormat,\n            normalizedNumberFormatType=normalizedNumberFormatType,\n            numberFormat=numberFormat,\n            numberFormatType=numberFormatType,\n            padding=padding,\n            params=params,\n            point=point,\n            projection=projection,\n            range=range,\n            rect=rect,\n            rule=rule,\n            scale=scale,\n            selection=selection,\n            square=square,\n            style=style,\n            text=text,\n            tick=tick,\n            timeFormat=timeFormat,\n            timeFormatType=timeFormatType,\n            title=title,\n            tooltipFormat=tooltipFormat,\n            trail=trail,\n            view=view,\n            **kwds,\n        )\n\n\nclass Cursor(VegaLiteSchema):\n    \"\"\"Cursor schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Cursor\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Cyclical(ColorScheme):\n    \"\"\"Cyclical schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Cyclical\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Data(VegaLiteSchema):\n    \"\"\"Data schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Data\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass DataFormat(VegaLiteSchema):\n    \"\"\"DataFormat schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/DataFormat\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass CsvDataFormat(DataFormat):\n    \"\"\"\n    CsvDataFormat schema wrapper.\n\n    Parameters\n    ----------\n    parse : dict, :class:`Parse`, None\n        If set to ``null``, disable type inference based on the spec and only use type\n        inference based on the data. Alternatively, a parsing directive object can be\n        provided for explicit data types. Each property of the object corresponds to a field\n        name, and the value to the desired data type (one of ``\"number\"``, ``\"boolean\"``,\n        ``\"date\"``, or null (do not parse the field)). For example, ``\"parse\":\n        {\"modified_on\": \"date\"}`` parses the ``modified_on`` field in each input record a\n        Date value.\n\n        For ``\"date\"``, we parse data based using JavaScript's `Date.parse()\n        <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__.\n        For Specific date formats can be provided (e.g., ``{foo: \"date:'%m%d%Y'\"}``), using\n        the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__.\n        UTC date format parsing is supported similarly (e.g., ``{foo: \"utc:'%m%d%Y'\"}``).\n        See more about `UTC time\n        <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__\n    type : Literal['csv', 'tsv']\n        Type of input data: ``\"json\"``, ``\"csv\"``, ``\"tsv\"``, ``\"dsv\"``.\n\n        **Default value:**  The default format type is determined by the extension of the\n        file URL. If no extension is detected, ``\"json\"`` will be used by default.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/CsvDataFormat\"}\n\n    def __init__(\n        self,\n        parse: Optional[SchemaBase | Map | None] = Undefined,\n        type: Optional[Literal[\"csv\", \"tsv\"]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(parse=parse, type=type, **kwds)\n\n\nclass DataSource(Data):\n    \"\"\"DataSource schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/DataSource\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass Datasets(VegaLiteSchema):\n    \"\"\"Datasets schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Datasets\"}\n\n    def __init__(self, **kwds):\n        super().__init__(**kwds)\n\n\nclass Day(VegaLiteSchema):\n    \"\"\"Day schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Day\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass DictInlineDataset(VegaLiteSchema):\n    \"\"\"DictInlineDataset schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Dict<InlineDataset>\"}\n\n    def __init__(self, **kwds):\n        super().__init__(**kwds)\n\n\nclass DictSelectionInit(VegaLiteSchema):\n    \"\"\"DictSelectionInit schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Dict<SelectionInit>\"}\n\n    def __init__(self, **kwds):\n        super().__init__(**kwds)\n\n\nclass DictSelectionInitInterval(VegaLiteSchema):\n    \"\"\"DictSelectionInitInterval schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Dict<SelectionInitInterval>\"}\n\n    def __init__(self, **kwds):\n        super().__init__(**kwds)\n\n\nclass Diverging(ColorScheme):\n    \"\"\"Diverging schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Diverging\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass DomainUnionWith(VegaLiteSchema):\n    \"\"\"\n    DomainUnionWith schema wrapper.\n\n    Parameters\n    ----------\n    unionWith : Sequence[str, bool, dict, float, :class:`DateTime`]\n        Customized domain values to be union with the field's values or explicitly defined\n        domain. Should be an array of valid scale domain values.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/DomainUnionWith\"}\n\n    def __init__(\n        self,\n        unionWith: Optional[\n            Sequence[str | bool | float | Temporal | SchemaBase | Map]\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(unionWith=unionWith, **kwds)\n\n\nclass DsvDataFormat(DataFormat):\n    \"\"\"\n    DsvDataFormat schema wrapper.\n\n    Parameters\n    ----------\n    delimiter : str\n        The delimiter between records. The delimiter must be a single character (i.e., a\n        single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are\n        not.\n    parse : dict, :class:`Parse`, None\n        If set to ``null``, disable type inference based on the spec and only use type\n        inference based on the data. Alternatively, a parsing directive object can be\n        provided for explicit data types. Each property of the object corresponds to a field\n        name, and the value to the desired data type (one of ``\"number\"``, ``\"boolean\"``,\n        ``\"date\"``, or null (do not parse the field)). For example, ``\"parse\":\n        {\"modified_on\": \"date\"}`` parses the ``modified_on`` field in each input record a\n        Date value.\n\n        For ``\"date\"``, we parse data based using JavaScript's `Date.parse()\n        <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__.\n        For Specific date formats can be provided (e.g., ``{foo: \"date:'%m%d%Y'\"}``), using\n        the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__.\n        UTC date format parsing is supported similarly (e.g., ``{foo: \"utc:'%m%d%Y'\"}``).\n        See more about `UTC time\n        <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__\n    type : Literal['dsv']\n        Type of input data: ``\"json\"``, ``\"csv\"``, ``\"tsv\"``, ``\"dsv\"``.\n\n        **Default value:**  The default format type is determined by the extension of the\n        file URL. If no extension is detected, ``\"json\"`` will be used by default.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/DsvDataFormat\"}\n\n    def __init__(\n        self,\n        delimiter: Optional[str] = Undefined,\n        parse: Optional[SchemaBase | Map | None] = Undefined,\n        type: Optional[Literal[\"dsv\"]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(delimiter=delimiter, parse=parse, type=type, **kwds)\n\n\nclass Element(VegaLiteSchema):\n    \"\"\"Element schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Element\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Encoding(VegaLiteSchema):\n    \"\"\"\n    Encoding schema wrapper.\n\n    Parameters\n    ----------\n    angle : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`\n        Rotation angle of point and text marks.\n    color : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull`\n        Color of the marks - either fill or stroke color based on  the ``filled`` property\n        of mark definition. By default, ``color`` represents fill color for ``\"area\"``,\n        ``\"bar\"``, ``\"tick\"``, ``\"text\"``, ``\"trail\"``, ``\"circle\"``, and ``\"square\"`` /\n        stroke color for ``\"line\"`` and ``\"point\"``.\n\n        **Default value:** If undefined, the default color depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``color``\n        property.\n\n        *Note:* 1) For fine-grained control over both fill and stroke colors of the marks,\n        please use the ``fill`` and ``stroke`` channels. The ``fill`` or ``stroke``\n        encodings have higher precedence than ``color``, thus may override the ``color``\n        encoding if conflicting encodings are specified. 2) See the scale documentation for\n        more information about customizing `color scheme\n        <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__.\n    description : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`\n        A text description of this mark for ARIA accessibility (SVG output only). For SVG\n        output the ``\"aria-label\"`` attribute will be set to this description.\n    detail : dict, :class:`FieldDefWithoutScale`, Sequence[dict, :class:`FieldDefWithoutScale`]\n        Additional levels of detail for grouping data in aggregate views and in line, trail,\n        and area marks without mapping data to a specific visual channel.\n    fill : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull`\n        Fill color of the marks. **Default value:** If undefined, the default color depends\n        on `mark config <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s\n        ``color`` property.\n\n        *Note:* The ``fill`` encoding has higher precedence than ``color``, thus may\n        override the ``color`` encoding if conflicting encodings are specified.\n    fillOpacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`\n        Fill opacity of the marks.\n\n        **Default value:** If undefined, the default opacity depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``fillOpacity``\n        property.\n    href : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`\n        A URL to load upon mouse click.\n    key : dict, :class:`FieldDefWithoutScale`\n        A data field to use as a unique key for data binding. When a visualization's data is\n        updated, the key value will be used to match data elements to existing mark\n        instances. Use a key channel to enable object constancy for transitions over dynamic\n        data.\n    latitude : dict, :class:`DatumDef`, :class:`LatLongDef`, :class:`LatLongFieldDef`\n        Latitude position of geographically projected marks.\n    latitude2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`\n        Latitude-2 position for geographically projected ranged ``\"area\"``, ``\"bar\"``,\n        ``\"rect\"``, and  ``\"rule\"``.\n    longitude : dict, :class:`DatumDef`, :class:`LatLongDef`, :class:`LatLongFieldDef`\n        Longitude position of geographically projected marks.\n    longitude2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`\n        Longitude-2 position for geographically projected ranged ``\"area\"``, ``\"bar\"``,\n        ``\"rect\"``, and  ``\"rule\"``.\n    opacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`\n        Opacity of the marks.\n\n        **Default value:** If undefined, the default opacity depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``opacity``\n        property.\n    order : dict, :class:`OrderOnlyDef`, :class:`OrderFieldDef`, :class:`OrderValueDef`, Sequence[dict, :class:`OrderFieldDef`]\n        Order of the marks.\n\n        * For stacked marks, this ``order`` channel encodes `stack order\n          <https://vega.github.io/vega-lite/docs/stack.html#order>`__.\n        * For line and trail marks, this ``order`` channel encodes order of data points in\n          the lines. This can be useful for creating `a connected scatterplot\n          <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__. Setting\n          ``order`` to ``{\"value\": null}`` makes the line marks use the original order in\n          the data sources.\n        * Otherwise, this ``order`` channel encodes layer order of the marks.\n\n        **Note**: In aggregate plots, ``order`` field should be aggregated to avoid creating\n        additional aggregation grouping.\n    radius : dict, :class:`PolarDef`, :class:`PositionValueDef`, :class:`PositionDatumDefBase`, :class:`PositionFieldDefBase`\n        The outer radius in pixels of arc marks.\n    radius2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`\n        The inner radius in pixels of arc marks.\n    shape : dict, :class:`ShapeDef`, :class:`FieldOrDatumDefWithConditionDatumDefstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull`\n        Shape of the mark.\n\n        1. For ``point`` marks the supported values include:   - plotting shapes:\n        ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``, ``\"triangle-up\"``,\n        ``\"triangle-down\"``, ``\"triangle-right\"``, or ``\"triangle-left\"``.   - the line\n        symbol ``\"stroke\"``   - centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or\n        ``\"triangle\"``   - a custom `SVG path string\n        <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n        sizing, custom shape paths should be defined within a square bounding box with\n        coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        2. For ``geoshape`` marks it should be a field definition of the geojson data\n\n        **Default value:** If undefined, the default shape depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#point-config>`__'s ``shape``\n        property. (``\"circle\"`` if unset.)\n    size : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`\n        Size of the mark.\n\n        * For ``\"point\"``, ``\"square\"`` and ``\"circle\"``, - the symbol size, or pixel area\n          of the mark.\n        * For ``\"bar\"`` and ``\"tick\"`` - the bar and tick's size.\n        * For ``\"text\"`` - the text's font size.\n        * Size is unsupported for ``\"line\"``, ``\"area\"``, and ``\"rect\"``. (Use ``\"trail\"``\n          instead of line with varying size)\n    stroke : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull`\n        Stroke color of the marks. **Default value:** If undefined, the default color\n        depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``color``\n        property.\n\n        *Note:* The ``stroke`` encoding has higher precedence than ``color``, thus may\n        override the ``color`` encoding if conflicting encodings are specified.\n    strokeDash : dict, :class:`NumericArrayMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumberArray`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray`\n        Stroke dash of the marks.\n\n        **Default value:** ``[1,0]`` (No dash).\n    strokeOpacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`\n        Stroke opacity of the marks.\n\n        **Default value:** If undefined, the default opacity depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s\n        ``strokeOpacity`` property.\n    strokeWidth : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`\n        Stroke width of the marks.\n\n        **Default value:** If undefined, the default stroke width depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``strokeWidth``\n        property.\n    text : dict, :class:`TextDef`, :class:`ValueDefWithConditionStringFieldDefText`, :class:`FieldOrDatumDefWithConditionStringDatumDefText`, :class:`FieldOrDatumDefWithConditionStringFieldDefText`\n        Text of the ``text`` mark.\n    theta : dict, :class:`PolarDef`, :class:`PositionValueDef`, :class:`PositionDatumDefBase`, :class:`PositionFieldDefBase`\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    time : dict, :class:`TimeDef`\n\n    tooltip : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`, Sequence[dict, :class:`StringFieldDef`], None\n        The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding overrides\n        `the tooltip property in the mark definition\n        <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip in Vega-Lite.\n    url : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`\n        The URL of an image mark.\n    x : dict, :class:`PositionDef`, :class:`PositionDatumDef`, :class:`PositionFieldDef`, :class:`PositionValueDef`\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    xError : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef`\n        Error value of x coordinates for error specified ``\"errorbar\"`` and ``\"errorband\"``.\n    xError2 : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef`\n        Secondary error value of x coordinates for error specified ``\"errorbar\"`` and\n        ``\"errorband\"``.\n    xOffset : dict, :class:`OffsetDef`, :class:`ScaleDatumDef`, :class:`ScaleFieldDef`, :class:`ValueDefnumber`\n        Offset of x-position of the marks\n    y : dict, :class:`PositionDef`, :class:`PositionDatumDef`, :class:`PositionFieldDef`, :class:`PositionValueDef`\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    yError : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef`\n        Error value of y coordinates for error specified ``\"errorbar\"`` and ``\"errorband\"``.\n    yError2 : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef`\n        Secondary error value of y coordinates for error specified ``\"errorbar\"`` and\n        ``\"errorband\"``.\n    yOffset : dict, :class:`OffsetDef`, :class:`ScaleDatumDef`, :class:`ScaleFieldDef`, :class:`ValueDefnumber`\n        Offset of y-position of the marks\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Encoding\"}\n\n    def __init__(\n        self,\n        angle: Optional[SchemaBase | Map] = Undefined,\n        color: Optional[SchemaBase | Map] = Undefined,\n        description: Optional[SchemaBase | Map] = Undefined,\n        detail: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        fill: Optional[SchemaBase | Map] = Undefined,\n        fillOpacity: Optional[SchemaBase | Map] = Undefined,\n        href: Optional[SchemaBase | Map] = Undefined,\n        key: Optional[SchemaBase | Map] = Undefined,\n        latitude: Optional[SchemaBase | Map] = Undefined,\n        latitude2: Optional[SchemaBase | Map] = Undefined,\n        longitude: Optional[SchemaBase | Map] = Undefined,\n        longitude2: Optional[SchemaBase | Map] = Undefined,\n        opacity: Optional[SchemaBase | Map] = Undefined,\n        order: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        radius: Optional[SchemaBase | Map] = Undefined,\n        radius2: Optional[SchemaBase | Map] = Undefined,\n        shape: Optional[SchemaBase | Map] = Undefined,\n        size: Optional[SchemaBase | Map] = Undefined,\n        stroke: Optional[SchemaBase | Map] = Undefined,\n        strokeDash: Optional[SchemaBase | Map] = Undefined,\n        strokeOpacity: Optional[SchemaBase | Map] = Undefined,\n        strokeWidth: Optional[SchemaBase | Map] = Undefined,\n        text: Optional[SchemaBase | Map] = Undefined,\n        theta: Optional[SchemaBase | Map] = Undefined,\n        theta2: Optional[SchemaBase | Map] = Undefined,\n        time: Optional[SchemaBase | Map] = Undefined,\n        tooltip: Optional[\n            SchemaBase | Sequence[SchemaBase | Map] | Map | None\n        ] = Undefined,\n        url: Optional[SchemaBase | Map] = Undefined,\n        x: Optional[SchemaBase | Map] = Undefined,\n        x2: Optional[SchemaBase | Map] = Undefined,\n        xError: Optional[SchemaBase | Map] = Undefined,\n        xError2: Optional[SchemaBase | Map] = Undefined,\n        xOffset: Optional[SchemaBase | Map] = Undefined,\n        y: Optional[SchemaBase | Map] = Undefined,\n        y2: Optional[SchemaBase | Map] = Undefined,\n        yError: Optional[SchemaBase | Map] = Undefined,\n        yError2: Optional[SchemaBase | Map] = Undefined,\n        yOffset: Optional[SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            angle=angle,\n            color=color,\n            description=description,\n            detail=detail,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            href=href,\n            key=key,\n            latitude=latitude,\n            latitude2=latitude2,\n            longitude=longitude,\n            longitude2=longitude2,\n            opacity=opacity,\n            order=order,\n            radius=radius,\n            radius2=radius2,\n            shape=shape,\n            size=size,\n            stroke=stroke,\n            strokeDash=strokeDash,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            text=text,\n            theta=theta,\n            theta2=theta2,\n            time=time,\n            tooltip=tooltip,\n            url=url,\n            x=x,\n            x2=x2,\n            xError=xError,\n            xError2=xError2,\n            xOffset=xOffset,\n            y=y,\n            y2=y2,\n            yError=yError,\n            yError2=yError2,\n            yOffset=yOffset,\n            **kwds,\n        )\n\n\nclass ErrorBand(CompositeMark):\n    \"\"\"ErrorBand schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ErrorBand\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass ErrorBandConfig(VegaLiteSchema):\n    \"\"\"\n    ErrorBandConfig schema wrapper.\n\n    Parameters\n    ----------\n    band : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    borders : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev']\n        The extent of the band. Available options include:\n\n        * ``\"ci\"``: Extend the band to the 95% bootstrapped confidence interval of the mean.\n        * ``\"stderr\"``: The size of band are set to the value of standard error, extending\n          from the mean.\n        * ``\"stdev\"``: The size of band are set to the value of standard deviation,\n          extending from the mean.\n        * ``\"iqr\"``: Extend the band to the q1 and q3.\n\n        **Default value:** ``\"stderr\"``.\n    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']\n        The line interpolation method for the error band. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: a piecewise constant function (a step function) consisting of\n          alternating horizontal and vertical lines. The y-value changes at the midpoint of\n          each pair of adjacent x-values.\n        * ``\"step-before\"``: a piecewise constant function (a step function) consisting of\n          alternating horizontal and vertical lines. The y-value changes before the x-value.\n        * ``\"step-after\"``: a piecewise constant function (a step function) consisting of\n          alternating horizontal and vertical lines. The y-value changes after the x-value.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    tension : float\n        The tension parameter for the interpolation type of the error band.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ErrorBandConfig\"}\n\n    def __init__(\n        self,\n        band: Optional[bool | SchemaBase | Map] = Undefined,\n        borders: Optional[bool | SchemaBase | Map] = Undefined,\n        extent: Optional[SchemaBase | ErrorBarExtent_T] = Undefined,\n        interpolate: Optional[SchemaBase | Interpolate_T] = Undefined,\n        tension: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            band=band,\n            borders=borders,\n            extent=extent,\n            interpolate=interpolate,\n            tension=tension,\n            **kwds,\n        )\n\n\nclass ErrorBandDef(CompositeMarkDef):\n    \"\"\"\n    ErrorBandDef schema wrapper.\n\n    Parameters\n    ----------\n    type : :class:`ErrorBand`, Literal['errorband']\n        The mark type. This could a primitive mark type (one of ``\"bar\"``, ``\"circle\"``,\n        ``\"square\"``, ``\"tick\"``, ``\"line\"``, ``\"area\"``, ``\"point\"``, ``\"geoshape\"``,\n        ``\"rule\"``, and ``\"text\"``) or a composite mark type (``\"boxplot\"``,\n        ``\"errorband\"``, ``\"errorbar\"``).\n    band : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    borders : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    clip : bool\n        Whether a composite mark be clipped to the enclosing group's width and height.\n    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']\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev']\n        The extent of the band. Available options include:\n\n        * ``\"ci\"``: Extend the band to the 95% bootstrapped confidence interval of the mean.\n        * ``\"stderr\"``: The size of band are set to the value of standard error, extending\n          from the mean.\n        * ``\"stdev\"``: The size of band are set to the value of standard deviation,\n          extending from the mean.\n        * ``\"iqr\"``: Extend the band to the q1 and q3.\n\n        **Default value:** ``\"stderr\"``.\n    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']\n        The line interpolation method for the error band. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: a piecewise constant function (a step function) consisting of\n          alternating horizontal and vertical lines. The y-value changes at the midpoint of\n          each pair of adjacent x-values.\n        * ``\"step-before\"``: a piecewise constant function (a step function) consisting of\n          alternating horizontal and vertical lines. The y-value changes before the x-value.\n        * ``\"step-after\"``: a piecewise constant function (a step function) consisting of\n          alternating horizontal and vertical lines. The y-value changes after the x-value.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    opacity : float\n        The opacity (value between [0,1]) of the mark.\n    orient : :class:`Orientation`, Literal['horizontal', 'vertical']\n        Orientation of the error band. This is normally automatically determined, but can be\n        specified when the orientation is ambiguous and cannot be automatically determined.\n    tension : float\n        The tension parameter for the interpolation type of the error band.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ErrorBandDef\"}\n\n    def __init__(\n        self,\n        type: Optional[SchemaBase | ErrorBand_T] = Undefined,\n        band: Optional[bool | SchemaBase | Map] = Undefined,\n        borders: Optional[bool | SchemaBase | Map] = Undefined,\n        clip: Optional[bool] = Undefined,\n        color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,\n        extent: Optional[SchemaBase | ErrorBarExtent_T] = Undefined,\n        interpolate: Optional[SchemaBase | Interpolate_T] = Undefined,\n        opacity: Optional[float] = Undefined,\n        orient: Optional[SchemaBase | Orientation_T] = Undefined,\n        tension: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            type=type,\n            band=band,\n            borders=borders,\n            clip=clip,\n            color=color,\n            extent=extent,\n            interpolate=interpolate,\n            opacity=opacity,\n            orient=orient,\n            tension=tension,\n            **kwds,\n        )\n\n\nclass ErrorBar(CompositeMark):\n    \"\"\"ErrorBar schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ErrorBar\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass ErrorBarConfig(VegaLiteSchema):\n    \"\"\"\n    ErrorBarConfig schema wrapper.\n\n    Parameters\n    ----------\n    extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev']\n        The extent of the rule. Available options include:\n\n        * ``\"ci\"``: Extend the rule to the 95% bootstrapped confidence interval of the mean.\n        * ``\"stderr\"``: The size of rule are set to the value of standard error, extending\n          from the mean.\n        * ``\"stdev\"``: The size of rule are set to the value of standard deviation,\n          extending from the mean.\n        * ``\"iqr\"``: Extend the rule to the q1 and q3.\n\n        **Default value:** ``\"stderr\"``.\n    rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    size : float\n        Size of the ticks of an error bar\n    thickness : float\n        Thickness of the ticks and the bar of an error bar\n    ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ErrorBarConfig\"}\n\n    def __init__(\n        self,\n        extent: Optional[SchemaBase | ErrorBarExtent_T] = Undefined,\n        rule: Optional[bool | SchemaBase | Map] = Undefined,\n        size: Optional[float] = Undefined,\n        thickness: Optional[float] = Undefined,\n        ticks: Optional[bool | SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            extent=extent,\n            rule=rule,\n            size=size,\n            thickness=thickness,\n            ticks=ticks,\n            **kwds,\n        )\n\n\nclass ErrorBarDef(CompositeMarkDef):\n    \"\"\"\n    ErrorBarDef schema wrapper.\n\n    Parameters\n    ----------\n    type : :class:`ErrorBar`, Literal['errorbar']\n        The mark type. This could a primitive mark type (one of ``\"bar\"``, ``\"circle\"``,\n        ``\"square\"``, ``\"tick\"``, ``\"line\"``, ``\"area\"``, ``\"point\"``, ``\"geoshape\"``,\n        ``\"rule\"``, and ``\"text\"``) or a composite mark type (``\"boxplot\"``,\n        ``\"errorband\"``, ``\"errorbar\"``).\n    clip : bool\n        Whether a composite mark be clipped to the enclosing group's width and height.\n    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']\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev']\n        The extent of the rule. Available options include:\n\n        * ``\"ci\"``: Extend the rule to the 95% bootstrapped confidence interval of the mean.\n        * ``\"stderr\"``: The size of rule are set to the value of standard error, extending\n          from the mean.\n        * ``\"stdev\"``: The size of rule are set to the value of standard deviation,\n          extending from the mean.\n        * ``\"iqr\"``: Extend the rule to the q1 and q3.\n\n        **Default value:** ``\"stderr\"``.\n    opacity : float\n        The opacity (value between [0,1]) of the mark.\n    orient : :class:`Orientation`, Literal['horizontal', 'vertical']\n        Orientation of the error bar. This is normally automatically determined, but can be\n        specified when the orientation is ambiguous and cannot be automatically determined.\n    rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    size : float\n        Size of the ticks of an error bar\n    thickness : float\n        Thickness of the ticks and the bar of an error bar\n    ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ErrorBarDef\"}\n\n    def __init__(\n        self,\n        type: Optional[SchemaBase | ErrorBar_T] = Undefined,\n        clip: Optional[bool] = Undefined,\n        color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,\n        extent: Optional[SchemaBase | ErrorBarExtent_T] = Undefined,\n        opacity: Optional[float] = Undefined,\n        orient: Optional[SchemaBase | Orientation_T] = Undefined,\n        rule: Optional[bool | SchemaBase | Map] = Undefined,\n        size: Optional[float] = Undefined,\n        thickness: Optional[float] = Undefined,\n        ticks: Optional[bool | SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            type=type,\n            clip=clip,\n            color=color,\n            extent=extent,\n            opacity=opacity,\n            orient=orient,\n            rule=rule,\n            size=size,\n            thickness=thickness,\n            ticks=ticks,\n            **kwds,\n        )\n\n\nclass ErrorBarExtent(VegaLiteSchema):\n    \"\"\"ErrorBarExtent schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ErrorBarExtent\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Expr(VegaLiteSchema):\n    \"\"\"Expr schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Expr\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass ExprRef(VegaLiteSchema):\n    \"\"\"\n    ExprRef schema wrapper.\n\n    Parameters\n    ----------\n    expr : str\n        Vega expression (which can refer to Vega-Lite parameters).\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ExprRef\"}\n\n    def __init__(self, expr: Optional[str] = Undefined, **kwds):\n        super().__init__(expr=expr, **kwds)\n\n\nclass FacetEncodingFieldDef(VegaLiteSchema):\n    r\"\"\"\n    FacetEncodingFieldDef schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']\n        The alignment to apply to grid rows and columns. The supported string values are\n        ``\"all\"``, ``\"each\"``, and ``\"none\"``.\n\n        * For ``\"none\"``, a flow layout will be used, in which adjacent subviews are simply\n          placed one after the other.\n        * For ``\"each\"``, subviews will be aligned into a clean grid structure, but each row\n          or column may be of variable size.\n        * For ``\"all\"``, subviews will be aligned and each row or column will be sized\n          identically based on the maximum observed size. String values for this property\n          will be applied to both grid rows and columns.\n\n        Alternatively, an object value of the form ``{\"row\": string, \"column\": string}`` can\n        be used to supply different alignments for rows and columns.\n\n        **Default value:** ``\"all\"``.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    bounds : Literal['full', 'flush']\n        The bounds calculation method to use for determining the extent of a sub-plot. One\n        of ``full`` (the default) or ``flush``.\n\n        * If set to ``full``, the entire calculated bounds (including axes, title, and\n          legend) will be used.\n        * If set to ``flush``, only the specified width and height values for the sub-view\n          will be used. The ``flush`` setting can be useful when attempting to place\n          sub-plots without axes or legends into a uniform grid structure.\n\n        **Default value:** ``\"full\"``\n    center : bool, dict, :class:`RowColboolean`\n        Boolean flag indicating if subviews should be centered relative to their respective\n        rows or columns.\n\n        An object value of the form ``{\"row\": boolean, \"column\": boolean}`` can be used to\n        supply different centering values for rows and columns.\n\n        **Default value:** ``false``\n    columns : float\n        The number of columns to include in the view composition layout.\n\n        **Default value**: ``undefined`` -- An infinite number of columns (a single row)\n        will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the\n        ``column`` channel (for ``facet`` and ``repeat``).\n\n        **Note**:\n\n        1) This property is only for:\n\n        * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)\n        * the ``facet`` and ``repeat`` operator with one field/repetition definition\n          (without row/column nesting)\n\n        2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)\n        and to using the ``row`` channel (for ``facet`` and ``repeat``).\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    header : dict, :class:`Header`, None\n        An object defining properties of a facet's header.\n    sort : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` is not supported for ``row`` and ``column``.\n    spacing : dict, float, :class:`RowColnumber`\n        The spacing in pixels between sub-views of the composition operator. An object of\n        the form ``{\"row\": number, \"column\": number}`` can be used to set different spacing\n        values for rows and columns.\n\n        **Default value**: Depends on ``\"spacing\"`` property of `the view composition\n        configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__\n        (``20`` by default)\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FacetEncodingFieldDef\"}\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        bounds: Optional[Literal[\"full\", \"flush\"]] = Undefined,\n        center: Optional[bool | SchemaBase | Map] = Undefined,\n        columns: Optional[float] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        header: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | SortOrder_T\n            | None\n        ] = Undefined,\n        spacing: Optional[float | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            align=align,\n            bandPosition=bandPosition,\n            bin=bin,\n            bounds=bounds,\n            center=center,\n            columns=columns,\n            field=field,\n            header=header,\n            sort=sort,\n            spacing=spacing,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass FacetFieldDef(VegaLiteSchema):\n    r\"\"\"\n    FacetFieldDef schema wrapper.\n\n    Parameters\n    ----------\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    header : dict, :class:`Header`, None\n        An object defining properties of a facet's header.\n    sort : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` is not supported for ``row`` and ``column``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FacetFieldDef\"}\n\n    def __init__(\n        self,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        header: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | SortOrder_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            header=header,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass FacetMapping(VegaLiteSchema):\n    \"\"\"\n    FacetMapping schema wrapper.\n\n    Parameters\n    ----------\n    column : dict, :class:`FacetFieldDef`\n        A field definition for the horizontal facet of trellis plots.\n    row : dict, :class:`FacetFieldDef`\n        A field definition for the vertical facet of trellis plots.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FacetMapping\"}\n\n    def __init__(\n        self,\n        column: Optional[SchemaBase | Map] = Undefined,\n        row: Optional[SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(column=column, row=row, **kwds)\n\n\nclass FacetedEncoding(VegaLiteSchema):\n    \"\"\"\n    FacetedEncoding schema wrapper.\n\n    Parameters\n    ----------\n    angle : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`\n        Rotation angle of point and text marks.\n    color : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull`\n        Color of the marks - either fill or stroke color based on  the ``filled`` property\n        of mark definition. By default, ``color`` represents fill color for ``\"area\"``,\n        ``\"bar\"``, ``\"tick\"``, ``\"text\"``, ``\"trail\"``, ``\"circle\"``, and ``\"square\"`` /\n        stroke color for ``\"line\"`` and ``\"point\"``.\n\n        **Default value:** If undefined, the default color depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``color``\n        property.\n\n        *Note:* 1) For fine-grained control over both fill and stroke colors of the marks,\n        please use the ``fill`` and ``stroke`` channels. The ``fill`` or ``stroke``\n        encodings have higher precedence than ``color``, thus may override the ``color``\n        encoding if conflicting encodings are specified. 2) See the scale documentation for\n        more information about customizing `color scheme\n        <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__.\n    column : dict, :class:`RowColumnEncodingFieldDef`\n        A field definition for the horizontal facet of trellis plots.\n    description : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`\n        A text description of this mark for ARIA accessibility (SVG output only). For SVG\n        output the ``\"aria-label\"`` attribute will be set to this description.\n    detail : dict, :class:`FieldDefWithoutScale`, Sequence[dict, :class:`FieldDefWithoutScale`]\n        Additional levels of detail for grouping data in aggregate views and in line, trail,\n        and area marks without mapping data to a specific visual channel.\n    facet : dict, :class:`FacetEncodingFieldDef`\n        A field definition for the (flexible) facet of trellis plots.\n\n        If either ``row`` or ``column`` is specified, this channel will be ignored.\n    fill : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull`\n        Fill color of the marks. **Default value:** If undefined, the default color depends\n        on `mark config <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s\n        ``color`` property.\n\n        *Note:* The ``fill`` encoding has higher precedence than ``color``, thus may\n        override the ``color`` encoding if conflicting encodings are specified.\n    fillOpacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`\n        Fill opacity of the marks.\n\n        **Default value:** If undefined, the default opacity depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``fillOpacity``\n        property.\n    href : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`\n        A URL to load upon mouse click.\n    key : dict, :class:`FieldDefWithoutScale`\n        A data field to use as a unique key for data binding. When a visualization's data is\n        updated, the key value will be used to match data elements to existing mark\n        instances. Use a key channel to enable object constancy for transitions over dynamic\n        data.\n    latitude : dict, :class:`DatumDef`, :class:`LatLongDef`, :class:`LatLongFieldDef`\n        Latitude position of geographically projected marks.\n    latitude2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`\n        Latitude-2 position for geographically projected ranged ``\"area\"``, ``\"bar\"``,\n        ``\"rect\"``, and  ``\"rule\"``.\n    longitude : dict, :class:`DatumDef`, :class:`LatLongDef`, :class:`LatLongFieldDef`\n        Longitude position of geographically projected marks.\n    longitude2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`\n        Longitude-2 position for geographically projected ranged ``\"area\"``, ``\"bar\"``,\n        ``\"rect\"``, and  ``\"rule\"``.\n    opacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`\n        Opacity of the marks.\n\n        **Default value:** If undefined, the default opacity depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``opacity``\n        property.\n    order : dict, :class:`OrderOnlyDef`, :class:`OrderFieldDef`, :class:`OrderValueDef`, Sequence[dict, :class:`OrderFieldDef`]\n        Order of the marks.\n\n        * For stacked marks, this ``order`` channel encodes `stack order\n          <https://vega.github.io/vega-lite/docs/stack.html#order>`__.\n        * For line and trail marks, this ``order`` channel encodes order of data points in\n          the lines. This can be useful for creating `a connected scatterplot\n          <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__. Setting\n          ``order`` to ``{\"value\": null}`` makes the line marks use the original order in\n          the data sources.\n        * Otherwise, this ``order`` channel encodes layer order of the marks.\n\n        **Note**: In aggregate plots, ``order`` field should be aggregated to avoid creating\n        additional aggregation grouping.\n    radius : dict, :class:`PolarDef`, :class:`PositionValueDef`, :class:`PositionDatumDefBase`, :class:`PositionFieldDefBase`\n        The outer radius in pixels of arc marks.\n    radius2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`\n        The inner radius in pixels of arc marks.\n    row : dict, :class:`RowColumnEncodingFieldDef`\n        A field definition for the vertical facet of trellis plots.\n    shape : dict, :class:`ShapeDef`, :class:`FieldOrDatumDefWithConditionDatumDefstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull`\n        Shape of the mark.\n\n        1. For ``point`` marks the supported values include:   - plotting shapes:\n        ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``, ``\"triangle-up\"``,\n        ``\"triangle-down\"``, ``\"triangle-right\"``, or ``\"triangle-left\"``.   - the line\n        symbol ``\"stroke\"``   - centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or\n        ``\"triangle\"``   - a custom `SVG path string\n        <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n        sizing, custom shape paths should be defined within a square bounding box with\n        coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        2. For ``geoshape`` marks it should be a field definition of the geojson data\n\n        **Default value:** If undefined, the default shape depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#point-config>`__'s ``shape``\n        property. (``\"circle\"`` if unset.)\n    size : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`\n        Size of the mark.\n\n        * For ``\"point\"``, ``\"square\"`` and ``\"circle\"``, - the symbol size, or pixel area\n          of the mark.\n        * For ``\"bar\"`` and ``\"tick\"`` - the bar and tick's size.\n        * For ``\"text\"`` - the text's font size.\n        * Size is unsupported for ``\"line\"``, ``\"area\"``, and ``\"rect\"``. (Use ``\"trail\"``\n          instead of line with varying size)\n    stroke : dict, :class:`ColorDef`, :class:`FieldOrDatumDefWithConditionDatumDefGradientstringnull`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull`\n        Stroke color of the marks. **Default value:** If undefined, the default color\n        depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``color``\n        property.\n\n        *Note:* The ``stroke`` encoding has higher precedence than ``color``, thus may\n        override the ``color`` encoding if conflicting encodings are specified.\n    strokeDash : dict, :class:`NumericArrayMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumberArray`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray`\n        Stroke dash of the marks.\n\n        **Default value:** ``[1,0]`` (No dash).\n    strokeOpacity : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`\n        Stroke opacity of the marks.\n\n        **Default value:** If undefined, the default opacity depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s\n        ``strokeOpacity`` property.\n    strokeWidth : dict, :class:`NumericMarkPropDef`, :class:`FieldOrDatumDefWithConditionDatumDefnumber`, :class:`FieldOrDatumDefWithConditionMarkPropFieldDefnumber`, :class:`ValueDefWithConditionMarkPropFieldOrDatumDefnumber`\n        Stroke width of the marks.\n\n        **Default value:** If undefined, the default stroke width depends on `mark config\n        <https://vega.github.io/vega-lite/docs/config.html#mark-config>`__'s ``strokeWidth``\n        property.\n    text : dict, :class:`TextDef`, :class:`ValueDefWithConditionStringFieldDefText`, :class:`FieldOrDatumDefWithConditionStringDatumDefText`, :class:`FieldOrDatumDefWithConditionStringFieldDefText`\n        Text of the ``text`` mark.\n    theta : dict, :class:`PolarDef`, :class:`PositionValueDef`, :class:`PositionDatumDefBase`, :class:`PositionFieldDefBase`\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    time : dict, :class:`TimeDef`\n\n    tooltip : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`, Sequence[dict, :class:`StringFieldDef`], None\n        The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding overrides\n        `the tooltip property in the mark definition\n        <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip in Vega-Lite.\n    url : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`\n        The URL of an image mark.\n    x : dict, :class:`PositionDef`, :class:`PositionDatumDef`, :class:`PositionFieldDef`, :class:`PositionValueDef`\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    xError : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef`\n        Error value of x coordinates for error specified ``\"errorbar\"`` and ``\"errorband\"``.\n    xError2 : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef`\n        Secondary error value of x coordinates for error specified ``\"errorbar\"`` and\n        ``\"errorband\"``.\n    xOffset : dict, :class:`OffsetDef`, :class:`ScaleDatumDef`, :class:`ScaleFieldDef`, :class:`ValueDefnumber`\n        Offset of x-position of the marks\n    y : dict, :class:`PositionDef`, :class:`PositionDatumDef`, :class:`PositionFieldDef`, :class:`PositionValueDef`\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2 : dict, :class:`DatumDef`, :class:`Position2Def`, :class:`PositionValueDef`, :class:`SecondaryFieldDef`\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    yError : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef`\n        Error value of y coordinates for error specified ``\"errorbar\"`` and ``\"errorband\"``.\n    yError2 : dict, :class:`ValueDefnumber`, :class:`SecondaryFieldDef`\n        Secondary error value of y coordinates for error specified ``\"errorbar\"`` and\n        ``\"errorband\"``.\n    yOffset : dict, :class:`OffsetDef`, :class:`ScaleDatumDef`, :class:`ScaleFieldDef`, :class:`ValueDefnumber`\n        Offset of y-position of the marks\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FacetedEncoding\"}\n\n    def __init__(\n        self,\n        angle: Optional[SchemaBase | Map] = Undefined,\n        color: Optional[SchemaBase | Map] = Undefined,\n        column: Optional[SchemaBase | Map] = Undefined,\n        description: Optional[SchemaBase | Map] = Undefined,\n        detail: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        facet: Optional[SchemaBase | Map] = Undefined,\n        fill: Optional[SchemaBase | Map] = Undefined,\n        fillOpacity: Optional[SchemaBase | Map] = Undefined,\n        href: Optional[SchemaBase | Map] = Undefined,\n        key: Optional[SchemaBase | Map] = Undefined,\n        latitude: Optional[SchemaBase | Map] = Undefined,\n        latitude2: Optional[SchemaBase | Map] = Undefined,\n        longitude: Optional[SchemaBase | Map] = Undefined,\n        longitude2: Optional[SchemaBase | Map] = Undefined,\n        opacity: Optional[SchemaBase | Map] = Undefined,\n        order: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        radius: Optional[SchemaBase | Map] = Undefined,\n        radius2: Optional[SchemaBase | Map] = Undefined,\n        row: Optional[SchemaBase | Map] = Undefined,\n        shape: Optional[SchemaBase | Map] = Undefined,\n        size: Optional[SchemaBase | Map] = Undefined,\n        stroke: Optional[SchemaBase | Map] = Undefined,\n        strokeDash: Optional[SchemaBase | Map] = Undefined,\n        strokeOpacity: Optional[SchemaBase | Map] = Undefined,\n        strokeWidth: Optional[SchemaBase | Map] = Undefined,\n        text: Optional[SchemaBase | Map] = Undefined,\n        theta: Optional[SchemaBase | Map] = Undefined,\n        theta2: Optional[SchemaBase | Map] = Undefined,\n        time: Optional[SchemaBase | Map] = Undefined,\n        tooltip: Optional[\n            SchemaBase | Sequence[SchemaBase | Map] | Map | None\n        ] = Undefined,\n        url: Optional[SchemaBase | Map] = Undefined,\n        x: Optional[SchemaBase | Map] = Undefined,\n        x2: Optional[SchemaBase | Map] = Undefined,\n        xError: Optional[SchemaBase | Map] = Undefined,\n        xError2: Optional[SchemaBase | Map] = Undefined,\n        xOffset: Optional[SchemaBase | Map] = Undefined,\n        y: Optional[SchemaBase | Map] = Undefined,\n        y2: Optional[SchemaBase | Map] = Undefined,\n        yError: Optional[SchemaBase | Map] = Undefined,\n        yError2: Optional[SchemaBase | Map] = Undefined,\n        yOffset: Optional[SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            angle=angle,\n            color=color,\n            column=column,\n            description=description,\n            detail=detail,\n            facet=facet,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            href=href,\n            key=key,\n            latitude=latitude,\n            latitude2=latitude2,\n            longitude=longitude,\n            longitude2=longitude2,\n            opacity=opacity,\n            order=order,\n            radius=radius,\n            radius2=radius2,\n            row=row,\n            shape=shape,\n            size=size,\n            stroke=stroke,\n            strokeDash=strokeDash,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            text=text,\n            theta=theta,\n            theta2=theta2,\n            time=time,\n            tooltip=tooltip,\n            url=url,\n            x=x,\n            x2=x2,\n            xError=xError,\n            xError2=xError2,\n            xOffset=xOffset,\n            y=y,\n            y2=y2,\n            yError=yError,\n            yError2=yError2,\n            yOffset=yOffset,\n            **kwds,\n        )\n\n\nclass Feature(VegaLiteSchema):\n    \"\"\"\n    Feature schema wrapper.\n\n    A feature object which contains a geometry and associated properties.\n    https://tools.ietf.org/html/rfc7946#section-3.2\n\n    Parameters\n    ----------\n    geometry : dict, :class:`Point`, :class:`Polygon`, :class:`Geometry`, :class:`LineString`, :class:`MultiPoint`, :class:`MultiPolygon`, :class:`MultiLineString`, :class:`GeometryCollection`\n        The feature's geometry\n    properties : dict, :class:`GeoJsonProperties`, None\n        Properties associated with this feature.\n    type : Literal['Feature']\n        Specifies the type of GeoJSON object.\n    bbox : :class:`BBox`, Sequence[float]\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    id : str, float\n        A value that uniquely identifies this feature in a\n        https://tools.ietf.org/html/rfc7946#section-3.2.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Feature\"}\n\n    def __init__(\n        self,\n        geometry: Optional[SchemaBase | Map] = Undefined,\n        properties: Optional[SchemaBase | Map | None] = Undefined,\n        type: Optional[Literal[\"Feature\"]] = Undefined,\n        bbox: Optional[SchemaBase | Sequence[float]] = Undefined,\n        id: Optional[str | float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            geometry=geometry,\n            properties=properties,\n            type=type,\n            bbox=bbox,\n            id=id,\n            **kwds,\n        )\n\n\nclass FeatureCollection(VegaLiteSchema):\n    \"\"\"\n    FeatureCollection schema wrapper.\n\n    A collection of feature objects.  https://tools.ietf.org/html/rfc7946#section-3.3\n\n    Parameters\n    ----------\n    features : Sequence[dict, :class:`FeatureGeometryGeoJsonProperties`]\n\n    type : Literal['FeatureCollection']\n        Specifies the type of GeoJSON object.\n    bbox : :class:`BBox`, Sequence[float]\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FeatureCollection\"}\n\n    def __init__(\n        self,\n        features: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        type: Optional[Literal[\"FeatureCollection\"]] = Undefined,\n        bbox: Optional[SchemaBase | Sequence[float]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(features=features, type=type, bbox=bbox, **kwds)\n\n\nclass FeatureGeometryGeoJsonProperties(VegaLiteSchema):\n    \"\"\"\n    FeatureGeometryGeoJsonProperties schema wrapper.\n\n    A feature object which contains a geometry and associated properties.\n    https://tools.ietf.org/html/rfc7946#section-3.2\n\n    Parameters\n    ----------\n    geometry : dict, :class:`Point`, :class:`Polygon`, :class:`Geometry`, :class:`LineString`, :class:`MultiPoint`, :class:`MultiPolygon`, :class:`MultiLineString`, :class:`GeometryCollection`\n        The feature's geometry\n    properties : dict, :class:`GeoJsonProperties`, None\n        Properties associated with this feature.\n    type : Literal['Feature']\n        Specifies the type of GeoJSON object.\n    bbox : :class:`BBox`, Sequence[float]\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    id : str, float\n        A value that uniquely identifies this feature in a\n        https://tools.ietf.org/html/rfc7946#section-3.2.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Feature<Geometry,GeoJsonProperties>\"}\n\n    def __init__(\n        self,\n        geometry: Optional[SchemaBase | Map] = Undefined,\n        properties: Optional[SchemaBase | Map | None] = Undefined,\n        type: Optional[Literal[\"Feature\"]] = Undefined,\n        bbox: Optional[SchemaBase | Sequence[float]] = Undefined,\n        id: Optional[str | float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            geometry=geometry,\n            properties=properties,\n            type=type,\n            bbox=bbox,\n            id=id,\n            **kwds,\n        )\n\n\nclass Field(VegaLiteSchema):\n    \"\"\"Field schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Field\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass FieldDefWithoutScale(VegaLiteSchema):\n    r\"\"\"\n    FieldDefWithoutScale schema wrapper.\n\n    Definition object for a data field, its type and transformation of an encoding channel.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FieldDefWithoutScale\"}\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass FieldName(Field):\n    \"\"\"FieldName schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FieldName\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass FieldOrDatumDefWithConditionStringFieldDefstring(VegaLiteSchema):\n    r\"\"\"\n    FieldOrDatumDefWithConditionStringFieldDefstring schema wrapper.\n\n    Parameters\n    ----------\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<StringFieldDef,string>\"\n    }\n\n    def __init__(\n        self,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            format=format,\n            formatType=formatType,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass FieldRange(VegaLiteSchema):\n    \"\"\"\n    FieldRange schema wrapper.\n\n    Parameters\n    ----------\n    field : str\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FieldRange\"}\n\n    def __init__(self, field: Optional[str] = Undefined, **kwds):\n        super().__init__(field=field, **kwds)\n\n\nclass Fit(VegaLiteSchema):\n    \"\"\"Fit schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Fit\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass FontStyle(VegaLiteSchema):\n    \"\"\"FontStyle schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FontStyle\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass FontWeight(VegaLiteSchema):\n    \"\"\"FontWeight schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FontWeight\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Format(VegaLiteSchema):\n    \"\"\"Format schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Format\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass Dict(Format):\n    \"\"\"Dict schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Dict\"}\n\n    def __init__(self, **kwds):\n        super().__init__(**kwds)\n\n\nclass FormatConfig(VegaLiteSchema):\n    \"\"\"\n    FormatConfig schema wrapper.\n\n    Parameters\n    ----------\n    normalizedNumberFormat : str\n        If normalizedNumberFormatType is not specified, D3 number format for axis labels,\n        text marks, and tooltips of normalized stacked fields (fields with ``stack:\n        \"normalize\"``). For example ``\"s\"`` for SI units. Use `D3's number format pattern\n        <https://github.com/d3/d3-format#locale_format>`__.\n\n        If ``config.normalizedNumberFormatType`` is specified and\n        ``config.customFormatTypes`` is ``true``, this value will be passed as ``format``\n        alongside ``datum.value`` to the ``config.numberFormatType`` function. **Default\n        value:** ``%``\n    normalizedNumberFormatType : str\n        `Custom format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for\n        ``config.normalizedNumberFormat``.\n\n        **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is\n        exposed as `format in Vega-Expression\n        <https://vega.github.io/vega/docs/expressions/#format>`__. **Note:** You must also\n        set ``customFormatTypes`` to ``true`` to use this feature.\n    numberFormat : str\n        If numberFormatType is not specified, D3 number format for guide labels, text marks,\n        and tooltips of non-normalized fields (fields *without* ``stack: \"normalize\"``). For\n        example ``\"s\"`` for SI units. Use `D3's number format pattern\n        <https://github.com/d3/d3-format#locale_format>`__.\n\n        If ``config.numberFormatType`` is specified and ``config.customFormatTypes`` is\n        ``true``, this value will be passed as ``format`` alongside ``datum.value`` to the\n        ``config.numberFormatType`` function.\n    numberFormatType : str\n        `Custom format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for\n        ``config.numberFormat``.\n\n        **Default value:** ``undefined`` -- This is equilvalent to call D3-format, which is\n        exposed as `format in Vega-Expression\n        <https://vega.github.io/vega/docs/expressions/#format>`__. **Note:** You must also\n        set ``customFormatTypes`` to ``true`` to use this feature.\n    timeFormat : str\n        Default time format for raw time values (without time units) in text marks, legend\n        labels and header labels.\n\n        **Default value:** ``\"%b %d, %Y\"`` **Note:** Axes automatically determine the format\n        for each label automatically so this config does not affect axes.\n    timeFormatType : str\n        `Custom format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__ for\n        ``config.timeFormat``.\n\n        **Default value:** ``undefined`` -- This is equilvalent to call D3-time-format,\n        which is exposed as `timeFormat in Vega-Expression\n        <https://vega.github.io/vega/docs/expressions/#timeFormat>`__. **Note:** You must\n        also set ``customFormatTypes`` to ``true`` and there must *not* be a ``timeUnit``\n        defined to use this feature.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FormatConfig\"}\n\n    def __init__(\n        self,\n        normalizedNumberFormat: Optional[str] = Undefined,\n        normalizedNumberFormatType: Optional[str] = Undefined,\n        numberFormat: Optional[str] = Undefined,\n        numberFormatType: Optional[str] = Undefined,\n        timeFormat: Optional[str] = Undefined,\n        timeFormatType: Optional[str] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            normalizedNumberFormat=normalizedNumberFormat,\n            normalizedNumberFormatType=normalizedNumberFormatType,\n            numberFormat=numberFormat,\n            numberFormatType=numberFormatType,\n            timeFormat=timeFormat,\n            timeFormatType=timeFormatType,\n            **kwds,\n        )\n\n\nclass Generator(Data):\n    \"\"\"Generator schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Generator\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass GenericUnitSpecEncodingAnyMark(VegaLiteSchema):\n    \"\"\"\n    GenericUnitSpecEncodingAnyMark schema wrapper.\n\n    Base interface for a unit (single-view) specification.\n\n    Parameters\n    ----------\n    mark : dict, :class:`Mark`, :class:`AnyMark`, :class:`BoxPlot`, :class:`MarkDef`, :class:`ErrorBar`, :class:`ErrorBand`, :class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`, :class:`CompositeMark`, :class:`CompositeMarkDef`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape', 'boxplot', 'errorband', 'errorbar']\n        A string describing the mark type (one of ``\"bar\"``, ``\"circle\"``, ``\"square\"``,\n        ``\"tick\"``, ``\"line\"``, ``\"area\"``, ``\"point\"``, ``\"rule\"``, ``\"geoshape\"``, and\n        ``\"text\"``) or a `mark definition object\n        <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    description : str\n        Description of this mark for commenting purpose.\n    encoding : dict, :class:`Encoding`\n        A key-value mapping between encoding channels and definition of fields.\n    name : str\n        Name of the visualization for later reference.\n    params : Sequence[dict, :class:`SelectionParameter`]\n        An array of parameters that may either be simple variables, or more complex\n        selections that map user input to data queries.\n    projection : dict, :class:`Projection`\n        An object defining properties of geographic projection, which will be applied to\n        ``shape`` path for ``\"geoshape\"`` marks and to ``latitude`` and ``\"longitude\"``\n        channels for other marks.\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/GenericUnitSpec<Encoding,AnyMark>\"}\n\n    def __init__(\n        self,\n        mark: Optional[SchemaBase | Map | Mark_T | CompositeMark_T] = Undefined,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        description: Optional[str] = Undefined,\n        encoding: Optional[SchemaBase | Map] = Undefined,\n        name: Optional[str] = Undefined,\n        params: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        projection: Optional[SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            mark=mark,\n            data=data,\n            description=description,\n            encoding=encoding,\n            name=name,\n            params=params,\n            projection=projection,\n            title=title,\n            transform=transform,\n            **kwds,\n        )\n\n\nclass GeoJsonFeature(Fit):\n    \"\"\"\n    GeoJsonFeature schema wrapper.\n\n    A feature object which contains a geometry and associated properties.\n    https://tools.ietf.org/html/rfc7946#section-3.2\n\n    Parameters\n    ----------\n    geometry : dict, :class:`Point`, :class:`Polygon`, :class:`Geometry`, :class:`LineString`, :class:`MultiPoint`, :class:`MultiPolygon`, :class:`MultiLineString`, :class:`GeometryCollection`\n        The feature's geometry\n    properties : dict, :class:`GeoJsonProperties`, None\n        Properties associated with this feature.\n    type : Literal['Feature']\n        Specifies the type of GeoJSON object.\n    bbox : :class:`BBox`, Sequence[float]\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    id : str, float\n        A value that uniquely identifies this feature in a\n        https://tools.ietf.org/html/rfc7946#section-3.2.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/GeoJsonFeature\"}\n\n    def __init__(\n        self,\n        geometry: Optional[SchemaBase | Map] = Undefined,\n        properties: Optional[SchemaBase | Map | None] = Undefined,\n        type: Optional[Literal[\"Feature\"]] = Undefined,\n        bbox: Optional[SchemaBase | Sequence[float]] = Undefined,\n        id: Optional[str | float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            geometry=geometry,\n            properties=properties,\n            type=type,\n            bbox=bbox,\n            id=id,\n            **kwds,\n        )\n\n\nclass GeoJsonFeatureCollection(Fit):\n    \"\"\"\n    GeoJsonFeatureCollection schema wrapper.\n\n    A collection of feature objects.  https://tools.ietf.org/html/rfc7946#section-3.3\n\n    Parameters\n    ----------\n    features : Sequence[dict, :class:`FeatureGeometryGeoJsonProperties`]\n\n    type : Literal['FeatureCollection']\n        Specifies the type of GeoJSON object.\n    bbox : :class:`BBox`, Sequence[float]\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/GeoJsonFeatureCollection\"}\n\n    def __init__(\n        self,\n        features: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        type: Optional[Literal[\"FeatureCollection\"]] = Undefined,\n        bbox: Optional[SchemaBase | Sequence[float]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(features=features, type=type, bbox=bbox, **kwds)\n\n\nclass GeoJsonProperties(VegaLiteSchema):\n    \"\"\"GeoJsonProperties schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/GeoJsonProperties\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass Geometry(VegaLiteSchema):\n    \"\"\"\n    Geometry schema wrapper.\n\n    Geometry object. https://tools.ietf.org/html/rfc7946#section-3\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Geometry\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass GeometryCollection(Geometry):\n    \"\"\"\n    GeometryCollection schema wrapper.\n\n    Geometry Collection https://tools.ietf.org/html/rfc7946#section-3.1.8\n\n    Parameters\n    ----------\n    geometries : Sequence[dict, :class:`Point`, :class:`Polygon`, :class:`Geometry`, :class:`LineString`, :class:`MultiPoint`, :class:`MultiPolygon`, :class:`MultiLineString`, :class:`GeometryCollection`]\n\n    type : Literal['GeometryCollection']\n        Specifies the type of GeoJSON object.\n    bbox : :class:`BBox`, Sequence[float]\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/GeometryCollection\"}\n\n    def __init__(\n        self,\n        geometries: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        type: Optional[Literal[\"GeometryCollection\"]] = Undefined,\n        bbox: Optional[SchemaBase | Sequence[float]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(geometries=geometries, type=type, bbox=bbox, **kwds)\n\n\nclass Gradient(VegaLiteSchema):\n    \"\"\"Gradient schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Gradient\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass GradientStop(VegaLiteSchema):\n    \"\"\"\n    GradientStop schema wrapper.\n\n    Parameters\n    ----------\n    color : str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']\n        The color value at this point in the gradient.\n    offset : float\n        The offset fraction for the color stop, indicating its position within the gradient.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/GradientStop\"}\n\n    def __init__(\n        self,\n        color: Optional[str | SchemaBase | ColorName_T] = Undefined,\n        offset: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(color=color, offset=offset, **kwds)\n\n\nclass GraticuleGenerator(Generator):\n    \"\"\"\n    GraticuleGenerator schema wrapper.\n\n    Parameters\n    ----------\n    graticule : dict, Literal[True], :class:`GraticuleParams`\n        Generate graticule GeoJSON data for geographic reference lines.\n    name : str\n        Provide a placeholder name and bind data at runtime.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/GraticuleGenerator\"}\n\n    def __init__(\n        self,\n        graticule: Optional[SchemaBase | Literal[True] | Map] = Undefined,\n        name: Optional[str] = Undefined,\n        **kwds,\n    ):\n        super().__init__(graticule=graticule, name=name, **kwds)\n\n\nclass GraticuleParams(VegaLiteSchema):\n    \"\"\"\n    GraticuleParams schema wrapper.\n\n    Parameters\n    ----------\n    extent : :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`]\n        Sets both the major and minor extents to the same values.\n    extentMajor : :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`]\n        The major extent of the graticule as a two-element array of coordinates.\n    extentMinor : :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`]\n        The minor extent of the graticule as a two-element array of coordinates.\n    precision : float\n        The precision of the graticule in degrees.\n\n        **Default value:** ``2.5``\n    step : Sequence[float], :class:`Vector2number`\n        Sets both the major and minor step angles to the same values.\n    stepMajor : Sequence[float], :class:`Vector2number`\n        The major step angles of the graticule.\n\n        **Default value:** ``[90, 360]``\n    stepMinor : Sequence[float], :class:`Vector2number`\n        The minor step angles of the graticule.\n\n        **Default value:** ``[10, 10]``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/GraticuleParams\"}\n\n    def __init__(\n        self,\n        extent: Optional[\n            SchemaBase | Sequence[SchemaBase | Sequence[float]]\n        ] = Undefined,\n        extentMajor: Optional[\n            SchemaBase | Sequence[SchemaBase | Sequence[float]]\n        ] = Undefined,\n        extentMinor: Optional[\n            SchemaBase | Sequence[SchemaBase | Sequence[float]]\n        ] = Undefined,\n        precision: Optional[float] = Undefined,\n        step: Optional[SchemaBase | Sequence[float]] = Undefined,\n        stepMajor: Optional[SchemaBase | Sequence[float]] = Undefined,\n        stepMinor: Optional[SchemaBase | Sequence[float]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            extent=extent,\n            extentMajor=extentMajor,\n            extentMinor=extentMinor,\n            precision=precision,\n            step=step,\n            stepMajor=stepMajor,\n            stepMinor=stepMinor,\n            **kwds,\n        )\n\n\nclass Header(VegaLiteSchema):\n    \"\"\"\n    Header schema wrapper.\n\n    Headers of row / column channels for faceted plots.\n\n    Parameters\n    ----------\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    labelAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        Horizontal text alignment of header labels. One of ``\"left\"``, ``\"center\"``, or\n        ``\"right\"``.\n    labelAnchor : :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']\n        The anchor position for placing the labels. One of ``\"start\"``, ``\"middle\"``, or\n        ``\"end\"``. For example, with a label orientation of top these anchor positions map\n        to a left-, center-, or right-aligned label.\n    labelAngle : float\n        The rotation angle of the header labels.\n\n        **Default value:** ``0`` for column header, ``-90`` for row header.\n    labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        The vertical text baseline for the header labels. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or ``\"line-bottom\"``. The\n        ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and\n        ``\"bottom\"``, but are calculated relative to the ``titleLineHeight`` rather than\n        ``titleFontSize`` alone.\n    labelColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']\n        The color of the header label, can be in hex color code or regular color name.\n    labelExpr : str\n        `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing\n        labels.\n\n        **Note:** The label text and value can be assessed via the ``label`` and ``value``\n        properties of the header's backing ``datum`` object.\n    labelFont : str, dict, :class:`ExprRef`\n        The font of the header label.\n    labelFontSize : dict, float, :class:`ExprRef`\n        The font size of the header label, in pixels.\n    labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style of the header label.\n    labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        The font weight of the header label.\n    labelLimit : dict, float, :class:`ExprRef`\n        The maximum length of the header label in pixels. The text value will be\n        automatically truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0``, indicating no limit\n    labelLineHeight : dict, float, :class:`ExprRef`\n        Line height in pixels for multi-line header labels or title text with ``\"line-top\"``\n        or ``\"line-bottom\"`` baseline.\n    labelOrient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom']\n        The orientation of the header label. One of ``\"top\"``, ``\"bottom\"``, ``\"left\"`` or\n        ``\"right\"``.\n    labelPadding : dict, float, :class:`ExprRef`\n        The padding, in pixel, between facet header's label and the plot.\n\n        **Default value:** ``10``\n    labels : bool\n        A boolean flag indicating if labels should be included as part of the header.\n\n        **Default value:** ``true``.\n    orient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom']\n        Shortcut for setting both labelOrient and titleOrient.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        Horizontal text alignment (to the anchor) of header titles.\n    titleAnchor : :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']\n        The anchor position for placing the title. One of ``\"start\"``, ``\"middle\"``, or\n        ``\"end\"``. For example, with an orientation of top these anchor positions map to a\n        left-, center-, or right-aligned title.\n    titleAngle : float\n        The rotation angle of the header title.\n\n        **Default value:** ``0``.\n    titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        The vertical text baseline for the header title. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or ``\"line-bottom\"``. The\n        ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and\n        ``\"bottom\"``, but are calculated relative to the ``titleLineHeight`` rather than\n        ``titleFontSize`` alone.\n\n        **Default value:** ``\"middle\"``\n    titleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']\n        Color of the header title, can be in hex color code or regular color name.\n    titleFont : str, dict, :class:`ExprRef`\n        Font of the header title. (e.g., ``\"Helvetica Neue\"``).\n    titleFontSize : dict, float, :class:`ExprRef`\n        Font size of the header title.\n    titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style of the header title.\n    titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        Font weight of the header title. This can be either a string (e.g ``\"bold\"``,\n        ``\"normal\"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where\n        ``\"normal\"`` = ``400`` and ``\"bold\"`` = ``700``).\n    titleLimit : dict, float, :class:`ExprRef`\n        The maximum length of the header title in pixels. The text value will be\n        automatically truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0``, indicating no limit\n    titleLineHeight : dict, float, :class:`ExprRef`\n        Line height in pixels for multi-line header title text or title text with\n        ``\"line-top\"`` or ``\"line-bottom\"`` baseline.\n    titleOrient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom']\n        The orientation of the header title. One of ``\"top\"``, ``\"bottom\"``, ``\"left\"`` or\n        ``\"right\"``.\n    titlePadding : dict, float, :class:`ExprRef`\n        The padding, in pixel, between facet header's title and the label.\n\n        **Default value:** ``10``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Header\"}\n\n    def __init__(\n        self,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined,\n        labelAngle: Optional[float] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOrient: Optional[SchemaBase | Orient_T] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labels: Optional[bool] = Undefined,\n        orient: Optional[SchemaBase | Orient_T] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined,\n        titleAngle: Optional[float] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[SchemaBase | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            format=format,\n            formatType=formatType,\n            labelAlign=labelAlign,\n            labelAnchor=labelAnchor,\n            labelAngle=labelAngle,\n            labelBaseline=labelBaseline,\n            labelColor=labelColor,\n            labelExpr=labelExpr,\n            labelFont=labelFont,\n            labelFontSize=labelFontSize,\n            labelFontStyle=labelFontStyle,\n            labelFontWeight=labelFontWeight,\n            labelLimit=labelLimit,\n            labelLineHeight=labelLineHeight,\n            labelOrient=labelOrient,\n            labelPadding=labelPadding,\n            labels=labels,\n            orient=orient,\n            title=title,\n            titleAlign=titleAlign,\n            titleAnchor=titleAnchor,\n            titleAngle=titleAngle,\n            titleBaseline=titleBaseline,\n            titleColor=titleColor,\n            titleFont=titleFont,\n            titleFontSize=titleFontSize,\n            titleFontStyle=titleFontStyle,\n            titleFontWeight=titleFontWeight,\n            titleLimit=titleLimit,\n            titleLineHeight=titleLineHeight,\n            titleOrient=titleOrient,\n            titlePadding=titlePadding,\n            **kwds,\n        )\n\n\nclass HeaderConfig(VegaLiteSchema):\n    \"\"\"\n    HeaderConfig schema wrapper.\n\n    Parameters\n    ----------\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    labelAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        Horizontal text alignment of header labels. One of ``\"left\"``, ``\"center\"``, or\n        ``\"right\"``.\n    labelAnchor : :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']\n        The anchor position for placing the labels. One of ``\"start\"``, ``\"middle\"``, or\n        ``\"end\"``. For example, with a label orientation of top these anchor positions map\n        to a left-, center-, or right-aligned label.\n    labelAngle : float\n        The rotation angle of the header labels.\n\n        **Default value:** ``0`` for column header, ``-90`` for row header.\n    labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        The vertical text baseline for the header labels. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or ``\"line-bottom\"``. The\n        ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and\n        ``\"bottom\"``, but are calculated relative to the ``titleLineHeight`` rather than\n        ``titleFontSize`` alone.\n    labelColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']\n        The color of the header label, can be in hex color code or regular color name.\n    labelExpr : str\n        `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing\n        labels.\n\n        **Note:** The label text and value can be assessed via the ``label`` and ``value``\n        properties of the header's backing ``datum`` object.\n    labelFont : str, dict, :class:`ExprRef`\n        The font of the header label.\n    labelFontSize : dict, float, :class:`ExprRef`\n        The font size of the header label, in pixels.\n    labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style of the header label.\n    labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        The font weight of the header label.\n    labelLimit : dict, float, :class:`ExprRef`\n        The maximum length of the header label in pixels. The text value will be\n        automatically truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0``, indicating no limit\n    labelLineHeight : dict, float, :class:`ExprRef`\n        Line height in pixels for multi-line header labels or title text with ``\"line-top\"``\n        or ``\"line-bottom\"`` baseline.\n    labelOrient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom']\n        The orientation of the header label. One of ``\"top\"``, ``\"bottom\"``, ``\"left\"`` or\n        ``\"right\"``.\n    labelPadding : dict, float, :class:`ExprRef`\n        The padding, in pixel, between facet header's label and the plot.\n\n        **Default value:** ``10``\n    labels : bool\n        A boolean flag indicating if labels should be included as part of the header.\n\n        **Default value:** ``true``.\n    orient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom']\n        Shortcut for setting both labelOrient and titleOrient.\n    title : None\n        Set to null to disable title for the axis, legend, or header.\n    titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        Horizontal text alignment (to the anchor) of header titles.\n    titleAnchor : :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']\n        The anchor position for placing the title. One of ``\"start\"``, ``\"middle\"``, or\n        ``\"end\"``. For example, with an orientation of top these anchor positions map to a\n        left-, center-, or right-aligned title.\n    titleAngle : float\n        The rotation angle of the header title.\n\n        **Default value:** ``0``.\n    titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        The vertical text baseline for the header title. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or ``\"line-bottom\"``. The\n        ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and\n        ``\"bottom\"``, but are calculated relative to the ``titleLineHeight`` rather than\n        ``titleFontSize`` alone.\n\n        **Default value:** ``\"middle\"``\n    titleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']\n        Color of the header title, can be in hex color code or regular color name.\n    titleFont : str, dict, :class:`ExprRef`\n        Font of the header title. (e.g., ``\"Helvetica Neue\"``).\n    titleFontSize : dict, float, :class:`ExprRef`\n        Font size of the header title.\n    titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style of the header title.\n    titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        Font weight of the header title. This can be either a string (e.g ``\"bold\"``,\n        ``\"normal\"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where\n        ``\"normal\"`` = ``400`` and ``\"bold\"`` = ``700``).\n    titleLimit : dict, float, :class:`ExprRef`\n        The maximum length of the header title in pixels. The text value will be\n        automatically truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0``, indicating no limit\n    titleLineHeight : dict, float, :class:`ExprRef`\n        Line height in pixels for multi-line header title text or title text with\n        ``\"line-top\"`` or ``\"line-bottom\"`` baseline.\n    titleOrient : :class:`Orient`, Literal['left', 'right', 'top', 'bottom']\n        The orientation of the header title. One of ``\"top\"``, ``\"bottom\"``, ``\"left\"`` or\n        ``\"right\"``.\n    titlePadding : dict, float, :class:`ExprRef`\n        The padding, in pixel, between facet header's title and the label.\n\n        **Default value:** ``10``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/HeaderConfig\"}\n\n    def __init__(\n        self,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined,\n        labelAngle: Optional[float] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOrient: Optional[SchemaBase | Orient_T] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labels: Optional[bool] = Undefined,\n        orient: Optional[SchemaBase | Orient_T] = Undefined,\n        title: Optional[None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[SchemaBase | TitleAnchor_T] = Undefined,\n        titleAngle: Optional[float] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[SchemaBase | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            format=format,\n            formatType=formatType,\n            labelAlign=labelAlign,\n            labelAnchor=labelAnchor,\n            labelAngle=labelAngle,\n            labelBaseline=labelBaseline,\n            labelColor=labelColor,\n            labelExpr=labelExpr,\n            labelFont=labelFont,\n            labelFontSize=labelFontSize,\n            labelFontStyle=labelFontStyle,\n            labelFontWeight=labelFontWeight,\n            labelLimit=labelLimit,\n            labelLineHeight=labelLineHeight,\n            labelOrient=labelOrient,\n            labelPadding=labelPadding,\n            labels=labels,\n            orient=orient,\n            title=title,\n            titleAlign=titleAlign,\n            titleAnchor=titleAnchor,\n            titleAngle=titleAngle,\n            titleBaseline=titleBaseline,\n            titleColor=titleColor,\n            titleFont=titleFont,\n            titleFontSize=titleFontSize,\n            titleFontStyle=titleFontStyle,\n            titleFontWeight=titleFontWeight,\n            titleLimit=titleLimit,\n            titleLineHeight=titleLineHeight,\n            titleOrient=titleOrient,\n            titlePadding=titlePadding,\n            **kwds,\n        )\n\n\nclass HexColor(Color):\n    \"\"\"HexColor schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/HexColor\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass ImputeMethod(VegaLiteSchema):\n    \"\"\"ImputeMethod schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ImputeMethod\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass ImputeParams(VegaLiteSchema):\n    \"\"\"\n    ImputeParams schema wrapper.\n\n    Parameters\n    ----------\n    frame : Sequence[float, None]\n        A frame specification as a two-element array used to control the window over which\n        the specified method is applied. The array entries should either be a number\n        indicating the offset from the current data object, or null to indicate unbounded\n        rows preceding or following the current data object. For example, the value ``[-5,\n        5]`` indicates that the window should include five objects preceding and five\n        objects following the current object.\n\n        **Default value:**:  ``[null, null]`` indicating that the window includes all\n        objects.\n    keyvals : dict, Sequence[Any], :class:`ImputeSequence`\n        Defines the key values that should be considered for imputation. An array of key\n        values or an object defining a `number sequence\n        <https://vega.github.io/vega-lite/docs/impute.html#sequence-def>`__.\n\n        If provided, this will be used in addition to the key values observed within the\n        input data. If not provided, the values will be derived from all unique values of\n        the ``key`` field. For ``impute`` in ``encoding``, the key field is the x-field if\n        the y-field is imputed, or vice versa.\n\n        If there is no impute grouping, this property *must* be specified.\n    method : :class:`ImputeMethod`, Literal['value', 'median', 'max', 'min', 'mean']\n        The imputation method to use for the field value of imputed data objects. One of\n        ``\"value\"``, ``\"mean\"``, ``\"median\"``, ``\"max\"`` or ``\"min\"``.\n\n        **Default value:**  ``\"value\"``\n    value : Any\n        The field value to use when the imputation ``method`` is ``\"value\"``.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ImputeParams\"}\n\n    def __init__(\n        self,\n        frame: Optional[Sequence[float | None]] = Undefined,\n        keyvals: Optional[SchemaBase | Sequence[Any] | Map] = Undefined,\n        method: Optional[SchemaBase | ImputeMethod_T] = Undefined,\n        value: Optional[Any] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            frame=frame, keyvals=keyvals, method=method, value=value, **kwds\n        )\n\n\nclass ImputeSequence(VegaLiteSchema):\n    \"\"\"\n    ImputeSequence schema wrapper.\n\n    Parameters\n    ----------\n    stop : float\n        The ending value(exclusive) of the sequence.\n    start : float\n        The starting value of the sequence. **Default value:** ``0``\n    step : float\n        The step value between sequence entries. **Default value:** ``1`` or ``-1`` if\n        ``stop < start``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ImputeSequence\"}\n\n    def __init__(\n        self,\n        stop: Optional[float] = Undefined,\n        start: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(stop=stop, start=start, step=step, **kwds)\n\n\nclass InlineData(DataSource):\n    \"\"\"\n    InlineData schema wrapper.\n\n    Parameters\n    ----------\n    values : str, dict, Sequence[str], Sequence[bool], Sequence[dict], Sequence[float], :class:`InlineDataset`\n        The full data set, included inline. This can be an array of objects or primitive\n        values, an object, or a string. Arrays of primitive values are ingested as objects\n        with a ``data`` property. Strings are parsed according to the specified format type.\n    format : dict, :class:`DataFormat`, :class:`CsvDataFormat`, :class:`DsvDataFormat`, :class:`JsonDataFormat`, :class:`TopoDataFormat`\n        An object that specifies the format for parsing the data.\n    name : str\n        Provide a placeholder name and bind data at runtime.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/InlineData\"}\n\n    def __init__(\n        self,\n        values: Optional[\n            str\n            | SchemaBase\n            | Sequence[Map]\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Map\n        ] = Undefined,\n        format: Optional[SchemaBase | Map] = Undefined,\n        name: Optional[str] = Undefined,\n        **kwds,\n    ):\n        super().__init__(values=values, format=format, name=name, **kwds)\n\n\nclass InlineDataset(VegaLiteSchema):\n    \"\"\"InlineDataset schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/InlineDataset\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass Interpolate(VegaLiteSchema):\n    \"\"\"Interpolate schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Interpolate\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass IntervalSelectionConfig(VegaLiteSchema):\n    \"\"\"\n    IntervalSelectionConfig schema wrapper.\n\n    Parameters\n    ----------\n    type : Literal['interval']\n        Determines the default event processing and data query for the selection. Vega-Lite\n        currently supports two selection types:\n\n        * ``\"point\"`` -- to select multiple discrete data values; the first value is\n          selected on ``click`` and additional values toggled on shift-click.\n        * ``\"interval\"`` -- to select a continuous range of data values on ``drag``.\n    clear : str, bool, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`\n        Clears the selection, emptying it of all values. This property can be a `Event\n        Stream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable\n        clear.\n\n        **Default value:** ``dblclick``.\n\n        **See also:** `clear examples\n        <https://vega.github.io/vega-lite/docs/selection.html#clear>`__ in the\n        documentation.\n    encodings : Sequence[:class:`SingleDefUnitChannel`, Literal['text', 'shape', 'x', 'y', 'xOffset', 'yOffset', 'x2', 'y2', 'longitude', 'latitude', 'longitude2', 'latitude2', 'theta', 'theta2', 'radius', 'radius2', 'time', 'color', 'fill', 'stroke', 'opacity', 'fillOpacity', 'strokeOpacity', 'strokeWidth', 'strokeDash', 'size', 'angle', 'key', 'href', 'url', 'description']]\n        An array of encoding channels. The corresponding data field values must match for a\n        data tuple to fall within the selection.\n\n        **See also:** The `projection with encodings and fields section\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the\n        documentation.\n    fields : Sequence[str, :class:`FieldName`]\n        An array of field names whose values must match for a data tuple to fall within the\n        selection.\n\n        **See also:** The `projection with encodings and fields section\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the\n        documentation.\n    mark : dict, :class:`BrushConfig`\n        An interval selection also adds a rectangle mark to depict the extents of the\n        interval. The ``mark`` property can be used to customize the appearance of the mark.\n\n        **See also:** `mark examples\n        <https://vega.github.io/vega-lite/docs/selection.html#mark>`__ in the documentation.\n    on : str, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`\n        A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or\n        selector) that triggers the selection. For interval selections, the event stream\n        must specify a `start and end\n        <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.\n\n        **See also:** `on examples\n        <https://vega.github.io/vega-lite/docs/selection.html#on>`__ in the documentation.\n    resolve : :class:`SelectionResolution`, Literal['global', 'union', 'intersect']\n        With layered and multi-view displays, a strategy that determines how selections'\n        data queries are resolved when applied in a filter transform, conditional encoding\n        rule, or scale domain.\n\n        One of:\n\n        * ``\"global\"`` -- only one brush exists for the entire SPLOM. When the user begins\n          to drag, any previous brushes are cleared, and a new one is constructed.\n        * ``\"union\"`` -- each cell contains its own brush, and points are highlighted if\n          they lie within *any* of these individual brushes.\n        * ``\"intersect\"`` -- each cell contains its own brush, and points are highlighted\n          only if they fall within *all* of these individual brushes.\n\n        **Default value:** ``global``.\n\n        **See also:** `resolve examples\n        <https://vega.github.io/vega-lite/docs/selection.html#resolve>`__ in the\n        documentation.\n    translate : str, bool\n        When truthy, allows a user to interactively move an interval selection\n        back-and-forth. Can be ``true``, ``false`` (to disable panning), or a `Vega event\n        stream definition <https://vega.github.io/vega/docs/event-streams/>`__ which must\n        include a start and end event to trigger continuous panning. Discrete panning (e.g.,\n        pressing the left/right arrow keys) will be supported in future versions.\n\n        **Default value:** ``true``, which corresponds to ``[pointerdown, window:pointerup]\n        > window:pointermove!``. This default allows users to clicks and drags within an\n        interval selection to reposition it.\n\n        **See also:** `translate examples\n        <https://vega.github.io/vega-lite/docs/selection.html#translate>`__ in the\n        documentation.\n    zoom : str, bool\n        When truthy, allows a user to interactively resize an interval selection. Can be\n        ``true``, ``false`` (to disable zooming), or a `Vega event stream definition\n        <https://vega.github.io/vega/docs/event-streams/>`__. Currently, only ``wheel``\n        events are supported, but custom event streams can still be used to specify filters,\n        debouncing, and throttling. Future versions will expand the set of events that can\n        trigger this transformation.\n\n        **Default value:** ``true``, which corresponds to ``wheel!``. This default allows\n        users to use the mouse wheel to resize an interval selection.\n\n        **See also:** `zoom examples\n        <https://vega.github.io/vega-lite/docs/selection.html#zoom>`__ in the documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/IntervalSelectionConfig\"}\n\n    def __init__(\n        self,\n        type: Optional[Literal[\"interval\"]] = Undefined,\n        clear: Optional[str | bool | SchemaBase | Map] = Undefined,\n        encodings: Optional[Sequence[SchemaBase | SingleDefUnitChannel_T]] = Undefined,\n        fields: Optional[Sequence[str | SchemaBase]] = Undefined,\n        mark: Optional[SchemaBase | Map] = Undefined,\n        on: Optional[str | SchemaBase | Map] = Undefined,\n        resolve: Optional[SchemaBase | SelectionResolution_T] = Undefined,\n        translate: Optional[str | bool] = Undefined,\n        zoom: Optional[str | bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            type=type,\n            clear=clear,\n            encodings=encodings,\n            fields=fields,\n            mark=mark,\n            on=on,\n            resolve=resolve,\n            translate=translate,\n            zoom=zoom,\n            **kwds,\n        )\n\n\nclass IntervalSelectionConfigWithoutType(VegaLiteSchema):\n    \"\"\"\n    IntervalSelectionConfigWithoutType schema wrapper.\n\n    Parameters\n    ----------\n    clear : str, bool, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`\n        Clears the selection, emptying it of all values. This property can be a `Event\n        Stream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable\n        clear.\n\n        **Default value:** ``dblclick``.\n\n        **See also:** `clear examples\n        <https://vega.github.io/vega-lite/docs/selection.html#clear>`__ in the\n        documentation.\n    encodings : Sequence[:class:`SingleDefUnitChannel`, Literal['text', 'shape', 'x', 'y', 'xOffset', 'yOffset', 'x2', 'y2', 'longitude', 'latitude', 'longitude2', 'latitude2', 'theta', 'theta2', 'radius', 'radius2', 'time', 'color', 'fill', 'stroke', 'opacity', 'fillOpacity', 'strokeOpacity', 'strokeWidth', 'strokeDash', 'size', 'angle', 'key', 'href', 'url', 'description']]\n        An array of encoding channels. The corresponding data field values must match for a\n        data tuple to fall within the selection.\n\n        **See also:** The `projection with encodings and fields section\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the\n        documentation.\n    fields : Sequence[str, :class:`FieldName`]\n        An array of field names whose values must match for a data tuple to fall within the\n        selection.\n\n        **See also:** The `projection with encodings and fields section\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the\n        documentation.\n    mark : dict, :class:`BrushConfig`\n        An interval selection also adds a rectangle mark to depict the extents of the\n        interval. The ``mark`` property can be used to customize the appearance of the mark.\n\n        **See also:** `mark examples\n        <https://vega.github.io/vega-lite/docs/selection.html#mark>`__ in the documentation.\n    on : str, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`\n        A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or\n        selector) that triggers the selection. For interval selections, the event stream\n        must specify a `start and end\n        <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.\n\n        **See also:** `on examples\n        <https://vega.github.io/vega-lite/docs/selection.html#on>`__ in the documentation.\n    resolve : :class:`SelectionResolution`, Literal['global', 'union', 'intersect']\n        With layered and multi-view displays, a strategy that determines how selections'\n        data queries are resolved when applied in a filter transform, conditional encoding\n        rule, or scale domain.\n\n        One of:\n\n        * ``\"global\"`` -- only one brush exists for the entire SPLOM. When the user begins\n          to drag, any previous brushes are cleared, and a new one is constructed.\n        * ``\"union\"`` -- each cell contains its own brush, and points are highlighted if\n          they lie within *any* of these individual brushes.\n        * ``\"intersect\"`` -- each cell contains its own brush, and points are highlighted\n          only if they fall within *all* of these individual brushes.\n\n        **Default value:** ``global``.\n\n        **See also:** `resolve examples\n        <https://vega.github.io/vega-lite/docs/selection.html#resolve>`__ in the\n        documentation.\n    translate : str, bool\n        When truthy, allows a user to interactively move an interval selection\n        back-and-forth. Can be ``true``, ``false`` (to disable panning), or a `Vega event\n        stream definition <https://vega.github.io/vega/docs/event-streams/>`__ which must\n        include a start and end event to trigger continuous panning. Discrete panning (e.g.,\n        pressing the left/right arrow keys) will be supported in future versions.\n\n        **Default value:** ``true``, which corresponds to ``[pointerdown, window:pointerup]\n        > window:pointermove!``. This default allows users to clicks and drags within an\n        interval selection to reposition it.\n\n        **See also:** `translate examples\n        <https://vega.github.io/vega-lite/docs/selection.html#translate>`__ in the\n        documentation.\n    zoom : str, bool\n        When truthy, allows a user to interactively resize an interval selection. Can be\n        ``true``, ``false`` (to disable zooming), or a `Vega event stream definition\n        <https://vega.github.io/vega/docs/event-streams/>`__. Currently, only ``wheel``\n        events are supported, but custom event streams can still be used to specify filters,\n        debouncing, and throttling. Future versions will expand the set of events that can\n        trigger this transformation.\n\n        **Default value:** ``true``, which corresponds to ``wheel!``. This default allows\n        users to use the mouse wheel to resize an interval selection.\n\n        **See also:** `zoom examples\n        <https://vega.github.io/vega-lite/docs/selection.html#zoom>`__ in the documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/IntervalSelectionConfigWithoutType\"}\n\n    def __init__(\n        self,\n        clear: Optional[str | bool | SchemaBase | Map] = Undefined,\n        encodings: Optional[Sequence[SchemaBase | SingleDefUnitChannel_T]] = Undefined,\n        fields: Optional[Sequence[str | SchemaBase]] = Undefined,\n        mark: Optional[SchemaBase | Map] = Undefined,\n        on: Optional[str | SchemaBase | Map] = Undefined,\n        resolve: Optional[SchemaBase | SelectionResolution_T] = Undefined,\n        translate: Optional[str | bool] = Undefined,\n        zoom: Optional[str | bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            clear=clear,\n            encodings=encodings,\n            fields=fields,\n            mark=mark,\n            on=on,\n            resolve=resolve,\n            translate=translate,\n            zoom=zoom,\n            **kwds,\n        )\n\n\nclass JoinAggregateFieldDef(VegaLiteSchema):\n    \"\"\"\n    JoinAggregateFieldDef schema wrapper.\n\n    Parameters\n    ----------\n    op : :class:`AggregateOp`, Literal['argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        The aggregation operation to apply (e.g., ``\"sum\"``, ``\"average\"`` or ``\"count\"``).\n        See the list of all supported operations `here\n        <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__.\n    field : str, :class:`FieldName`\n        The data field for which to compute the aggregate function. This can be omitted for\n        functions that do not operate over a field such as ``\"count\"``.\n    as : str, :class:`FieldName`\n        The output name for the join aggregate operation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/JoinAggregateFieldDef\"}\n\n    def __init__(\n        self,\n        op: Optional[SchemaBase | AggregateOp_T] = Undefined,\n        field: Optional[str | SchemaBase] = Undefined,\n        **kwds,\n    ):\n        super().__init__(op=op, field=field, **kwds)\n\n\nclass JsonDataFormat(DataFormat):\n    \"\"\"\n    JsonDataFormat schema wrapper.\n\n    Parameters\n    ----------\n    parse : dict, :class:`Parse`, None\n        If set to ``null``, disable type inference based on the spec and only use type\n        inference based on the data. Alternatively, a parsing directive object can be\n        provided for explicit data types. Each property of the object corresponds to a field\n        name, and the value to the desired data type (one of ``\"number\"``, ``\"boolean\"``,\n        ``\"date\"``, or null (do not parse the field)). For example, ``\"parse\":\n        {\"modified_on\": \"date\"}`` parses the ``modified_on`` field in each input record a\n        Date value.\n\n        For ``\"date\"``, we parse data based using JavaScript's `Date.parse()\n        <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__.\n        For Specific date formats can be provided (e.g., ``{foo: \"date:'%m%d%Y'\"}``), using\n        the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__.\n        UTC date format parsing is supported similarly (e.g., ``{foo: \"utc:'%m%d%Y'\"}``).\n        See more about `UTC time\n        <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__\n    property : str\n        The JSON property containing the desired data. This parameter can be used when the\n        loaded JSON file may have surrounding structure or meta-data. For example\n        ``\"property\": \"values.features\"`` is equivalent to retrieving\n        ``json.values.features`` from the loaded JSON object.\n    type : Literal['json']\n        Type of input data: ``\"json\"``, ``\"csv\"``, ``\"tsv\"``, ``\"dsv\"``.\n\n        **Default value:**  The default format type is determined by the extension of the\n        file URL. If no extension is detected, ``\"json\"`` will be used by default.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/JsonDataFormat\"}\n\n    def __init__(\n        self,\n        parse: Optional[SchemaBase | Map | None] = Undefined,\n        property: Optional[str] = Undefined,\n        type: Optional[Literal[\"json\"]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(parse=parse, property=property, type=type, **kwds)\n\n\nclass LabelOverlap(VegaLiteSchema):\n    \"\"\"LabelOverlap schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LabelOverlap\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass LatLongDef(VegaLiteSchema):\n    \"\"\"LatLongDef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LatLongDef\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass LatLongFieldDef(LatLongDef):\n    r\"\"\"\n    LatLongFieldDef schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : Literal['quantitative']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LatLongFieldDef\"}\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[Literal[\"quantitative\"]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass LayerRepeatMapping(VegaLiteSchema):\n    \"\"\"\n    LayerRepeatMapping schema wrapper.\n\n    Parameters\n    ----------\n    layer : Sequence[str]\n        An array of fields to be repeated as layers.\n    column : Sequence[str]\n        An array of fields to be repeated horizontally.\n    row : Sequence[str]\n        An array of fields to be repeated vertically.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LayerRepeatMapping\"}\n\n    def __init__(\n        self,\n        layer: Optional[Sequence[str]] = Undefined,\n        column: Optional[Sequence[str]] = Undefined,\n        row: Optional[Sequence[str]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(layer=layer, column=column, row=row, **kwds)\n\n\nclass LayoutAlign(VegaLiteSchema):\n    \"\"\"LayoutAlign schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LayoutAlign\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Legend(VegaLiteSchema):\n    \"\"\"\n    Legend schema wrapper.\n\n    Properties of a legend or boolean flag for determining whether to show it.\n\n    Parameters\n    ----------\n    aria : bool, dict, :class:`ExprRef`\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG group, removing the legend from the ARIA accessibility tree.\n\n        **Default value:** ``true``\n    clipHeight : dict, float, :class:`ExprRef`\n        The height in pixels to clip symbol legend entries and limit their size.\n    columnPadding : dict, float, :class:`ExprRef`\n        The horizontal padding in pixels between symbol legend entries.\n\n        **Default value:** ``10``.\n    columns : dict, float, :class:`ExprRef`\n        The number of columns in which to arrange symbol legend entries. A value of ``0`` or\n        lower indicates a single row with one column per entry.\n    cornerRadius : dict, float, :class:`ExprRef`\n        Corner radius for the full legend.\n    description : str, dict, :class:`ExprRef`\n        A text description of this legend for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If the ``aria`` property is true, for SVG output the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__\n        will be set to this description. If the description is unspecified it will be\n        automatically generated.\n    direction : :class:`Orientation`, Literal['horizontal', 'vertical']\n        The direction of the legend, one of ``\"vertical\"`` or ``\"horizontal\"``.\n\n        **Default value:**\n\n        * For top-/bottom-``orient``ed legends, ``\"horizontal\"``\n        * For left-/right-``orient``ed legends, ``\"vertical\"``\n        * For top/bottom-left/right-``orient``ed legends, ``\"horizontal\"`` for gradient\n          legends and ``\"vertical\"`` for symbol legends.\n    fillColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Background fill color for the full legend.\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    gradientLength : dict, float, :class:`ExprRef`\n        The length in pixels of the primary axis of a color gradient. This value corresponds\n        to the height of a vertical gradient or the width of a horizontal gradient.\n\n        **Default value:** ``200``.\n    gradientOpacity : dict, float, :class:`ExprRef`\n        Opacity of the color gradient.\n    gradientStrokeColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        The color of the gradient stroke, can be in hex color code or regular color name.\n\n        **Default value:** ``\"lightGray\"``.\n    gradientStrokeWidth : dict, float, :class:`ExprRef`\n        The width of the gradient stroke, in pixels.\n\n        **Default value:** ``0``.\n    gradientThickness : dict, float, :class:`ExprRef`\n        The thickness in pixels of the color gradient. This value corresponds to the width\n        of a vertical gradient or the height of a horizontal gradient.\n\n        **Default value:** ``16``.\n    gridAlign : dict, :class:`ExprRef`, :class:`LayoutAlign`, Literal['all', 'each', 'none']\n        The alignment to apply to symbol legends rows and columns. The supported string\n        values are ``\"all\"``, ``\"each\"`` (the default), and ``none``. For more information,\n        see the `grid layout documentation <https://vega.github.io/vega/docs/layout>`__.\n\n        **Default value:** ``\"each\"``.\n    labelAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        The alignment of the legend label, can be left, center, or right.\n    labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        The position of the baseline of legend label, can be ``\"top\"``, ``\"middle\"``,\n        ``\"bottom\"``, or ``\"alphabetic\"``.\n\n        **Default value:** ``\"middle\"``.\n    labelColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        The color of the legend label, can be in hex color code or regular color name.\n    labelExpr : str\n        `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ for customizing\n        labels.\n\n        **Note:** The label text and value can be assessed via the ``label`` and ``value``\n        properties of the legend's backing ``datum`` object.\n    labelFont : str, dict, :class:`ExprRef`\n        The font of the legend label.\n    labelFontSize : dict, float, :class:`ExprRef`\n        The font size of legend label.\n\n        **Default value:** ``10``.\n    labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style of legend label.\n    labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        The font weight of legend label.\n    labelLimit : dict, float, :class:`ExprRef`\n        Maximum allowed pixel width of legend tick labels.\n\n        **Default value:** ``160``.\n    labelOffset : dict, float, :class:`ExprRef`\n        The offset of the legend label.\n\n        **Default value:** ``4``.\n    labelOpacity : dict, float, :class:`ExprRef`\n        Opacity of labels.\n    labelOverlap : bool, dict, :class:`ExprRef`, :class:`LabelOverlap`, Literal['greedy', 'parity']\n        The strategy to use for resolving overlap of labels in gradient legends. If\n        ``false``, no overlap reduction is attempted. If set to ``true`` (default) or\n        ``\"parity\"``, a strategy of removing every other label is used. If set to\n        ``\"greedy\"``, a linear scan of the labels is performed, removing any label that\n        overlaps with the last visible label (this often works better for log-scaled axes).\n\n        **Default value:** ``true``.\n    labelPadding : dict, float, :class:`ExprRef`\n        Padding in pixels between the legend and legend labels.\n    labelSeparation : dict, float, :class:`ExprRef`\n        The minimum separation that must be between label bounding boxes for them to be\n        considered non-overlapping (default ``0``). This property is ignored if\n        *labelOverlap* resolution is not enabled.\n    legendX : dict, float, :class:`ExprRef`\n        Custom x-position for legend with orient \"none\".\n    legendY : dict, float, :class:`ExprRef`\n        Custom y-position for legend with orient \"none\".\n    offset : dict, float, :class:`ExprRef`\n        The offset in pixels by which to displace the legend from the data rectangle and\n        axes.\n\n        **Default value:** ``18``.\n    orient : :class:`LegendOrient`, Literal['none', 'left', 'right', 'top', 'bottom', 'top-left', 'top-right', 'bottom-left', 'bottom-right']\n        The orientation of the legend, which determines how the legend is positioned within\n        the scene. One of ``\"left\"``, ``\"right\"``, ``\"top\"``, ``\"bottom\"``, ``\"top-left\"``,\n        ``\"top-right\"``, ``\"bottom-left\"``, ``\"bottom-right\"``, ``\"none\"``.\n\n        **Default value:** ``\"right\"``\n    padding : dict, float, :class:`ExprRef`\n        The padding between the border and content of the legend group.\n\n        **Default value:** ``0``.\n    rowPadding : dict, float, :class:`ExprRef`\n        The vertical padding in pixels between symbol legend entries.\n\n        **Default value:** ``2``.\n    strokeColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Border stroke color for the full legend.\n    symbolDash : dict, Sequence[float], :class:`ExprRef`\n        An array of alternating [stroke, space] lengths for dashed symbol strokes.\n    symbolDashOffset : dict, float, :class:`ExprRef`\n        The pixel offset at which to start drawing with the symbol stroke dash array.\n    symbolFillColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        The color of the legend symbol,\n    symbolLimit : dict, float, :class:`ExprRef`\n        The maximum number of allowed entries for a symbol legend. Additional entries will\n        be dropped.\n    symbolOffset : dict, float, :class:`ExprRef`\n        Horizontal pixel offset for legend symbols.\n\n        **Default value:** ``0``.\n    symbolOpacity : dict, float, :class:`ExprRef`\n        Opacity of the legend symbols.\n    symbolSize : dict, float, :class:`ExprRef`\n        The size of the legend symbol, in pixels.\n\n        **Default value:** ``100``.\n    symbolStrokeColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Stroke color for legend symbols.\n    symbolStrokeWidth : dict, float, :class:`ExprRef`\n        The width of the symbol's stroke.\n\n        **Default value:** ``1.5``.\n    symbolType : str, dict, :class:`ExprRef`, :class:`SymbolShape`\n        The symbol shape. One of the plotting shapes ``circle`` (default), ``square``,\n        ``cross``, ``diamond``, ``triangle-up``, ``triangle-down``, ``triangle-right``, or\n        ``triangle-left``, the line symbol ``stroke``, or one of the centered directional\n        shapes ``arrow``, ``wedge``, or ``triangle``. Alternatively, a custom `SVG path\n        string <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ can be\n        provided. For correct sizing, custom shape paths should be defined within a square\n        bounding box with coordinates ranging from -1 to 1 along both the x and y\n        dimensions.\n\n        **Default value:** ``\"circle\"``.\n    tickCount : dict, float, :class:`ExprRef`, :class:`TickCount`, :class:`TimeInterval`, :class:`TimeIntervalStep`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year']\n        The desired number of tick values for quantitative legends.\n    tickMinStep : dict, float, :class:`ExprRef`\n        The minimum desired step between legend ticks, in terms of scale domain values. For\n        example, a value of ``1`` indicates that ticks should not be less than 1 unit apart.\n        If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if\n        necessary, to enforce the minimum step value.\n\n        **Default value**: ``undefined``\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        Horizontal text alignment for legend titles.\n\n        **Default value:** ``\"left\"``.\n    titleAnchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']\n        Text anchor position for placing legend titles.\n    titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        Vertical text baseline for legend titles.  One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or ``\"line-bottom\"``. The\n        ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and\n        ``\"bottom\"``, but are calculated relative to the *lineHeight* rather than *fontSize*\n        alone.\n\n        **Default value:** ``\"top\"``.\n    titleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        The color of the legend title, can be in hex color code or regular color name.\n    titleFont : str, dict, :class:`ExprRef`\n        The font of the legend title.\n    titleFontSize : dict, float, :class:`ExprRef`\n        The font size of the legend title.\n    titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style of the legend title.\n    titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        The font weight of the legend title. This can be either a string (e.g ``\"bold\"``,\n        ``\"normal\"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where\n        ``\"normal\"`` = ``400`` and ``\"bold\"`` = ``700``).\n    titleLimit : dict, float, :class:`ExprRef`\n        Maximum allowed pixel width of legend titles.\n\n        **Default value:** ``180``.\n    titleLineHeight : dict, float, :class:`ExprRef`\n        Line height in pixels for multi-line title text or title text with ``\"line-top\"`` or\n        ``\"line-bottom\"`` baseline.\n    titleOpacity : dict, float, :class:`ExprRef`\n        Opacity of the legend title.\n    titleOrient : dict, :class:`Orient`, :class:`ExprRef`, Literal['left', 'right', 'top', 'bottom']\n        Orientation of the legend title.\n    titlePadding : dict, float, :class:`ExprRef`\n        The padding, in pixels, between title and legend.\n\n        **Default value:** ``5``.\n    type : Literal['symbol', 'gradient']\n        The type of the legend. Use ``\"symbol\"`` to create a discrete legend and\n        ``\"gradient\"`` for a continuous color gradient.\n\n        **Default value:** ``\"gradient\"`` for non-binned quantitative fields and temporal\n        fields; ``\"symbol\"`` otherwise.\n    values : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`ExprRef`, Sequence[dict, :class:`DateTime`]\n        Explicitly set the visible legend values.\n    zindex : float\n        A non-negative integer indicating the z-index of the legend. If zindex is 0, legend\n        should be drawn behind all chart elements. To put them in front, use zindex = 1.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Legend\"}\n\n    def __init__(\n        self,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columns: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        direction: Optional[SchemaBase | Orientation_T] = Undefined,\n        fillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelExpr: Optional[str] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[SchemaBase | LegendOrient_T] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolFillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        tickMinStep: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        type: Optional[Literal[\"symbol\", \"gradient\"]] = Undefined,\n        values: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n        ] = Undefined,\n        zindex: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            aria=aria,\n            clipHeight=clipHeight,\n            columnPadding=columnPadding,\n            columns=columns,\n            cornerRadius=cornerRadius,\n            description=description,\n            direction=direction,\n            fillColor=fillColor,\n            format=format,\n            formatType=formatType,\n            gradientLength=gradientLength,\n            gradientOpacity=gradientOpacity,\n            gradientStrokeColor=gradientStrokeColor,\n            gradientStrokeWidth=gradientStrokeWidth,\n            gradientThickness=gradientThickness,\n            gridAlign=gridAlign,\n            labelAlign=labelAlign,\n            labelBaseline=labelBaseline,\n            labelColor=labelColor,\n            labelExpr=labelExpr,\n            labelFont=labelFont,\n            labelFontSize=labelFontSize,\n            labelFontStyle=labelFontStyle,\n            labelFontWeight=labelFontWeight,\n            labelLimit=labelLimit,\n            labelOffset=labelOffset,\n            labelOpacity=labelOpacity,\n            labelOverlap=labelOverlap,\n            labelPadding=labelPadding,\n            labelSeparation=labelSeparation,\n            legendX=legendX,\n            legendY=legendY,\n            offset=offset,\n            orient=orient,\n            padding=padding,\n            rowPadding=rowPadding,\n            strokeColor=strokeColor,\n            symbolDash=symbolDash,\n            symbolDashOffset=symbolDashOffset,\n            symbolFillColor=symbolFillColor,\n            symbolLimit=symbolLimit,\n            symbolOffset=symbolOffset,\n            symbolOpacity=symbolOpacity,\n            symbolSize=symbolSize,\n            symbolStrokeColor=symbolStrokeColor,\n            symbolStrokeWidth=symbolStrokeWidth,\n            symbolType=symbolType,\n            tickCount=tickCount,\n            tickMinStep=tickMinStep,\n            title=title,\n            titleAlign=titleAlign,\n            titleAnchor=titleAnchor,\n            titleBaseline=titleBaseline,\n            titleColor=titleColor,\n            titleFont=titleFont,\n            titleFontSize=titleFontSize,\n            titleFontStyle=titleFontStyle,\n            titleFontWeight=titleFontWeight,\n            titleLimit=titleLimit,\n            titleLineHeight=titleLineHeight,\n            titleOpacity=titleOpacity,\n            titleOrient=titleOrient,\n            titlePadding=titlePadding,\n            type=type,\n            values=values,\n            zindex=zindex,\n            **kwds,\n        )\n\n\nclass LegendBinding(VegaLiteSchema):\n    \"\"\"LegendBinding schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LegendBinding\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass LegendConfig(VegaLiteSchema):\n    \"\"\"\n    LegendConfig schema wrapper.\n\n    Parameters\n    ----------\n    aria : bool, dict, :class:`ExprRef`\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG group, removing the legend from the ARIA accessibility tree.\n\n        **Default value:** ``true``\n    clipHeight : dict, float, :class:`ExprRef`\n        The height in pixels to clip symbol legend entries and limit their size.\n    columnPadding : dict, float, :class:`ExprRef`\n        The horizontal padding in pixels between symbol legend entries.\n\n        **Default value:** ``10``.\n    columns : dict, float, :class:`ExprRef`\n        The number of columns in which to arrange symbol legend entries. A value of ``0`` or\n        lower indicates a single row with one column per entry.\n    cornerRadius : dict, float, :class:`ExprRef`\n        Corner radius for the full legend.\n    description : str, dict, :class:`ExprRef`\n        A text description of this legend for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If the ``aria`` property is true, for SVG output the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__\n        will be set to this description. If the description is unspecified it will be\n        automatically generated.\n    direction : :class:`Orientation`, Literal['horizontal', 'vertical']\n        The direction of the legend, one of ``\"vertical\"`` or ``\"horizontal\"``.\n\n        **Default value:**\n\n        * For top-/bottom-``orient``ed legends, ``\"horizontal\"``\n        * For left-/right-``orient``ed legends, ``\"vertical\"``\n        * For top/bottom-left/right-``orient``ed legends, ``\"horizontal\"`` for gradient\n          legends and ``\"vertical\"`` for symbol legends.\n    disable : bool\n        Disable legend by default\n    fillColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Background fill color for the full legend.\n    gradientDirection : dict, :class:`ExprRef`, :class:`Orientation`, Literal['horizontal', 'vertical']\n        The default direction (``\"horizontal\"`` or ``\"vertical\"``) for gradient legends.\n\n        **Default value:** ``\"vertical\"``.\n    gradientHorizontalMaxLength : float\n        Max legend length for a horizontal gradient when ``config.legend.gradientLength`` is\n        undefined.\n\n        **Default value:** ``200``\n    gradientHorizontalMinLength : float\n        Min legend length for a horizontal gradient when ``config.legend.gradientLength`` is\n        undefined.\n\n        **Default value:** ``100``\n    gradientLabelLimit : dict, float, :class:`ExprRef`\n        The maximum allowed length in pixels of color ramp gradient labels.\n    gradientLabelOffset : dict, float, :class:`ExprRef`\n        Vertical offset in pixels for color ramp gradient labels.\n\n        **Default value:** ``2``.\n    gradientLength : dict, float, :class:`ExprRef`\n        The length in pixels of the primary axis of a color gradient. This value corresponds\n        to the height of a vertical gradient or the width of a horizontal gradient.\n\n        **Default value:** ``200``.\n    gradientOpacity : dict, float, :class:`ExprRef`\n        Opacity of the color gradient.\n    gradientStrokeColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        The color of the gradient stroke, can be in hex color code or regular color name.\n\n        **Default value:** ``\"lightGray\"``.\n    gradientStrokeWidth : dict, float, :class:`ExprRef`\n        The width of the gradient stroke, in pixels.\n\n        **Default value:** ``0``.\n    gradientThickness : dict, float, :class:`ExprRef`\n        The thickness in pixels of the color gradient. This value corresponds to the width\n        of a vertical gradient or the height of a horizontal gradient.\n\n        **Default value:** ``16``.\n    gradientVerticalMaxLength : float\n        Max legend length for a vertical gradient when ``config.legend.gradientLength`` is\n        undefined.\n\n        **Default value:** ``200``\n    gradientVerticalMinLength : float\n        Min legend length for a vertical gradient when ``config.legend.gradientLength`` is\n        undefined.\n\n        **Default value:** ``100``\n    gridAlign : dict, :class:`ExprRef`, :class:`LayoutAlign`, Literal['all', 'each', 'none']\n        The alignment to apply to symbol legends rows and columns. The supported string\n        values are ``\"all\"``, ``\"each\"`` (the default), and ``none``. For more information,\n        see the `grid layout documentation <https://vega.github.io/vega/docs/layout>`__.\n\n        **Default value:** ``\"each\"``.\n    labelAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        The alignment of the legend label, can be left, center, or right.\n    labelBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        The position of the baseline of legend label, can be ``\"top\"``, ``\"middle\"``,\n        ``\"bottom\"``, or ``\"alphabetic\"``.\n\n        **Default value:** ``\"middle\"``.\n    labelColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        The color of the legend label, can be in hex color code or regular color name.\n    labelFont : str, dict, :class:`ExprRef`\n        The font of the legend label.\n    labelFontSize : dict, float, :class:`ExprRef`\n        The font size of legend label.\n\n        **Default value:** ``10``.\n    labelFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style of legend label.\n    labelFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        The font weight of legend label.\n    labelLimit : dict, float, :class:`ExprRef`\n        Maximum allowed pixel width of legend tick labels.\n\n        **Default value:** ``160``.\n    labelOffset : dict, float, :class:`ExprRef`\n        The offset of the legend label.\n\n        **Default value:** ``4``.\n    labelOpacity : dict, float, :class:`ExprRef`\n        Opacity of labels.\n    labelOverlap : bool, dict, :class:`ExprRef`, :class:`LabelOverlap`, Literal['greedy', 'parity']\n        The strategy to use for resolving overlap of labels in gradient legends. If\n        ``false``, no overlap reduction is attempted. If set to ``true`` or ``\"parity\"``, a\n        strategy of removing every other label is used. If set to ``\"greedy\"``, a linear\n        scan of the labels is performed, removing any label that overlaps with the last\n        visible label (this often works better for log-scaled axes).\n\n        **Default value:** ``\"greedy\"`` for log scales otherwise ``true``.\n    labelPadding : dict, float, :class:`ExprRef`\n        Padding in pixels between the legend and legend labels.\n    labelSeparation : dict, float, :class:`ExprRef`\n        The minimum separation that must be between label bounding boxes for them to be\n        considered non-overlapping (default ``0``). This property is ignored if\n        *labelOverlap* resolution is not enabled.\n    layout : dict, :class:`ExprRef`\n\n    legendX : dict, float, :class:`ExprRef`\n        Custom x-position for legend with orient \"none\".\n    legendY : dict, float, :class:`ExprRef`\n        Custom y-position for legend with orient \"none\".\n    offset : dict, float, :class:`ExprRef`\n        The offset in pixels by which to displace the legend from the data rectangle and\n        axes.\n\n        **Default value:** ``18``.\n    orient : :class:`LegendOrient`, Literal['none', 'left', 'right', 'top', 'bottom', 'top-left', 'top-right', 'bottom-left', 'bottom-right']\n        The orientation of the legend, which determines how the legend is positioned within\n        the scene. One of ``\"left\"``, ``\"right\"``, ``\"top\"``, ``\"bottom\"``, ``\"top-left\"``,\n        ``\"top-right\"``, ``\"bottom-left\"``, ``\"bottom-right\"``, ``\"none\"``.\n\n        **Default value:** ``\"right\"``\n    padding : dict, float, :class:`ExprRef`\n        The padding between the border and content of the legend group.\n\n        **Default value:** ``0``.\n    rowPadding : dict, float, :class:`ExprRef`\n        The vertical padding in pixels between symbol legend entries.\n\n        **Default value:** ``2``.\n    strokeColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Border stroke color for the full legend.\n    strokeDash : dict, Sequence[float], :class:`ExprRef`\n        Border stroke dash pattern for the full legend.\n    strokeWidth : dict, float, :class:`ExprRef`\n        Border stroke width for the full legend.\n    symbolBaseFillColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Default fill color for legend symbols. Only applied if there is no ``\"fill\"`` scale\n        color encoding for the legend.\n\n        **Default value:** ``\"transparent\"``.\n    symbolBaseStrokeColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Default stroke color for legend symbols. Only applied if there is no ``\"fill\"``\n        scale color encoding for the legend.\n\n        **Default value:** ``\"gray\"``.\n    symbolDash : dict, Sequence[float], :class:`ExprRef`\n        An array of alternating [stroke, space] lengths for dashed symbol strokes.\n    symbolDashOffset : dict, float, :class:`ExprRef`\n        The pixel offset at which to start drawing with the symbol stroke dash array.\n    symbolDirection : dict, :class:`ExprRef`, :class:`Orientation`, Literal['horizontal', 'vertical']\n        The default direction (``\"horizontal\"`` or ``\"vertical\"``) for symbol legends.\n\n        **Default value:** ``\"vertical\"``.\n    symbolFillColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        The color of the legend symbol,\n    symbolLimit : dict, float, :class:`ExprRef`\n        The maximum number of allowed entries for a symbol legend. Additional entries will\n        be dropped.\n    symbolOffset : dict, float, :class:`ExprRef`\n        Horizontal pixel offset for legend symbols.\n\n        **Default value:** ``0``.\n    symbolOpacity : dict, float, :class:`ExprRef`\n        Opacity of the legend symbols.\n    symbolSize : dict, float, :class:`ExprRef`\n        The size of the legend symbol, in pixels.\n\n        **Default value:** ``100``.\n    symbolStrokeColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Stroke color for legend symbols.\n    symbolStrokeWidth : dict, float, :class:`ExprRef`\n        The width of the symbol's stroke.\n\n        **Default value:** ``1.5``.\n    symbolType : str, dict, :class:`ExprRef`, :class:`SymbolShape`\n        The symbol shape. One of the plotting shapes ``circle`` (default), ``square``,\n        ``cross``, ``diamond``, ``triangle-up``, ``triangle-down``, ``triangle-right``, or\n        ``triangle-left``, the line symbol ``stroke``, or one of the centered directional\n        shapes ``arrow``, ``wedge``, or ``triangle``. Alternatively, a custom `SVG path\n        string <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ can be\n        provided. For correct sizing, custom shape paths should be defined within a square\n        bounding box with coordinates ranging from -1 to 1 along both the x and y\n        dimensions.\n\n        **Default value:** ``\"circle\"``.\n    tickCount : dict, float, :class:`ExprRef`, :class:`TickCount`, :class:`TimeInterval`, :class:`TimeIntervalStep`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year']\n        The desired number of tick values for quantitative legends.\n    title : None\n        Set to null to disable title for the axis, legend, or header.\n    titleAlign : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        Horizontal text alignment for legend titles.\n\n        **Default value:** ``\"left\"``.\n    titleAnchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']\n        Text anchor position for placing legend titles.\n    titleBaseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        Vertical text baseline for legend titles.  One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or ``\"line-bottom\"``. The\n        ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and\n        ``\"bottom\"``, but are calculated relative to the *lineHeight* rather than *fontSize*\n        alone.\n\n        **Default value:** ``\"top\"``.\n    titleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        The color of the legend title, can be in hex color code or regular color name.\n    titleFont : str, dict, :class:`ExprRef`\n        The font of the legend title.\n    titleFontSize : dict, float, :class:`ExprRef`\n        The font size of the legend title.\n    titleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style of the legend title.\n    titleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        The font weight of the legend title. This can be either a string (e.g ``\"bold\"``,\n        ``\"normal\"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where\n        ``\"normal\"`` = ``400`` and ``\"bold\"`` = ``700``).\n    titleLimit : dict, float, :class:`ExprRef`\n        Maximum allowed pixel width of legend titles.\n\n        **Default value:** ``180``.\n    titleLineHeight : dict, float, :class:`ExprRef`\n        Line height in pixels for multi-line title text or title text with ``\"line-top\"`` or\n        ``\"line-bottom\"`` baseline.\n    titleOpacity : dict, float, :class:`ExprRef`\n        Opacity of the legend title.\n    titleOrient : dict, :class:`Orient`, :class:`ExprRef`, Literal['left', 'right', 'top', 'bottom']\n        Orientation of the legend title.\n    titlePadding : dict, float, :class:`ExprRef`\n        The padding, in pixels, between title and legend.\n\n        **Default value:** ``5``.\n    unselectedOpacity : float\n        The opacity of unselected legend entries.\n\n        **Default value:** 0.35.\n    zindex : dict, float, :class:`ExprRef`\n        The integer z-index indicating the layering of the legend group relative to other\n        axis, mark, and legend groups.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LegendConfig\"}\n\n    def __init__(\n        self,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        clipHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columnPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        columns: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        direction: Optional[SchemaBase | Orientation_T] = Undefined,\n        disable: Optional[bool] = Undefined,\n        fillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gradientDirection: Optional[\n            Parameter | SchemaBase | Map | Orientation_T\n        ] = Undefined,\n        gradientHorizontalMaxLength: Optional[float] = Undefined,\n        gradientHorizontalMinLength: Optional[float] = Undefined,\n        gradientLabelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientLabelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientLength: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        gradientStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientThickness: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        gradientVerticalMaxLength: Optional[float] = Undefined,\n        gradientVerticalMinLength: Optional[float] = Undefined,\n        gridAlign: Optional[Parameter | SchemaBase | Map | LayoutAlign_T] = Undefined,\n        labelAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        labelBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        labelColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        labelFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        labelFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        labelLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelOverlap: Optional[\n            bool | Parameter | SchemaBase | Literal[\"greedy\", \"parity\"] | Map\n        ] = Undefined,\n        labelPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        labelSeparation: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        layout: Optional[Parameter | SchemaBase | Map] = Undefined,\n        legendX: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        legendY: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[SchemaBase | LegendOrient_T] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        rowPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        strokeDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolBaseFillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolBaseStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        symbolDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolDirection: Optional[\n            Parameter | SchemaBase | Map | Orientation_T\n        ] = Undefined,\n        symbolFillColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolStrokeColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        symbolStrokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        symbolType: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        tickCount: Optional[\n            float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        title: Optional[None] = Undefined,\n        titleAlign: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        titleAnchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        titleBaseline: Optional[\n            Parameter | SchemaBase | Map | TextBaseline_T\n        ] = Undefined,\n        titleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        titleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        titleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        titleLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        titleOrient: Optional[Parameter | SchemaBase | Map | Orient_T] = Undefined,\n        titlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        unselectedOpacity: Optional[float] = Undefined,\n        zindex: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            aria=aria,\n            clipHeight=clipHeight,\n            columnPadding=columnPadding,\n            columns=columns,\n            cornerRadius=cornerRadius,\n            description=description,\n            direction=direction,\n            disable=disable,\n            fillColor=fillColor,\n            gradientDirection=gradientDirection,\n            gradientHorizontalMaxLength=gradientHorizontalMaxLength,\n            gradientHorizontalMinLength=gradientHorizontalMinLength,\n            gradientLabelLimit=gradientLabelLimit,\n            gradientLabelOffset=gradientLabelOffset,\n            gradientLength=gradientLength,\n            gradientOpacity=gradientOpacity,\n            gradientStrokeColor=gradientStrokeColor,\n            gradientStrokeWidth=gradientStrokeWidth,\n            gradientThickness=gradientThickness,\n            gradientVerticalMaxLength=gradientVerticalMaxLength,\n            gradientVerticalMinLength=gradientVerticalMinLength,\n            gridAlign=gridAlign,\n            labelAlign=labelAlign,\n            labelBaseline=labelBaseline,\n            labelColor=labelColor,\n            labelFont=labelFont,\n            labelFontSize=labelFontSize,\n            labelFontStyle=labelFontStyle,\n            labelFontWeight=labelFontWeight,\n            labelLimit=labelLimit,\n            labelOffset=labelOffset,\n            labelOpacity=labelOpacity,\n            labelOverlap=labelOverlap,\n            labelPadding=labelPadding,\n            labelSeparation=labelSeparation,\n            layout=layout,\n            legendX=legendX,\n            legendY=legendY,\n            offset=offset,\n            orient=orient,\n            padding=padding,\n            rowPadding=rowPadding,\n            strokeColor=strokeColor,\n            strokeDash=strokeDash,\n            strokeWidth=strokeWidth,\n            symbolBaseFillColor=symbolBaseFillColor,\n            symbolBaseStrokeColor=symbolBaseStrokeColor,\n            symbolDash=symbolDash,\n            symbolDashOffset=symbolDashOffset,\n            symbolDirection=symbolDirection,\n            symbolFillColor=symbolFillColor,\n            symbolLimit=symbolLimit,\n            symbolOffset=symbolOffset,\n            symbolOpacity=symbolOpacity,\n            symbolSize=symbolSize,\n            symbolStrokeColor=symbolStrokeColor,\n            symbolStrokeWidth=symbolStrokeWidth,\n            symbolType=symbolType,\n            tickCount=tickCount,\n            title=title,\n            titleAlign=titleAlign,\n            titleAnchor=titleAnchor,\n            titleBaseline=titleBaseline,\n            titleColor=titleColor,\n            titleFont=titleFont,\n            titleFontSize=titleFontSize,\n            titleFontStyle=titleFontStyle,\n            titleFontWeight=titleFontWeight,\n            titleLimit=titleLimit,\n            titleLineHeight=titleLineHeight,\n            titleOpacity=titleOpacity,\n            titleOrient=titleOrient,\n            titlePadding=titlePadding,\n            unselectedOpacity=unselectedOpacity,\n            zindex=zindex,\n            **kwds,\n        )\n\n\nclass LegendOrient(VegaLiteSchema):\n    \"\"\"LegendOrient schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LegendOrient\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass LegendResolveMap(VegaLiteSchema):\n    \"\"\"\n    LegendResolveMap schema wrapper.\n\n    Parameters\n    ----------\n    angle : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    color : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    fill : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    fillOpacity : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    opacity : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    shape : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    size : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    stroke : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    strokeDash : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    strokeOpacity : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    strokeWidth : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    time : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LegendResolveMap\"}\n\n    def __init__(\n        self,\n        angle: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        color: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        fill: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        fillOpacity: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        opacity: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        shape: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        size: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        stroke: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        strokeDash: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        strokeOpacity: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        strokeWidth: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        time: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            angle=angle,\n            color=color,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            opacity=opacity,\n            shape=shape,\n            size=size,\n            stroke=stroke,\n            strokeDash=strokeDash,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            time=time,\n            **kwds,\n        )\n\n\nclass LegendStreamBinding(LegendBinding):\n    \"\"\"\n    LegendStreamBinding schema wrapper.\n\n    Parameters\n    ----------\n    legend : str, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LegendStreamBinding\"}\n\n    def __init__(self, legend: Optional[str | SchemaBase | Map] = Undefined, **kwds):\n        super().__init__(legend=legend, **kwds)\n\n\nclass LineConfig(AnyMarkConfig):\n    \"\"\"\n    LineConfig schema wrapper.\n\n    Parameters\n    ----------\n    align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).\n        One of ``\"left\"``, ``\"right\"``, ``\"center\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    angle : dict, float, :class:`ExprRef`\n        The rotation angle of the text, in degrees.\n    aria : bool, dict, :class:`ExprRef`\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG element, removing the mark item from the ARIA accessibility tree.\n    ariaRole : str, dict, :class:`ExprRef`\n        Sets the type of user interface element of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"role\" attribute. Warning: this\n        property is experimental and may be changed in the future.\n    ariaRoleDescription : str, dict, :class:`ExprRef`\n        A human-readable, author-localized description for the role of the mark item for\n        `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"aria-roledescription\" attribute.\n        Warning: this property is experimental and may be changed in the future.\n    aspect : bool, dict, :class:`ExprRef`\n        Whether to keep aspect ratio of image marks.\n    baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        For text marks, the vertical text baseline. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, ``\"line-bottom\"``, or an\n        expression reference that provides one of the valid values. The ``\"line-top\"`` and\n        ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but are\n        calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.\n\n        For range marks, the vertical alignment of the marks. One of ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    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']\n        The color blend mode for drawing an item on its current background. Any valid `CSS\n        mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__\n        value can be used.\n\n        **Default value:** ``\"source-over\"``\n    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']\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    cornerRadius : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cornerRadiusBottomLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom left corner.\n\n        **Default value:** ``0``\n    cornerRadiusBottomRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top left corner.\n\n        **Default value:** ``0``\n    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']\n        The mouse cursor used over the mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    description : str, dict, :class:`ExprRef`\n        A text description of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.\n    dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl']\n        The direction of the text. One of ``\"ltr\"`` (left-to-right) or ``\"rtl\"``\n        (right-to-left). This property determines on which side is truncated in response to\n        the limit parameter.\n\n        **Default value:** ``\"ltr\"``\n    dx : dict, float, :class:`ExprRef`\n        The horizontal offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    dy : dict, float, :class:`ExprRef`\n        The vertical offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    ellipsis : str, dict, :class:`ExprRef`\n        The ellipsis string for text truncated in response to the limit parameter.\n\n        **Default value:** ``\"…\"``\n    endAngle : dict, float, :class:`ExprRef`\n        The end angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    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\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    fillOpacity : dict, float, :class:`ExprRef`\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    filled : bool\n        Whether the mark's color should be used as fill color instead of stroke color.\n\n        **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well\n        as ``geoshape`` marks for `graticule\n        <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;\n        otherwise, ``true``.\n\n        **Note:** This property cannot be used in a `style config\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n    font : str, dict, :class:`ExprRef`\n        The typeface to set the text in (e.g., ``\"Helvetica Neue\"``).\n    fontSize : dict, float, :class:`ExprRef`\n        The font size, in pixels.\n\n        **Default value:** ``11``\n    fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style (e.g., ``\"italic\"``).\n    fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        The font weight. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``) or a\n        number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400`` and\n        ``\"bold\"`` = ``700``).\n    height : dict, float, :class:`ExprRef`\n        Height of the marks.\n    href : str, dict, :class:`URI`, :class:`ExprRef`\n        A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\n    innerRadius : dict, float, :class:`ExprRef`\n        The inner radius in pixels of arc marks. ``innerRadius`` is an alias for\n        ``radius2``.\n\n        **Default value:** ``0``\n    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']\n        The line interpolation method to use for line and area marks. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"step-before\"``: alternate between vertical and horizontal segments, as in a\n          step function.\n        * ``\"step-after\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    limit : dict, float, :class:`ExprRef`\n        The maximum length of the text mark in pixels. The text value will be automatically\n        truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0`` -- indicating no limit\n    lineBreak : str, dict, :class:`ExprRef`\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property is ignored if the text is array-valued.\n    lineHeight : dict, float, :class:`ExprRef`\n        The line height in pixels (the spacing between subsequent lines of text) for\n        multi-line text marks.\n    opacity : dict, float, :class:`ExprRef`\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    order : bool, None\n        For line and trail marks, this ``order`` property can be set to ``null`` or\n        ``false`` to make the lines use the original order in the data sources.\n    orient : :class:`Orientation`, Literal['horizontal', 'vertical']\n        The orientation of a non-stacked bar, tick, area, and line charts. The value is\n        either horizontal (default) or vertical.\n\n        * For bar, rule and tick, this determines whether the size of the bar and tick\n          should be applied to x or y dimension.\n        * For area, this property determines the orient property of the Vega output.\n        * For line and trail marks, this property determines the sort order of the points in\n          the line if ``config.sortLineBy`` is not specified. For stacked charts, this is\n          always determined by the orientation of the stack; therefore explicitly specified\n          value will be ignored.\n    outerRadius : dict, float, :class:`ExprRef`\n        The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.\n\n        **Default value:** ``0``\n    padAngle : dict, float, :class:`ExprRef`\n        The angular padding applied to sides of the arc, in radians.\n    point : bool, dict, Literal['transparent'], :class:`OverlayMarkDef`\n        A flag for overlaying points on top of line or area marks, or an object defining the\n        properties of the overlayed points.\n\n        * If this property is ``\"transparent\"``, transparent points will be used (for\n          enhancing tooltips and selections).\n\n        * If this property is an empty object (``{}``) or ``true``, filled points with\n          default properties will be used.\n\n        * If this property is ``false``, no points would be automatically added to line or\n          area marks.\n\n        **Default value:** ``false``.\n    radius : dict, float, :class:`ExprRef`\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    radius2 : dict, float, :class:`ExprRef`\n        The secondary (inner) radius in pixels of arc marks.\n\n        **Default value:** ``0``\n    shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    size : dict, float, :class:`ExprRef`\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    smooth : bool, dict, :class:`ExprRef`\n        A boolean flag (default true) indicating if the image should be smoothed when\n        resized. If false, individual pixels should be scaled directly rather than\n        interpolated with smoothing. For SVG rendering, this option may not work in some\n        browsers due to lack of standardization.\n    startAngle : dict, float, :class:`ExprRef`\n        The start angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    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\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash : dict, Sequence[float], :class:`ExprRef`\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset : dict, float, :class:`ExprRef`\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit : dict, float, :class:`ExprRef`\n        The miter limit at which to bevel a line join.\n    strokeOffset : dict, float, :class:`ExprRef`\n        The offset in pixels at which to draw the group stroke and fill. If unspecified, the\n        default behavior is to dynamically offset stroked groups such that 1 pixel stroke\n        widths align with the pixel grid.\n    strokeOpacity : dict, float, :class:`ExprRef`\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth : dict, float, :class:`ExprRef`\n        The stroke width, in pixels.\n    tension : dict, float, :class:`ExprRef`\n        Depending on the interpolation type, sets the tension parameter (for line and area\n        marks).\n    text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`\n        Placeholder text if the ``text`` channel is not specified\n    theta : dict, float, :class:`ExprRef`\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2 : dict, float, :class:`ExprRef`\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    time : dict, float, :class:`ExprRef`\n\n    timeUnitBandPosition : float\n        Default relative band position for a time unit. If set to ``0``, the marks will be\n        positioned at the beginning of the time unit band step. If set to ``0.5``, the marks\n        will be positioned in the middle of the time unit band step.\n    timeUnitBandSize : float\n        Default relative band size for a time unit. If set to ``1``, the bandwidth of the\n        marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the\n        marks will be half of the time unit band step.\n    tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None\n        The tooltip text string to show upon mouse hover or an object defining which fields\n        should the tooltip be derived from.\n\n        * If ``tooltip`` is ``true`` or ``{\"content\": \"encoding\"}``, then all fields from\n          ``encoding`` will be used.\n        * If ``tooltip`` is ``{\"content\": \"data\"}``, then all fields that appear in the\n          highlighted data point will be used.\n        * If set to ``null`` or ``false``, then no tooltip will be used.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n        **Default value:** ``null``\n    url : str, dict, :class:`URI`, :class:`ExprRef`\n        The URL of the image file for image marks.\n    width : dict, float, :class:`ExprRef`\n        Width of the marks.\n    x : dict, float, :class:`ExprRef`, Literal['width']\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2 : dict, float, :class:`ExprRef`, Literal['width']\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    y : dict, float, :class:`ExprRef`, Literal['height']\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2 : dict, float, :class:`ExprRef`, Literal['height']\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LineConfig\"}\n\n    def __init__(\n        self,\n        align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        angle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined,\n        blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined,\n        color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusBottomLeft: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusBottomRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusTopRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined,\n        dx: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        dy: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        endAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fill: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        filled: Optional[bool] = Undefined,\n        font: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined,\n        height: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        href: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined,\n        invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined,\n        limit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        order: Optional[bool | None] = Undefined,\n        orient: Optional[SchemaBase | Orientation_T] = Undefined,\n        outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        point: Optional[bool | SchemaBase | Literal[\"transparent\"] | Map] = Undefined,\n        radius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        shape: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        size: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        startAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        stroke: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        strokeDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined,\n        strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tension: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n        theta: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        time: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        timeUnitBandPosition: Optional[float] = Undefined,\n        timeUnitBandSize: Optional[float] = Undefined,\n        tooltip: Optional[\n            str | bool | float | Parameter | SchemaBase | Map | None\n        ] = Undefined,\n        url: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        width: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        x: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        x2: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        y: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        y2: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            align=align,\n            angle=angle,\n            aria=aria,\n            ariaRole=ariaRole,\n            ariaRoleDescription=ariaRoleDescription,\n            aspect=aspect,\n            baseline=baseline,\n            blend=blend,\n            color=color,\n            cornerRadius=cornerRadius,\n            cornerRadiusBottomLeft=cornerRadiusBottomLeft,\n            cornerRadiusBottomRight=cornerRadiusBottomRight,\n            cornerRadiusTopLeft=cornerRadiusTopLeft,\n            cornerRadiusTopRight=cornerRadiusTopRight,\n            cursor=cursor,\n            description=description,\n            dir=dir,\n            dx=dx,\n            dy=dy,\n            ellipsis=ellipsis,\n            endAngle=endAngle,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            filled=filled,\n            font=font,\n            fontSize=fontSize,\n            fontStyle=fontStyle,\n            fontWeight=fontWeight,\n            height=height,\n            href=href,\n            innerRadius=innerRadius,\n            interpolate=interpolate,\n            invalid=invalid,\n            limit=limit,\n            lineBreak=lineBreak,\n            lineHeight=lineHeight,\n            opacity=opacity,\n            order=order,\n            orient=orient,\n            outerRadius=outerRadius,\n            padAngle=padAngle,\n            point=point,\n            radius=radius,\n            radius2=radius2,\n            shape=shape,\n            size=size,\n            smooth=smooth,\n            startAngle=startAngle,\n            stroke=stroke,\n            strokeCap=strokeCap,\n            strokeDash=strokeDash,\n            strokeDashOffset=strokeDashOffset,\n            strokeJoin=strokeJoin,\n            strokeMiterLimit=strokeMiterLimit,\n            strokeOffset=strokeOffset,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            tension=tension,\n            text=text,\n            theta=theta,\n            theta2=theta2,\n            time=time,\n            timeUnitBandPosition=timeUnitBandPosition,\n            timeUnitBandSize=timeUnitBandSize,\n            tooltip=tooltip,\n            url=url,\n            width=width,\n            x=x,\n            x2=x2,\n            y=y,\n            y2=y2,\n            **kwds,\n        )\n\n\nclass LineString(Geometry):\n    \"\"\"\n    LineString schema wrapper.\n\n    LineString geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.4\n\n    Parameters\n    ----------\n    coordinates : Sequence[Sequence[float], :class:`Position`]\n\n    type : Literal['LineString']\n        Specifies the type of GeoJSON object.\n    bbox : :class:`BBox`, Sequence[float]\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LineString\"}\n\n    def __init__(\n        self,\n        coordinates: Optional[Sequence[SchemaBase | Sequence[float]]] = Undefined,\n        type: Optional[Literal[\"LineString\"]] = Undefined,\n        bbox: Optional[SchemaBase | Sequence[float]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(coordinates=coordinates, type=type, bbox=bbox, **kwds)\n\n\nclass LinearGradient(Gradient):\n    \"\"\"\n    LinearGradient schema wrapper.\n\n    Parameters\n    ----------\n    gradient : Literal['linear']\n        The type of gradient. Use ``\"linear\"`` for a linear gradient.\n    stops : Sequence[dict, :class:`GradientStop`]\n        An array of gradient stops defining the gradient color sequence.\n    id : str\n\n    x1 : float\n        The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n        **Default value:** ``0``\n    x2 : float\n        The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n        **Default value:** ``1``\n    y1 : float\n        The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n        **Default value:** ``0``\n    y2 : float\n        The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n        **Default value:** ``0``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LinearGradient\"}\n\n    def __init__(\n        self,\n        gradient: Optional[Literal[\"linear\"]] = Undefined,\n        stops: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        id: Optional[str] = Undefined,\n        x1: Optional[float] = Undefined,\n        x2: Optional[float] = Undefined,\n        y1: Optional[float] = Undefined,\n        y2: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            gradient=gradient, stops=stops, id=id, x1=x1, x2=x2, y1=y1, y2=y2, **kwds\n        )\n\n\nclass Locale(VegaLiteSchema):\n    \"\"\"\n    Locale schema wrapper.\n\n    Parameters\n    ----------\n    number : dict, :class:`NumberLocale`\n        Locale definition for formatting numbers.\n    time : dict, :class:`TimeLocale`\n        Locale definition for formatting dates and times.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Locale\"}\n\n    def __init__(\n        self,\n        number: Optional[SchemaBase | Map] = Undefined,\n        time: Optional[SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(number=number, time=time, **kwds)\n\n\nclass LookupData(VegaLiteSchema):\n    \"\"\"\n    LookupData schema wrapper.\n\n    Parameters\n    ----------\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`\n        Secondary data source to lookup in.\n    key : str, :class:`FieldName`\n        Key in data to lookup.\n    fields : Sequence[str, :class:`FieldName`]\n        Fields in foreign data or selection to lookup. If not specified, the entire object\n        is queried.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LookupData\"}\n\n    def __init__(\n        self,\n        data: Optional[SchemaBase | ChartDataType | Map] = Undefined,\n        key: Optional[str | SchemaBase] = Undefined,\n        fields: Optional[Sequence[str | SchemaBase]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(data=data, key=key, fields=fields, **kwds)\n\n\nclass LookupSelection(VegaLiteSchema):\n    \"\"\"\n    LookupSelection schema wrapper.\n\n    Parameters\n    ----------\n    key : str, :class:`FieldName`\n        Key in data to lookup.\n    param : str, :class:`ParameterName`\n        Selection parameter name to look up.\n    fields : Sequence[str, :class:`FieldName`]\n        Fields in foreign data or selection to lookup. If not specified, the entire object\n        is queried.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LookupSelection\"}\n\n    def __init__(\n        self,\n        key: Optional[str | SchemaBase] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        fields: Optional[Sequence[str | SchemaBase]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(key=key, param=param, fields=fields, **kwds)\n\n\nclass Mark(AnyMark):\n    \"\"\"\n    Mark schema wrapper.\n\n    All types of primitive marks.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Mark\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass MarkConfig(AnyMarkConfig):\n    \"\"\"\n    MarkConfig schema wrapper.\n\n    Parameters\n    ----------\n    align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).\n        One of ``\"left\"``, ``\"right\"``, ``\"center\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    angle : dict, float, :class:`ExprRef`\n        The rotation angle of the text, in degrees.\n    aria : bool, dict, :class:`ExprRef`\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG element, removing the mark item from the ARIA accessibility tree.\n    ariaRole : str, dict, :class:`ExprRef`\n        Sets the type of user interface element of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"role\" attribute. Warning: this\n        property is experimental and may be changed in the future.\n    ariaRoleDescription : str, dict, :class:`ExprRef`\n        A human-readable, author-localized description for the role of the mark item for\n        `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"aria-roledescription\" attribute.\n        Warning: this property is experimental and may be changed in the future.\n    aspect : bool, dict, :class:`ExprRef`\n        Whether to keep aspect ratio of image marks.\n    baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        For text marks, the vertical text baseline. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, ``\"line-bottom\"``, or an\n        expression reference that provides one of the valid values. The ``\"line-top\"`` and\n        ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but are\n        calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.\n\n        For range marks, the vertical alignment of the marks. One of ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    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']\n        The color blend mode for drawing an item on its current background. Any valid `CSS\n        mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__\n        value can be used.\n\n        **Default value:** ``\"source-over\"``\n    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']\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    cornerRadius : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cornerRadiusBottomLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom left corner.\n\n        **Default value:** ``0``\n    cornerRadiusBottomRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top left corner.\n\n        **Default value:** ``0``\n    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']\n        The mouse cursor used over the mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    description : str, dict, :class:`ExprRef`\n        A text description of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.\n    dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl']\n        The direction of the text. One of ``\"ltr\"`` (left-to-right) or ``\"rtl\"``\n        (right-to-left). This property determines on which side is truncated in response to\n        the limit parameter.\n\n        **Default value:** ``\"ltr\"``\n    dx : dict, float, :class:`ExprRef`\n        The horizontal offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    dy : dict, float, :class:`ExprRef`\n        The vertical offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    ellipsis : str, dict, :class:`ExprRef`\n        The ellipsis string for text truncated in response to the limit parameter.\n\n        **Default value:** ``\"…\"``\n    endAngle : dict, float, :class:`ExprRef`\n        The end angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    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\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    fillOpacity : dict, float, :class:`ExprRef`\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    filled : bool\n        Whether the mark's color should be used as fill color instead of stroke color.\n\n        **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well\n        as ``geoshape`` marks for `graticule\n        <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;\n        otherwise, ``true``.\n\n        **Note:** This property cannot be used in a `style config\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n    font : str, dict, :class:`ExprRef`\n        The typeface to set the text in (e.g., ``\"Helvetica Neue\"``).\n    fontSize : dict, float, :class:`ExprRef`\n        The font size, in pixels.\n\n        **Default value:** ``11``\n    fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style (e.g., ``\"italic\"``).\n    fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        The font weight. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``) or a\n        number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400`` and\n        ``\"bold\"`` = ``700``).\n    height : dict, float, :class:`ExprRef`\n        Height of the marks.\n    href : str, dict, :class:`URI`, :class:`ExprRef`\n        A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\n    innerRadius : dict, float, :class:`ExprRef`\n        The inner radius in pixels of arc marks. ``innerRadius`` is an alias for\n        ``radius2``.\n\n        **Default value:** ``0``\n    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']\n        The line interpolation method to use for line and area marks. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"step-before\"``: alternate between vertical and horizontal segments, as in a\n          step function.\n        * ``\"step-after\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    limit : dict, float, :class:`ExprRef`\n        The maximum length of the text mark in pixels. The text value will be automatically\n        truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0`` -- indicating no limit\n    lineBreak : str, dict, :class:`ExprRef`\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property is ignored if the text is array-valued.\n    lineHeight : dict, float, :class:`ExprRef`\n        The line height in pixels (the spacing between subsequent lines of text) for\n        multi-line text marks.\n    opacity : dict, float, :class:`ExprRef`\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    order : bool, None\n        For line and trail marks, this ``order`` property can be set to ``null`` or\n        ``false`` to make the lines use the original order in the data sources.\n    orient : :class:`Orientation`, Literal['horizontal', 'vertical']\n        The orientation of a non-stacked bar, tick, area, and line charts. The value is\n        either horizontal (default) or vertical.\n\n        * For bar, rule and tick, this determines whether the size of the bar and tick\n          should be applied to x or y dimension.\n        * For area, this property determines the orient property of the Vega output.\n        * For line and trail marks, this property determines the sort order of the points in\n          the line if ``config.sortLineBy`` is not specified. For stacked charts, this is\n          always determined by the orientation of the stack; therefore explicitly specified\n          value will be ignored.\n    outerRadius : dict, float, :class:`ExprRef`\n        The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.\n\n        **Default value:** ``0``\n    padAngle : dict, float, :class:`ExprRef`\n        The angular padding applied to sides of the arc, in radians.\n    radius : dict, float, :class:`ExprRef`\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    radius2 : dict, float, :class:`ExprRef`\n        The secondary (inner) radius in pixels of arc marks.\n\n        **Default value:** ``0``\n    shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    size : dict, float, :class:`ExprRef`\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    smooth : bool, dict, :class:`ExprRef`\n        A boolean flag (default true) indicating if the image should be smoothed when\n        resized. If false, individual pixels should be scaled directly rather than\n        interpolated with smoothing. For SVG rendering, this option may not work in some\n        browsers due to lack of standardization.\n    startAngle : dict, float, :class:`ExprRef`\n        The start angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    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\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash : dict, Sequence[float], :class:`ExprRef`\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset : dict, float, :class:`ExprRef`\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit : dict, float, :class:`ExprRef`\n        The miter limit at which to bevel a line join.\n    strokeOffset : dict, float, :class:`ExprRef`\n        The offset in pixels at which to draw the group stroke and fill. If unspecified, the\n        default behavior is to dynamically offset stroked groups such that 1 pixel stroke\n        widths align with the pixel grid.\n    strokeOpacity : dict, float, :class:`ExprRef`\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth : dict, float, :class:`ExprRef`\n        The stroke width, in pixels.\n    tension : dict, float, :class:`ExprRef`\n        Depending on the interpolation type, sets the tension parameter (for line and area\n        marks).\n    text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`\n        Placeholder text if the ``text`` channel is not specified\n    theta : dict, float, :class:`ExprRef`\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2 : dict, float, :class:`ExprRef`\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    time : dict, float, :class:`ExprRef`\n\n    timeUnitBandPosition : float\n        Default relative band position for a time unit. If set to ``0``, the marks will be\n        positioned at the beginning of the time unit band step. If set to ``0.5``, the marks\n        will be positioned in the middle of the time unit band step.\n    timeUnitBandSize : float\n        Default relative band size for a time unit. If set to ``1``, the bandwidth of the\n        marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the\n        marks will be half of the time unit band step.\n    tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None\n        The tooltip text string to show upon mouse hover or an object defining which fields\n        should the tooltip be derived from.\n\n        * If ``tooltip`` is ``true`` or ``{\"content\": \"encoding\"}``, then all fields from\n          ``encoding`` will be used.\n        * If ``tooltip`` is ``{\"content\": \"data\"}``, then all fields that appear in the\n          highlighted data point will be used.\n        * If set to ``null`` or ``false``, then no tooltip will be used.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n        **Default value:** ``null``\n    url : str, dict, :class:`URI`, :class:`ExprRef`\n        The URL of the image file for image marks.\n    width : dict, float, :class:`ExprRef`\n        Width of the marks.\n    x : dict, float, :class:`ExprRef`, Literal['width']\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2 : dict, float, :class:`ExprRef`, Literal['width']\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    y : dict, float, :class:`ExprRef`, Literal['height']\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2 : dict, float, :class:`ExprRef`, Literal['height']\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/MarkConfig\"}\n\n    def __init__(\n        self,\n        align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        angle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined,\n        blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined,\n        color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusBottomLeft: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusBottomRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusTopRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined,\n        dx: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        dy: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        endAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fill: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        filled: Optional[bool] = Undefined,\n        font: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined,\n        height: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        href: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined,\n        invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined,\n        limit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        order: Optional[bool | None] = Undefined,\n        orient: Optional[SchemaBase | Orientation_T] = Undefined,\n        outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        shape: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        size: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        startAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        stroke: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        strokeDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined,\n        strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tension: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n        theta: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        time: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        timeUnitBandPosition: Optional[float] = Undefined,\n        timeUnitBandSize: Optional[float] = Undefined,\n        tooltip: Optional[\n            str | bool | float | Parameter | SchemaBase | Map | None\n        ] = Undefined,\n        url: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        width: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        x: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        x2: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        y: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        y2: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            align=align,\n            angle=angle,\n            aria=aria,\n            ariaRole=ariaRole,\n            ariaRoleDescription=ariaRoleDescription,\n            aspect=aspect,\n            baseline=baseline,\n            blend=blend,\n            color=color,\n            cornerRadius=cornerRadius,\n            cornerRadiusBottomLeft=cornerRadiusBottomLeft,\n            cornerRadiusBottomRight=cornerRadiusBottomRight,\n            cornerRadiusTopLeft=cornerRadiusTopLeft,\n            cornerRadiusTopRight=cornerRadiusTopRight,\n            cursor=cursor,\n            description=description,\n            dir=dir,\n            dx=dx,\n            dy=dy,\n            ellipsis=ellipsis,\n            endAngle=endAngle,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            filled=filled,\n            font=font,\n            fontSize=fontSize,\n            fontStyle=fontStyle,\n            fontWeight=fontWeight,\n            height=height,\n            href=href,\n            innerRadius=innerRadius,\n            interpolate=interpolate,\n            invalid=invalid,\n            limit=limit,\n            lineBreak=lineBreak,\n            lineHeight=lineHeight,\n            opacity=opacity,\n            order=order,\n            orient=orient,\n            outerRadius=outerRadius,\n            padAngle=padAngle,\n            radius=radius,\n            radius2=radius2,\n            shape=shape,\n            size=size,\n            smooth=smooth,\n            startAngle=startAngle,\n            stroke=stroke,\n            strokeCap=strokeCap,\n            strokeDash=strokeDash,\n            strokeDashOffset=strokeDashOffset,\n            strokeJoin=strokeJoin,\n            strokeMiterLimit=strokeMiterLimit,\n            strokeOffset=strokeOffset,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            tension=tension,\n            text=text,\n            theta=theta,\n            theta2=theta2,\n            time=time,\n            timeUnitBandPosition=timeUnitBandPosition,\n            timeUnitBandSize=timeUnitBandSize,\n            tooltip=tooltip,\n            url=url,\n            width=width,\n            x=x,\n            x2=x2,\n            y=y,\n            y2=y2,\n            **kwds,\n        )\n\n\nclass MarkDef(AnyMark):\n    \"\"\"\n    MarkDef schema wrapper.\n\n    Parameters\n    ----------\n    type : :class:`Mark`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape']\n        The mark type. This could a primitive mark type (one of ``\"bar\"``, ``\"circle\"``,\n        ``\"square\"``, ``\"tick\"``, ``\"line\"``, ``\"area\"``, ``\"point\"``, ``\"geoshape\"``,\n        ``\"rule\"``, and ``\"text\"``) or a composite mark type (``\"boxplot\"``,\n        ``\"errorband\"``, ``\"errorbar\"``).\n    align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).\n        One of ``\"left\"``, ``\"right\"``, ``\"center\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    angle : dict, float, :class:`ExprRef`\n        The rotation angle of the text, in degrees.\n    aria : bool, dict, :class:`ExprRef`\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG element, removing the mark item from the ARIA accessibility tree.\n    ariaRole : str, dict, :class:`ExprRef`\n        Sets the type of user interface element of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"role\" attribute. Warning: this\n        property is experimental and may be changed in the future.\n    ariaRoleDescription : str, dict, :class:`ExprRef`\n        A human-readable, author-localized description for the role of the mark item for\n        `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"aria-roledescription\" attribute.\n        Warning: this property is experimental and may be changed in the future.\n    aspect : bool, dict, :class:`ExprRef`\n        Whether to keep aspect ratio of image marks.\n    bandSize : float\n        The width of the ticks.\n\n        **Default value:**  3/4 of step (width step for horizontal ticks and height step for\n        vertical ticks).\n    baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        For text marks, the vertical text baseline. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, ``\"line-bottom\"``, or an\n        expression reference that provides one of the valid values. The ``\"line-top\"`` and\n        ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but are\n        calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.\n\n        For range marks, the vertical alignment of the marks. One of ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    binSpacing : float\n        Offset between bars for binned field. The ideal value for this is either 0\n        (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n        **Default value:** ``1``\n    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']\n        The color blend mode for drawing an item on its current background. Any valid `CSS\n        mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__\n        value can be used.\n\n        **Default value:** ``\"source-over\"``\n    clip : bool, dict, :class:`ExprRef`\n        Whether a mark be clipped to the enclosing group's width and height.\n    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']\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    continuousBandSize : float\n        The default size of the bars on continuous scales.\n\n        **Default value:** ``5``\n    cornerRadius : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cornerRadiusBottomLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom left corner.\n\n        **Default value:** ``0``\n    cornerRadiusBottomRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom right corner.\n\n        **Default value:** ``0``\n    cornerRadiusEnd : dict, float, :class:`ExprRef`\n        * For vertical bars, top-left and top-right corner radius.\n\n        * For horizontal bars, top-right and bottom-right corner radius.\n    cornerRadiusTopLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top left corner.\n\n        **Default value:** ``0``\n    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']\n        The mouse cursor used over the mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    description : str, dict, :class:`ExprRef`\n        A text description of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.\n    dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl']\n        The direction of the text. One of ``\"ltr\"`` (left-to-right) or ``\"rtl\"``\n        (right-to-left). This property determines on which side is truncated in response to\n        the limit parameter.\n\n        **Default value:** ``\"ltr\"``\n    discreteBandSize : dict, float, :class:`RelativeBandSize`\n        The default size of the bars with discrete dimensions. If unspecified, the default\n        size is  ``step-2``, which provides 2 pixel offset between bars.\n    dx : dict, float, :class:`ExprRef`\n        The horizontal offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    dy : dict, float, :class:`ExprRef`\n        The vertical offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    ellipsis : str, dict, :class:`ExprRef`\n        The ellipsis string for text truncated in response to the limit parameter.\n\n        **Default value:** ``\"…\"``\n    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\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    fillOpacity : dict, float, :class:`ExprRef`\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    filled : bool\n        Whether the mark's color should be used as fill color instead of stroke color.\n\n        **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well\n        as ``geoshape`` marks for `graticule\n        <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;\n        otherwise, ``true``.\n\n        **Note:** This property cannot be used in a `style config\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n    font : str, dict, :class:`ExprRef`\n        The typeface to set the text in (e.g., ``\"Helvetica Neue\"``).\n    fontSize : dict, float, :class:`ExprRef`\n        The font size, in pixels.\n\n        **Default value:** ``11``\n    fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style (e.g., ``\"italic\"``).\n    fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        The font weight. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``) or a\n        number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400`` and\n        ``\"bold\"`` = ``700``).\n    height : dict, float, :class:`ExprRef`, :class:`RelativeBandSize`\n        Height of the marks.  One of:\n\n        * A number representing a fixed pixel height.\n\n        * A relative band size definition.  For example, ``{band: 0.5}`` represents half of\n          the band\n    href : str, dict, :class:`URI`, :class:`ExprRef`\n        A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\n    innerRadius : dict, float, :class:`ExprRef`\n        The inner radius in pixels of arc marks. ``innerRadius`` is an alias for\n        ``radius2``.\n\n        **Default value:** ``0``\n    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']\n        The line interpolation method to use for line and area marks. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"step-before\"``: alternate between vertical and horizontal segments, as in a\n          step function.\n        * ``\"step-after\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    limit : dict, float, :class:`ExprRef`\n        The maximum length of the text mark in pixels. The text value will be automatically\n        truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0`` -- indicating no limit\n    line : bool, dict, :class:`OverlayMarkDef`\n        A flag for overlaying line on top of area marks, or an object defining the\n        properties of the overlayed lines.\n\n        * If this value is an empty object (``{}``) or ``true``, lines with default\n          properties will be used.\n\n        * If this value is ``false``, no lines would be automatically added to area marks.\n\n        **Default value:** ``false``.\n    lineBreak : str, dict, :class:`ExprRef`\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property is ignored if the text is array-valued.\n    lineHeight : dict, float, :class:`ExprRef`\n        The line height in pixels (the spacing between subsequent lines of text) for\n        multi-line text marks.\n    minBandSize : dict, float, :class:`ExprRef`\n        The minimum band size for bar and rectangle marks. **Default value:** ``0.25``\n    opacity : dict, float, :class:`ExprRef`\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    order : bool, None\n        For line and trail marks, this ``order`` property can be set to ``null`` or\n        ``false`` to make the lines use the original order in the data sources.\n    orient : :class:`Orientation`, Literal['horizontal', 'vertical']\n        The orientation of a non-stacked bar, tick, area, and line charts. The value is\n        either horizontal (default) or vertical.\n\n        * For bar, rule and tick, this determines whether the size of the bar and tick\n          should be applied to x or y dimension.\n        * For area, this property determines the orient property of the Vega output.\n        * For line and trail marks, this property determines the sort order of the points in\n          the line if ``config.sortLineBy`` is not specified. For stacked charts, this is\n          always determined by the orientation of the stack; therefore explicitly specified\n          value will be ignored.\n    outerRadius : dict, float, :class:`ExprRef`\n        The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.\n\n        **Default value:** ``0``\n    padAngle : dict, float, :class:`ExprRef`\n        The angular padding applied to sides of the arc, in radians.\n    point : bool, dict, Literal['transparent'], :class:`OverlayMarkDef`\n        A flag for overlaying points on top of line or area marks, or an object defining the\n        properties of the overlayed points.\n\n        * If this property is ``\"transparent\"``, transparent points will be used (for\n          enhancing tooltips and selections).\n\n        * If this property is an empty object (``{}``) or ``true``, filled points with\n          default properties will be used.\n\n        * If this property is ``false``, no points would be automatically added to line or\n          area marks.\n\n        **Default value:** ``false``.\n    radius : dict, float, :class:`ExprRef`\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    radius2 : dict, float, :class:`ExprRef`\n        The secondary (inner) radius in pixels of arc marks.\n\n        **Default value:** ``0``\n    radius2Offset : dict, float, :class:`ExprRef`\n        Offset for radius2.\n    radiusOffset : dict, float, :class:`ExprRef`\n        Offset for radius.\n    shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    size : dict, float, :class:`ExprRef`\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    smooth : bool, dict, :class:`ExprRef`\n        A boolean flag (default true) indicating if the image should be smoothed when\n        resized. If false, individual pixels should be scaled directly rather than\n        interpolated with smoothing. For SVG rendering, this option may not work in some\n        browsers due to lack of standardization.\n    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\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash : dict, Sequence[float], :class:`ExprRef`\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset : dict, float, :class:`ExprRef`\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit : dict, float, :class:`ExprRef`\n        The miter limit at which to bevel a line join.\n    strokeOffset : dict, float, :class:`ExprRef`\n        The offset in pixels at which to draw the group stroke and fill. If unspecified, the\n        default behavior is to dynamically offset stroked groups such that 1 pixel stroke\n        widths align with the pixel grid.\n    strokeOpacity : dict, float, :class:`ExprRef`\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth : dict, float, :class:`ExprRef`\n        The stroke width, in pixels.\n    style : str, Sequence[str]\n        A string or array of strings indicating the name of custom styles to apply to the\n        mark. A style is a named collection of mark property defaults defined within the\n        `style configuration\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an\n        array, later styles will override earlier styles. Any `mark properties\n        <https://vega.github.io/vega-lite/docs/encoding.html#mark-prop>`__ explicitly\n        defined within the ``encoding`` will override a style default.\n\n        **Default value:** The mark's name. For example, a bar mark will have style\n        ``\"bar\"`` by default. **Note:** Any specified style will augment the default style.\n        For example, a bar mark with ``\"style\": \"foo\"`` will receive from\n        ``config.style.bar`` and ``config.style.foo`` (the specified style ``\"foo\"`` has\n        higher precedence).\n    tension : dict, float, :class:`ExprRef`\n        Depending on the interpolation type, sets the tension parameter (for line and area\n        marks).\n    text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`\n        Placeholder text if the ``text`` channel is not specified\n    theta : dict, float, :class:`ExprRef`\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2 : dict, float, :class:`ExprRef`\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    theta2Offset : dict, float, :class:`ExprRef`\n        Offset for theta2.\n    thetaOffset : dict, float, :class:`ExprRef`\n        Offset for theta.\n    thickness : float\n        Thickness of the tick mark.\n\n        **Default value:**  ``1``\n    time : dict, float, :class:`ExprRef`\n\n    timeUnitBandPosition : float\n        Default relative band position for a time unit. If set to ``0``, the marks will be\n        positioned at the beginning of the time unit band step. If set to ``0.5``, the marks\n        will be positioned in the middle of the time unit band step.\n    timeUnitBandSize : float\n        Default relative band size for a time unit. If set to ``1``, the bandwidth of the\n        marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the\n        marks will be half of the time unit band step.\n    tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None\n        The tooltip text string to show upon mouse hover or an object defining which fields\n        should the tooltip be derived from.\n\n        * If ``tooltip`` is ``true`` or ``{\"content\": \"encoding\"}``, then all fields from\n          ``encoding`` will be used.\n        * If ``tooltip`` is ``{\"content\": \"data\"}``, then all fields that appear in the\n          highlighted data point will be used.\n        * If set to ``null`` or ``false``, then no tooltip will be used.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n        **Default value:** ``null``\n    url : str, dict, :class:`URI`, :class:`ExprRef`\n        The URL of the image file for image marks.\n    width : dict, float, :class:`ExprRef`, :class:`RelativeBandSize`\n        Width of the marks.  One of:\n\n        * A number representing a fixed pixel width.\n\n        * A relative band size definition.  For example, ``{band: 0.5}`` represents half of\n          the band.\n    x : dict, float, :class:`ExprRef`, Literal['width']\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2 : dict, float, :class:`ExprRef`, Literal['width']\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2Offset : dict, float, :class:`ExprRef`\n        Offset for x2-position.\n    xOffset : dict, float, :class:`ExprRef`\n        Offset for x-position.\n    y : dict, float, :class:`ExprRef`, Literal['height']\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2 : dict, float, :class:`ExprRef`, Literal['height']\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2Offset : dict, float, :class:`ExprRef`\n        Offset for y2-position.\n    yOffset : dict, float, :class:`ExprRef`\n        Offset for y-position.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/MarkDef\"}\n\n    def __init__(\n        self,\n        type: Optional[SchemaBase | Mark_T] = Undefined,\n        align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        angle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        bandSize: Optional[float] = Undefined,\n        baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined,\n        binSpacing: Optional[float] = Undefined,\n        blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined,\n        clip: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,\n        continuousBandSize: Optional[float] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusBottomLeft: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusBottomRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusEnd: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusTopRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined,\n        discreteBandSize: Optional[float | SchemaBase | Map] = Undefined,\n        dx: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        dy: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fill: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        filled: Optional[bool] = Undefined,\n        font: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined,\n        height: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        href: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined,\n        invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined,\n        limit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        line: Optional[bool | SchemaBase | Map] = Undefined,\n        lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        minBandSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        order: Optional[bool | None] = Undefined,\n        orient: Optional[SchemaBase | Orientation_T] = Undefined,\n        outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        point: Optional[bool | SchemaBase | Literal[\"transparent\"] | Map] = Undefined,\n        radius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radiusOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        shape: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        size: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        stroke: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        strokeDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined,\n        strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        style: Optional[str | Sequence[str]] = Undefined,\n        tension: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n        theta: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        theta2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        thetaOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        thickness: Optional[float] = Undefined,\n        time: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        timeUnitBandPosition: Optional[float] = Undefined,\n        timeUnitBandSize: Optional[float] = Undefined,\n        tooltip: Optional[\n            str | bool | float | Parameter | SchemaBase | Map | None\n        ] = Undefined,\n        url: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        width: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        x: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        x2: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        x2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        xOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        y: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        y2: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        y2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        yOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            type=type,\n            align=align,\n            angle=angle,\n            aria=aria,\n            ariaRole=ariaRole,\n            ariaRoleDescription=ariaRoleDescription,\n            aspect=aspect,\n            bandSize=bandSize,\n            baseline=baseline,\n            binSpacing=binSpacing,\n            blend=blend,\n            clip=clip,\n            color=color,\n            continuousBandSize=continuousBandSize,\n            cornerRadius=cornerRadius,\n            cornerRadiusBottomLeft=cornerRadiusBottomLeft,\n            cornerRadiusBottomRight=cornerRadiusBottomRight,\n            cornerRadiusEnd=cornerRadiusEnd,\n            cornerRadiusTopLeft=cornerRadiusTopLeft,\n            cornerRadiusTopRight=cornerRadiusTopRight,\n            cursor=cursor,\n            description=description,\n            dir=dir,\n            discreteBandSize=discreteBandSize,\n            dx=dx,\n            dy=dy,\n            ellipsis=ellipsis,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            filled=filled,\n            font=font,\n            fontSize=fontSize,\n            fontStyle=fontStyle,\n            fontWeight=fontWeight,\n            height=height,\n            href=href,\n            innerRadius=innerRadius,\n            interpolate=interpolate,\n            invalid=invalid,\n            limit=limit,\n            line=line,\n            lineBreak=lineBreak,\n            lineHeight=lineHeight,\n            minBandSize=minBandSize,\n            opacity=opacity,\n            order=order,\n            orient=orient,\n            outerRadius=outerRadius,\n            padAngle=padAngle,\n            point=point,\n            radius=radius,\n            radius2=radius2,\n            radius2Offset=radius2Offset,\n            radiusOffset=radiusOffset,\n            shape=shape,\n            size=size,\n            smooth=smooth,\n            stroke=stroke,\n            strokeCap=strokeCap,\n            strokeDash=strokeDash,\n            strokeDashOffset=strokeDashOffset,\n            strokeJoin=strokeJoin,\n            strokeMiterLimit=strokeMiterLimit,\n            strokeOffset=strokeOffset,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            style=style,\n            tension=tension,\n            text=text,\n            theta=theta,\n            theta2=theta2,\n            theta2Offset=theta2Offset,\n            thetaOffset=thetaOffset,\n            thickness=thickness,\n            time=time,\n            timeUnitBandPosition=timeUnitBandPosition,\n            timeUnitBandSize=timeUnitBandSize,\n            tooltip=tooltip,\n            url=url,\n            width=width,\n            x=x,\n            x2=x2,\n            x2Offset=x2Offset,\n            xOffset=xOffset,\n            y=y,\n            y2=y2,\n            y2Offset=y2Offset,\n            yOffset=yOffset,\n            **kwds,\n        )\n\n\nclass MarkInvalidDataMode(VegaLiteSchema):\n    \"\"\"MarkInvalidDataMode schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/MarkInvalidDataMode\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass MarkPropDefGradientstringnull(VegaLiteSchema):\n    \"\"\"MarkPropDefGradientstringnull schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/MarkPropDef<(Gradient|string|null)>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass FieldOrDatumDefWithConditionDatumDefGradientstringnull(\n    ColorDef, MarkPropDefGradientstringnull\n):\n    \"\"\"\n    FieldOrDatumDefWithConditionDatumDefGradientstringnull schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<DatumDef,(Gradient|string|null)>\"\n    }\n\n    def __init__(\n        self,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            bandPosition=bandPosition,\n            condition=condition,\n            datum=datum,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull(\n    ColorDef, MarkPropDefGradientstringnull\n):\n    r\"\"\"\n    FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    legend : dict, :class:`Legend`, None\n        An object defining properties of the legend. If ``null``, the legend for the\n        encoding channel will be removed.\n\n        **Default value:** If undefined, default `legend properties\n        <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.\n\n        **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef,(Gradient|string|null)>\"\n    }\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            legend=legend,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass MarkPropDefnumber(VegaLiteSchema):\n    \"\"\"MarkPropDefnumber schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/MarkPropDef<number>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass MarkPropDefnumberArray(VegaLiteSchema):\n    \"\"\"MarkPropDefnumberArray schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/MarkPropDef<number[]>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass MarkPropDefstringnullTypeForShape(VegaLiteSchema):\n    \"\"\"MarkPropDefstringnullTypeForShape schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/MarkPropDef<(string|null),TypeForShape>\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass MarkType(VegaLiteSchema):\n    \"\"\"MarkType schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/MarkType\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Month(VegaLiteSchema):\n    \"\"\"Month schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Month\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass MultiLineString(Geometry):\n    \"\"\"\n    MultiLineString schema wrapper.\n\n    MultiLineString geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.5\n\n    Parameters\n    ----------\n    coordinates : Sequence[Sequence[Sequence[float], :class:`Position`]]\n\n    type : Literal['MultiLineString']\n        Specifies the type of GeoJSON object.\n    bbox : :class:`BBox`, Sequence[float]\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/MultiLineString\"}\n\n    def __init__(\n        self,\n        coordinates: Optional[\n            Sequence[Sequence[SchemaBase | Sequence[float]]]\n        ] = Undefined,\n        type: Optional[Literal[\"MultiLineString\"]] = Undefined,\n        bbox: Optional[SchemaBase | Sequence[float]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(coordinates=coordinates, type=type, bbox=bbox, **kwds)\n\n\nclass MultiPoint(Geometry):\n    \"\"\"\n    MultiPoint schema wrapper.\n\n    MultiPoint geometry object.  https://tools.ietf.org/html/rfc7946#section-3.1.3\n\n    Parameters\n    ----------\n    coordinates : Sequence[Sequence[float], :class:`Position`]\n\n    type : Literal['MultiPoint']\n        Specifies the type of GeoJSON object.\n    bbox : :class:`BBox`, Sequence[float]\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/MultiPoint\"}\n\n    def __init__(\n        self,\n        coordinates: Optional[Sequence[SchemaBase | Sequence[float]]] = Undefined,\n        type: Optional[Literal[\"MultiPoint\"]] = Undefined,\n        bbox: Optional[SchemaBase | Sequence[float]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(coordinates=coordinates, type=type, bbox=bbox, **kwds)\n\n\nclass MultiPolygon(Geometry):\n    \"\"\"\n    MultiPolygon schema wrapper.\n\n    MultiPolygon geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.7\n\n    Parameters\n    ----------\n    coordinates : Sequence[Sequence[Sequence[Sequence[float], :class:`Position`]]]\n\n    type : Literal['MultiPolygon']\n        Specifies the type of GeoJSON object.\n    bbox : :class:`BBox`, Sequence[float]\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/MultiPolygon\"}\n\n    def __init__(\n        self,\n        coordinates: Optional[\n            Sequence[Sequence[Sequence[SchemaBase | Sequence[float]]]]\n        ] = Undefined,\n        type: Optional[Literal[\"MultiPolygon\"]] = Undefined,\n        bbox: Optional[SchemaBase | Sequence[float]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(coordinates=coordinates, type=type, bbox=bbox, **kwds)\n\n\nclass NamedData(DataSource):\n    \"\"\"\n    NamedData schema wrapper.\n\n    Parameters\n    ----------\n    name : str\n        Provide a placeholder name and bind data at runtime.\n\n        New data may change the layout but Vega does not always resize the chart. To update\n        the layout when the data updates, set `autosize\n        <https://vega.github.io/vega-lite/docs/size.html#autosize>`__ or explicitly use\n        `view.resize <https://vega.github.io/vega/docs/api/view/#view_resize>`__.\n    format : dict, :class:`DataFormat`, :class:`CsvDataFormat`, :class:`DsvDataFormat`, :class:`JsonDataFormat`, :class:`TopoDataFormat`\n        An object that specifies the format for parsing the data.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/NamedData\"}\n\n    def __init__(\n        self,\n        name: Optional[str] = Undefined,\n        format: Optional[SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(name=name, format=format, **kwds)\n\n\nclass NonArgAggregateOp(Aggregate):\n    \"\"\"NonArgAggregateOp schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/NonArgAggregateOp\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass NonNormalizedSpec(VegaLiteSchema):\n    \"\"\"\n    NonNormalizedSpec schema wrapper.\n\n    Any specification in Vega-Lite.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/NonNormalizedSpec\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass NumberLocale(VegaLiteSchema):\n    \"\"\"\n    NumberLocale schema wrapper.\n\n    Locale definition for formatting numbers.\n\n    Parameters\n    ----------\n    currency : Sequence[str], :class:`Vector2string`\n        The currency prefix and suffix (e.g., [\"$\", \"\"]).\n    decimal : str\n        The decimal point (e.g., \".\").\n    grouping : Sequence[float]\n        The array of group sizes (e.g., [3]), cycled as needed.\n    thousands : str\n        The group separator (e.g., \",\").\n    minus : str\n        The minus sign (defaults to hyphen-minus, \"-\").\n    nan : str\n        The not-a-number value (defaults to \"NaN\").\n    numerals : Sequence[str], :class:`Vector10string`\n        An array of ten strings to replace the numerals 0-9.\n    percent : str\n        The percent sign (defaults to \"%\").\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/NumberLocale\"}\n\n    def __init__(\n        self,\n        currency: Optional[SchemaBase | Sequence[str]] = Undefined,\n        decimal: Optional[str] = Undefined,\n        grouping: Optional[Sequence[float]] = Undefined,\n        thousands: Optional[str] = Undefined,\n        minus: Optional[str] = Undefined,\n        nan: Optional[str] = Undefined,\n        numerals: Optional[SchemaBase | Sequence[str]] = Undefined,\n        percent: Optional[str] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            currency=currency,\n            decimal=decimal,\n            grouping=grouping,\n            thousands=thousands,\n            minus=minus,\n            nan=nan,\n            numerals=numerals,\n            percent=percent,\n            **kwds,\n        )\n\n\nclass NumericArrayMarkPropDef(VegaLiteSchema):\n    \"\"\"NumericArrayMarkPropDef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/NumericArrayMarkPropDef\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass FieldOrDatumDefWithConditionDatumDefnumberArray(\n    MarkPropDefnumberArray, NumericArrayMarkPropDef\n):\n    \"\"\"\n    FieldOrDatumDefWithConditionDatumDefnumberArray schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<DatumDef,number[]>\"}\n\n    def __init__(\n        self,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            bandPosition=bandPosition,\n            condition=condition,\n            datum=datum,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray(\n    MarkPropDefnumberArray, NumericArrayMarkPropDef\n):\n    r\"\"\"\n    FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    legend : dict, :class:`Legend`, None\n        An object defining properties of the legend. If ``null``, the legend for the\n        encoding channel will be removed.\n\n        **Default value:** If undefined, default `legend properties\n        <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.\n\n        **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef,number[]>\"\n    }\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            legend=legend,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass NumericMarkPropDef(VegaLiteSchema):\n    \"\"\"NumericMarkPropDef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/NumericMarkPropDef\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass FieldOrDatumDefWithConditionDatumDefnumber(MarkPropDefnumber, NumericMarkPropDef):\n    \"\"\"\n    FieldOrDatumDefWithConditionDatumDefnumber schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<DatumDef,number>\"}\n\n    def __init__(\n        self,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            bandPosition=bandPosition,\n            condition=condition,\n            datum=datum,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass FieldOrDatumDefWithConditionMarkPropFieldDefnumber(\n    MarkPropDefnumber, NumericMarkPropDef\n):\n    r\"\"\"\n    FieldOrDatumDefWithConditionMarkPropFieldDefnumber schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    legend : dict, :class:`Legend`, None\n        An object defining properties of the legend. If ``null``, the legend for the\n        encoding channel will be removed.\n\n        **Default value:** If undefined, default `legend properties\n        <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.\n\n        **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef,number>\"\n    }\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            legend=legend,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass OffsetDef(VegaLiteSchema):\n    \"\"\"OffsetDef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/OffsetDef\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass OrderFieldDef(VegaLiteSchema):\n    r\"\"\"\n    OrderFieldDef schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    sort : :class:`SortOrder`, Literal['ascending', 'descending']\n        The sort order. One of ``\"ascending\"`` (default) or ``\"descending\"``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/OrderFieldDef\"}\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        sort: Optional[SchemaBase | SortOrder_T] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass OrderOnlyDef(VegaLiteSchema):\n    \"\"\"\n    OrderOnlyDef schema wrapper.\n\n    Parameters\n    ----------\n    sort : :class:`SortOrder`, Literal['ascending', 'descending']\n        The sort order. One of ``\"ascending\"`` (default) or ``\"descending\"``.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/OrderOnlyDef\"}\n\n    def __init__(self, sort: Optional[SchemaBase | SortOrder_T] = Undefined, **kwds):\n        super().__init__(sort=sort, **kwds)\n\n\nclass OrderValueDef(VegaLiteSchema):\n    \"\"\"\n    OrderValueDef schema wrapper.\n\n    Parameters\n    ----------\n    value : dict, float, :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    condition : dict, :class:`ConditionalValueDefnumber`, :class:`ConditionalParameterValueDefnumber`, :class:`ConditionalPredicateValueDefnumber`, Sequence[dict, :class:`ConditionalValueDefnumber`, :class:`ConditionalParameterValueDefnumber`, :class:`ConditionalPredicateValueDefnumber`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/OrderValueDef\"}\n\n    def __init__(\n        self,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, condition=condition, **kwds)\n\n\nclass Orient(VegaLiteSchema):\n    \"\"\"Orient schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Orient\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Orientation(VegaLiteSchema):\n    \"\"\"Orientation schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Orientation\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass OverlayMarkDef(VegaLiteSchema):\n    \"\"\"\n    OverlayMarkDef schema wrapper.\n\n    Parameters\n    ----------\n    align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).\n        One of ``\"left\"``, ``\"right\"``, ``\"center\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    angle : dict, float, :class:`ExprRef`\n        The rotation angle of the text, in degrees.\n    aria : bool, dict, :class:`ExprRef`\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG element, removing the mark item from the ARIA accessibility tree.\n    ariaRole : str, dict, :class:`ExprRef`\n        Sets the type of user interface element of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"role\" attribute. Warning: this\n        property is experimental and may be changed in the future.\n    ariaRoleDescription : str, dict, :class:`ExprRef`\n        A human-readable, author-localized description for the role of the mark item for\n        `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"aria-roledescription\" attribute.\n        Warning: this property is experimental and may be changed in the future.\n    aspect : bool, dict, :class:`ExprRef`\n        Whether to keep aspect ratio of image marks.\n    baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        For text marks, the vertical text baseline. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, ``\"line-bottom\"``, or an\n        expression reference that provides one of the valid values. The ``\"line-top\"`` and\n        ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but are\n        calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.\n\n        For range marks, the vertical alignment of the marks. One of ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    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']\n        The color blend mode for drawing an item on its current background. Any valid `CSS\n        mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__\n        value can be used.\n\n        **Default value:** ``\"source-over\"``\n    clip : bool, dict, :class:`ExprRef`\n        Whether a mark be clipped to the enclosing group's width and height.\n    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']\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    cornerRadius : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cornerRadiusBottomLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom left corner.\n\n        **Default value:** ``0``\n    cornerRadiusBottomRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top left corner.\n\n        **Default value:** ``0``\n    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']\n        The mouse cursor used over the mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    description : str, dict, :class:`ExprRef`\n        A text description of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.\n    dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl']\n        The direction of the text. One of ``\"ltr\"`` (left-to-right) or ``\"rtl\"``\n        (right-to-left). This property determines on which side is truncated in response to\n        the limit parameter.\n\n        **Default value:** ``\"ltr\"``\n    dx : dict, float, :class:`ExprRef`\n        The horizontal offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    dy : dict, float, :class:`ExprRef`\n        The vertical offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    ellipsis : str, dict, :class:`ExprRef`\n        The ellipsis string for text truncated in response to the limit parameter.\n\n        **Default value:** ``\"…\"``\n    endAngle : dict, float, :class:`ExprRef`\n        The end angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    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\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    fillOpacity : dict, float, :class:`ExprRef`\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    filled : bool\n        Whether the mark's color should be used as fill color instead of stroke color.\n\n        **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well\n        as ``geoshape`` marks for `graticule\n        <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;\n        otherwise, ``true``.\n\n        **Note:** This property cannot be used in a `style config\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n    font : str, dict, :class:`ExprRef`\n        The typeface to set the text in (e.g., ``\"Helvetica Neue\"``).\n    fontSize : dict, float, :class:`ExprRef`\n        The font size, in pixels.\n\n        **Default value:** ``11``\n    fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style (e.g., ``\"italic\"``).\n    fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        The font weight. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``) or a\n        number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400`` and\n        ``\"bold\"`` = ``700``).\n    height : dict, float, :class:`ExprRef`\n        Height of the marks.\n    href : str, dict, :class:`URI`, :class:`ExprRef`\n        A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\n    innerRadius : dict, float, :class:`ExprRef`\n        The inner radius in pixels of arc marks. ``innerRadius`` is an alias for\n        ``radius2``.\n\n        **Default value:** ``0``\n    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']\n        The line interpolation method to use for line and area marks. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"step-before\"``: alternate between vertical and horizontal segments, as in a\n          step function.\n        * ``\"step-after\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    limit : dict, float, :class:`ExprRef`\n        The maximum length of the text mark in pixels. The text value will be automatically\n        truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0`` -- indicating no limit\n    lineBreak : str, dict, :class:`ExprRef`\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property is ignored if the text is array-valued.\n    lineHeight : dict, float, :class:`ExprRef`\n        The line height in pixels (the spacing between subsequent lines of text) for\n        multi-line text marks.\n    opacity : dict, float, :class:`ExprRef`\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    order : bool, None\n        For line and trail marks, this ``order`` property can be set to ``null`` or\n        ``false`` to make the lines use the original order in the data sources.\n    orient : :class:`Orientation`, Literal['horizontal', 'vertical']\n        The orientation of a non-stacked bar, tick, area, and line charts. The value is\n        either horizontal (default) or vertical.\n\n        * For bar, rule and tick, this determines whether the size of the bar and tick\n          should be applied to x or y dimension.\n        * For area, this property determines the orient property of the Vega output.\n        * For line and trail marks, this property determines the sort order of the points in\n          the line if ``config.sortLineBy`` is not specified. For stacked charts, this is\n          always determined by the orientation of the stack; therefore explicitly specified\n          value will be ignored.\n    outerRadius : dict, float, :class:`ExprRef`\n        The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.\n\n        **Default value:** ``0``\n    padAngle : dict, float, :class:`ExprRef`\n        The angular padding applied to sides of the arc, in radians.\n    radius : dict, float, :class:`ExprRef`\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    radius2 : dict, float, :class:`ExprRef`\n        The secondary (inner) radius in pixels of arc marks.\n\n        **Default value:** ``0``\n    radius2Offset : dict, float, :class:`ExprRef`\n        Offset for radius2.\n    radiusOffset : dict, float, :class:`ExprRef`\n        Offset for radius.\n    shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    size : dict, float, :class:`ExprRef`\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    smooth : bool, dict, :class:`ExprRef`\n        A boolean flag (default true) indicating if the image should be smoothed when\n        resized. If false, individual pixels should be scaled directly rather than\n        interpolated with smoothing. For SVG rendering, this option may not work in some\n        browsers due to lack of standardization.\n    startAngle : dict, float, :class:`ExprRef`\n        The start angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    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\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash : dict, Sequence[float], :class:`ExprRef`\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset : dict, float, :class:`ExprRef`\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit : dict, float, :class:`ExprRef`\n        The miter limit at which to bevel a line join.\n    strokeOffset : dict, float, :class:`ExprRef`\n        The offset in pixels at which to draw the group stroke and fill. If unspecified, the\n        default behavior is to dynamically offset stroked groups such that 1 pixel stroke\n        widths align with the pixel grid.\n    strokeOpacity : dict, float, :class:`ExprRef`\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth : dict, float, :class:`ExprRef`\n        The stroke width, in pixels.\n    style : str, Sequence[str]\n        A string or array of strings indicating the name of custom styles to apply to the\n        mark. A style is a named collection of mark property defaults defined within the\n        `style configuration\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an\n        array, later styles will override earlier styles. Any `mark properties\n        <https://vega.github.io/vega-lite/docs/encoding.html#mark-prop>`__ explicitly\n        defined within the ``encoding`` will override a style default.\n\n        **Default value:** The mark's name. For example, a bar mark will have style\n        ``\"bar\"`` by default. **Note:** Any specified style will augment the default style.\n        For example, a bar mark with ``\"style\": \"foo\"`` will receive from\n        ``config.style.bar`` and ``config.style.foo`` (the specified style ``\"foo\"`` has\n        higher precedence).\n    tension : dict, float, :class:`ExprRef`\n        Depending on the interpolation type, sets the tension parameter (for line and area\n        marks).\n    text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`\n        Placeholder text if the ``text`` channel is not specified\n    theta : dict, float, :class:`ExprRef`\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2 : dict, float, :class:`ExprRef`\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    theta2Offset : dict, float, :class:`ExprRef`\n        Offset for theta2.\n    thetaOffset : dict, float, :class:`ExprRef`\n        Offset for theta.\n    time : dict, float, :class:`ExprRef`\n\n    timeUnitBandPosition : float\n        Default relative band position for a time unit. If set to ``0``, the marks will be\n        positioned at the beginning of the time unit band step. If set to ``0.5``, the marks\n        will be positioned in the middle of the time unit band step.\n    timeUnitBandSize : float\n        Default relative band size for a time unit. If set to ``1``, the bandwidth of the\n        marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the\n        marks will be half of the time unit band step.\n    tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None\n        The tooltip text string to show upon mouse hover or an object defining which fields\n        should the tooltip be derived from.\n\n        * If ``tooltip`` is ``true`` or ``{\"content\": \"encoding\"}``, then all fields from\n          ``encoding`` will be used.\n        * If ``tooltip`` is ``{\"content\": \"data\"}``, then all fields that appear in the\n          highlighted data point will be used.\n        * If set to ``null`` or ``false``, then no tooltip will be used.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n        **Default value:** ``null``\n    url : str, dict, :class:`URI`, :class:`ExprRef`\n        The URL of the image file for image marks.\n    width : dict, float, :class:`ExprRef`\n        Width of the marks.\n    x : dict, float, :class:`ExprRef`, Literal['width']\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2 : dict, float, :class:`ExprRef`, Literal['width']\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2Offset : dict, float, :class:`ExprRef`\n        Offset for x2-position.\n    xOffset : dict, float, :class:`ExprRef`\n        Offset for x-position.\n    y : dict, float, :class:`ExprRef`, Literal['height']\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2 : dict, float, :class:`ExprRef`, Literal['height']\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2Offset : dict, float, :class:`ExprRef`\n        Offset for y2-position.\n    yOffset : dict, float, :class:`ExprRef`\n        Offset for y-position.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/OverlayMarkDef\"}\n\n    def __init__(\n        self,\n        align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        angle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined,\n        blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined,\n        clip: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusBottomLeft: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusBottomRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusTopRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined,\n        dx: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        dy: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        endAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fill: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        filled: Optional[bool] = Undefined,\n        font: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined,\n        height: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        href: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined,\n        invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined,\n        limit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        order: Optional[bool | None] = Undefined,\n        orient: Optional[SchemaBase | Orientation_T] = Undefined,\n        outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radiusOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        shape: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        size: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        startAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        stroke: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        strokeDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined,\n        strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        style: Optional[str | Sequence[str]] = Undefined,\n        tension: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n        theta: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        theta2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        thetaOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        time: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        timeUnitBandPosition: Optional[float] = Undefined,\n        timeUnitBandSize: Optional[float] = Undefined,\n        tooltip: Optional[\n            str | bool | float | Parameter | SchemaBase | Map | None\n        ] = Undefined,\n        url: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        width: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        x: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        x2: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        x2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        xOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        y: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        y2: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        y2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        yOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            align=align,\n            angle=angle,\n            aria=aria,\n            ariaRole=ariaRole,\n            ariaRoleDescription=ariaRoleDescription,\n            aspect=aspect,\n            baseline=baseline,\n            blend=blend,\n            clip=clip,\n            color=color,\n            cornerRadius=cornerRadius,\n            cornerRadiusBottomLeft=cornerRadiusBottomLeft,\n            cornerRadiusBottomRight=cornerRadiusBottomRight,\n            cornerRadiusTopLeft=cornerRadiusTopLeft,\n            cornerRadiusTopRight=cornerRadiusTopRight,\n            cursor=cursor,\n            description=description,\n            dir=dir,\n            dx=dx,\n            dy=dy,\n            ellipsis=ellipsis,\n            endAngle=endAngle,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            filled=filled,\n            font=font,\n            fontSize=fontSize,\n            fontStyle=fontStyle,\n            fontWeight=fontWeight,\n            height=height,\n            href=href,\n            innerRadius=innerRadius,\n            interpolate=interpolate,\n            invalid=invalid,\n            limit=limit,\n            lineBreak=lineBreak,\n            lineHeight=lineHeight,\n            opacity=opacity,\n            order=order,\n            orient=orient,\n            outerRadius=outerRadius,\n            padAngle=padAngle,\n            radius=radius,\n            radius2=radius2,\n            radius2Offset=radius2Offset,\n            radiusOffset=radiusOffset,\n            shape=shape,\n            size=size,\n            smooth=smooth,\n            startAngle=startAngle,\n            stroke=stroke,\n            strokeCap=strokeCap,\n            strokeDash=strokeDash,\n            strokeDashOffset=strokeDashOffset,\n            strokeJoin=strokeJoin,\n            strokeMiterLimit=strokeMiterLimit,\n            strokeOffset=strokeOffset,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            style=style,\n            tension=tension,\n            text=text,\n            theta=theta,\n            theta2=theta2,\n            theta2Offset=theta2Offset,\n            thetaOffset=thetaOffset,\n            time=time,\n            timeUnitBandPosition=timeUnitBandPosition,\n            timeUnitBandSize=timeUnitBandSize,\n            tooltip=tooltip,\n            url=url,\n            width=width,\n            x=x,\n            x2=x2,\n            x2Offset=x2Offset,\n            xOffset=xOffset,\n            y=y,\n            y2=y2,\n            y2Offset=y2Offset,\n            yOffset=yOffset,\n            **kwds,\n        )\n\n\nclass Padding(VegaLiteSchema):\n    \"\"\"Padding schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Padding\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ParameterExtent(BinExtent):\n    \"\"\"ParameterExtent schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ParameterExtent\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ParameterName(VegaLiteSchema):\n    \"\"\"ParameterName schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ParameterName\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Parse(VegaLiteSchema):\n    \"\"\"Parse schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Parse\"}\n\n    def __init__(self, **kwds):\n        super().__init__(**kwds)\n\n\nclass ParseValue(VegaLiteSchema):\n    \"\"\"ParseValue schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ParseValue\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Point(Geometry):\n    \"\"\"\n    Point schema wrapper.\n\n    Point geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.2\n\n    Parameters\n    ----------\n    coordinates : Sequence[float], :class:`Position`\n        A Position is an array of coordinates.\n        https://tools.ietf.org/html/rfc7946#section-3.1.1 Array should contain between two\n        and three elements. The previous GeoJSON specification allowed more elements (e.g.,\n        which could be used to represent M values), but the current specification only\n        allows X, Y, and (optionally) Z to be defined.\n\n        Note: the type will not be narrowed down to ``[number, number] | [number, number,\n        number]`` due to marginal benefits and the large impact of breaking change.\n\n        See previous discussions on the type narrowing:\n\n        * {@link  https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21590 Nov 2017 }\n        * {@link  https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/67773 Dec\n          2023 }\n        * {@link  https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/71441 Dec\n          2024 }\n\n        One can use a  {@link\n        https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates\n        user-defined type guard that returns a type predicate }  to determine if a position\n        is a 2D or 3D position.\n    type : Literal['Point']\n        Specifies the type of GeoJSON object.\n    bbox : :class:`BBox`, Sequence[float]\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Point\"}\n\n    def __init__(\n        self,\n        coordinates: Optional[SchemaBase | Sequence[float]] = Undefined,\n        type: Optional[Literal[\"Point\"]] = Undefined,\n        bbox: Optional[SchemaBase | Sequence[float]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(coordinates=coordinates, type=type, bbox=bbox, **kwds)\n\n\nclass PointSelectionConfig(VegaLiteSchema):\n    \"\"\"\n    PointSelectionConfig schema wrapper.\n\n    Parameters\n    ----------\n    type : Literal['point']\n        Determines the default event processing and data query for the selection. Vega-Lite\n        currently supports two selection types:\n\n        * ``\"point\"`` -- to select multiple discrete data values; the first value is\n          selected on ``click`` and additional values toggled on shift-click.\n        * ``\"interval\"`` -- to select a continuous range of data values on ``drag``.\n    clear : str, bool, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`\n        Clears the selection, emptying it of all values. This property can be a `Event\n        Stream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable\n        clear.\n\n        **Default value:** ``dblclick``.\n\n        **See also:** `clear examples\n        <https://vega.github.io/vega-lite/docs/selection.html#clear>`__ in the\n        documentation.\n    encodings : Sequence[:class:`SingleDefUnitChannel`, Literal['text', 'shape', 'x', 'y', 'xOffset', 'yOffset', 'x2', 'y2', 'longitude', 'latitude', 'longitude2', 'latitude2', 'theta', 'theta2', 'radius', 'radius2', 'time', 'color', 'fill', 'stroke', 'opacity', 'fillOpacity', 'strokeOpacity', 'strokeWidth', 'strokeDash', 'size', 'angle', 'key', 'href', 'url', 'description']]\n        An array of encoding channels. The corresponding data field values must match for a\n        data tuple to fall within the selection.\n\n        **See also:** The `projection with encodings and fields section\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the\n        documentation.\n    fields : Sequence[str, :class:`FieldName`]\n        An array of field names whose values must match for a data tuple to fall within the\n        selection.\n\n        **See also:** The `projection with encodings and fields section\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the\n        documentation.\n    nearest : bool\n        When true, an invisible voronoi diagram is computed to accelerate discrete\n        selection. The data value *nearest* the mouse cursor is added to the selection.\n\n        **Default value:** ``false``, which means that data values must be interacted with\n        directly (e.g., clicked on) to be added to the selection.\n\n        **See also:** `nearest examples\n        <https://vega.github.io/vega-lite/docs/selection.html#nearest>`__ documentation.\n    on : str, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`\n        A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or\n        selector) that triggers the selection. For interval selections, the event stream\n        must specify a `start and end\n        <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.\n\n        **See also:** `on examples\n        <https://vega.github.io/vega-lite/docs/selection.html#on>`__ in the documentation.\n    resolve : :class:`SelectionResolution`, Literal['global', 'union', 'intersect']\n        With layered and multi-view displays, a strategy that determines how selections'\n        data queries are resolved when applied in a filter transform, conditional encoding\n        rule, or scale domain.\n\n        One of:\n\n        * ``\"global\"`` -- only one brush exists for the entire SPLOM. When the user begins\n          to drag, any previous brushes are cleared, and a new one is constructed.\n        * ``\"union\"`` -- each cell contains its own brush, and points are highlighted if\n          they lie within *any* of these individual brushes.\n        * ``\"intersect\"`` -- each cell contains its own brush, and points are highlighted\n          only if they fall within *all* of these individual brushes.\n\n        **Default value:** ``global``.\n\n        **See also:** `resolve examples\n        <https://vega.github.io/vega-lite/docs/selection.html#resolve>`__ in the\n        documentation.\n    toggle : str, bool\n        Controls whether data values should be toggled (inserted or removed from a point\n        selection) or only ever inserted into point selections.\n\n        One of:\n\n        * ``true`` -- the default behavior, which corresponds to ``\"event.shiftKey\"``.  As a\n          result, data values are toggled when the user interacts with the shift-key\n          pressed.\n        * ``false`` -- disables toggling behaviour; the selection will only ever contain a\n          single data value corresponding to the most recent interaction.\n        * A `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ which is\n          re-evaluated as the user interacts. If the expression evaluates to ``true``, the\n          data value is toggled into or out of the point selection. If the expression\n          evaluates to ``false``, the point selection is first cleared, and the data value\n          is then inserted. For example, setting the value to the Vega expression ``\"true\"``\n          will toggle data values without the user pressing the shift-key.\n\n        **Default value:** ``true``\n\n        **See also:** `toggle examples\n        <https://vega.github.io/vega-lite/docs/selection.html#toggle>`__ in the\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/PointSelectionConfig\"}\n\n    def __init__(\n        self,\n        type: Optional[Literal[\"point\"]] = Undefined,\n        clear: Optional[str | bool | SchemaBase | Map] = Undefined,\n        encodings: Optional[Sequence[SchemaBase | SingleDefUnitChannel_T]] = Undefined,\n        fields: Optional[Sequence[str | SchemaBase]] = Undefined,\n        nearest: Optional[bool] = Undefined,\n        on: Optional[str | SchemaBase | Map] = Undefined,\n        resolve: Optional[SchemaBase | SelectionResolution_T] = Undefined,\n        toggle: Optional[str | bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            type=type,\n            clear=clear,\n            encodings=encodings,\n            fields=fields,\n            nearest=nearest,\n            on=on,\n            resolve=resolve,\n            toggle=toggle,\n            **kwds,\n        )\n\n\nclass PointSelectionConfigWithoutType(VegaLiteSchema):\n    \"\"\"\n    PointSelectionConfigWithoutType schema wrapper.\n\n    Parameters\n    ----------\n    clear : str, bool, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`\n        Clears the selection, emptying it of all values. This property can be a `Event\n        Stream <https://vega.github.io/vega/docs/event-streams/>`__ or ``false`` to disable\n        clear.\n\n        **Default value:** ``dblclick``.\n\n        **See also:** `clear examples\n        <https://vega.github.io/vega-lite/docs/selection.html#clear>`__ in the\n        documentation.\n    encodings : Sequence[:class:`SingleDefUnitChannel`, Literal['text', 'shape', 'x', 'y', 'xOffset', 'yOffset', 'x2', 'y2', 'longitude', 'latitude', 'longitude2', 'latitude2', 'theta', 'theta2', 'radius', 'radius2', 'time', 'color', 'fill', 'stroke', 'opacity', 'fillOpacity', 'strokeOpacity', 'strokeWidth', 'strokeDash', 'size', 'angle', 'key', 'href', 'url', 'description']]\n        An array of encoding channels. The corresponding data field values must match for a\n        data tuple to fall within the selection.\n\n        **See also:** The `projection with encodings and fields section\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the\n        documentation.\n    fields : Sequence[str, :class:`FieldName`]\n        An array of field names whose values must match for a data tuple to fall within the\n        selection.\n\n        **See also:** The `projection with encodings and fields section\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ in the\n        documentation.\n    nearest : bool\n        When true, an invisible voronoi diagram is computed to accelerate discrete\n        selection. The data value *nearest* the mouse cursor is added to the selection.\n\n        **Default value:** ``false``, which means that data values must be interacted with\n        directly (e.g., clicked on) to be added to the selection.\n\n        **See also:** `nearest examples\n        <https://vega.github.io/vega-lite/docs/selection.html#nearest>`__ documentation.\n    on : str, dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`\n        A `Vega event stream <https://vega.github.io/vega/docs/event-streams/>`__ (object or\n        selector) that triggers the selection. For interval selections, the event stream\n        must specify a `start and end\n        <https://vega.github.io/vega/docs/event-streams/#between-filters>`__.\n\n        **See also:** `on examples\n        <https://vega.github.io/vega-lite/docs/selection.html#on>`__ in the documentation.\n    resolve : :class:`SelectionResolution`, Literal['global', 'union', 'intersect']\n        With layered and multi-view displays, a strategy that determines how selections'\n        data queries are resolved when applied in a filter transform, conditional encoding\n        rule, or scale domain.\n\n        One of:\n\n        * ``\"global\"`` -- only one brush exists for the entire SPLOM. When the user begins\n          to drag, any previous brushes are cleared, and a new one is constructed.\n        * ``\"union\"`` -- each cell contains its own brush, and points are highlighted if\n          they lie within *any* of these individual brushes.\n        * ``\"intersect\"`` -- each cell contains its own brush, and points are highlighted\n          only if they fall within *all* of these individual brushes.\n\n        **Default value:** ``global``.\n\n        **See also:** `resolve examples\n        <https://vega.github.io/vega-lite/docs/selection.html#resolve>`__ in the\n        documentation.\n    toggle : str, bool\n        Controls whether data values should be toggled (inserted or removed from a point\n        selection) or only ever inserted into point selections.\n\n        One of:\n\n        * ``true`` -- the default behavior, which corresponds to ``\"event.shiftKey\"``.  As a\n          result, data values are toggled when the user interacts with the shift-key\n          pressed.\n        * ``false`` -- disables toggling behaviour; the selection will only ever contain a\n          single data value corresponding to the most recent interaction.\n        * A `Vega expression <https://vega.github.io/vega/docs/expressions/>`__ which is\n          re-evaluated as the user interacts. If the expression evaluates to ``true``, the\n          data value is toggled into or out of the point selection. If the expression\n          evaluates to ``false``, the point selection is first cleared, and the data value\n          is then inserted. For example, setting the value to the Vega expression ``\"true\"``\n          will toggle data values without the user pressing the shift-key.\n\n        **Default value:** ``true``\n\n        **See also:** `toggle examples\n        <https://vega.github.io/vega-lite/docs/selection.html#toggle>`__ in the\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/PointSelectionConfigWithoutType\"}\n\n    def __init__(\n        self,\n        clear: Optional[str | bool | SchemaBase | Map] = Undefined,\n        encodings: Optional[Sequence[SchemaBase | SingleDefUnitChannel_T]] = Undefined,\n        fields: Optional[Sequence[str | SchemaBase]] = Undefined,\n        nearest: Optional[bool] = Undefined,\n        on: Optional[str | SchemaBase | Map] = Undefined,\n        resolve: Optional[SchemaBase | SelectionResolution_T] = Undefined,\n        toggle: Optional[str | bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            clear=clear,\n            encodings=encodings,\n            fields=fields,\n            nearest=nearest,\n            on=on,\n            resolve=resolve,\n            toggle=toggle,\n            **kwds,\n        )\n\n\nclass PolarDef(VegaLiteSchema):\n    \"\"\"PolarDef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/PolarDef\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass Polygon(Geometry):\n    \"\"\"\n    Polygon schema wrapper.\n\n    Polygon geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.6\n\n    Parameters\n    ----------\n    coordinates : Sequence[Sequence[Sequence[float], :class:`Position`]]\n\n    type : Literal['Polygon']\n        Specifies the type of GeoJSON object.\n    bbox : :class:`BBox`, Sequence[float]\n        Bounding box of the coordinate range of the object's Geometries, Features, or\n        Feature Collections. The value of the bbox member is an array of length 2*n where n\n        is the number of dimensions represented in the contained geometries, with all axes\n        of the most southwesterly point followed by all axes of the more northeasterly\n        point. The axes order of a bbox follows the axes order of geometries.\n        https://tools.ietf.org/html/rfc7946#section-5\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Polygon\"}\n\n    def __init__(\n        self,\n        coordinates: Optional[\n            Sequence[Sequence[SchemaBase | Sequence[float]]]\n        ] = Undefined,\n        type: Optional[Literal[\"Polygon\"]] = Undefined,\n        bbox: Optional[SchemaBase | Sequence[float]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(coordinates=coordinates, type=type, bbox=bbox, **kwds)\n\n\nclass Position(VegaLiteSchema):\n    \"\"\"\n    Position schema wrapper.\n\n    A Position is an array of coordinates. https://tools.ietf.org/html/rfc7946#section-3.1.1\n    Array should contain between two and three elements. The previous GeoJSON specification\n    allowed more elements (e.g., which could be used to represent M values), but the current\n    specification only allows X, Y, and (optionally) Z to be defined.\n\n    Note: the type will not be narrowed down to ``[number, number] | [number, number, number]``\n    due to marginal benefits and the large impact of breaking change.\n\n    See previous discussions on the type narrowing:\n\n    * {@link  https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21590 Nov 2017 }\n    * {@link  https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/67773 Dec 2023 }\n    * {@link  https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/71441 Dec 2024 }\n\n    One can use a  {@link\n    https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates\n    user-defined type guard that returns a type predicate }  to determine if a position is a 2D\n    or 3D position.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Position\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Position2Def(VegaLiteSchema):\n    \"\"\"Position2Def schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Position2Def\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass DatumDef(LatLongDef, Position2Def):\n    \"\"\"\n    DatumDef schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/DatumDef\"}\n\n    def __init__(\n        self,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            bandPosition=bandPosition, datum=datum, title=title, type=type, **kwds\n        )\n\n\nclass PositionDatumDefBase(PolarDef):\n    \"\"\"\n    PositionDatumDefBase schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None\n        Type of stacking offset if the field should be stacked. ``stack`` is only applicable\n        for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For\n        example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar\n        chart.\n\n        ``stack`` can be one of the following values:\n\n        * ``\"zero\"`` or ``true``: stacking with baseline offset at zero value of the scale\n          (for creating typical stacked `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area\n          <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).\n        * ``\"normalize\"`` - stacking with normalized domain (for creating `normalized\n          stacked bar and area charts\n          <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts\n          `with percentage tooltip\n          <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).\n        * ``\"center\"`` - stacking with center baseline (for `streamgraph\n          <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).\n        * ``null`` or ``false`` - No-stacking. This will produce layered `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area\n          chart.\n\n        **Default value:** ``zero`` for plots with all of the following conditions are true:\n        (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or\n        y) has a linear scale; (3) At least one of non-position channels mapped to an\n        unaggregated field that is different from x and y. Otherwise, ``null`` by default.\n\n        **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/PositionDatumDefBase\"}\n\n    def __init__(\n        self,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            bandPosition=bandPosition,\n            datum=datum,\n            scale=scale,\n            stack=stack,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass PositionDef(VegaLiteSchema):\n    \"\"\"PositionDef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/PositionDef\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass PositionDatumDef(PositionDef):\n    \"\"\"\n    PositionDatumDef schema wrapper.\n\n    Parameters\n    ----------\n    axis : dict, :class:`Axis`, None\n        An object defining properties of axis's gridlines, ticks and labels. If ``null``,\n        the axis for the encoding channel will be removed.\n\n        **Default value:** If undefined, default `axis properties\n        <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.\n\n        **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    impute : dict, :class:`ImputeParams`, None\n        An object defining the properties of the Impute Operation to be applied. The field\n        value of the other positional channel is taken as ``key`` of the ``Impute``\n        Operation. The field of the ``color`` channel if specified is used as ``groupby`` of\n        the ``Impute`` Operation.\n\n        **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None\n        Type of stacking offset if the field should be stacked. ``stack`` is only applicable\n        for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For\n        example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar\n        chart.\n\n        ``stack`` can be one of the following values:\n\n        * ``\"zero\"`` or ``true``: stacking with baseline offset at zero value of the scale\n          (for creating typical stacked `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area\n          <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).\n        * ``\"normalize\"`` - stacking with normalized domain (for creating `normalized\n          stacked bar and area charts\n          <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts\n          `with percentage tooltip\n          <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).\n        * ``\"center\"`` - stacking with center baseline (for `streamgraph\n          <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).\n        * ``null`` or ``false`` - No-stacking. This will produce layered `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area\n          chart.\n\n        **Default value:** ``zero`` for plots with all of the following conditions are true:\n        (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or\n        y) has a linear scale; (3) At least one of non-position channels mapped to an\n        unaggregated field that is different from x and y. Otherwise, ``null`` by default.\n\n        **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/PositionDatumDef\"}\n\n    def __init__(\n        self,\n        axis: Optional[SchemaBase | Map | None] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        impute: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            axis=axis,\n            bandPosition=bandPosition,\n            datum=datum,\n            impute=impute,\n            scale=scale,\n            stack=stack,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass PositionFieldDef(PositionDef):\n    r\"\"\"\n    PositionFieldDef schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    axis : dict, :class:`Axis`, None\n        An object defining properties of axis's gridlines, ticks and labels. If ``null``,\n        the axis for the encoding channel will be removed.\n\n        **Default value:** If undefined, default `axis properties\n        <https://vega.github.io/vega-lite/docs/axis.html>`__ are applied.\n\n        **See also:** `axis <https://vega.github.io/vega-lite/docs/axis.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    impute : dict, :class:`ImputeParams`, None\n        An object defining the properties of the Impute Operation to be applied. The field\n        value of the other positional channel is taken as ``key`` of the ``Impute``\n        Operation. The field of the ``color`` channel if specified is used as ``groupby`` of\n        the ``Impute`` Operation.\n\n        **See also:** `impute <https://vega.github.io/vega-lite/docs/impute.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None\n        Type of stacking offset if the field should be stacked. ``stack`` is only applicable\n        for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For\n        example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar\n        chart.\n\n        ``stack`` can be one of the following values:\n\n        * ``\"zero\"`` or ``true``: stacking with baseline offset at zero value of the scale\n          (for creating typical stacked `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area\n          <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).\n        * ``\"normalize\"`` - stacking with normalized domain (for creating `normalized\n          stacked bar and area charts\n          <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts\n          `with percentage tooltip\n          <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).\n        * ``\"center\"`` - stacking with center baseline (for `streamgraph\n          <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).\n        * ``null`` or ``false`` - No-stacking. This will produce layered `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area\n          chart.\n\n        **Default value:** ``zero`` for plots with all of the following conditions are true:\n        (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or\n        y) has a linear scale; (3) At least one of non-position channels mapped to an\n        unaggregated field that is different from x and y. Otherwise, ``null`` by default.\n\n        **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/PositionFieldDef\"}\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        axis: Optional[SchemaBase | Map | None] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        impute: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            axis=axis,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            impute=impute,\n            scale=scale,\n            sort=sort,\n            stack=stack,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass PositionFieldDefBase(PolarDef):\n    r\"\"\"\n    PositionFieldDefBase schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    stack : bool, :class:`StackOffset`, Literal['zero', 'center', 'normalize'], None\n        Type of stacking offset if the field should be stacked. ``stack`` is only applicable\n        for ``x``, ``y``, ``theta``, and ``radius`` channels with continuous domains. For\n        example, ``stack`` of ``y`` can be used to customize stacking for a vertical bar\n        chart.\n\n        ``stack`` can be one of the following values:\n\n        * ``\"zero\"`` or ``true``: stacking with baseline offset at zero value of the scale\n          (for creating typical stacked `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#bar>`__ and `area\n          <https://vega.github.io/vega-lite/docs/stack.html#area>`__ chart).\n        * ``\"normalize\"`` - stacking with normalized domain (for creating `normalized\n          stacked bar and area charts\n          <https://vega.github.io/vega-lite/docs/stack.html#normalized>`__ and pie charts\n          `with percentage tooltip\n          <https://vega.github.io/vega-lite/docs/arc.html#tooltip>`__).\n        * ``\"center\"`` - stacking with center baseline (for `streamgraph\n          <https://vega.github.io/vega-lite/docs/stack.html#streamgraph>`__).\n        * ``null`` or ``false`` - No-stacking. This will produce layered `bar\n          <https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart>`__ and area\n          chart.\n\n        **Default value:** ``zero`` for plots with all of the following conditions are true:\n        (1) the mark is ``bar``, ``area``, or ``arc``; (2) the stacked measure channel (x or\n        y) has a linear scale; (3) At least one of non-position channels mapped to an\n        unaggregated field that is different from x and y. Otherwise, ``null`` by default.\n\n        **See also:** `stack <https://vega.github.io/vega-lite/docs/stack.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/PositionFieldDefBase\"}\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        stack: Optional[bool | SchemaBase | StackOffset_T | None] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            scale=scale,\n            sort=sort,\n            stack=stack,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass PositionValueDef(PolarDef, Position2Def, PositionDef):\n    \"\"\"\n    PositionValueDef schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : dict, float, :class:`ExprRef`, Literal['height', 'width']\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/PositionValueDef\"}\n\n    def __init__(\n        self,\n        value: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\", \"width\"] | Map\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, **kwds)\n\n\nclass PredicateComposition(VegaLiteSchema):\n    \"\"\"PredicateComposition schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/PredicateComposition\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n    def __invert__(self) -> PredicateComposition:\n        return PredicateComposition({\"not\": self.to_dict()})\n\n    def __and__(self, other: SchemaBase) -> PredicateComposition:\n        return PredicateComposition({\"and\": [self.to_dict(), other.to_dict()]})\n\n    def __or__(self, other: SchemaBase) -> PredicateComposition:\n        return PredicateComposition({\"or\": [self.to_dict(), other.to_dict()]})\n\n\nclass LogicalAndPredicate(PredicateComposition):\n    \"\"\"\n    LogicalAndPredicate schema wrapper.\n\n    Parameters\n    ----------\n    and : Sequence[str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`]\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LogicalAnd<Predicate>\"}\n\n    def __init__(self, **kwds):\n        super().__init__(**kwds)\n\n\nclass LogicalNotPredicate(PredicateComposition):\n    \"\"\"\n    LogicalNotPredicate schema wrapper.\n\n    Parameters\n    ----------\n    not : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LogicalNot<Predicate>\"}\n\n    def __init__(self, **kwds):\n        super().__init__(**kwds)\n\n\nclass LogicalOrPredicate(PredicateComposition):\n    \"\"\"\n    LogicalOrPredicate schema wrapper.\n\n    Parameters\n    ----------\n    or : Sequence[str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`]\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LogicalOr<Predicate>\"}\n\n    def __init__(self, **kwds):\n        super().__init__(**kwds)\n\n\nclass Predicate(PredicateComposition):\n    \"\"\"Predicate schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Predicate\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass FieldEqualPredicate(Predicate):\n    \"\"\"\n    FieldEqualPredicate schema wrapper.\n\n    Parameters\n    ----------\n    equal : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`\n        The value that the field should be equal to.\n    field : str, :class:`FieldName`\n        Field to be tested.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit for the field to be tested.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FieldEqualPredicate\"}\n\n    def __init__(\n        self,\n        equal: Optional[\n            str | bool | float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        field: Optional[str | SchemaBase] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(equal=equal, field=field, timeUnit=timeUnit, **kwds)\n\n\nclass FieldGTEPredicate(Predicate):\n    \"\"\"\n    FieldGTEPredicate schema wrapper.\n\n    Parameters\n    ----------\n    field : str, :class:`FieldName`\n        Field to be tested.\n    gte : str, dict, float, :class:`ExprRef`, :class:`DateTime`\n        The value that the field should be greater than or equals to.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit for the field to be tested.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FieldGTEPredicate\"}\n\n    def __init__(\n        self,\n        field: Optional[str | SchemaBase] = Undefined,\n        gte: Optional[\n            str | float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(field=field, gte=gte, timeUnit=timeUnit, **kwds)\n\n\nclass FieldGTPredicate(Predicate):\n    \"\"\"\n    FieldGTPredicate schema wrapper.\n\n    Parameters\n    ----------\n    field : str, :class:`FieldName`\n        Field to be tested.\n    gt : str, dict, float, :class:`ExprRef`, :class:`DateTime`\n        The value that the field should be greater than.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit for the field to be tested.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FieldGTPredicate\"}\n\n    def __init__(\n        self,\n        field: Optional[str | SchemaBase] = Undefined,\n        gt: Optional[str | float | Temporal | Parameter | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(field=field, gt=gt, timeUnit=timeUnit, **kwds)\n\n\nclass FieldLTEPredicate(Predicate):\n    \"\"\"\n    FieldLTEPredicate schema wrapper.\n\n    Parameters\n    ----------\n    field : str, :class:`FieldName`\n        Field to be tested.\n    lte : str, dict, float, :class:`ExprRef`, :class:`DateTime`\n        The value that the field should be less than or equals to.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit for the field to be tested.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FieldLTEPredicate\"}\n\n    def __init__(\n        self,\n        field: Optional[str | SchemaBase] = Undefined,\n        lte: Optional[\n            str | float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(field=field, lte=lte, timeUnit=timeUnit, **kwds)\n\n\nclass FieldLTPredicate(Predicate):\n    \"\"\"\n    FieldLTPredicate schema wrapper.\n\n    Parameters\n    ----------\n    field : str, :class:`FieldName`\n        Field to be tested.\n    lt : str, dict, float, :class:`ExprRef`, :class:`DateTime`\n        The value that the field should be less than.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit for the field to be tested.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FieldLTPredicate\"}\n\n    def __init__(\n        self,\n        field: Optional[str | SchemaBase] = Undefined,\n        lt: Optional[str | float | Temporal | Parameter | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(field=field, lt=lt, timeUnit=timeUnit, **kwds)\n\n\nclass FieldOneOfPredicate(Predicate):\n    \"\"\"\n    FieldOneOfPredicate schema wrapper.\n\n    Parameters\n    ----------\n    field : str, :class:`FieldName`\n        Field to be tested.\n    oneOf : Sequence[str], Sequence[bool], Sequence[float], Sequence[dict, :class:`DateTime`]\n        A set of values that the ``field``'s value should be a member of, for a data item\n        included in the filtered data.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit for the field to be tested.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FieldOneOfPredicate\"}\n\n    def __init__(\n        self,\n        field: Optional[str | SchemaBase] = Undefined,\n        oneOf: Optional[\n            Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(field=field, oneOf=oneOf, timeUnit=timeUnit, **kwds)\n\n\nclass FieldRangePredicate(Predicate):\n    \"\"\"\n    FieldRangePredicate schema wrapper.\n\n    Parameters\n    ----------\n    field : str, :class:`FieldName`\n        Field to be tested.\n    range : dict, :class:`ExprRef`, Sequence[dict, float, :class:`ExprRef`, :class:`DateTime`, None]\n        An array of inclusive minimum and maximum values for a field value of a data item to\n        be included in the filtered data.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit for the field to be tested.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FieldRangePredicate\"}\n\n    def __init__(\n        self,\n        field: Optional[str | SchemaBase] = Undefined,\n        range: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[float | Temporal | Parameter | SchemaBase | Map | None]\n            | Map\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(field=field, range=range, timeUnit=timeUnit, **kwds)\n\n\nclass FieldValidPredicate(Predicate):\n    \"\"\"\n    FieldValidPredicate schema wrapper.\n\n    Parameters\n    ----------\n    field : str, :class:`FieldName`\n        Field to be tested.\n    valid : bool\n        If set to true the field's value has to be valid, meaning both not ``null`` and not\n        `NaN\n        <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN>`__.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit for the field to be tested.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FieldValidPredicate\"}\n\n    def __init__(\n        self,\n        field: Optional[str | SchemaBase] = Undefined,\n        valid: Optional[bool] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(field=field, valid=valid, timeUnit=timeUnit, **kwds)\n\n\nclass ParameterPredicate(Predicate):\n    \"\"\"\n    ParameterPredicate schema wrapper.\n\n    Parameters\n    ----------\n    param : str, :class:`ParameterName`\n        Filter using a parameter name.\n    empty : bool\n        For selection parameters, the predicate of empty selections returns true by default.\n        Override this behavior, by setting this property ``empty: false``.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ParameterPredicate\"}\n\n    def __init__(\n        self,\n        param: Optional[str | SchemaBase] = Undefined,\n        empty: Optional[bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(param=param, empty=empty, **kwds)\n\n\nclass Projection(VegaLiteSchema):\n    \"\"\"\n    Projection schema wrapper.\n\n    Parameters\n    ----------\n    center : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`\n        The projection's center, a two-element array of longitude and latitude in degrees.\n\n        **Default value:** ``[0, 0]``\n    clipAngle : dict, float, :class:`ExprRef`\n        The projection's clipping circle radius to the specified angle in degrees. If\n        ``null``, switches to `antimeridian <http://bl.ocks.org/mbostock/3788999>`__ cutting\n        rather than small-circle clipping.\n    clipExtent : dict, :class:`ExprRef`, :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`]\n        The projection's viewport clip extent to the specified bounds in pixels. The extent\n        bounds are specified as an array ``[[x0, y0], [x1, y1]]``, where ``x0`` is the\n        left-side of the viewport, ``y0`` is the top, ``x1`` is the right and ``y1`` is the\n        bottom. If ``null``, no viewport clipping is performed.\n    coefficient : dict, float, :class:`ExprRef`\n        The coefficient parameter for the ``hammer`` projection.\n\n        **Default value:** ``2``\n    distance : dict, float, :class:`ExprRef`\n        For the ``satellite`` projection, the distance from the center of the sphere to the\n        point of view, as a proportion of the sphere's radius. The recommended maximum clip\n        angle for a given ``distance`` is acos(1 / distance) converted to degrees. If tilt\n        is also applied, then more conservative clipping may be necessary.\n\n        **Default value:** ``2.0``\n    extent : dict, :class:`ExprRef`, :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`]\n\n    fit : dict, :class:`Fit`, :class:`ExprRef`, :class:`GeoJsonFeature`, :class:`GeoJsonFeatureCollection`, Sequence[dict, :class:`GeoJsonFeature`], Sequence[dict, :class:`Fit`, :class:`GeoJsonFeature`, :class:`GeoJsonFeatureCollection`, Sequence[dict, :class:`GeoJsonFeature`]]\n\n    fraction : dict, float, :class:`ExprRef`\n        The fraction parameter for the ``bottomley`` projection.\n\n        **Default value:** ``0.5``, corresponding to a sin(ψ) where ψ = π/6.\n    lobes : dict, float, :class:`ExprRef`\n        The number of lobes in projections that support multi-lobe views: ``berghaus``,\n        ``gingery``, or ``healpix``. The default value varies based on the projection type.\n    parallel : dict, float, :class:`ExprRef`\n        The parallel parameter for projections that support it: ``armadillo``, ``bonne``,\n        ``craig``, ``cylindricalEqualArea``, ``cylindricalStereographic``,\n        ``hammerRetroazimuthal``, ``loximuthal``, or ``rectangularPolyconic``. The default\n        value varies based on the projection type.\n    parallels : dict, Sequence[float], :class:`ExprRef`\n        For conic projections, the `two standard parallels\n        <https://en.wikipedia.org/wiki/Map_projection#Conic>`__ that define the map layout.\n        The default depends on the specific conic projection used.\n    pointRadius : dict, float, :class:`ExprRef`\n        The default radius (in pixels) to use when drawing GeoJSON ``Point`` and\n        ``MultiPoint`` geometries. This parameter sets a constant default value. To modify\n        the point radius in response to data, see the corresponding parameter of the GeoPath\n        and GeoShape transforms.\n\n        **Default value:** ``4.5``\n    precision : dict, float, :class:`ExprRef`\n        The threshold for the projection's `adaptive resampling\n        <http://bl.ocks.org/mbostock/3795544>`__ to the specified value in pixels. This\n        value corresponds to the `Douglas-Peucker distance\n        <http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm>`__.\n        If precision is not specified, returns the projection's current resampling precision\n        which defaults to ``√0.5 ≅ 0.70710…``.\n    radius : dict, float, :class:`ExprRef`\n        The radius parameter for the ``airy`` or ``gingery`` projection. The default value\n        varies based on the projection type.\n    ratio : dict, float, :class:`ExprRef`\n        The ratio parameter for the ``hill``, ``hufnagel``, or ``wagner`` projections. The\n        default value varies based on the projection type.\n    reflectX : bool, dict, :class:`ExprRef`\n        Sets whether or not the x-dimension is reflected (negated) in the output.\n    reflectY : bool, dict, :class:`ExprRef`\n        Sets whether or not the y-dimension is reflected (negated) in the output.\n    rotate : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`, :class:`Vector3number`\n        The projection's three-axis rotation to the specified angles, which must be a two-\n        or three-element array of numbers [``lambda``, ``phi``, ``gamma``] specifying the\n        rotation angles in degrees about each spherical axis. (These correspond to yaw,\n        pitch and roll.)\n\n        **Default value:** ``[0, 0, 0]``\n    scale : dict, float, :class:`ExprRef`\n        The projection's scale (zoom) factor, overriding automatic fitting. The default\n        scale is projection-specific. The scale factor corresponds linearly to the distance\n        between projected points; however, scale factor values are not equivalent across\n        projections.\n    size : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`\n        Used in conjunction with fit, provides the width and height in pixels of the area to\n        which the projection should be automatically fit.\n    spacing : dict, float, :class:`ExprRef`\n        The spacing parameter for the ``lagrange`` projection.\n\n        **Default value:** ``0.5``\n    tilt : dict, float, :class:`ExprRef`\n        The tilt angle (in degrees) for the ``satellite`` projection.\n\n        **Default value:** ``0``.\n    translate : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`\n        The projection's translation offset as a two-element array ``[tx, ty]``.\n    type : dict, :class:`ExprRef`, :class:`ProjectionType`, Literal['albers', 'albersUsa', 'azimuthalEqualArea', 'azimuthalEquidistant', 'conicConformal', 'conicEqualArea', 'conicEquidistant', 'equalEarth', 'equirectangular', 'gnomonic', 'identity', 'mercator', 'naturalEarth1', 'orthographic', 'stereographic', 'transverseMercator']\n        The cartographic projection to use. This value is case-insensitive, for example\n        ``\"albers\"`` and ``\"Albers\"`` indicate the same projection type. You can find all\n        valid projection types `in the documentation\n        <https://vega.github.io/vega-lite/docs/projection.html#projection-types>`__.\n\n        **Default value:** ``equalEarth``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Projection\"}\n\n    def __init__(\n        self,\n        center: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        clipAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        clipExtent: Optional[\n            Parameter | SchemaBase | Sequence[SchemaBase | Sequence[float]] | Map\n        ] = Undefined,\n        coefficient: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        distance: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        extent: Optional[\n            Parameter | SchemaBase | Sequence[SchemaBase | Sequence[float]] | Map\n        ] = Undefined,\n        fit: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[SchemaBase | Map]\n            | Sequence[SchemaBase | Sequence[SchemaBase | Map] | Map]\n            | Map\n        ] = Undefined,\n        fraction: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        lobes: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        parallel: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        parallels: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        pointRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        precision: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ratio: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        reflectX: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        reflectY: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        rotate: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        scale: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        size: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        spacing: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tilt: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        translate: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        type: Optional[Parameter | SchemaBase | Map | ProjectionType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            center=center,\n            clipAngle=clipAngle,\n            clipExtent=clipExtent,\n            coefficient=coefficient,\n            distance=distance,\n            extent=extent,\n            fit=fit,\n            fraction=fraction,\n            lobes=lobes,\n            parallel=parallel,\n            parallels=parallels,\n            pointRadius=pointRadius,\n            precision=precision,\n            radius=radius,\n            ratio=ratio,\n            reflectX=reflectX,\n            reflectY=reflectY,\n            rotate=rotate,\n            scale=scale,\n            size=size,\n            spacing=spacing,\n            tilt=tilt,\n            translate=translate,\n            type=type,\n            **kwds,\n        )\n\n\nclass ProjectionConfig(VegaLiteSchema):\n    \"\"\"\n    ProjectionConfig schema wrapper.\n\n    Parameters\n    ----------\n    center : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`\n        The projection's center, a two-element array of longitude and latitude in degrees.\n\n        **Default value:** ``[0, 0]``\n    clipAngle : dict, float, :class:`ExprRef`\n        The projection's clipping circle radius to the specified angle in degrees. If\n        ``null``, switches to `antimeridian <http://bl.ocks.org/mbostock/3788999>`__ cutting\n        rather than small-circle clipping.\n    clipExtent : dict, :class:`ExprRef`, :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`]\n        The projection's viewport clip extent to the specified bounds in pixels. The extent\n        bounds are specified as an array ``[[x0, y0], [x1, y1]]``, where ``x0`` is the\n        left-side of the viewport, ``y0`` is the top, ``x1`` is the right and ``y1`` is the\n        bottom. If ``null``, no viewport clipping is performed.\n    coefficient : dict, float, :class:`ExprRef`\n        The coefficient parameter for the ``hammer`` projection.\n\n        **Default value:** ``2``\n    distance : dict, float, :class:`ExprRef`\n        For the ``satellite`` projection, the distance from the center of the sphere to the\n        point of view, as a proportion of the sphere's radius. The recommended maximum clip\n        angle for a given ``distance`` is acos(1 / distance) converted to degrees. If tilt\n        is also applied, then more conservative clipping may be necessary.\n\n        **Default value:** ``2.0``\n    extent : dict, :class:`ExprRef`, :class:`Vector2Vector2number`, Sequence[Sequence[float], :class:`Vector2number`]\n\n    fit : dict, :class:`Fit`, :class:`ExprRef`, :class:`GeoJsonFeature`, :class:`GeoJsonFeatureCollection`, Sequence[dict, :class:`GeoJsonFeature`], Sequence[dict, :class:`Fit`, :class:`GeoJsonFeature`, :class:`GeoJsonFeatureCollection`, Sequence[dict, :class:`GeoJsonFeature`]]\n\n    fraction : dict, float, :class:`ExprRef`\n        The fraction parameter for the ``bottomley`` projection.\n\n        **Default value:** ``0.5``, corresponding to a sin(ψ) where ψ = π/6.\n    lobes : dict, float, :class:`ExprRef`\n        The number of lobes in projections that support multi-lobe views: ``berghaus``,\n        ``gingery``, or ``healpix``. The default value varies based on the projection type.\n    parallel : dict, float, :class:`ExprRef`\n        The parallel parameter for projections that support it: ``armadillo``, ``bonne``,\n        ``craig``, ``cylindricalEqualArea``, ``cylindricalStereographic``,\n        ``hammerRetroazimuthal``, ``loximuthal``, or ``rectangularPolyconic``. The default\n        value varies based on the projection type.\n    parallels : dict, Sequence[float], :class:`ExprRef`\n        For conic projections, the `two standard parallels\n        <https://en.wikipedia.org/wiki/Map_projection#Conic>`__ that define the map layout.\n        The default depends on the specific conic projection used.\n    pointRadius : dict, float, :class:`ExprRef`\n        The default radius (in pixels) to use when drawing GeoJSON ``Point`` and\n        ``MultiPoint`` geometries. This parameter sets a constant default value. To modify\n        the point radius in response to data, see the corresponding parameter of the GeoPath\n        and GeoShape transforms.\n\n        **Default value:** ``4.5``\n    precision : dict, float, :class:`ExprRef`\n        The threshold for the projection's `adaptive resampling\n        <http://bl.ocks.org/mbostock/3795544>`__ to the specified value in pixels. This\n        value corresponds to the `Douglas-Peucker distance\n        <http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm>`__.\n        If precision is not specified, returns the projection's current resampling precision\n        which defaults to ``√0.5 ≅ 0.70710…``.\n    radius : dict, float, :class:`ExprRef`\n        The radius parameter for the ``airy`` or ``gingery`` projection. The default value\n        varies based on the projection type.\n    ratio : dict, float, :class:`ExprRef`\n        The ratio parameter for the ``hill``, ``hufnagel``, or ``wagner`` projections. The\n        default value varies based on the projection type.\n    reflectX : bool, dict, :class:`ExprRef`\n        Sets whether or not the x-dimension is reflected (negated) in the output.\n    reflectY : bool, dict, :class:`ExprRef`\n        Sets whether or not the y-dimension is reflected (negated) in the output.\n    rotate : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`, :class:`Vector3number`\n        The projection's three-axis rotation to the specified angles, which must be a two-\n        or three-element array of numbers [``lambda``, ``phi``, ``gamma``] specifying the\n        rotation angles in degrees about each spherical axis. (These correspond to yaw,\n        pitch and roll.)\n\n        **Default value:** ``[0, 0, 0]``\n    scale : dict, float, :class:`ExprRef`\n        The projection's scale (zoom) factor, overriding automatic fitting. The default\n        scale is projection-specific. The scale factor corresponds linearly to the distance\n        between projected points; however, scale factor values are not equivalent across\n        projections.\n    size : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`\n        Used in conjunction with fit, provides the width and height in pixels of the area to\n        which the projection should be automatically fit.\n    spacing : dict, float, :class:`ExprRef`\n        The spacing parameter for the ``lagrange`` projection.\n\n        **Default value:** ``0.5``\n    tilt : dict, float, :class:`ExprRef`\n        The tilt angle (in degrees) for the ``satellite`` projection.\n\n        **Default value:** ``0``.\n    translate : dict, Sequence[float], :class:`ExprRef`, :class:`Vector2number`\n        The projection's translation offset as a two-element array ``[tx, ty]``.\n    type : dict, :class:`ExprRef`, :class:`ProjectionType`, Literal['albers', 'albersUsa', 'azimuthalEqualArea', 'azimuthalEquidistant', 'conicConformal', 'conicEqualArea', 'conicEquidistant', 'equalEarth', 'equirectangular', 'gnomonic', 'identity', 'mercator', 'naturalEarth1', 'orthographic', 'stereographic', 'transverseMercator']\n        The cartographic projection to use. This value is case-insensitive, for example\n        ``\"albers\"`` and ``\"Albers\"`` indicate the same projection type. You can find all\n        valid projection types `in the documentation\n        <https://vega.github.io/vega-lite/docs/projection.html#projection-types>`__.\n\n        **Default value:** ``equalEarth``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ProjectionConfig\"}\n\n    def __init__(\n        self,\n        center: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        clipAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        clipExtent: Optional[\n            Parameter | SchemaBase | Sequence[SchemaBase | Sequence[float]] | Map\n        ] = Undefined,\n        coefficient: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        distance: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        extent: Optional[\n            Parameter | SchemaBase | Sequence[SchemaBase | Sequence[float]] | Map\n        ] = Undefined,\n        fit: Optional[\n            Parameter\n            | SchemaBase\n            | Sequence[SchemaBase | Map]\n            | Sequence[SchemaBase | Sequence[SchemaBase | Map] | Map]\n            | Map\n        ] = Undefined,\n        fraction: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        lobes: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        parallel: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        parallels: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        pointRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        precision: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ratio: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        reflectX: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        reflectY: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        rotate: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        scale: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        size: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        spacing: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tilt: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        translate: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        type: Optional[Parameter | SchemaBase | Map | ProjectionType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            center=center,\n            clipAngle=clipAngle,\n            clipExtent=clipExtent,\n            coefficient=coefficient,\n            distance=distance,\n            extent=extent,\n            fit=fit,\n            fraction=fraction,\n            lobes=lobes,\n            parallel=parallel,\n            parallels=parallels,\n            pointRadius=pointRadius,\n            precision=precision,\n            radius=radius,\n            ratio=ratio,\n            reflectX=reflectX,\n            reflectY=reflectY,\n            rotate=rotate,\n            scale=scale,\n            size=size,\n            spacing=spacing,\n            tilt=tilt,\n            translate=translate,\n            type=type,\n            **kwds,\n        )\n\n\nclass ProjectionType(VegaLiteSchema):\n    \"\"\"ProjectionType schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ProjectionType\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass RadialGradient(Gradient):\n    \"\"\"\n    RadialGradient schema wrapper.\n\n    Parameters\n    ----------\n    gradient : Literal['radial']\n        The type of gradient. Use ``\"radial\"`` for a radial gradient.\n    stops : Sequence[dict, :class:`GradientStop`]\n        An array of gradient stops defining the gradient color sequence.\n    id : str\n\n    r1 : float\n        The radius length, in normalized [0, 1] coordinates, of the inner circle for the\n        gradient.\n\n        **Default value:** ``0``\n    r2 : float\n        The radius length, in normalized [0, 1] coordinates, of the outer circle for the\n        gradient.\n\n        **Default value:** ``0.5``\n    x1 : float\n        The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner\n        circle for the gradient.\n\n        **Default value:** ``0.5``\n    x2 : float\n        The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer\n        circle for the gradient.\n\n        **Default value:** ``0.5``\n    y1 : float\n        The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner\n        circle for the gradient.\n\n        **Default value:** ``0.5``\n    y2 : float\n        The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer\n        circle for the gradient.\n\n        **Default value:** ``0.5``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/RadialGradient\"}\n\n    def __init__(\n        self,\n        gradient: Optional[Literal[\"radial\"]] = Undefined,\n        stops: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        id: Optional[str] = Undefined,\n        r1: Optional[float] = Undefined,\n        r2: Optional[float] = Undefined,\n        x1: Optional[float] = Undefined,\n        x2: Optional[float] = Undefined,\n        y1: Optional[float] = Undefined,\n        y2: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            gradient=gradient,\n            stops=stops,\n            id=id,\n            r1=r1,\n            r2=r2,\n            x1=x1,\n            x2=x2,\n            y1=y1,\n            y2=y2,\n            **kwds,\n        )\n\n\nclass RangeConfig(VegaLiteSchema):\n    \"\"\"\n    RangeConfig schema wrapper.\n\n    Parameters\n    ----------\n    category : dict, :class:`RangeRaw`, :class:`RangeEnum`, :class:`RangeScheme`, Sequence[str, bool, float, Sequence[float], :class:`RangeRawArray`, None], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap'], Sequence[str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']]\n        Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for categorical\n        data.\n    diverging : dict, :class:`RangeRaw`, :class:`RangeEnum`, :class:`RangeScheme`, Sequence[str, bool, float, Sequence[float], :class:`RangeRawArray`, None], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap'], Sequence[str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']]\n        Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for diverging\n        quantitative ramps.\n    heatmap : dict, :class:`RangeRaw`, :class:`RangeEnum`, :class:`RangeScheme`, Sequence[str, bool, float, Sequence[float], :class:`RangeRawArray`, None], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap'], Sequence[str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']]\n        Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for\n        quantitative heatmaps.\n    ordinal : dict, :class:`RangeRaw`, :class:`RangeEnum`, :class:`RangeScheme`, Sequence[str, bool, float, Sequence[float], :class:`RangeRawArray`, None], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap'], Sequence[str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']]\n        Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for\n        rank-ordered data.\n    ramp : dict, :class:`RangeRaw`, :class:`RangeEnum`, :class:`RangeScheme`, Sequence[str, bool, float, Sequence[float], :class:`RangeRawArray`, None], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap'], Sequence[str, :class:`Color`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']]\n        Default `color scheme <https://vega.github.io/vega/docs/schemes/>`__ for sequential\n        quantitative ramps.\n    symbol : Sequence[str, :class:`SymbolShape`]\n        Array of `symbol <https://vega.github.io/vega/docs/marks/symbol/>`__ names or paths\n        for the default shape palette.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/RangeConfig\"}\n\n    def __init__(\n        self,\n        category: Optional[\n            SchemaBase\n            | Sequence[str | SchemaBase | ColorName_T]\n            | Sequence[str | bool | float | SchemaBase | Sequence[float] | None]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        diverging: Optional[\n            SchemaBase\n            | Sequence[str | SchemaBase | ColorName_T]\n            | Sequence[str | bool | float | SchemaBase | Sequence[float] | None]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        heatmap: Optional[\n            SchemaBase\n            | Sequence[str | SchemaBase | ColorName_T]\n            | Sequence[str | bool | float | SchemaBase | Sequence[float] | None]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        ordinal: Optional[\n            SchemaBase\n            | Sequence[str | SchemaBase | ColorName_T]\n            | Sequence[str | bool | float | SchemaBase | Sequence[float] | None]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        ramp: Optional[\n            SchemaBase\n            | Sequence[str | SchemaBase | ColorName_T]\n            | Sequence[str | bool | float | SchemaBase | Sequence[float] | None]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        symbol: Optional[Sequence[str | SchemaBase]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            category=category,\n            diverging=diverging,\n            heatmap=heatmap,\n            ordinal=ordinal,\n            ramp=ramp,\n            symbol=symbol,\n            **kwds,\n        )\n\n\nclass RangeRawArray(VegaLiteSchema):\n    \"\"\"RangeRawArray schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/RangeRawArray\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass RangeScheme(VegaLiteSchema):\n    \"\"\"RangeScheme schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/RangeScheme\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass RangeEnum(RangeScheme):\n    \"\"\"RangeEnum schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/RangeEnum\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass RangeRaw(RangeScheme):\n    \"\"\"RangeRaw schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/RangeRaw\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass RectConfig(AnyMarkConfig):\n    \"\"\"\n    RectConfig schema wrapper.\n\n    Parameters\n    ----------\n    align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).\n        One of ``\"left\"``, ``\"right\"``, ``\"center\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    angle : dict, float, :class:`ExprRef`\n        The rotation angle of the text, in degrees.\n    aria : bool, dict, :class:`ExprRef`\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG element, removing the mark item from the ARIA accessibility tree.\n    ariaRole : str, dict, :class:`ExprRef`\n        Sets the type of user interface element of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"role\" attribute. Warning: this\n        property is experimental and may be changed in the future.\n    ariaRoleDescription : str, dict, :class:`ExprRef`\n        A human-readable, author-localized description for the role of the mark item for\n        `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"aria-roledescription\" attribute.\n        Warning: this property is experimental and may be changed in the future.\n    aspect : bool, dict, :class:`ExprRef`\n        Whether to keep aspect ratio of image marks.\n    baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        For text marks, the vertical text baseline. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, ``\"line-bottom\"``, or an\n        expression reference that provides one of the valid values. The ``\"line-top\"`` and\n        ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but are\n        calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.\n\n        For range marks, the vertical alignment of the marks. One of ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    binSpacing : float\n        Offset between bars for binned field. The ideal value for this is either 0\n        (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n        **Default value:** ``1``\n    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']\n        The color blend mode for drawing an item on its current background. Any valid `CSS\n        mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__\n        value can be used.\n\n        **Default value:** ``\"source-over\"``\n    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']\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    continuousBandSize : float\n        The default size of the bars on continuous scales.\n\n        **Default value:** ``5``\n    cornerRadius : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cornerRadiusBottomLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom left corner.\n\n        **Default value:** ``0``\n    cornerRadiusBottomRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top left corner.\n\n        **Default value:** ``0``\n    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']\n        The mouse cursor used over the mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    description : str, dict, :class:`ExprRef`\n        A text description of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.\n    dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl']\n        The direction of the text. One of ``\"ltr\"`` (left-to-right) or ``\"rtl\"``\n        (right-to-left). This property determines on which side is truncated in response to\n        the limit parameter.\n\n        **Default value:** ``\"ltr\"``\n    discreteBandSize : dict, float, :class:`RelativeBandSize`\n        The default size of the bars with discrete dimensions. If unspecified, the default\n        size is  ``step-2``, which provides 2 pixel offset between bars.\n    dx : dict, float, :class:`ExprRef`\n        The horizontal offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    dy : dict, float, :class:`ExprRef`\n        The vertical offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    ellipsis : str, dict, :class:`ExprRef`\n        The ellipsis string for text truncated in response to the limit parameter.\n\n        **Default value:** ``\"…\"``\n    endAngle : dict, float, :class:`ExprRef`\n        The end angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    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\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    fillOpacity : dict, float, :class:`ExprRef`\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    filled : bool\n        Whether the mark's color should be used as fill color instead of stroke color.\n\n        **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well\n        as ``geoshape`` marks for `graticule\n        <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;\n        otherwise, ``true``.\n\n        **Note:** This property cannot be used in a `style config\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n    font : str, dict, :class:`ExprRef`\n        The typeface to set the text in (e.g., ``\"Helvetica Neue\"``).\n    fontSize : dict, float, :class:`ExprRef`\n        The font size, in pixels.\n\n        **Default value:** ``11``\n    fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style (e.g., ``\"italic\"``).\n    fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        The font weight. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``) or a\n        number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400`` and\n        ``\"bold\"`` = ``700``).\n    height : dict, float, :class:`ExprRef`\n        Height of the marks.\n    href : str, dict, :class:`URI`, :class:`ExprRef`\n        A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\n    innerRadius : dict, float, :class:`ExprRef`\n        The inner radius in pixels of arc marks. ``innerRadius`` is an alias for\n        ``radius2``.\n\n        **Default value:** ``0``\n    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']\n        The line interpolation method to use for line and area marks. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"step-before\"``: alternate between vertical and horizontal segments, as in a\n          step function.\n        * ``\"step-after\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    limit : dict, float, :class:`ExprRef`\n        The maximum length of the text mark in pixels. The text value will be automatically\n        truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0`` -- indicating no limit\n    lineBreak : str, dict, :class:`ExprRef`\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property is ignored if the text is array-valued.\n    lineHeight : dict, float, :class:`ExprRef`\n        The line height in pixels (the spacing between subsequent lines of text) for\n        multi-line text marks.\n    minBandSize : dict, float, :class:`ExprRef`\n        The minimum band size for bar and rectangle marks. **Default value:** ``0.25``\n    opacity : dict, float, :class:`ExprRef`\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    order : bool, None\n        For line and trail marks, this ``order`` property can be set to ``null`` or\n        ``false`` to make the lines use the original order in the data sources.\n    orient : :class:`Orientation`, Literal['horizontal', 'vertical']\n        The orientation of a non-stacked bar, tick, area, and line charts. The value is\n        either horizontal (default) or vertical.\n\n        * For bar, rule and tick, this determines whether the size of the bar and tick\n          should be applied to x or y dimension.\n        * For area, this property determines the orient property of the Vega output.\n        * For line and trail marks, this property determines the sort order of the points in\n          the line if ``config.sortLineBy`` is not specified. For stacked charts, this is\n          always determined by the orientation of the stack; therefore explicitly specified\n          value will be ignored.\n    outerRadius : dict, float, :class:`ExprRef`\n        The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.\n\n        **Default value:** ``0``\n    padAngle : dict, float, :class:`ExprRef`\n        The angular padding applied to sides of the arc, in radians.\n    radius : dict, float, :class:`ExprRef`\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    radius2 : dict, float, :class:`ExprRef`\n        The secondary (inner) radius in pixels of arc marks.\n\n        **Default value:** ``0``\n    shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    size : dict, float, :class:`ExprRef`\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    smooth : bool, dict, :class:`ExprRef`\n        A boolean flag (default true) indicating if the image should be smoothed when\n        resized. If false, individual pixels should be scaled directly rather than\n        interpolated with smoothing. For SVG rendering, this option may not work in some\n        browsers due to lack of standardization.\n    startAngle : dict, float, :class:`ExprRef`\n        The start angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    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\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash : dict, Sequence[float], :class:`ExprRef`\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset : dict, float, :class:`ExprRef`\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit : dict, float, :class:`ExprRef`\n        The miter limit at which to bevel a line join.\n    strokeOffset : dict, float, :class:`ExprRef`\n        The offset in pixels at which to draw the group stroke and fill. If unspecified, the\n        default behavior is to dynamically offset stroked groups such that 1 pixel stroke\n        widths align with the pixel grid.\n    strokeOpacity : dict, float, :class:`ExprRef`\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth : dict, float, :class:`ExprRef`\n        The stroke width, in pixels.\n    tension : dict, float, :class:`ExprRef`\n        Depending on the interpolation type, sets the tension parameter (for line and area\n        marks).\n    text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`\n        Placeholder text if the ``text`` channel is not specified\n    theta : dict, float, :class:`ExprRef`\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2 : dict, float, :class:`ExprRef`\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    time : dict, float, :class:`ExprRef`\n\n    timeUnitBandPosition : float\n        Default relative band position for a time unit. If set to ``0``, the marks will be\n        positioned at the beginning of the time unit band step. If set to ``0.5``, the marks\n        will be positioned in the middle of the time unit band step.\n    timeUnitBandSize : float\n        Default relative band size for a time unit. If set to ``1``, the bandwidth of the\n        marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the\n        marks will be half of the time unit band step.\n    tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None\n        The tooltip text string to show upon mouse hover or an object defining which fields\n        should the tooltip be derived from.\n\n        * If ``tooltip`` is ``true`` or ``{\"content\": \"encoding\"}``, then all fields from\n          ``encoding`` will be used.\n        * If ``tooltip`` is ``{\"content\": \"data\"}``, then all fields that appear in the\n          highlighted data point will be used.\n        * If set to ``null`` or ``false``, then no tooltip will be used.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n        **Default value:** ``null``\n    url : str, dict, :class:`URI`, :class:`ExprRef`\n        The URL of the image file for image marks.\n    width : dict, float, :class:`ExprRef`\n        Width of the marks.\n    x : dict, float, :class:`ExprRef`, Literal['width']\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2 : dict, float, :class:`ExprRef`, Literal['width']\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    y : dict, float, :class:`ExprRef`, Literal['height']\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2 : dict, float, :class:`ExprRef`, Literal['height']\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/RectConfig\"}\n\n    def __init__(\n        self,\n        align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        angle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined,\n        binSpacing: Optional[float] = Undefined,\n        blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined,\n        color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,\n        continuousBandSize: Optional[float] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusBottomLeft: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusBottomRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusTopRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined,\n        discreteBandSize: Optional[float | SchemaBase | Map] = Undefined,\n        dx: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        dy: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        endAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fill: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        filled: Optional[bool] = Undefined,\n        font: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined,\n        height: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        href: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined,\n        invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined,\n        limit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        minBandSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        order: Optional[bool | None] = Undefined,\n        orient: Optional[SchemaBase | Orientation_T] = Undefined,\n        outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        shape: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        size: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        startAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        stroke: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        strokeDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined,\n        strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tension: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n        theta: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        time: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        timeUnitBandPosition: Optional[float] = Undefined,\n        timeUnitBandSize: Optional[float] = Undefined,\n        tooltip: Optional[\n            str | bool | float | Parameter | SchemaBase | Map | None\n        ] = Undefined,\n        url: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        width: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        x: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        x2: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        y: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        y2: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            align=align,\n            angle=angle,\n            aria=aria,\n            ariaRole=ariaRole,\n            ariaRoleDescription=ariaRoleDescription,\n            aspect=aspect,\n            baseline=baseline,\n            binSpacing=binSpacing,\n            blend=blend,\n            color=color,\n            continuousBandSize=continuousBandSize,\n            cornerRadius=cornerRadius,\n            cornerRadiusBottomLeft=cornerRadiusBottomLeft,\n            cornerRadiusBottomRight=cornerRadiusBottomRight,\n            cornerRadiusTopLeft=cornerRadiusTopLeft,\n            cornerRadiusTopRight=cornerRadiusTopRight,\n            cursor=cursor,\n            description=description,\n            dir=dir,\n            discreteBandSize=discreteBandSize,\n            dx=dx,\n            dy=dy,\n            ellipsis=ellipsis,\n            endAngle=endAngle,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            filled=filled,\n            font=font,\n            fontSize=fontSize,\n            fontStyle=fontStyle,\n            fontWeight=fontWeight,\n            height=height,\n            href=href,\n            innerRadius=innerRadius,\n            interpolate=interpolate,\n            invalid=invalid,\n            limit=limit,\n            lineBreak=lineBreak,\n            lineHeight=lineHeight,\n            minBandSize=minBandSize,\n            opacity=opacity,\n            order=order,\n            orient=orient,\n            outerRadius=outerRadius,\n            padAngle=padAngle,\n            radius=radius,\n            radius2=radius2,\n            shape=shape,\n            size=size,\n            smooth=smooth,\n            startAngle=startAngle,\n            stroke=stroke,\n            strokeCap=strokeCap,\n            strokeDash=strokeDash,\n            strokeDashOffset=strokeDashOffset,\n            strokeJoin=strokeJoin,\n            strokeMiterLimit=strokeMiterLimit,\n            strokeOffset=strokeOffset,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            tension=tension,\n            text=text,\n            theta=theta,\n            theta2=theta2,\n            time=time,\n            timeUnitBandPosition=timeUnitBandPosition,\n            timeUnitBandSize=timeUnitBandSize,\n            tooltip=tooltip,\n            url=url,\n            width=width,\n            x=x,\n            x2=x2,\n            y=y,\n            y2=y2,\n            **kwds,\n        )\n\n\nclass RelativeBandSize(VegaLiteSchema):\n    \"\"\"\n    RelativeBandSize schema wrapper.\n\n    Parameters\n    ----------\n    band : float\n        The relative band size.  For example ``0.5`` means half of the band scale's band\n        width.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/RelativeBandSize\"}\n\n    def __init__(self, band: Optional[float] = Undefined, **kwds):\n        super().__init__(band=band, **kwds)\n\n\nclass RepeatMapping(VegaLiteSchema):\n    \"\"\"\n    RepeatMapping schema wrapper.\n\n    Parameters\n    ----------\n    column : Sequence[str]\n        An array of fields to be repeated horizontally.\n    row : Sequence[str]\n        An array of fields to be repeated vertically.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/RepeatMapping\"}\n\n    def __init__(\n        self,\n        column: Optional[Sequence[str]] = Undefined,\n        row: Optional[Sequence[str]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(column=column, row=row, **kwds)\n\n\nclass RepeatRef(Field):\n    \"\"\"\n    RepeatRef schema wrapper.\n\n    Reference to a repeated value.\n\n    Parameters\n    ----------\n    repeat : Literal['row', 'column', 'repeat', 'layer']\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/RepeatRef\"}\n\n    def __init__(\n        self,\n        repeat: Optional[Literal[\"row\", \"column\", \"repeat\", \"layer\"]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(repeat=repeat, **kwds)\n\n\nclass Resolve(VegaLiteSchema):\n    \"\"\"\n    Resolve schema wrapper.\n\n    Defines how scales, axes, and legends from different specs should be combined. Resolve is a\n    mapping from ``scale``, ``axis``, and ``legend`` to a mapping from channels to resolutions.\n    Scales and guides can be resolved to be ``\"independent\"`` or ``\"shared\"``.\n\n    Parameters\n    ----------\n    axis : dict, :class:`AxisResolveMap`\n\n    legend : dict, :class:`LegendResolveMap`\n\n    scale : dict, :class:`ScaleResolveMap`\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Resolve\"}\n\n    def __init__(\n        self,\n        axis: Optional[SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map] = Undefined,\n        scale: Optional[SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(axis=axis, legend=legend, scale=scale, **kwds)\n\n\nclass ResolveMode(VegaLiteSchema):\n    \"\"\"ResolveMode schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ResolveMode\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass RowColLayoutAlign(VegaLiteSchema):\n    \"\"\"\n    RowColLayoutAlign schema wrapper.\n\n    Parameters\n    ----------\n    column : :class:`LayoutAlign`, Literal['all', 'each', 'none']\n\n    row : :class:`LayoutAlign`, Literal['all', 'each', 'none']\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/RowCol<LayoutAlign>\"}\n\n    def __init__(\n        self,\n        column: Optional[SchemaBase | LayoutAlign_T] = Undefined,\n        row: Optional[SchemaBase | LayoutAlign_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(column=column, row=row, **kwds)\n\n\nclass RowColboolean(VegaLiteSchema):\n    \"\"\"\n    RowColboolean schema wrapper.\n\n    Parameters\n    ----------\n    column : bool\n\n    row : bool\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/RowCol<boolean>\"}\n\n    def __init__(\n        self,\n        column: Optional[bool] = Undefined,\n        row: Optional[bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(column=column, row=row, **kwds)\n\n\nclass RowColnumber(VegaLiteSchema):\n    \"\"\"\n    RowColnumber schema wrapper.\n\n    Parameters\n    ----------\n    column : float\n\n    row : float\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/RowCol<number>\"}\n\n    def __init__(\n        self,\n        column: Optional[float] = Undefined,\n        row: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(column=column, row=row, **kwds)\n\n\nclass RowColumnEncodingFieldDef(VegaLiteSchema):\n    r\"\"\"\n    RowColumnEncodingFieldDef schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    align : :class:`LayoutAlign`, Literal['all', 'each', 'none']\n        The alignment to apply to row/column facet's subplot. The supported string values\n        are ``\"all\"``, ``\"each\"``, and ``\"none\"``.\n\n        * For ``\"none\"``, a flow layout will be used, in which adjacent subviews are simply\n          placed one after the other.\n        * For ``\"each\"``, subviews will be aligned into a clean grid structure, but each row\n          or column may be of variable size.\n        * For ``\"all\"``, subviews will be aligned and each row or column will be sized\n          identically based on the maximum observed size. String values for this property\n          will be applied to both grid rows and columns.\n\n        **Default value:** ``\"all\"``.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    center : bool\n        Boolean flag indicating if facet's subviews should be centered relative to their\n        respective rows or columns.\n\n        **Default value:** ``false``\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    header : dict, :class:`Header`, None\n        An object defining properties of a facet's header.\n    sort : dict, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`EncodingSortField`, Sequence[dict, :class:`DateTime`], Literal['ascending', 'descending'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` is not supported for ``row`` and ``column``.\n    spacing : float\n        The spacing in pixels between facet's sub-views.\n\n        **Default value**: Depends on ``\"spacing\"`` property of `the view composition\n        configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__\n        (``20`` by default)\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/RowColumnEncodingFieldDef\"}\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        align: Optional[SchemaBase | LayoutAlign_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        center: Optional[bool] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        header: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | SortOrder_T\n            | None\n        ] = Undefined,\n        spacing: Optional[float] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            align=align,\n            bandPosition=bandPosition,\n            bin=bin,\n            center=center,\n            field=field,\n            header=header,\n            sort=sort,\n            spacing=spacing,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass Scale(VegaLiteSchema):\n    \"\"\"\n    Scale schema wrapper.\n\n    Parameters\n    ----------\n    align : dict, float, :class:`ExprRef`\n        The alignment of the steps within the scale range.\n\n        This value must lie in the range ``[0,1]``. A value of ``0.5`` indicates that the\n        steps should be centered within the range. A value of ``0`` or ``1`` may be used to\n        shift the bands to one side, say to position them adjacent to an axis.\n\n        **Default value:** ``0.5``\n    base : dict, float, :class:`ExprRef`\n        The logarithm base of the ``log`` scale (default ``10``).\n    bins : dict, Sequence[float], :class:`ScaleBins`, :class:`ScaleBinParams`\n        Bin boundaries can be provided to scales as either an explicit array of bin\n        boundaries or as a bin specification object. The legal values are:\n\n        * An `array <../types/#Array>`__ literal of bin boundary values. For example, ``[0,\n          5, 10, 15, 20]``. The array must include both starting and ending boundaries. The\n          previous example uses five values to indicate a total of four bin intervals:\n          [0-5), [5-10), [10-15), [15-20]. Array literals may include signal references as\n          elements.\n        * A `bin specification object\n          <https://vega.github.io/vega-lite/docs/scale.html#bins>`__ that indicates the bin\n          *step* size, and optionally the *start* and *stop* boundaries.\n        * An array of bin boundaries over the scale domain. If provided, axes and legends\n          will use the bin boundaries to inform the choice of tick marks and text labels.\n    clamp : bool, dict, :class:`ExprRef`\n        If ``true``, values that exceed the data domain are clamped to either the minimum or\n        maximum range value\n\n        **Default value:** derived from the `scale config\n        <https://vega.github.io/vega-lite/docs/config.html#scale-config>`__'s ``clamp``\n        (``true`` by default).\n    constant : dict, float, :class:`ExprRef`\n        A constant determining the slope of the symlog function around zero. Only used for\n        ``symlog`` scales.\n\n        **Default value:** ``1``\n    domain : dict, :class:`ExprRef`, Literal['unaggregated'], :class:`DomainUnionWith`, :class:`ParameterExtent`, Sequence[str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, None]\n        Customized domain values in the form of constant values or dynamic values driven by\n        a parameter.\n\n        1) Constant ``domain`` for *quantitative* fields can take one of the following\n        forms:\n\n        * A two-element array with minimum and maximum values. To create a diverging scale,\n          this two-element array can be combined with the ``domainMid`` property.\n        * An array with more than two entries, for `Piecewise quantitative scales\n          <https://vega.github.io/vega-lite/docs/scale.html#piecewise>`__.\n        * A string value ``\"unaggregated\"``, if the input field is aggregated, to indicate\n          that the domain should include the raw data values prior to the aggregation.\n\n        2) Constant ``domain`` for *temporal* fields can be a two-element array with minimum\n        and maximum values, in the form of either timestamps or the `DateTime definition\n        objects <https://vega.github.io/vega-lite/docs/types.html#datetime>`__.\n\n        3) Constant ``domain`` for *ordinal* and *nominal* fields can be an array that lists\n        valid input values.\n\n        4) To combine (union) specified constant domain with the field's values, ``domain``\n        can be an object with a ``unionWith`` property that specify constant domain to be\n        combined. For example, ``domain: {unionWith: [0, 100]}`` for a quantitative scale\n        means that the scale domain always includes ``[0, 100]``, but will include other\n        values in the fields beyond ``[0, 100]``.\n\n        5) Domain can also takes an object defining a field or encoding of a parameter that\n        `interactively determines\n        <https://vega.github.io/vega-lite/docs/selection.html#scale-domains>`__ the scale\n        domain.\n    domainMax : dict, float, :class:`ExprRef`, :class:`DateTime`\n        Sets the maximum value in the scale domain, overriding the ``domain`` property. This\n        property is only intended for use with scales having continuous domains.\n    domainMid : dict, float, :class:`ExprRef`\n        Inserts a single mid-point value into a two-element domain. The mid-point value must\n        lie between the domain minimum and maximum values. This property can be useful for\n        setting a midpoint for `diverging color scales\n        <https://vega.github.io/vega-lite/docs/scale.html#piecewise>`__. The domainMid\n        property is only intended for use with scales supporting continuous, piecewise\n        domains.\n    domainMin : dict, float, :class:`ExprRef`, :class:`DateTime`\n        Sets the minimum value in the scale domain, overriding the domain property. This\n        property is only intended for use with scales having continuous domains.\n    domainRaw : dict, :class:`ExprRef`\n        An expression for an array of raw values that, if non-null, directly overrides the\n        *domain* property. This is useful for supporting interactions such as panning or\n        zooming a scale. The scale may be initially determined using a data-driven domain,\n        then modified in response to user input by setting the rawDomain value.\n    exponent : dict, float, :class:`ExprRef`\n        The exponent of the ``pow`` scale.\n    interpolate : dict, :class:`ExprRef`, :class:`ScaleInterpolateEnum`, :class:`ScaleInterpolateParams`, Literal['rgb', 'lab', 'hcl', 'hsl', 'hsl-long', 'hcl-long', 'cubehelix', 'cubehelix-long']\n        The interpolation method for range values. By default, a general interpolator for\n        numbers, dates, strings and colors (in HCL space) is used. For color ranges, this\n        property allows interpolation in alternative color spaces. Legal values include\n        ``rgb``, ``hsl``, ``hsl-long``, ``lab``, ``hcl``, ``hcl-long``, ``cubehelix`` and\n        ``cubehelix-long`` ('-long' variants use longer paths in polar coordinate spaces).\n        If object-valued, this property accepts an object with a string-valued *type*\n        property and an optional numeric *gamma* property applicable to rgb and cubehelix\n        interpolators. For more, see the `d3-interpolate documentation\n        <https://github.com/d3/d3-interpolate>`__.\n\n        * **Default value:** ``hcl``\n    nice : bool, dict, float, :class:`ExprRef`, :class:`TimeInterval`, :class:`TimeIntervalStep`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year']\n        Extending the domain so that it starts and ends on nice round values. This method\n        typically modifies the scale's domain, and may only extend the bounds to the nearest\n        round value. Nicing is useful if the domain is computed from data and may be\n        irregular. For example, for a domain of *[0.201479…, 0.996679…]*, a nice domain\n        might be *[0.2, 1.0]*.\n\n        For quantitative scales such as linear, ``nice`` can be either a boolean flag or a\n        number. If ``nice`` is a number, it will represent a desired tick count. This allows\n        greater control over the step size used to extend the bounds, guaranteeing that the\n        returned ticks will exactly cover the domain.\n\n        For temporal fields with time and utc scales, the ``nice`` value can be a string\n        indicating the desired time interval. Legal values are ``\"millisecond\"``,\n        ``\"second\"``, ``\"minute\"``, ``\"hour\"``, ``\"day\"``, ``\"week\"``, ``\"month\"``, and\n        ``\"year\"``. Alternatively, ``time`` and ``utc`` scales can accept an object-valued\n        interval specifier of the form ``{\"interval\": \"month\", \"step\": 3}``, which includes\n        a desired number of interval steps. Here, the domain would snap to quarter (Jan,\n        Apr, Jul, Oct) boundaries.\n\n        **Default value:** ``true`` for unbinned *quantitative* fields without explicit\n        domain bounds; ``false`` otherwise.\n    padding : dict, float, :class:`ExprRef`\n        For *`continuous <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__*\n        scales, expands the scale domain to accommodate the specified number of pixels on\n        each of the scale range. The scale range must represent pixels for this parameter to\n        function as intended. Padding adjustment is performed prior to all other\n        adjustments, including the effects of the ``zero``, ``nice``, ``domainMin``, and\n        ``domainMax`` properties.\n\n        For *`band <https://vega.github.io/vega-lite/docs/scale.html#band>`__* scales,\n        shortcut for setting ``paddingInner`` and ``paddingOuter`` to the same value.\n\n        For *`point <https://vega.github.io/vega-lite/docs/scale.html#point>`__* scales,\n        alias for ``paddingOuter``.\n\n        **Default value:** For *continuous* scales, derived from the `scale config\n        <https://vega.github.io/vega-lite/docs/scale.html#config>`__'s\n        ``continuousPadding``. For *band and point* scales, see ``paddingInner`` and\n        ``paddingOuter``. By default, Vega-Lite sets padding such that *width/height =\n        number of unique values * step*.\n    paddingInner : dict, float, :class:`ExprRef`\n        The inner padding (spacing) within each band step of band scales, as a fraction of\n        the step size. This value must lie in the range [0,1].\n\n        For point scale, this property is invalid as point scales do not have internal band\n        widths (only step sizes between bands).\n\n        **Default value:** derived from the `scale config\n        <https://vega.github.io/vega-lite/docs/scale.html#config>`__'s ``bandPaddingInner``.\n    paddingOuter : dict, float, :class:`ExprRef`\n        The outer padding (spacing) at the ends of the range of band and point scales, as a\n        fraction of the step size. This value must lie in the range [0,1].\n\n        **Default value:** derived from the `scale config\n        <https://vega.github.io/vega-lite/docs/scale.html#config>`__'s ``bandPaddingOuter``\n        for band scales and ``pointPadding`` for point scales. By default, Vega-Lite sets\n        outer padding such that *width/height = number of unique values * step*.\n    range : dict, :class:`RangeEnum`, :class:`FieldRange`, Sequence[str, dict, float, Sequence[float], :class:`ExprRef`], Literal['width', 'height', 'symbol', 'category', 'ordinal', 'ramp', 'diverging', 'heatmap']\n        The range of the scale. One of:\n\n        * A string indicating a `pre-defined named scale range\n          <https://vega.github.io/vega-lite/docs/scale.html#range-config>`__ (e.g., example,\n          ``\"symbol\"``, or ``\"diverging\"``).\n\n        * For `continuous scales\n          <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__, two-element\n          array indicating  minimum and maximum values, or an array with more than two\n          entries for specifying a `piecewise scale\n          <https://vega.github.io/vega-lite/docs/scale.html#piecewise>`__.\n\n        * For `discrete <https://vega.github.io/vega-lite/docs/scale.html#discrete>`__ and\n          `discretizing <https://vega.github.io/vega-lite/docs/scale.html#discretizing>`__\n          scales, an array of desired output values or an object with a ``field`` property\n          representing the range values.  For example, if a field ``color`` contains CSS\n          color names, we can set ``range`` to ``{field: \"color\"}``.\n\n        **Notes:**\n\n        1) For color scales you can also specify a color `scheme\n        <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__ instead of ``range``.\n\n        2) Any directly specified ``range`` for ``x`` and ``y`` channels will be ignored.\n        Range can be customized via the view's corresponding `size\n        <https://vega.github.io/vega-lite/docs/size.html>`__ (``width`` and ``height``).\n    rangeMax : str, dict, float, :class:`ExprRef`\n        Sets the maximum value in the scale range, overriding the ``range`` property or the\n        default range. This property is only intended for use with scales having continuous\n        ranges.\n    rangeMin : str, dict, float, :class:`ExprRef`\n        Sets the minimum value in the scale range, overriding the ``range`` property or the\n        default range. This property is only intended for use with scales having continuous\n        ranges.\n    reverse : bool, dict, :class:`ExprRef`\n        If true, reverses the order of the scale range. **Default value:** ``false``.\n    round : bool, dict, :class:`ExprRef`\n        If ``true``, rounds numeric output values to integers. This can be helpful for\n        snapping to the pixel grid.\n\n        **Default value:** ``false``.\n    scheme : dict, :class:`ExprRef`, :class:`Cyclical`, :class:`Diverging`, :class:`Categorical`, :class:`ColorScheme`, :class:`SchemeParams`, :class:`SequentialMultiHue`, :class:`SequentialSingleHue`, Literal['accent', 'category10', 'category20', 'category20b', 'category20c', 'dark2', 'paired', 'pastel1', 'pastel2', 'set1', 'set2', 'set3', 'tableau10', 'tableau20', 'observable10', 'blueorange', 'blueorange-3', 'blueorange-4', 'blueorange-5', 'blueorange-6', 'blueorange-7', 'blueorange-8', 'blueorange-9', 'blueorange-10', 'blueorange-11', 'brownbluegreen', 'brownbluegreen-3', 'brownbluegreen-4', 'brownbluegreen-5', 'brownbluegreen-6', 'brownbluegreen-7', 'brownbluegreen-8', 'brownbluegreen-9', 'brownbluegreen-10', 'brownbluegreen-11', 'purplegreen', 'purplegreen-3', 'purplegreen-4', 'purplegreen-5', 'purplegreen-6', 'purplegreen-7', 'purplegreen-8', 'purplegreen-9', 'purplegreen-10', 'purplegreen-11', 'pinkyellowgreen', 'pinkyellowgreen-3', 'pinkyellowgreen-4', 'pinkyellowgreen-5', 'pinkyellowgreen-6', 'pinkyellowgreen-7', 'pinkyellowgreen-8', 'pinkyellowgreen-9', 'pinkyellowgreen-10', 'pinkyellowgreen-11', 'purpleorange', 'purpleorange-3', 'purpleorange-4', 'purpleorange-5', 'purpleorange-6', 'purpleorange-7', 'purpleorange-8', 'purpleorange-9', 'purpleorange-10', 'purpleorange-11', 'redblue', 'redblue-3', 'redblue-4', 'redblue-5', 'redblue-6', 'redblue-7', 'redblue-8', 'redblue-9', 'redblue-10', 'redblue-11', 'redgrey', 'redgrey-3', 'redgrey-4', 'redgrey-5', 'redgrey-6', 'redgrey-7', 'redgrey-8', 'redgrey-9', 'redgrey-10', 'redgrey-11', 'redyellowblue', 'redyellowblue-3', 'redyellowblue-4', 'redyellowblue-5', 'redyellowblue-6', 'redyellowblue-7', 'redyellowblue-8', 'redyellowblue-9', 'redyellowblue-10', 'redyellowblue-11', 'redyellowgreen', 'redyellowgreen-3', 'redyellowgreen-4', 'redyellowgreen-5', 'redyellowgreen-6', 'redyellowgreen-7', 'redyellowgreen-8', 'redyellowgreen-9', 'redyellowgreen-10', 'redyellowgreen-11', 'spectral', 'spectral-3', 'spectral-4', 'spectral-5', 'spectral-6', 'spectral-7', 'spectral-8', 'spectral-9', 'spectral-10', 'spectral-11', 'blues', 'tealblues', 'teals', 'greens', 'browns', 'greys', 'purples', 'warmgreys', 'reds', 'oranges', 'rainbow', 'sinebow', 'turbo', 'viridis', 'inferno', 'magma', 'plasma', 'cividis', 'bluegreen', 'bluegreen-3', 'bluegreen-4', 'bluegreen-5', 'bluegreen-6', 'bluegreen-7', 'bluegreen-8', 'bluegreen-9', 'bluepurple', 'bluepurple-3', 'bluepurple-4', 'bluepurple-5', 'bluepurple-6', 'bluepurple-7', 'bluepurple-8', 'bluepurple-9', 'goldgreen', 'goldgreen-3', 'goldgreen-4', 'goldgreen-5', 'goldgreen-6', 'goldgreen-7', 'goldgreen-8', 'goldgreen-9', 'goldorange', 'goldorange-3', 'goldorange-4', 'goldorange-5', 'goldorange-6', 'goldorange-7', 'goldorange-8', 'goldorange-9', 'goldred', 'goldred-3', 'goldred-4', 'goldred-5', 'goldred-6', 'goldred-7', 'goldred-8', 'goldred-9', 'greenblue', 'greenblue-3', 'greenblue-4', 'greenblue-5', 'greenblue-6', 'greenblue-7', 'greenblue-8', 'greenblue-9', 'orangered', 'orangered-3', 'orangered-4', 'orangered-5', 'orangered-6', 'orangered-7', 'orangered-8', 'orangered-9', 'purplebluegreen', 'purplebluegreen-3', 'purplebluegreen-4', 'purplebluegreen-5', 'purplebluegreen-6', 'purplebluegreen-7', 'purplebluegreen-8', 'purplebluegreen-9', 'purpleblue', 'purpleblue-3', 'purpleblue-4', 'purpleblue-5', 'purpleblue-6', 'purpleblue-7', 'purpleblue-8', 'purpleblue-9', 'purplered', 'purplered-3', 'purplered-4', 'purplered-5', 'purplered-6', 'purplered-7', 'purplered-8', 'purplered-9', 'redpurple', 'redpurple-3', 'redpurple-4', 'redpurple-5', 'redpurple-6', 'redpurple-7', 'redpurple-8', 'redpurple-9', 'yellowgreenblue', 'yellowgreenblue-3', 'yellowgreenblue-4', 'yellowgreenblue-5', 'yellowgreenblue-6', 'yellowgreenblue-7', 'yellowgreenblue-8', 'yellowgreenblue-9', 'yellowgreen', 'yellowgreen-3', 'yellowgreen-4', 'yellowgreen-5', 'yellowgreen-6', 'yellowgreen-7', 'yellowgreen-8', 'yellowgreen-9', 'yelloworangebrown', 'yelloworangebrown-3', 'yelloworangebrown-4', 'yelloworangebrown-5', 'yelloworangebrown-6', 'yelloworangebrown-7', 'yelloworangebrown-8', 'yelloworangebrown-9', 'yelloworangered', 'yelloworangered-3', 'yelloworangered-4', 'yelloworangered-5', 'yelloworangered-6', 'yelloworangered-7', 'yelloworangered-8', 'yelloworangered-9', 'darkblue', 'darkblue-3', 'darkblue-4', 'darkblue-5', 'darkblue-6', 'darkblue-7', 'darkblue-8', 'darkblue-9', 'darkgold', 'darkgold-3', 'darkgold-4', 'darkgold-5', 'darkgold-6', 'darkgold-7', 'darkgold-8', 'darkgold-9', 'darkgreen', 'darkgreen-3', 'darkgreen-4', 'darkgreen-5', 'darkgreen-6', 'darkgreen-7', 'darkgreen-8', 'darkgreen-9', 'darkmulti', 'darkmulti-3', 'darkmulti-4', 'darkmulti-5', 'darkmulti-6', 'darkmulti-7', 'darkmulti-8', 'darkmulti-9', 'darkred', 'darkred-3', 'darkred-4', 'darkred-5', 'darkred-6', 'darkred-7', 'darkred-8', 'darkred-9', 'lightgreyred', 'lightgreyred-3', 'lightgreyred-4', 'lightgreyred-5', 'lightgreyred-6', 'lightgreyred-7', 'lightgreyred-8', 'lightgreyred-9', 'lightgreyteal', 'lightgreyteal-3', 'lightgreyteal-4', 'lightgreyteal-5', 'lightgreyteal-6', 'lightgreyteal-7', 'lightgreyteal-8', 'lightgreyteal-9', 'lightmulti', 'lightmulti-3', 'lightmulti-4', 'lightmulti-5', 'lightmulti-6', 'lightmulti-7', 'lightmulti-8', 'lightmulti-9', 'lightorange', 'lightorange-3', 'lightorange-4', 'lightorange-5', 'lightorange-6', 'lightorange-7', 'lightorange-8', 'lightorange-9', 'lighttealblue', 'lighttealblue-3', 'lighttealblue-4', 'lighttealblue-5', 'lighttealblue-6', 'lighttealblue-7', 'lighttealblue-8', 'lighttealblue-9']\n        A string indicating a color `scheme\n        <https://vega.github.io/vega-lite/docs/scale.html#scheme>`__ name (e.g.,\n        ``\"category10\"`` or ``\"blues\"``) or a `scheme parameter object\n        <https://vega.github.io/vega-lite/docs/scale.html#scheme-params>`__.\n\n        Discrete color schemes may be used with `discrete\n        <https://vega.github.io/vega-lite/docs/scale.html#discrete>`__ or `discretizing\n        <https://vega.github.io/vega-lite/docs/scale.html#discretizing>`__ scales.\n        Continuous color schemes are intended for use with color scales.\n\n        To set a custom scheme, instead set the list of values `as the scale range\n        <https://vega.github.io/vega-lite/docs/scale.html#2-setting-the-range-property-to-an-array-of-valid-css-color-strings>`__.\n\n        For the full list of supported schemes, please refer to the `Vega Scheme\n        <https://vega.github.io/vega/docs/schemes/#reference>`__ reference.\n    type : :class:`ScaleType`, Literal['linear', 'log', 'pow', 'sqrt', 'symlog', 'identity', 'sequential', 'time', 'utc', 'quantile', 'quantize', 'threshold', 'bin-ordinal', 'ordinal', 'point', 'band']\n        The type of scale. Vega-Lite supports the following categories of scale types:\n\n        1) `Continuous Scales\n        <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ -- mapping\n        continuous domains to continuous output ranges (`\"linear\"\n        <https://vega.github.io/vega-lite/docs/scale.html#linear>`__, `\"pow\"\n        <https://vega.github.io/vega-lite/docs/scale.html#pow>`__, `\"sqrt\"\n        <https://vega.github.io/vega-lite/docs/scale.html#sqrt>`__, `\"symlog\"\n        <https://vega.github.io/vega-lite/docs/scale.html#symlog>`__, `\"log\"\n        <https://vega.github.io/vega-lite/docs/scale.html#log>`__, `\"time\"\n        <https://vega.github.io/vega-lite/docs/scale.html#time>`__, `\"utc\"\n        <https://vega.github.io/vega-lite/docs/scale.html#utc>`__.\n\n        2) `Discrete Scales <https://vega.github.io/vega-lite/docs/scale.html#discrete>`__\n        -- mapping discrete domains to discrete (`\"ordinal\"\n        <https://vega.github.io/vega-lite/docs/scale.html#ordinal>`__) or continuous\n        (`\"band\" <https://vega.github.io/vega-lite/docs/scale.html#band>`__ and `\"point\"\n        <https://vega.github.io/vega-lite/docs/scale.html#point>`__) output ranges.\n\n        3) `Discretizing Scales\n        <https://vega.github.io/vega-lite/docs/scale.html#discretizing>`__ -- mapping\n        continuous domains to discrete output ranges `\"bin-ordinal\"\n        <https://vega.github.io/vega-lite/docs/scale.html#bin-ordinal>`__, `\"quantile\"\n        <https://vega.github.io/vega-lite/docs/scale.html#quantile>`__, `\"quantize\"\n        <https://vega.github.io/vega-lite/docs/scale.html#quantize>`__ and `\"threshold\"\n        <https://vega.github.io/vega-lite/docs/scale.html#threshold>`__.\n\n        **Default value:** please see the `scale type table\n        <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n    zero : bool, dict, :class:`ExprRef`\n        If ``true``, ensures that a zero baseline value is included in the scale domain.\n\n        **Default value:** ``true`` for x and y channels if the quantitative field is not\n        binned and no custom ``domain`` is provided; ``false`` otherwise.\n\n        **Note:** Log, time, and utc scales do not support ``zero``.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Scale\"}\n\n    def __init__(\n        self,\n        align: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        base: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bins: Optional[SchemaBase | Sequence[float] | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        constant: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domain: Optional[\n            Parameter\n            | SchemaBase\n            | Literal[\"unaggregated\"]\n            | Sequence[\n                str | bool | float | Temporal | Parameter | SchemaBase | Map | None\n            ]\n            | Map\n        ] = Undefined,\n        domainMax: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainMid: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        domainMin: Optional[\n            float | Temporal | Parameter | SchemaBase | Map\n        ] = Undefined,\n        domainRaw: Optional[Parameter | SchemaBase | Map] = Undefined,\n        exponent: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[\n            Parameter | SchemaBase | Map | ScaleInterpolateEnum_T\n        ] = Undefined,\n        nice: Optional[\n            bool | float | Parameter | SchemaBase | Map | TimeInterval_T\n        ] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        paddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        range: Optional[\n            SchemaBase\n            | Sequence[str | float | Parameter | SchemaBase | Sequence[float] | Map]\n            | Map\n            | RangeEnum_T\n        ] = Undefined,\n        rangeMax: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        rangeMin: Optional[str | float | Parameter | SchemaBase | Map] = Undefined,\n        reverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        scheme: Optional[Parameter | SchemaBase | Map | ColorScheme_T] = Undefined,\n        type: Optional[SchemaBase | ScaleType_T] = Undefined,\n        zero: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            align=align,\n            base=base,\n            bins=bins,\n            clamp=clamp,\n            constant=constant,\n            domain=domain,\n            domainMax=domainMax,\n            domainMid=domainMid,\n            domainMin=domainMin,\n            domainRaw=domainRaw,\n            exponent=exponent,\n            interpolate=interpolate,\n            nice=nice,\n            padding=padding,\n            paddingInner=paddingInner,\n            paddingOuter=paddingOuter,\n            range=range,\n            rangeMax=rangeMax,\n            rangeMin=rangeMin,\n            reverse=reverse,\n            round=round,\n            scheme=scheme,\n            type=type,\n            zero=zero,\n            **kwds,\n        )\n\n\nclass ScaleBins(VegaLiteSchema):\n    \"\"\"ScaleBins schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ScaleBins\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleBinParams(ScaleBins):\n    \"\"\"\n    ScaleBinParams schema wrapper.\n\n    Parameters\n    ----------\n    step : float\n        The step size defining the bin interval width.\n    start : float\n        The starting (lowest-valued) bin boundary.\n\n        **Default value:** The lowest value of the scale domain will be used.\n    stop : float\n        The stopping (highest-valued) bin boundary.\n\n        **Default value:** The highest value of the scale domain will be used.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ScaleBinParams\"}\n\n    def __init__(\n        self,\n        step: Optional[float] = Undefined,\n        start: Optional[float] = Undefined,\n        stop: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(step=step, start=start, stop=stop, **kwds)\n\n\nclass ScaleConfig(VegaLiteSchema):\n    \"\"\"\n    ScaleConfig schema wrapper.\n\n    Parameters\n    ----------\n    animationDuration : float\n        Default animation duration (in seconds) for time encodings, except for `band\n        <https://vega.github.io/vega-lite/docs/scale.html#band>`__ scales.\n\n        **Default value:** ``5``\n    bandPaddingInner : dict, float, :class:`ExprRef`\n        Default inner padding for ``x`` and ``y`` band scales.\n\n        **Default value:**\n\n        * ``nestedOffsetPaddingInner`` for x/y scales with nested x/y offset scales.\n        * ``barBandPaddingInner`` for bar marks (``0.1`` by default)\n        * ``rectBandPaddingInner`` for rect and other marks (``0`` by default)\n    bandPaddingOuter : dict, float, :class:`ExprRef`\n        Default outer padding for ``x`` and ``y`` band scales.\n\n        **Default value:** ``paddingInner/2`` (which makes *width/height = number of unique\n        values * step*)\n    bandWithNestedOffsetPaddingInner : dict, float, :class:`ExprRef`\n        Default inner padding for ``x`` and ``y`` band scales with nested ``xOffset`` and\n        ``yOffset`` encoding.\n\n        **Default value:** ``0.2``\n    bandWithNestedOffsetPaddingOuter : dict, float, :class:`ExprRef`\n        Default outer padding for ``x`` and ``y`` band scales with nested ``xOffset`` and\n        ``yOffset`` encoding.\n\n        **Default value:** ``0.2``\n    barBandPaddingInner : dict, float, :class:`ExprRef`\n        Default inner padding for ``x`` and ``y`` band-ordinal scales of ``\"bar\"`` marks.\n\n        **Default value:** ``0.1``\n    clamp : bool, dict, :class:`ExprRef`\n        If true, values that exceed the data domain are clamped to either the minimum or\n        maximum range value\n    continuousPadding : dict, float, :class:`ExprRef`\n        Default padding for continuous x/y scales.\n\n        **Default:** The bar width for continuous x-scale of a vertical bar and continuous\n        y-scale of a horizontal bar.; ``0`` otherwise.\n    framesPerSecond : float\n        Default framerate (frames per second) for time `band\n        <https://vega.github.io/vega-lite/docs/scale.html#band>`__ scales.\n\n        **Default value:** ``2``\n    invalid : dict, :class:`ScaleInvalidDataConfig`\n        An object that defines scale outputs per channel for invalid values (nulls and NaNs\n        on a continuous scale).\n\n        * The keys in this object are the scale channels.\n        * The values is either ``\"zero-or-min\"`` (use zero if the scale includes zero or min\n          value otherwise) or a value definition ``{value: ...}``.\n\n        *Example:* Setting this ``config.scale.invalid`` property to ``{color: {value:\n        '#aaa'}}`` will make the visualization color all invalid values with '#aaa'.\n\n        See [https://vega.github.io/vega-lite/docs/invalid-data.html](Invalid Data Docs) for\n        more details.\n    maxBandSize : float\n        The default max value for mapping quantitative fields to bar's size/bandSize.\n\n        If undefined (default), we will use the axis's size (width or height) - 1.\n    maxFontSize : float\n        The default max value for mapping quantitative fields to text's size/fontSize scale.\n\n        **Default value:** ``40``\n    maxOpacity : float\n        Default max opacity for mapping a field to opacity.\n\n        **Default value:** ``0.8``\n    maxSize : float\n        Default max value for point size scale.\n    maxStrokeWidth : float\n        Default max strokeWidth for the scale of strokeWidth for rule and line marks and of\n        size for trail marks.\n\n        **Default value:** ``4``\n    minBandSize : float\n        The default min value for mapping quantitative fields to bar and tick's\n        size/bandSize scale.\n\n        **Default value:** ``2``\n    minFontSize : float\n        The default min value for mapping quantitative fields to text's size/fontSize scale.\n\n        **Default value:** ``8``\n    minOpacity : float\n        Default minimum opacity for mapping a field to opacity.\n\n        **Default value:** ``0.3``\n    minSize : float\n        Default minimum value for point size scale.\n\n        **Default value:** ``9``\n    minStrokeWidth : float\n        Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and\n        of size for trail marks.\n\n        **Default value:** ``1``\n    offsetBandPaddingInner : dict, float, :class:`ExprRef`\n        Default padding inner for xOffset/yOffset's band scales.\n\n        **Default Value:** ``0``\n    offsetBandPaddingOuter : dict, float, :class:`ExprRef`\n        Default padding outer for xOffset/yOffset's band scales.\n\n        **Default Value:** ``0``\n    pointPadding : dict, float, :class:`ExprRef`\n        Default outer padding for ``x`` and ``y`` point-ordinal scales.\n\n        **Default value:** ``0.5`` (which makes *width/height = number of unique values *\n        step*)\n    quantileCount : float\n        Default range cardinality for `quantile\n        <https://vega.github.io/vega-lite/docs/scale.html#quantile>`__ scale.\n\n        **Default value:** ``4``\n    quantizeCount : float\n        Default range cardinality for `quantize\n        <https://vega.github.io/vega-lite/docs/scale.html#quantize>`__ scale.\n\n        **Default value:** ``4``\n    rectBandPaddingInner : dict, float, :class:`ExprRef`\n        Default inner padding for ``x`` and ``y`` band-ordinal scales of ``\"rect\"`` marks.\n\n        **Default value:** ``0``\n    round : bool, dict, :class:`ExprRef`\n        If true, rounds numeric output values to integers. This can be helpful for snapping\n        to the pixel grid. (Only available for ``x``, ``y``, and ``size`` scales.)\n    tickBandPaddingInner : dict, float, :class:`ExprRef`\n        Default inner padding for ``x`` and ``y`` band-ordinal scales of ``\"tick\"`` marks.\n\n        **Default value:** ``0.25``\n    useUnaggregatedDomain : bool\n        Use the source data range before aggregation as scale domain instead of aggregated\n        data for aggregate axis.\n\n        This is equivalent to setting ``domain`` to ``\"unaggregate\"`` for aggregated\n        *quantitative* fields by default.\n\n        This property only works with aggregate functions that produce values within the raw\n        data domain (``\"mean\"``, ``\"average\"``, ``\"median\"``, ``\"q1\"``, ``\"q3\"``, ``\"min\"``,\n        ``\"max\"``). For other aggregations that produce values outside of the raw data\n        domain (e.g. ``\"count\"``, ``\"sum\"``), this property is ignored.\n\n        **Default value:** ``false``\n    xReverse : bool, dict, :class:`ExprRef`\n        Reverse x-scale by default (useful for right-to-left charts).\n    zero : bool\n        Default ``scale.zero`` for `continuous\n        <https://vega.github.io/vega-lite/docs/scale.html#continuous>`__ scales except for\n        (1) x/y-scales of non-ranged bar or area charts and (2) size scales.\n\n        **Default value:** ``true``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ScaleConfig\"}\n\n    def __init__(\n        self,\n        animationDuration: Optional[float] = Undefined,\n        bandPaddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bandPaddingOuter: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        bandWithNestedOffsetPaddingInner: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        bandWithNestedOffsetPaddingOuter: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        barBandPaddingInner: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        clamp: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        continuousPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        framesPerSecond: Optional[float] = Undefined,\n        invalid: Optional[SchemaBase | Map] = Undefined,\n        maxBandSize: Optional[float] = Undefined,\n        maxFontSize: Optional[float] = Undefined,\n        maxOpacity: Optional[float] = Undefined,\n        maxSize: Optional[float] = Undefined,\n        maxStrokeWidth: Optional[float] = Undefined,\n        minBandSize: Optional[float] = Undefined,\n        minFontSize: Optional[float] = Undefined,\n        minOpacity: Optional[float] = Undefined,\n        minSize: Optional[float] = Undefined,\n        minStrokeWidth: Optional[float] = Undefined,\n        offsetBandPaddingInner: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        offsetBandPaddingOuter: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        pointPadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        quantileCount: Optional[float] = Undefined,\n        quantizeCount: Optional[float] = Undefined,\n        rectBandPaddingInner: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        round: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        tickBandPaddingInner: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        useUnaggregatedDomain: Optional[bool] = Undefined,\n        xReverse: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        zero: Optional[bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            animationDuration=animationDuration,\n            bandPaddingInner=bandPaddingInner,\n            bandPaddingOuter=bandPaddingOuter,\n            bandWithNestedOffsetPaddingInner=bandWithNestedOffsetPaddingInner,\n            bandWithNestedOffsetPaddingOuter=bandWithNestedOffsetPaddingOuter,\n            barBandPaddingInner=barBandPaddingInner,\n            clamp=clamp,\n            continuousPadding=continuousPadding,\n            framesPerSecond=framesPerSecond,\n            invalid=invalid,\n            maxBandSize=maxBandSize,\n            maxFontSize=maxFontSize,\n            maxOpacity=maxOpacity,\n            maxSize=maxSize,\n            maxStrokeWidth=maxStrokeWidth,\n            minBandSize=minBandSize,\n            minFontSize=minFontSize,\n            minOpacity=minOpacity,\n            minSize=minSize,\n            minStrokeWidth=minStrokeWidth,\n            offsetBandPaddingInner=offsetBandPaddingInner,\n            offsetBandPaddingOuter=offsetBandPaddingOuter,\n            pointPadding=pointPadding,\n            quantileCount=quantileCount,\n            quantizeCount=quantizeCount,\n            rectBandPaddingInner=rectBandPaddingInner,\n            round=round,\n            tickBandPaddingInner=tickBandPaddingInner,\n            useUnaggregatedDomain=useUnaggregatedDomain,\n            xReverse=xReverse,\n            zero=zero,\n            **kwds,\n        )\n\n\nclass ScaleDatumDef(OffsetDef):\n    \"\"\"\n    ScaleDatumDef schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ScaleDatumDef\"}\n\n    def __init__(\n        self,\n        bandPosition: Optional[float] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            bandPosition=bandPosition,\n            datum=datum,\n            scale=scale,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass ScaleFieldDef(OffsetDef):\n    r\"\"\"\n    ScaleFieldDef schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ScaleFieldDef\"}\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass ScaleInterpolateEnum(VegaLiteSchema):\n    \"\"\"ScaleInterpolateEnum schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ScaleInterpolateEnum\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass ScaleInterpolateParams(VegaLiteSchema):\n    \"\"\"\n    ScaleInterpolateParams schema wrapper.\n\n    Parameters\n    ----------\n    type : Literal['rgb', 'cubehelix', 'cubehelix-long']\n\n    gamma : float\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ScaleInterpolateParams\"}\n\n    def __init__(\n        self,\n        type: Optional[Literal[\"rgb\", \"cubehelix\", \"cubehelix-long\"]] = Undefined,\n        gamma: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(type=type, gamma=gamma, **kwds)\n\n\nclass ScaleInvalidDataConfig(VegaLiteSchema):\n    \"\"\"\n    ScaleInvalidDataConfig schema wrapper.\n\n    Parameters\n    ----------\n    angle : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsangle`, :class:`ScaleInvalidDataShowAsValueangle`\n\n    color : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAscolor`, :class:`ScaleInvalidDataShowAsValuecolor`\n\n    fill : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsfill`, :class:`ScaleInvalidDataShowAsValuefill`\n\n    fillOpacity : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsfillOpacity`, :class:`ScaleInvalidDataShowAsValuefillOpacity`\n\n    opacity : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsopacity`, :class:`ScaleInvalidDataShowAsValueopacity`\n\n    radius : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsradius`, :class:`ScaleInvalidDataShowAsValueradius`\n\n    shape : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsshape`, :class:`ScaleInvalidDataShowAsValueshape`\n\n    size : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAssize`, :class:`ScaleInvalidDataShowAsValuesize`\n\n    stroke : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsstroke`, :class:`ScaleInvalidDataShowAsValuestroke`\n\n    strokeDash : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsstrokeDash`, :class:`ScaleInvalidDataShowAsValuestrokeDash`\n\n    strokeOpacity : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsstrokeOpacity`, :class:`ScaleInvalidDataShowAsValuestrokeOpacity`\n\n    strokeWidth : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsstrokeWidth`, :class:`ScaleInvalidDataShowAsValuestrokeWidth`\n\n    theta : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAstheta`, :class:`ScaleInvalidDataShowAsValuetheta`\n\n    time : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAstime`, :class:`ScaleInvalidDataShowAsValuetime`\n\n    x : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsx`, :class:`ScaleInvalidDataShowAsValuex`\n\n    xOffset : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsxOffset`, :class:`ScaleInvalidDataShowAsValuexOffset`\n\n    y : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsy`, :class:`ScaleInvalidDataShowAsValuey`\n\n    yOffset : dict, Literal['zero-or-min'], :class:`ScaleInvalidDataShowAsyOffset`, :class:`ScaleInvalidDataShowAsValueyOffset`\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ScaleInvalidDataConfig\"}\n\n    def __init__(\n        self,\n        angle: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        color: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        fill: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        fillOpacity: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        opacity: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        radius: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        shape: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        size: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        stroke: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        strokeDash: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        strokeOpacity: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        strokeWidth: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        theta: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        time: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        x: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        xOffset: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        y: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        yOffset: Optional[SchemaBase | Literal[\"zero-or-min\"] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            angle=angle,\n            color=color,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            opacity=opacity,\n            radius=radius,\n            shape=shape,\n            size=size,\n            stroke=stroke,\n            strokeDash=strokeDash,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            theta=theta,\n            time=time,\n            x=x,\n            xOffset=xOffset,\n            y=y,\n            yOffset=yOffset,\n            **kwds,\n        )\n\n\nclass ScaleInvalidDataShowAsangle(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAsangle schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"angle\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValueangle(ScaleInvalidDataShowAsangle):\n    \"\"\"\n    ScaleInvalidDataShowAsValueangle schema wrapper.\n\n    Parameters\n    ----------\n    value : float\n        The rotation angle of the text, in degrees.\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"angle\">'}\n\n    def __init__(self, value: Optional[float] = Undefined, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAscolor(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAscolor schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"color\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValuecolor(ScaleInvalidDataShowAscolor):\n    \"\"\"\n    ScaleInvalidDataShowAsValuecolor schema wrapper.\n\n    Parameters\n    ----------\n    value : str, dict, :class:`Color`, :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']\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"color\">'}\n\n    def __init__(\n        self, value: Optional[str | SchemaBase | Map | ColorName_T] = Undefined, **kwds\n    ):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAsfill(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAsfill schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"fill\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValuefill(ScaleInvalidDataShowAsfill):\n    \"\"\"\n    ScaleInvalidDataShowAsValuefill schema wrapper.\n\n    Parameters\n    ----------\n    value : str, dict, :class:`Color`, :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\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"fill\">'}\n\n    def __init__(\n        self,\n        value: Optional[str | SchemaBase | Map | ColorName_T | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAsfillOpacity(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAsfillOpacity schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"fillOpacity\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValuefillOpacity(ScaleInvalidDataShowAsfillOpacity):\n    \"\"\"\n    ScaleInvalidDataShowAsValuefillOpacity schema wrapper.\n\n    Parameters\n    ----------\n    value : float\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"fillOpacity\">'}\n\n    def __init__(self, value: Optional[float] = Undefined, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAsopacity(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAsopacity schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"opacity\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValueopacity(ScaleInvalidDataShowAsopacity):\n    \"\"\"\n    ScaleInvalidDataShowAsValueopacity schema wrapper.\n\n    Parameters\n    ----------\n    value : float\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"opacity\">'}\n\n    def __init__(self, value: Optional[float] = Undefined, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAsradius(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAsradius schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"radius\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValueradius(ScaleInvalidDataShowAsradius):\n    \"\"\"\n    ScaleInvalidDataShowAsValueradius schema wrapper.\n\n    Parameters\n    ----------\n    value : float\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"radius\">'}\n\n    def __init__(self, value: Optional[float] = Undefined, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAsshape(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAsshape schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"shape\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValueshape(ScaleInvalidDataShowAsshape):\n    \"\"\"\n    ScaleInvalidDataShowAsValueshape schema wrapper.\n\n    Parameters\n    ----------\n    value : str, :class:`SymbolShape`\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"shape\">'}\n\n    def __init__(self, value: Optional[str | SchemaBase] = Undefined, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAssize(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAssize schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"size\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValuesize(ScaleInvalidDataShowAssize):\n    \"\"\"\n    ScaleInvalidDataShowAsValuesize schema wrapper.\n\n    Parameters\n    ----------\n    value : float\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"size\">'}\n\n    def __init__(self, value: Optional[float] = Undefined, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAsstroke(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAsstroke schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"stroke\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValuestroke(ScaleInvalidDataShowAsstroke):\n    \"\"\"\n    ScaleInvalidDataShowAsValuestroke schema wrapper.\n\n    Parameters\n    ----------\n    value : str, dict, :class:`Color`, :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\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"stroke\">'}\n\n    def __init__(\n        self,\n        value: Optional[str | SchemaBase | Map | ColorName_T | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAsstrokeDash(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAsstrokeDash schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"strokeDash\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValuestrokeDash(ScaleInvalidDataShowAsstrokeDash):\n    \"\"\"\n    ScaleInvalidDataShowAsValuestrokeDash schema wrapper.\n\n    Parameters\n    ----------\n    value : Sequence[float]\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"strokeDash\">'}\n\n    def __init__(self, value: Optional[Sequence[float]] = Undefined, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAsstrokeOpacity(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAsstrokeOpacity schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"strokeOpacity\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValuestrokeOpacity(ScaleInvalidDataShowAsstrokeOpacity):\n    \"\"\"\n    ScaleInvalidDataShowAsValuestrokeOpacity schema wrapper.\n\n    Parameters\n    ----------\n    value : float\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"strokeOpacity\">'}\n\n    def __init__(self, value: Optional[float] = Undefined, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAsstrokeWidth(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAsstrokeWidth schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"strokeWidth\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValuestrokeWidth(ScaleInvalidDataShowAsstrokeWidth):\n    \"\"\"\n    ScaleInvalidDataShowAsValuestrokeWidth schema wrapper.\n\n    Parameters\n    ----------\n    value : float\n        The stroke width, in pixels.\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"strokeWidth\">'}\n\n    def __init__(self, value: Optional[float] = Undefined, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAstheta(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAstheta schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"theta\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValuetheta(ScaleInvalidDataShowAstheta):\n    \"\"\"\n    ScaleInvalidDataShowAsValuetheta schema wrapper.\n\n    Parameters\n    ----------\n    value : float\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"theta\">'}\n\n    def __init__(self, value: Optional[float] = Undefined, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAstime(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAstime schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"time\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValuetime(ScaleInvalidDataShowAstime):\n    \"\"\"\n    ScaleInvalidDataShowAsValuetime schema wrapper.\n\n    Parameters\n    ----------\n    value : float\n\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"time\">'}\n\n    def __init__(self, value: Optional[float] = Undefined, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAsx(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAsx schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"x\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValuex(ScaleInvalidDataShowAsx):\n    \"\"\"\n    ScaleInvalidDataShowAsValuex schema wrapper.\n\n    Parameters\n    ----------\n    value : float, Literal['width']\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"x\">'}\n\n    def __init__(self, value: Optional[float | Literal[\"width\"]] = Undefined, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAsxOffset(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAsxOffset schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"xOffset\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValuexOffset(ScaleInvalidDataShowAsxOffset):\n    \"\"\"\n    ScaleInvalidDataShowAsValuexOffset schema wrapper.\n\n    Parameters\n    ----------\n    value : float\n        Offset for x-position.\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"xOffset\">'}\n\n    def __init__(self, value: Optional[float] = Undefined, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAsy(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAsy schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"y\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValuey(ScaleInvalidDataShowAsy):\n    \"\"\"\n    ScaleInvalidDataShowAsValuey schema wrapper.\n\n    Parameters\n    ----------\n    value : float, Literal['height']\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"y\">'}\n\n    def __init__(self, value: Optional[float | Literal[\"height\"]] = Undefined, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleInvalidDataShowAsyOffset(VegaLiteSchema):\n    \"\"\"ScaleInvalidDataShowAsyOffset schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAs<\"yOffset\">'}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ScaleInvalidDataShowAsValueyOffset(ScaleInvalidDataShowAsyOffset):\n    \"\"\"\n    ScaleInvalidDataShowAsValueyOffset schema wrapper.\n\n    Parameters\n    ----------\n    value : float\n        Offset for y-position.\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ScaleInvalidDataShowAsValue<\"yOffset\">'}\n\n    def __init__(self, value: Optional[float] = Undefined, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nclass ScaleResolveMap(VegaLiteSchema):\n    \"\"\"\n    ScaleResolveMap schema wrapper.\n\n    Parameters\n    ----------\n    angle : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    color : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    fill : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    fillOpacity : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    opacity : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    radius : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    shape : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    size : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    stroke : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    strokeDash : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    strokeOpacity : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    strokeWidth : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    theta : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    time : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    x : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    xOffset : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    y : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    yOffset : :class:`ResolveMode`, Literal['independent', 'shared']\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ScaleResolveMap\"}\n\n    def __init__(\n        self,\n        angle: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        color: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        fill: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        fillOpacity: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        opacity: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        radius: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        shape: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        size: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        stroke: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        strokeDash: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        strokeOpacity: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        strokeWidth: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        theta: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        time: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        x: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        xOffset: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        y: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        yOffset: Optional[SchemaBase | ResolveMode_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            angle=angle,\n            color=color,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            opacity=opacity,\n            radius=radius,\n            shape=shape,\n            size=size,\n            stroke=stroke,\n            strokeDash=strokeDash,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            theta=theta,\n            time=time,\n            x=x,\n            xOffset=xOffset,\n            y=y,\n            yOffset=yOffset,\n            **kwds,\n        )\n\n\nclass ScaleType(VegaLiteSchema):\n    \"\"\"ScaleType schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ScaleType\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass SchemeParams(VegaLiteSchema):\n    \"\"\"\n    SchemeParams schema wrapper.\n\n    Parameters\n    ----------\n    name : :class:`Cyclical`, :class:`Diverging`, :class:`Categorical`, :class:`ColorScheme`, :class:`SequentialMultiHue`, :class:`SequentialSingleHue`, Literal['accent', 'category10', 'category20', 'category20b', 'category20c', 'dark2', 'paired', 'pastel1', 'pastel2', 'set1', 'set2', 'set3', 'tableau10', 'tableau20', 'observable10', 'blueorange', 'blueorange-3', 'blueorange-4', 'blueorange-5', 'blueorange-6', 'blueorange-7', 'blueorange-8', 'blueorange-9', 'blueorange-10', 'blueorange-11', 'brownbluegreen', 'brownbluegreen-3', 'brownbluegreen-4', 'brownbluegreen-5', 'brownbluegreen-6', 'brownbluegreen-7', 'brownbluegreen-8', 'brownbluegreen-9', 'brownbluegreen-10', 'brownbluegreen-11', 'purplegreen', 'purplegreen-3', 'purplegreen-4', 'purplegreen-5', 'purplegreen-6', 'purplegreen-7', 'purplegreen-8', 'purplegreen-9', 'purplegreen-10', 'purplegreen-11', 'pinkyellowgreen', 'pinkyellowgreen-3', 'pinkyellowgreen-4', 'pinkyellowgreen-5', 'pinkyellowgreen-6', 'pinkyellowgreen-7', 'pinkyellowgreen-8', 'pinkyellowgreen-9', 'pinkyellowgreen-10', 'pinkyellowgreen-11', 'purpleorange', 'purpleorange-3', 'purpleorange-4', 'purpleorange-5', 'purpleorange-6', 'purpleorange-7', 'purpleorange-8', 'purpleorange-9', 'purpleorange-10', 'purpleorange-11', 'redblue', 'redblue-3', 'redblue-4', 'redblue-5', 'redblue-6', 'redblue-7', 'redblue-8', 'redblue-9', 'redblue-10', 'redblue-11', 'redgrey', 'redgrey-3', 'redgrey-4', 'redgrey-5', 'redgrey-6', 'redgrey-7', 'redgrey-8', 'redgrey-9', 'redgrey-10', 'redgrey-11', 'redyellowblue', 'redyellowblue-3', 'redyellowblue-4', 'redyellowblue-5', 'redyellowblue-6', 'redyellowblue-7', 'redyellowblue-8', 'redyellowblue-9', 'redyellowblue-10', 'redyellowblue-11', 'redyellowgreen', 'redyellowgreen-3', 'redyellowgreen-4', 'redyellowgreen-5', 'redyellowgreen-6', 'redyellowgreen-7', 'redyellowgreen-8', 'redyellowgreen-9', 'redyellowgreen-10', 'redyellowgreen-11', 'spectral', 'spectral-3', 'spectral-4', 'spectral-5', 'spectral-6', 'spectral-7', 'spectral-8', 'spectral-9', 'spectral-10', 'spectral-11', 'blues', 'tealblues', 'teals', 'greens', 'browns', 'greys', 'purples', 'warmgreys', 'reds', 'oranges', 'rainbow', 'sinebow', 'turbo', 'viridis', 'inferno', 'magma', 'plasma', 'cividis', 'bluegreen', 'bluegreen-3', 'bluegreen-4', 'bluegreen-5', 'bluegreen-6', 'bluegreen-7', 'bluegreen-8', 'bluegreen-9', 'bluepurple', 'bluepurple-3', 'bluepurple-4', 'bluepurple-5', 'bluepurple-6', 'bluepurple-7', 'bluepurple-8', 'bluepurple-9', 'goldgreen', 'goldgreen-3', 'goldgreen-4', 'goldgreen-5', 'goldgreen-6', 'goldgreen-7', 'goldgreen-8', 'goldgreen-9', 'goldorange', 'goldorange-3', 'goldorange-4', 'goldorange-5', 'goldorange-6', 'goldorange-7', 'goldorange-8', 'goldorange-9', 'goldred', 'goldred-3', 'goldred-4', 'goldred-5', 'goldred-6', 'goldred-7', 'goldred-8', 'goldred-9', 'greenblue', 'greenblue-3', 'greenblue-4', 'greenblue-5', 'greenblue-6', 'greenblue-7', 'greenblue-8', 'greenblue-9', 'orangered', 'orangered-3', 'orangered-4', 'orangered-5', 'orangered-6', 'orangered-7', 'orangered-8', 'orangered-9', 'purplebluegreen', 'purplebluegreen-3', 'purplebluegreen-4', 'purplebluegreen-5', 'purplebluegreen-6', 'purplebluegreen-7', 'purplebluegreen-8', 'purplebluegreen-9', 'purpleblue', 'purpleblue-3', 'purpleblue-4', 'purpleblue-5', 'purpleblue-6', 'purpleblue-7', 'purpleblue-8', 'purpleblue-9', 'purplered', 'purplered-3', 'purplered-4', 'purplered-5', 'purplered-6', 'purplered-7', 'purplered-8', 'purplered-9', 'redpurple', 'redpurple-3', 'redpurple-4', 'redpurple-5', 'redpurple-6', 'redpurple-7', 'redpurple-8', 'redpurple-9', 'yellowgreenblue', 'yellowgreenblue-3', 'yellowgreenblue-4', 'yellowgreenblue-5', 'yellowgreenblue-6', 'yellowgreenblue-7', 'yellowgreenblue-8', 'yellowgreenblue-9', 'yellowgreen', 'yellowgreen-3', 'yellowgreen-4', 'yellowgreen-5', 'yellowgreen-6', 'yellowgreen-7', 'yellowgreen-8', 'yellowgreen-9', 'yelloworangebrown', 'yelloworangebrown-3', 'yelloworangebrown-4', 'yelloworangebrown-5', 'yelloworangebrown-6', 'yelloworangebrown-7', 'yelloworangebrown-8', 'yelloworangebrown-9', 'yelloworangered', 'yelloworangered-3', 'yelloworangered-4', 'yelloworangered-5', 'yelloworangered-6', 'yelloworangered-7', 'yelloworangered-8', 'yelloworangered-9', 'darkblue', 'darkblue-3', 'darkblue-4', 'darkblue-5', 'darkblue-6', 'darkblue-7', 'darkblue-8', 'darkblue-9', 'darkgold', 'darkgold-3', 'darkgold-4', 'darkgold-5', 'darkgold-6', 'darkgold-7', 'darkgold-8', 'darkgold-9', 'darkgreen', 'darkgreen-3', 'darkgreen-4', 'darkgreen-5', 'darkgreen-6', 'darkgreen-7', 'darkgreen-8', 'darkgreen-9', 'darkmulti', 'darkmulti-3', 'darkmulti-4', 'darkmulti-5', 'darkmulti-6', 'darkmulti-7', 'darkmulti-8', 'darkmulti-9', 'darkred', 'darkred-3', 'darkred-4', 'darkred-5', 'darkred-6', 'darkred-7', 'darkred-8', 'darkred-9', 'lightgreyred', 'lightgreyred-3', 'lightgreyred-4', 'lightgreyred-5', 'lightgreyred-6', 'lightgreyred-7', 'lightgreyred-8', 'lightgreyred-9', 'lightgreyteal', 'lightgreyteal-3', 'lightgreyteal-4', 'lightgreyteal-5', 'lightgreyteal-6', 'lightgreyteal-7', 'lightgreyteal-8', 'lightgreyteal-9', 'lightmulti', 'lightmulti-3', 'lightmulti-4', 'lightmulti-5', 'lightmulti-6', 'lightmulti-7', 'lightmulti-8', 'lightmulti-9', 'lightorange', 'lightorange-3', 'lightorange-4', 'lightorange-5', 'lightorange-6', 'lightorange-7', 'lightorange-8', 'lightorange-9', 'lighttealblue', 'lighttealblue-3', 'lighttealblue-4', 'lighttealblue-5', 'lighttealblue-6', 'lighttealblue-7', 'lighttealblue-8', 'lighttealblue-9']\n        A color scheme name for ordinal scales (e.g., ``\"category10\"`` or ``\"blues\"``).\n\n        For the full list of supported schemes, please refer to the `Vega Scheme\n        <https://vega.github.io/vega/docs/schemes/#reference>`__ reference.\n    count : float\n        The number of colors to use in the scheme. This can be useful for scale types such\n        as ``\"quantize\"``, which use the length of the scale range to determine the number\n        of discrete bins for the scale domain.\n    extent : Sequence[float]\n        The extent of the color range to use. For example ``[0.2, 1]`` will rescale the\n        color scheme such that color values in the range *[0, 0.2)* are excluded from the\n        scheme.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SchemeParams\"}\n\n    def __init__(\n        self,\n        name: Optional[SchemaBase | ColorScheme_T] = Undefined,\n        count: Optional[float] = Undefined,\n        extent: Optional[Sequence[float]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(name=name, count=count, extent=extent, **kwds)\n\n\nclass SecondaryFieldDef(Position2Def):\n    r\"\"\"\n    SecondaryFieldDef schema wrapper.\n\n    A field definition of a secondary channel that shares a scale with another primary channel.\n    For example, ``x2``, ``xError`` and ``xError2`` share the same scale with ``x``.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SecondaryFieldDef\"}\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            **kwds,\n        )\n\n\nclass SelectionConfig(VegaLiteSchema):\n    \"\"\"\n    SelectionConfig schema wrapper.\n\n    Parameters\n    ----------\n    interval : dict, :class:`IntervalSelectionConfigWithoutType`\n        The default definition for an `interval\n        <https://vega.github.io/vega-lite/docs/parameter.html#select>`__ selection. All\n        properties and transformations for an interval selection definition (except\n        ``type``) may be specified here.\n\n        For instance, setting ``interval`` to ``{\"translate\": false}`` disables the ability\n        to move interval selections by default.\n    point : dict, :class:`PointSelectionConfigWithoutType`\n        The default definition for a `point\n        <https://vega.github.io/vega-lite/docs/parameter.html#select>`__ selection. All\n        properties and transformations  for a point selection definition (except ``type``)\n        may be specified here.\n\n        For instance, setting ``point`` to ``{\"on\": \"dblclick\"}`` populates point selections\n        on double-click by default.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SelectionConfig\"}\n\n    def __init__(\n        self,\n        interval: Optional[SchemaBase | Map] = Undefined,\n        point: Optional[SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(interval=interval, point=point, **kwds)\n\n\nclass SelectionInit(VegaLiteSchema):\n    \"\"\"SelectionInit schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SelectionInit\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass DateTime(SelectionInit):\n    \"\"\"\n    DateTime schema wrapper.\n\n    Object for defining datetime in Vega-Lite Filter. If both month and quarter are provided,\n    month has higher precedence. ``day`` cannot be combined with other date. We accept string\n    for month and day names.\n\n    Parameters\n    ----------\n    date : float\n        Integer value representing the date (day of the month) from 1-31.\n    day : str, float, :class:`Day`\n        Value representing the day of a week. This can be one of: (1) integer value -- ``1``\n        represents Monday; (2) case-insensitive day name (e.g., ``\"Monday\"``); (3)\n        case-insensitive, 3-character short day name (e.g., ``\"Mon\"``).\n\n        **Warning:** A DateTime definition object with ``day``** should not be combined with\n        ``year``, ``quarter``, ``month``, or ``date``.\n    hours : float\n        Integer value representing the hour of a day from 0-23.\n    milliseconds : float\n        Integer value representing the millisecond segment of time.\n    minutes : float\n        Integer value representing the minute segment of time from 0-59.\n    month : str, float, :class:`Month`\n        One of: (1) integer value representing the month from ``1``-``12``. ``1`` represents\n        January; (2) case-insensitive month name (e.g., ``\"January\"``); (3)\n        case-insensitive, 3-character short month name (e.g., ``\"Jan\"``).\n    quarter : float\n        Integer value representing the quarter of the year (from 1-4).\n    seconds : float\n        Integer value representing the second segment (0-59) of a time value\n    utc : bool\n        A boolean flag indicating if date time is in utc time. If false, the date time is in\n        local time\n    year : float\n        Integer value representing the year.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/DateTime\"}\n\n    def __init__(\n        self,\n        date: Optional[float] = Undefined,\n        day: Optional[str | float | SchemaBase] = Undefined,\n        hours: Optional[float] = Undefined,\n        milliseconds: Optional[float] = Undefined,\n        minutes: Optional[float] = Undefined,\n        month: Optional[str | float | SchemaBase] = Undefined,\n        quarter: Optional[float] = Undefined,\n        seconds: Optional[float] = Undefined,\n        utc: Optional[bool] = Undefined,\n        year: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            date=date,\n            day=day,\n            hours=hours,\n            milliseconds=milliseconds,\n            minutes=minutes,\n            month=month,\n            quarter=quarter,\n            seconds=seconds,\n            utc=utc,\n            year=year,\n            **kwds,\n        )\n\n\nclass PrimitiveValue(SelectionInit):\n    \"\"\"PrimitiveValue schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/PrimitiveValue\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass SelectionInitInterval(VegaLiteSchema):\n    \"\"\"SelectionInitInterval schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SelectionInitInterval\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass SelectionInitIntervalMapping(VegaLiteSchema):\n    \"\"\"SelectionInitIntervalMapping schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SelectionInitIntervalMapping\"}\n\n    def __init__(self, **kwds):\n        super().__init__(**kwds)\n\n\nclass SelectionInitMapping(VegaLiteSchema):\n    \"\"\"SelectionInitMapping schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SelectionInitMapping\"}\n\n    def __init__(self, **kwds):\n        super().__init__(**kwds)\n\n\nclass SelectionParameter(VegaLiteSchema):\n    \"\"\"\n    SelectionParameter schema wrapper.\n\n    Parameters\n    ----------\n    name : str, :class:`ParameterName`\n        Required. A unique name for the selection parameter. Selection names should be valid\n        JavaScript identifiers: they should contain only alphanumeric characters (or \"$\", or\n        \"_\") and may not start with a digit. Reserved keywords that may not be used as\n        parameter names are \"datum\", \"event\", \"item\", and \"parent\".\n    select : dict, :class:`SelectionType`, Literal['point', 'interval'], :class:`PointSelectionConfig`, :class:`IntervalSelectionConfig`\n        Determines the default event processing and data query for the selection. Vega-Lite\n        currently supports two selection types:\n\n        * ``\"point\"`` -- to select multiple discrete data values; the first value is\n          selected on ``click`` and additional values toggled on shift-click.\n        * ``\"interval\"`` -- to select a continuous range of data values on ``drag``.\n    bind : dict, :class:`Binding`, :class:`BindInput`, :class:`BindRange`, :class:`BindDirect`, :class:`BindCheckbox`, :class:`LegendBinding`, :class:`BindRadioSelect`, Literal['legend', 'scales'], :class:`LegendStreamBinding`\n        When set, a selection is populated by input elements (also known as dynamic query\n        widgets) or by interacting with the corresponding legend. Direct manipulation\n        interaction is disabled by default; to re-enable it, set the selection's `on\n        <https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties>`__\n        property.\n\n        Legend bindings are restricted to selections that only specify a single field or\n        encoding.\n\n        Query widget binding takes the form of Vega's `input element binding definition\n        <https://vega.github.io/vega/docs/signals/#bind>`__ or can be a mapping between\n        projected field/encodings and binding definitions.\n\n        **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__\n        documentation.\n    value : str, bool, dict, float, :class:`DateTime`, :class:`SelectionInit`, :class:`PrimitiveValue`, :class:`SelectionInitIntervalMapping`, Sequence[dict, :class:`SelectionInitMapping`], None\n        Initialize the selection with a mapping between `projected channels or field names\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ and initial\n        values.\n\n        **See also:** `init <https://vega.github.io/vega-lite/docs/value.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SelectionParameter\"}\n\n    def __init__(\n        self,\n        name: Optional[str | SchemaBase] = Undefined,\n        select: Optional[SchemaBase | Map | SelectionType_T] = Undefined,\n        bind: Optional[SchemaBase | Literal[\"legend\", \"scales\"] | Map] = Undefined,\n        value: Optional[\n            Temporal | SchemaBase | Sequence[SchemaBase | Map] | Map | PrimitiveValue_T\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(name=name, select=select, bind=bind, value=value, **kwds)\n\n\nclass SelectionResolution(VegaLiteSchema):\n    \"\"\"SelectionResolution schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SelectionResolution\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass SelectionType(VegaLiteSchema):\n    \"\"\"SelectionType schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SelectionType\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass SequenceGenerator(Generator):\n    \"\"\"\n    SequenceGenerator schema wrapper.\n\n    Parameters\n    ----------\n    sequence : dict, :class:`SequenceParams`\n        Generate a sequence of numbers.\n    name : str\n        Provide a placeholder name and bind data at runtime.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SequenceGenerator\"}\n\n    def __init__(\n        self,\n        sequence: Optional[SchemaBase | Map] = Undefined,\n        name: Optional[str] = Undefined,\n        **kwds,\n    ):\n        super().__init__(sequence=sequence, name=name, **kwds)\n\n\nclass SequenceParams(VegaLiteSchema):\n    \"\"\"\n    SequenceParams schema wrapper.\n\n    Parameters\n    ----------\n    start : float\n        The starting value of the sequence (inclusive).\n    stop : float\n        The ending value of the sequence (exclusive).\n    step : float\n        The step value between sequence entries.\n\n        **Default value:** ``1``\n    as : str, :class:`FieldName`\n        The name of the generated sequence field.\n\n        **Default value:** ``\"data\"``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SequenceParams\"}\n\n    def __init__(\n        self,\n        start: Optional[float] = Undefined,\n        stop: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(start=start, stop=stop, step=step, **kwds)\n\n\nclass SequentialMultiHue(ColorScheme):\n    \"\"\"SequentialMultiHue schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SequentialMultiHue\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass SequentialSingleHue(ColorScheme):\n    \"\"\"SequentialSingleHue schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SequentialSingleHue\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass ShapeDef(VegaLiteSchema):\n    \"\"\"ShapeDef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ShapeDef\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass FieldOrDatumDefWithConditionDatumDefstringnull(\n    MarkPropDefstringnullTypeForShape, ShapeDef\n):\n    \"\"\"\n    FieldOrDatumDefWithConditionDatumDefstringnull schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<DatumDef,(string|null)>\"\n    }\n\n    def __init__(\n        self,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            bandPosition=bandPosition,\n            condition=condition,\n            datum=datum,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull(\n    MarkPropDefstringnullTypeForShape, ShapeDef\n):\n    r\"\"\"\n    FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    legend : dict, :class:`Legend`, None\n        An object defining properties of the legend. If ``null``, the legend for the\n        encoding channel will be removed.\n\n        **Default value:** If undefined, default `legend properties\n        <https://vega.github.io/vega-lite/docs/legend.html>`__ are applied.\n\n        **See also:** `legend <https://vega.github.io/vega-lite/docs/legend.html>`__\n        documentation.\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`TypeForShape`, Literal['nominal', 'ordinal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef<TypeForShape>,(string|null)>\"\n    }\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        legend: Optional[SchemaBase | Map | None] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | TypeForShape_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            legend=legend,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass SharedEncoding(VegaLiteSchema):\n    \"\"\"\n    SharedEncoding schema wrapper.\n\n    Parameters\n    ----------\n    angle : dict\n\n    color : dict\n\n    description : dict\n\n    detail : dict, :class:`FieldDefWithoutScale`, Sequence[dict, :class:`FieldDefWithoutScale`]\n        Additional levels of detail for grouping data in aggregate views and in line, trail,\n        and area marks without mapping data to a specific visual channel.\n    fill : dict\n\n    fillOpacity : dict\n\n    href : dict\n\n    key : dict\n\n    latitude : dict\n\n    latitude2 : dict\n\n    longitude : dict\n\n    longitude2 : dict\n\n    opacity : dict\n\n    order : dict, :class:`OrderOnlyDef`, :class:`OrderFieldDef`, :class:`OrderValueDef`, Sequence[dict, :class:`OrderFieldDef`]\n        Order of the marks.\n\n        * For stacked marks, this ``order`` channel encodes `stack order\n          <https://vega.github.io/vega-lite/docs/stack.html#order>`__.\n        * For line and trail marks, this ``order`` channel encodes order of data points in\n          the lines. This can be useful for creating `a connected scatterplot\n          <https://vega.github.io/vega-lite/examples/connected_scatterplot.html>`__. Setting\n          ``order`` to ``{\"value\": null}`` makes the line marks use the original order in\n          the data sources.\n        * Otherwise, this ``order`` channel encodes layer order of the marks.\n\n        **Note**: In aggregate plots, ``order`` field should be aggregated to avoid creating\n        additional aggregation grouping.\n    radius : dict\n\n    radius2 : dict\n\n    shape : dict\n\n    size : dict\n\n    stroke : dict\n\n    strokeDash : dict\n\n    strokeOpacity : dict\n\n    strokeWidth : dict\n\n    text : dict\n\n    theta : dict\n\n    theta2 : dict\n\n    time : dict\n\n    tooltip : dict, :class:`StringFieldDefWithCondition`, :class:`StringValueDefWithCondition`, Sequence[dict, :class:`StringFieldDef`], None\n        The tooltip text to show upon mouse hover. Specifying ``tooltip`` encoding overrides\n        `the tooltip property in the mark definition\n        <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip in Vega-Lite.\n    url : dict\n\n    x : dict\n\n    x2 : dict\n\n    xError : dict\n\n    xError2 : dict\n\n    xOffset : dict\n\n    y : dict\n\n    y2 : dict\n\n    yError : dict\n\n    yError2 : dict\n\n    yOffset : dict\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SharedEncoding\"}\n\n    def __init__(\n        self,\n        angle: Optional[Map] = Undefined,\n        color: Optional[Map] = Undefined,\n        description: Optional[Map] = Undefined,\n        detail: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        fill: Optional[Map] = Undefined,\n        fillOpacity: Optional[Map] = Undefined,\n        href: Optional[Map] = Undefined,\n        key: Optional[Map] = Undefined,\n        latitude: Optional[Map] = Undefined,\n        latitude2: Optional[Map] = Undefined,\n        longitude: Optional[Map] = Undefined,\n        longitude2: Optional[Map] = Undefined,\n        opacity: Optional[Map] = Undefined,\n        order: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        radius: Optional[Map] = Undefined,\n        radius2: Optional[Map] = Undefined,\n        shape: Optional[Map] = Undefined,\n        size: Optional[Map] = Undefined,\n        stroke: Optional[Map] = Undefined,\n        strokeDash: Optional[Map] = Undefined,\n        strokeOpacity: Optional[Map] = Undefined,\n        strokeWidth: Optional[Map] = Undefined,\n        text: Optional[Map] = Undefined,\n        theta: Optional[Map] = Undefined,\n        theta2: Optional[Map] = Undefined,\n        time: Optional[Map] = Undefined,\n        tooltip: Optional[\n            SchemaBase | Sequence[SchemaBase | Map] | Map | None\n        ] = Undefined,\n        url: Optional[Map] = Undefined,\n        x: Optional[Map] = Undefined,\n        x2: Optional[Map] = Undefined,\n        xError: Optional[Map] = Undefined,\n        xError2: Optional[Map] = Undefined,\n        xOffset: Optional[Map] = Undefined,\n        y: Optional[Map] = Undefined,\n        y2: Optional[Map] = Undefined,\n        yError: Optional[Map] = Undefined,\n        yError2: Optional[Map] = Undefined,\n        yOffset: Optional[Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            angle=angle,\n            color=color,\n            description=description,\n            detail=detail,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            href=href,\n            key=key,\n            latitude=latitude,\n            latitude2=latitude2,\n            longitude=longitude,\n            longitude2=longitude2,\n            opacity=opacity,\n            order=order,\n            radius=radius,\n            radius2=radius2,\n            shape=shape,\n            size=size,\n            stroke=stroke,\n            strokeDash=strokeDash,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            text=text,\n            theta=theta,\n            theta2=theta2,\n            time=time,\n            tooltip=tooltip,\n            url=url,\n            x=x,\n            x2=x2,\n            xError=xError,\n            xError2=xError2,\n            xOffset=xOffset,\n            y=y,\n            y2=y2,\n            yError=yError,\n            yError2=yError2,\n            yOffset=yOffset,\n            **kwds,\n        )\n\n\nclass SingleDefUnitChannel(VegaLiteSchema):\n    \"\"\"SingleDefUnitChannel schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SingleDefUnitChannel\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Sort(VegaLiteSchema):\n    \"\"\"Sort schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Sort\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass AllSortString(Sort):\n    \"\"\"AllSortString schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/AllSortString\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass EncodingSortField(Sort):\n    \"\"\"\n    EncodingSortField schema wrapper.\n\n    A sort definition for sorting a discrete scale in an encoding field definition.\n\n    Parameters\n    ----------\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        The data `field <https://vega.github.io/vega-lite/docs/field.html>`__ to sort by.\n\n        **Default value:** If unspecified, defaults to the field specified in the outer data\n        reference.\n    op : :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        An `aggregate operation\n        <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__ to perform on the\n        field prior to sorting (e.g., ``\"count\"``, ``\"mean\"`` and ``\"median\"``). An\n        aggregation is required when there are multiple values of the sort field for each\n        encoded data field. The input data objects will be aggregated, grouped by the\n        encoded data field.\n\n        For a full list of operations, please see the documentation for `aggregate\n        <https://vega.github.io/vega-lite/docs/aggregate.html#ops>`__.\n\n        **Default value:** ``\"sum\"`` for stacked plots. Otherwise, ``\"min\"``.\n    order : :class:`SortOrder`, Literal['ascending', 'descending'], None\n        The sort order. One of ``\"ascending\"`` (default), ``\"descending\"``, or ``null`` (do\n        not sort).\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/EncodingSortField\"}\n\n    def __init__(\n        self,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        op: Optional[SchemaBase | NonArgAggregateOp_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(field=field, op=op, order=order, **kwds)\n\n\nclass SortArray(Sort):\n    \"\"\"SortArray schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SortArray\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass SortByChannel(AllSortString):\n    \"\"\"SortByChannel schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SortByChannel\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass SortByChannelDesc(AllSortString):\n    \"\"\"SortByChannelDesc schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SortByChannelDesc\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass SortByEncoding(Sort):\n    \"\"\"\n    SortByEncoding schema wrapper.\n\n    Parameters\n    ----------\n    encoding : :class:`SortByChannel`, Literal['x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text']\n        The `encoding channel\n        <https://vega.github.io/vega-lite/docs/encoding.html#channels>`__ to sort by (e.g.,\n        ``\"x\"``, ``\"y\"``)\n    order : :class:`SortOrder`, Literal['ascending', 'descending'], None\n        The sort order. One of ``\"ascending\"`` (default), ``\"descending\"``, or ``null`` (do\n        not sort).\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SortByEncoding\"}\n\n    def __init__(\n        self,\n        encoding: Optional[SchemaBase | SortByChannel_T] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(encoding=encoding, order=order, **kwds)\n\n\nclass SortField(VegaLiteSchema):\n    \"\"\"\n    SortField schema wrapper.\n\n    A sort definition for transform\n\n    Parameters\n    ----------\n    field : str, :class:`FieldName`\n        The name of the field to sort.\n    order : :class:`SortOrder`, Literal['ascending', 'descending'], None\n        Whether to sort the field in ascending or descending order. One of ``\"ascending\"``\n        (default), ``\"descending\"``, or ``null`` (do not sort).\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SortField\"}\n\n    def __init__(\n        self,\n        field: Optional[str | SchemaBase] = Undefined,\n        order: Optional[SchemaBase | SortOrder_T | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(field=field, order=order, **kwds)\n\n\nclass SortOrder(AllSortString):\n    \"\"\"SortOrder schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SortOrder\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Spec(VegaLiteSchema):\n    \"\"\"\n    Spec schema wrapper.\n\n    Any specification in Vega-Lite.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Spec\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass ConcatSpecGenericSpec(Spec, NonNormalizedSpec):\n    \"\"\"\n    ConcatSpecGenericSpec schema wrapper.\n\n    Base interface for a generalized concatenation specification.\n\n    Parameters\n    ----------\n    concat : Sequence[dict, :class:`Spec`, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`]\n        A list of views to be concatenated.\n    align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']\n        The alignment to apply to grid rows and columns. The supported string values are\n        ``\"all\"``, ``\"each\"``, and ``\"none\"``.\n\n        * For ``\"none\"``, a flow layout will be used, in which adjacent subviews are simply\n          placed one after the other.\n        * For ``\"each\"``, subviews will be aligned into a clean grid structure, but each row\n          or column may be of variable size.\n        * For ``\"all\"``, subviews will be aligned and each row or column will be sized\n          identically based on the maximum observed size. String values for this property\n          will be applied to both grid rows and columns.\n\n        Alternatively, an object value of the form ``{\"row\": string, \"column\": string}`` can\n        be used to supply different alignments for rows and columns.\n\n        **Default value:** ``\"all\"``.\n    bounds : Literal['full', 'flush']\n        The bounds calculation method to use for determining the extent of a sub-plot. One\n        of ``full`` (the default) or ``flush``.\n\n        * If set to ``full``, the entire calculated bounds (including axes, title, and\n          legend) will be used.\n        * If set to ``flush``, only the specified width and height values for the sub-view\n          will be used. The ``flush`` setting can be useful when attempting to place\n          sub-plots without axes or legends into a uniform grid structure.\n\n        **Default value:** ``\"full\"``\n    center : bool, dict, :class:`RowColboolean`\n        Boolean flag indicating if subviews should be centered relative to their respective\n        rows or columns.\n\n        An object value of the form ``{\"row\": boolean, \"column\": boolean}`` can be used to\n        supply different centering values for rows and columns.\n\n        **Default value:** ``false``\n    columns : float\n        The number of columns to include in the view composition layout.\n\n        **Default value**: ``undefined`` -- An infinite number of columns (a single row)\n        will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the\n        ``column`` channel (for ``facet`` and ``repeat``).\n\n        **Note**:\n\n        1) This property is only for:\n\n        * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)\n        * the ``facet`` and ``repeat`` operator with one field/repetition definition\n          (without row/column nesting)\n\n        2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)\n        and to using the ``row`` channel (for ``facet`` and ``repeat``).\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    description : str\n        Description of this mark for commenting purpose.\n    name : str\n        Name of the visualization for later reference.\n    resolve : dict, :class:`Resolve`\n        Scale, axis, and legend resolutions for view composition specifications.\n    spacing : dict, float, :class:`RowColnumber`\n        The spacing in pixels between sub-views of the composition operator. An object of\n        the form ``{\"row\": number, \"column\": number}`` can be used to set different spacing\n        values for rows and columns.\n\n        **Default value**: Depends on ``\"spacing\"`` property of `the view composition\n        configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__\n        (``20`` by default)\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ConcatSpec<GenericSpec>\"}\n\n    def __init__(\n        self,\n        concat: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined,\n        bounds: Optional[Literal[\"full\", \"flush\"]] = Undefined,\n        center: Optional[bool | SchemaBase | Map] = Undefined,\n        columns: Optional[float] = Undefined,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        description: Optional[str] = Undefined,\n        name: Optional[str] = Undefined,\n        resolve: Optional[SchemaBase | Map] = Undefined,\n        spacing: Optional[float | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            concat=concat,\n            align=align,\n            bounds=bounds,\n            center=center,\n            columns=columns,\n            data=data,\n            description=description,\n            name=name,\n            resolve=resolve,\n            spacing=spacing,\n            title=title,\n            transform=transform,\n            **kwds,\n        )\n\n\nclass FacetSpec(Spec, NonNormalizedSpec):\n    \"\"\"\n    FacetSpec schema wrapper.\n\n    Base interface for a facet specification.\n\n    Parameters\n    ----------\n    facet : dict, :class:`FacetMapping`, :class:`FacetFieldDef`\n        Definition for how to facet the data. One of: 1) `a field definition for faceting\n        the plot by one field\n        <https://vega.github.io/vega-lite/docs/facet.html#field-def>`__ 2) `An object that\n        maps row and column channels to their field definitions\n        <https://vega.github.io/vega-lite/docs/facet.html#mapping>`__\n    spec : dict, :class:`LayerSpec`, :class:`FacetedUnitSpec`\n        A specification of the view that gets faceted.\n    align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']\n        The alignment to apply to grid rows and columns. The supported string values are\n        ``\"all\"``, ``\"each\"``, and ``\"none\"``.\n\n        * For ``\"none\"``, a flow layout will be used, in which adjacent subviews are simply\n          placed one after the other.\n        * For ``\"each\"``, subviews will be aligned into a clean grid structure, but each row\n          or column may be of variable size.\n        * For ``\"all\"``, subviews will be aligned and each row or column will be sized\n          identically based on the maximum observed size. String values for this property\n          will be applied to both grid rows and columns.\n\n        Alternatively, an object value of the form ``{\"row\": string, \"column\": string}`` can\n        be used to supply different alignments for rows and columns.\n\n        **Default value:** ``\"all\"``.\n    bounds : Literal['full', 'flush']\n        The bounds calculation method to use for determining the extent of a sub-plot. One\n        of ``full`` (the default) or ``flush``.\n\n        * If set to ``full``, the entire calculated bounds (including axes, title, and\n          legend) will be used.\n        * If set to ``flush``, only the specified width and height values for the sub-view\n          will be used. The ``flush`` setting can be useful when attempting to place\n          sub-plots without axes or legends into a uniform grid structure.\n\n        **Default value:** ``\"full\"``\n    center : bool, dict, :class:`RowColboolean`\n        Boolean flag indicating if subviews should be centered relative to their respective\n        rows or columns.\n\n        An object value of the form ``{\"row\": boolean, \"column\": boolean}`` can be used to\n        supply different centering values for rows and columns.\n\n        **Default value:** ``false``\n    columns : float\n        The number of columns to include in the view composition layout.\n\n        **Default value**: ``undefined`` -- An infinite number of columns (a single row)\n        will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the\n        ``column`` channel (for ``facet`` and ``repeat``).\n\n        **Note**:\n\n        1) This property is only for:\n\n        * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)\n        * the ``facet`` and ``repeat`` operator with one field/repetition definition\n          (without row/column nesting)\n\n        2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)\n        and to using the ``row`` channel (for ``facet`` and ``repeat``).\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    description : str\n        Description of this mark for commenting purpose.\n    name : str\n        Name of the visualization for later reference.\n    resolve : dict, :class:`Resolve`\n        Scale, axis, and legend resolutions for view composition specifications.\n    spacing : dict, float, :class:`RowColnumber`\n        The spacing in pixels between sub-views of the composition operator. An object of\n        the form ``{\"row\": number, \"column\": number}`` can be used to set different spacing\n        values for rows and columns.\n\n        **Default value**: Depends on ``\"spacing\"`` property of `the view composition\n        configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__\n        (``20`` by default)\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FacetSpec\"}\n\n    def __init__(\n        self,\n        facet: Optional[SchemaBase | Map] = Undefined,\n        spec: Optional[SchemaBase | Map] = Undefined,\n        align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined,\n        bounds: Optional[Literal[\"full\", \"flush\"]] = Undefined,\n        center: Optional[bool | SchemaBase | Map] = Undefined,\n        columns: Optional[float] = Undefined,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        description: Optional[str] = Undefined,\n        name: Optional[str] = Undefined,\n        resolve: Optional[SchemaBase | Map] = Undefined,\n        spacing: Optional[float | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            facet=facet,\n            spec=spec,\n            align=align,\n            bounds=bounds,\n            center=center,\n            columns=columns,\n            data=data,\n            description=description,\n            name=name,\n            resolve=resolve,\n            spacing=spacing,\n            title=title,\n            transform=transform,\n            **kwds,\n        )\n\n\nclass FacetedUnitSpec(Spec, NonNormalizedSpec):\n    \"\"\"\n    FacetedUnitSpec schema wrapper.\n\n    Unit spec that can have a composite mark and row or column channels (shorthand for a facet\n    spec).\n\n    Parameters\n    ----------\n    mark : dict, :class:`Mark`, :class:`AnyMark`, :class:`BoxPlot`, :class:`MarkDef`, :class:`ErrorBar`, :class:`ErrorBand`, :class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`, :class:`CompositeMark`, :class:`CompositeMarkDef`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape', 'boxplot', 'errorband', 'errorbar']\n        A string describing the mark type (one of ``\"bar\"``, ``\"circle\"``, ``\"square\"``,\n        ``\"tick\"``, ``\"line\"``, ``\"area\"``, ``\"point\"``, ``\"rule\"``, ``\"geoshape\"``, and\n        ``\"text\"``) or a `mark definition object\n        <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.\n    align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']\n        The alignment to apply to grid rows and columns. The supported string values are\n        ``\"all\"``, ``\"each\"``, and ``\"none\"``.\n\n        * For ``\"none\"``, a flow layout will be used, in which adjacent subviews are simply\n          placed one after the other.\n        * For ``\"each\"``, subviews will be aligned into a clean grid structure, but each row\n          or column may be of variable size.\n        * For ``\"all\"``, subviews will be aligned and each row or column will be sized\n          identically based on the maximum observed size. String values for this property\n          will be applied to both grid rows and columns.\n\n        Alternatively, an object value of the form ``{\"row\": string, \"column\": string}`` can\n        be used to supply different alignments for rows and columns.\n\n        **Default value:** ``\"all\"``.\n    bounds : Literal['full', 'flush']\n        The bounds calculation method to use for determining the extent of a sub-plot. One\n        of ``full`` (the default) or ``flush``.\n\n        * If set to ``full``, the entire calculated bounds (including axes, title, and\n          legend) will be used.\n        * If set to ``flush``, only the specified width and height values for the sub-view\n          will be used. The ``flush`` setting can be useful when attempting to place\n          sub-plots without axes or legends into a uniform grid structure.\n\n        **Default value:** ``\"full\"``\n    center : bool, dict, :class:`RowColboolean`\n        Boolean flag indicating if subviews should be centered relative to their respective\n        rows or columns.\n\n        An object value of the form ``{\"row\": boolean, \"column\": boolean}`` can be used to\n        supply different centering values for rows and columns.\n\n        **Default value:** ``false``\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    description : str\n        Description of this mark for commenting purpose.\n    encoding : dict, :class:`FacetedEncoding`\n        A key-value mapping between encoding channels and definition of fields.\n    height : dict, float, :class:`Step`, Literal['container']\n        The height of a visualization.\n\n        * For a plot with a continuous y-field, height should be a number.\n        * For a plot with either a discrete y-field or no y-field, height can be either a\n          number indicating a fixed height or an object in the form of ``{step: number}``\n          defining the height per discrete step. (No y-field is equivalent to having one\n          discrete step.)\n        * To enable responsive sizing on height, it should be set to ``\"container\"``.\n\n        **Default value:** Based on ``config.view.continuousHeight`` for a plot with a\n        continuous y-field and ``config.view.discreteHeight`` otherwise.\n\n        **Note:** For plots with `row and column channels\n        <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the\n        height of a single view and the ``\"container\"`` option cannot be used.\n\n        **See also:** `height <https://vega.github.io/vega-lite/docs/size.html>`__\n        documentation.\n    name : str\n        Name of the visualization for later reference.\n    params : Sequence[dict, :class:`SelectionParameter`]\n        An array of parameters that may either be simple variables, or more complex\n        selections that map user input to data queries.\n    projection : dict, :class:`Projection`\n        An object defining properties of geographic projection, which will be applied to\n        ``shape`` path for ``\"geoshape\"`` marks and to ``latitude`` and ``\"longitude\"``\n        channels for other marks.\n    resolve : dict, :class:`Resolve`\n        Scale, axis, and legend resolutions for view composition specifications.\n    spacing : dict, float, :class:`RowColnumber`\n        The spacing in pixels between sub-views of the composition operator. An object of\n        the form ``{\"row\": number, \"column\": number}`` can be used to set different spacing\n        values for rows and columns.\n\n        **Default value**: Depends on ``\"spacing\"`` property of `the view composition\n        configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__\n        (``20`` by default)\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    view : dict, :class:`ViewBackground`\n        An object defining the view background's fill and stroke.\n\n        **Default value:** none (transparent)\n    width : dict, float, :class:`Step`, Literal['container']\n        The width of a visualization.\n\n        * For a plot with a continuous x-field, width should be a number.\n        * For a plot with either a discrete x-field or no x-field, width can be either a\n          number indicating a fixed width or an object in the form of ``{step: number}``\n          defining the width per discrete step. (No x-field is equivalent to having one\n          discrete step.)\n        * To enable responsive sizing on width, it should be set to ``\"container\"``.\n\n        **Default value:** Based on ``config.view.continuousWidth`` for a plot with a\n        continuous x-field and ``config.view.discreteWidth`` otherwise.\n\n        **Note:** For plots with `row and column channels\n        <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the\n        width of a single view and the ``\"container\"`` option cannot be used.\n\n        **See also:** `width <https://vega.github.io/vega-lite/docs/size.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FacetedUnitSpec\"}\n\n    def __init__(\n        self,\n        mark: Optional[SchemaBase | Map | Mark_T | CompositeMark_T] = Undefined,\n        align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined,\n        bounds: Optional[Literal[\"full\", \"flush\"]] = Undefined,\n        center: Optional[bool | SchemaBase | Map] = Undefined,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        description: Optional[str] = Undefined,\n        encoding: Optional[SchemaBase | Map] = Undefined,\n        height: Optional[float | SchemaBase | Literal[\"container\"] | Map] = Undefined,\n        name: Optional[str] = Undefined,\n        params: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        projection: Optional[SchemaBase | Map] = Undefined,\n        resolve: Optional[SchemaBase | Map] = Undefined,\n        spacing: Optional[float | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        view: Optional[SchemaBase | Map] = Undefined,\n        width: Optional[float | SchemaBase | Literal[\"container\"] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            mark=mark,\n            align=align,\n            bounds=bounds,\n            center=center,\n            data=data,\n            description=description,\n            encoding=encoding,\n            height=height,\n            name=name,\n            params=params,\n            projection=projection,\n            resolve=resolve,\n            spacing=spacing,\n            title=title,\n            transform=transform,\n            view=view,\n            width=width,\n            **kwds,\n        )\n\n\nclass HConcatSpecGenericSpec(Spec, NonNormalizedSpec):\n    \"\"\"\n    HConcatSpecGenericSpec schema wrapper.\n\n    Base interface for a horizontal concatenation specification.\n\n    Parameters\n    ----------\n    hconcat : Sequence[dict, :class:`Spec`, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`]\n        A list of views to be concatenated and put into a row.\n    bounds : Literal['full', 'flush']\n        The bounds calculation method to use for determining the extent of a sub-plot. One\n        of ``full`` (the default) or ``flush``.\n\n        * If set to ``full``, the entire calculated bounds (including axes, title, and\n          legend) will be used.\n        * If set to ``flush``, only the specified width and height values for the sub-view\n          will be used. The ``flush`` setting can be useful when attempting to place\n          sub-plots without axes or legends into a uniform grid structure.\n\n        **Default value:** ``\"full\"``\n    center : bool\n        Boolean flag indicating if subviews should be centered relative to their respective\n        rows or columns.\n\n        **Default value:** ``false``\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    description : str\n        Description of this mark for commenting purpose.\n    name : str\n        Name of the visualization for later reference.\n    resolve : dict, :class:`Resolve`\n        Scale, axis, and legend resolutions for view composition specifications.\n    spacing : float\n        The spacing in pixels between sub-views of the concat operator.\n\n        **Default value**: ``10``\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/HConcatSpec<GenericSpec>\"}\n\n    def __init__(\n        self,\n        hconcat: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        bounds: Optional[Literal[\"full\", \"flush\"]] = Undefined,\n        center: Optional[bool] = Undefined,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        description: Optional[str] = Undefined,\n        name: Optional[str] = Undefined,\n        resolve: Optional[SchemaBase | Map] = Undefined,\n        spacing: Optional[float] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            hconcat=hconcat,\n            bounds=bounds,\n            center=center,\n            data=data,\n            description=description,\n            name=name,\n            resolve=resolve,\n            spacing=spacing,\n            title=title,\n            transform=transform,\n            **kwds,\n        )\n\n\nclass LayerSpec(Spec, NonNormalizedSpec):\n    \"\"\"\n    LayerSpec schema wrapper.\n\n    A full layered plot specification, which may contains ``encoding`` and ``projection``\n    properties that will be applied to underlying unit (single-view) specifications.\n\n    Parameters\n    ----------\n    layer : Sequence[dict, :class:`UnitSpec`, :class:`LayerSpec`]\n        Layer or single view specifications to be layered.\n\n        **Note**: Specifications inside ``layer`` cannot use ``row`` and ``column`` channels\n        as layering facet specifications is not allowed. Instead, use the `facet operator\n        <https://vega.github.io/vega-lite/docs/facet.html>`__ and place a layer inside a\n        facet.\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    description : str\n        Description of this mark for commenting purpose.\n    encoding : dict, :class:`SharedEncoding`\n        A shared key-value mapping between encoding channels and definition of fields in the\n        underlying layers.\n    height : dict, float, :class:`Step`, Literal['container']\n        The height of a visualization.\n\n        * For a plot with a continuous y-field, height should be a number.\n        * For a plot with either a discrete y-field or no y-field, height can be either a\n          number indicating a fixed height or an object in the form of ``{step: number}``\n          defining the height per discrete step. (No y-field is equivalent to having one\n          discrete step.)\n        * To enable responsive sizing on height, it should be set to ``\"container\"``.\n\n        **Default value:** Based on ``config.view.continuousHeight`` for a plot with a\n        continuous y-field and ``config.view.discreteHeight`` otherwise.\n\n        **Note:** For plots with `row and column channels\n        <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the\n        height of a single view and the ``\"container\"`` option cannot be used.\n\n        **See also:** `height <https://vega.github.io/vega-lite/docs/size.html>`__\n        documentation.\n    name : str\n        Name of the visualization for later reference.\n    projection : dict, :class:`Projection`\n        An object defining properties of the geographic projection shared by underlying\n        layers.\n    resolve : dict, :class:`Resolve`\n        Scale, axis, and legend resolutions for view composition specifications.\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    view : dict, :class:`ViewBackground`\n        An object defining the view background's fill and stroke.\n\n        **Default value:** none (transparent)\n    width : dict, float, :class:`Step`, Literal['container']\n        The width of a visualization.\n\n        * For a plot with a continuous x-field, width should be a number.\n        * For a plot with either a discrete x-field or no x-field, width can be either a\n          number indicating a fixed width or an object in the form of ``{step: number}``\n          defining the width per discrete step. (No x-field is equivalent to having one\n          discrete step.)\n        * To enable responsive sizing on width, it should be set to ``\"container\"``.\n\n        **Default value:** Based on ``config.view.continuousWidth`` for a plot with a\n        continuous x-field and ``config.view.discreteWidth`` otherwise.\n\n        **Note:** For plots with `row and column channels\n        <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the\n        width of a single view and the ``\"container\"`` option cannot be used.\n\n        **See also:** `width <https://vega.github.io/vega-lite/docs/size.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LayerSpec\"}\n\n    def __init__(\n        self,\n        layer: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        description: Optional[str] = Undefined,\n        encoding: Optional[SchemaBase | Map] = Undefined,\n        height: Optional[float | SchemaBase | Literal[\"container\"] | Map] = Undefined,\n        name: Optional[str] = Undefined,\n        projection: Optional[SchemaBase | Map] = Undefined,\n        resolve: Optional[SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        view: Optional[SchemaBase | Map] = Undefined,\n        width: Optional[float | SchemaBase | Literal[\"container\"] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            layer=layer,\n            data=data,\n            description=description,\n            encoding=encoding,\n            height=height,\n            name=name,\n            projection=projection,\n            resolve=resolve,\n            title=title,\n            transform=transform,\n            view=view,\n            width=width,\n            **kwds,\n        )\n\n\nclass RepeatSpec(Spec, NonNormalizedSpec):\n    \"\"\"RepeatSpec schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/RepeatSpec\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass LayerRepeatSpec(RepeatSpec):\n    \"\"\"\n    LayerRepeatSpec schema wrapper.\n\n    Parameters\n    ----------\n    repeat : dict, :class:`LayerRepeatMapping`\n        Definition for fields to be repeated. One of: 1) An array of fields to be repeated.\n        If ``\"repeat\"`` is an array, the field can be referred to as ``{\"repeat\":\n        \"repeat\"}``. The repeated views are laid out in a wrapped row. You can set the\n        number of columns to control the wrapping. 2) An object that maps ``\"row\"`` and/or\n        ``\"column\"`` to the listed fields to be repeated along the particular orientations.\n        The objects ``{\"repeat\": \"row\"}`` and ``{\"repeat\": \"column\"}`` can be used to refer\n        to the repeated field respectively.\n    spec : dict, :class:`LayerSpec`, :class:`UnitSpecWithFrame`\n        A specification of the view that gets repeated.\n    align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']\n        The alignment to apply to grid rows and columns. The supported string values are\n        ``\"all\"``, ``\"each\"``, and ``\"none\"``.\n\n        * For ``\"none\"``, a flow layout will be used, in which adjacent subviews are simply\n          placed one after the other.\n        * For ``\"each\"``, subviews will be aligned into a clean grid structure, but each row\n          or column may be of variable size.\n        * For ``\"all\"``, subviews will be aligned and each row or column will be sized\n          identically based on the maximum observed size. String values for this property\n          will be applied to both grid rows and columns.\n\n        Alternatively, an object value of the form ``{\"row\": string, \"column\": string}`` can\n        be used to supply different alignments for rows and columns.\n\n        **Default value:** ``\"all\"``.\n    bounds : Literal['full', 'flush']\n        The bounds calculation method to use for determining the extent of a sub-plot. One\n        of ``full`` (the default) or ``flush``.\n\n        * If set to ``full``, the entire calculated bounds (including axes, title, and\n          legend) will be used.\n        * If set to ``flush``, only the specified width and height values for the sub-view\n          will be used. The ``flush`` setting can be useful when attempting to place\n          sub-plots without axes or legends into a uniform grid structure.\n\n        **Default value:** ``\"full\"``\n    center : bool, dict, :class:`RowColboolean`\n        Boolean flag indicating if subviews should be centered relative to their respective\n        rows or columns.\n\n        An object value of the form ``{\"row\": boolean, \"column\": boolean}`` can be used to\n        supply different centering values for rows and columns.\n\n        **Default value:** ``false``\n    columns : float\n        The number of columns to include in the view composition layout.\n\n        **Default value**: ``undefined`` -- An infinite number of columns (a single row)\n        will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the\n        ``column`` channel (for ``facet`` and ``repeat``).\n\n        **Note**:\n\n        1) This property is only for:\n\n        * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)\n        * the ``facet`` and ``repeat`` operator with one field/repetition definition\n          (without row/column nesting)\n\n        2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)\n        and to using the ``row`` channel (for ``facet`` and ``repeat``).\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    description : str\n        Description of this mark for commenting purpose.\n    name : str\n        Name of the visualization for later reference.\n    resolve : dict, :class:`Resolve`\n        Scale, axis, and legend resolutions for view composition specifications.\n    spacing : dict, float, :class:`RowColnumber`\n        The spacing in pixels between sub-views of the composition operator. An object of\n        the form ``{\"row\": number, \"column\": number}`` can be used to set different spacing\n        values for rows and columns.\n\n        **Default value**: Depends on ``\"spacing\"`` property of `the view composition\n        configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__\n        (``20`` by default)\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LayerRepeatSpec\"}\n\n    def __init__(\n        self,\n        repeat: Optional[SchemaBase | Map] = Undefined,\n        spec: Optional[SchemaBase | Map] = Undefined,\n        align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined,\n        bounds: Optional[Literal[\"full\", \"flush\"]] = Undefined,\n        center: Optional[bool | SchemaBase | Map] = Undefined,\n        columns: Optional[float] = Undefined,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        description: Optional[str] = Undefined,\n        name: Optional[str] = Undefined,\n        resolve: Optional[SchemaBase | Map] = Undefined,\n        spacing: Optional[float | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            repeat=repeat,\n            spec=spec,\n            align=align,\n            bounds=bounds,\n            center=center,\n            columns=columns,\n            data=data,\n            description=description,\n            name=name,\n            resolve=resolve,\n            spacing=spacing,\n            title=title,\n            transform=transform,\n            **kwds,\n        )\n\n\nclass NonLayerRepeatSpec(RepeatSpec):\n    \"\"\"\n    NonLayerRepeatSpec schema wrapper.\n\n    Base interface for a repeat specification.\n\n    Parameters\n    ----------\n    repeat : dict, Sequence[str], :class:`RepeatMapping`\n        Definition for fields to be repeated. One of: 1) An array of fields to be repeated.\n        If ``\"repeat\"`` is an array, the field can be referred to as ``{\"repeat\":\n        \"repeat\"}``. The repeated views are laid out in a wrapped row. You can set the\n        number of columns to control the wrapping. 2) An object that maps ``\"row\"`` and/or\n        ``\"column\"`` to the listed fields to be repeated along the particular orientations.\n        The objects ``{\"repeat\": \"row\"}`` and ``{\"repeat\": \"column\"}`` can be used to refer\n        to the repeated field respectively.\n    spec : dict, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonNormalizedSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`\n        A specification of the view that gets repeated.\n    align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']\n        The alignment to apply to grid rows and columns. The supported string values are\n        ``\"all\"``, ``\"each\"``, and ``\"none\"``.\n\n        * For ``\"none\"``, a flow layout will be used, in which adjacent subviews are simply\n          placed one after the other.\n        * For ``\"each\"``, subviews will be aligned into a clean grid structure, but each row\n          or column may be of variable size.\n        * For ``\"all\"``, subviews will be aligned and each row or column will be sized\n          identically based on the maximum observed size. String values for this property\n          will be applied to both grid rows and columns.\n\n        Alternatively, an object value of the form ``{\"row\": string, \"column\": string}`` can\n        be used to supply different alignments for rows and columns.\n\n        **Default value:** ``\"all\"``.\n    bounds : Literal['full', 'flush']\n        The bounds calculation method to use for determining the extent of a sub-plot. One\n        of ``full`` (the default) or ``flush``.\n\n        * If set to ``full``, the entire calculated bounds (including axes, title, and\n          legend) will be used.\n        * If set to ``flush``, only the specified width and height values for the sub-view\n          will be used. The ``flush`` setting can be useful when attempting to place\n          sub-plots without axes or legends into a uniform grid structure.\n\n        **Default value:** ``\"full\"``\n    center : bool, dict, :class:`RowColboolean`\n        Boolean flag indicating if subviews should be centered relative to their respective\n        rows or columns.\n\n        An object value of the form ``{\"row\": boolean, \"column\": boolean}`` can be used to\n        supply different centering values for rows and columns.\n\n        **Default value:** ``false``\n    columns : float\n        The number of columns to include in the view composition layout.\n\n        **Default value**: ``undefined`` -- An infinite number of columns (a single row)\n        will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the\n        ``column`` channel (for ``facet`` and ``repeat``).\n\n        **Note**:\n\n        1) This property is only for:\n\n        * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)\n        * the ``facet`` and ``repeat`` operator with one field/repetition definition\n          (without row/column nesting)\n\n        2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)\n        and to using the ``row`` channel (for ``facet`` and ``repeat``).\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    description : str\n        Description of this mark for commenting purpose.\n    name : str\n        Name of the visualization for later reference.\n    resolve : dict, :class:`Resolve`\n        Scale, axis, and legend resolutions for view composition specifications.\n    spacing : dict, float, :class:`RowColnumber`\n        The spacing in pixels between sub-views of the composition operator. An object of\n        the form ``{\"row\": number, \"column\": number}`` can be used to set different spacing\n        values for rows and columns.\n\n        **Default value**: Depends on ``\"spacing\"`` property of `the view composition\n        configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__\n        (``20`` by default)\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/NonLayerRepeatSpec\"}\n\n    def __init__(\n        self,\n        repeat: Optional[SchemaBase | Sequence[str] | Map] = Undefined,\n        spec: Optional[SchemaBase | Map] = Undefined,\n        align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined,\n        bounds: Optional[Literal[\"full\", \"flush\"]] = Undefined,\n        center: Optional[bool | SchemaBase | Map] = Undefined,\n        columns: Optional[float] = Undefined,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        description: Optional[str] = Undefined,\n        name: Optional[str] = Undefined,\n        resolve: Optional[SchemaBase | Map] = Undefined,\n        spacing: Optional[float | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            repeat=repeat,\n            spec=spec,\n            align=align,\n            bounds=bounds,\n            center=center,\n            columns=columns,\n            data=data,\n            description=description,\n            name=name,\n            resolve=resolve,\n            spacing=spacing,\n            title=title,\n            transform=transform,\n            **kwds,\n        )\n\n\nclass SphereGenerator(Generator):\n    \"\"\"\n    SphereGenerator schema wrapper.\n\n    Parameters\n    ----------\n    sphere : dict, Literal[True]\n        Generate sphere GeoJSON data for the full globe.\n    name : str\n        Provide a placeholder name and bind data at runtime.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SphereGenerator\"}\n\n    def __init__(\n        self,\n        sphere: Optional[Literal[True] | Map] = Undefined,\n        name: Optional[str] = Undefined,\n        **kwds,\n    ):\n        super().__init__(sphere=sphere, name=name, **kwds)\n\n\nclass StackOffset(VegaLiteSchema):\n    \"\"\"StackOffset schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/StackOffset\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass StandardType(VegaLiteSchema):\n    \"\"\"StandardType schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/StandardType\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Step(VegaLiteSchema):\n    \"\"\"\n    Step schema wrapper.\n\n    Parameters\n    ----------\n    step : float\n        The size (width/height) per discrete step.\n    for : :class:`StepFor`, Literal['position', 'offset']\n        Whether to apply the step to position scale or offset scale when there are both\n        ``x`` and ``xOffset`` or both ``y`` and ``yOffset`` encodings.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Step\"}\n\n    def __init__(self, step: Optional[float] = Undefined, **kwds):\n        super().__init__(step=step, **kwds)\n\n\nclass StepFor(VegaLiteSchema):\n    \"\"\"StepFor schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/StepFor\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Stream(VegaLiteSchema):\n    \"\"\"Stream schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Stream\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass DerivedStream(Stream):\n    \"\"\"\n    DerivedStream schema wrapper.\n\n    Parameters\n    ----------\n    stream : dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`\n\n    between : Sequence[dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`]\n\n    consume : bool\n\n    debounce : float\n\n    filter : str, :class:`Expr`, Sequence[str, :class:`Expr`]\n\n    markname : str\n\n    marktype : :class:`MarkType`, Literal['arc', 'area', 'image', 'group', 'line', 'path', 'rect', 'rule', 'shape', 'symbol', 'text', 'trail']\n\n    throttle : float\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/DerivedStream\"}\n\n    def __init__(\n        self,\n        stream: Optional[SchemaBase | Map] = Undefined,\n        between: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        consume: Optional[bool] = Undefined,\n        debounce: Optional[float] = Undefined,\n        filter: Optional[str | SchemaBase | Sequence[str | SchemaBase]] = Undefined,\n        markname: Optional[str] = Undefined,\n        marktype: Optional[SchemaBase | MarkType_T] = Undefined,\n        throttle: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            stream=stream,\n            between=between,\n            consume=consume,\n            debounce=debounce,\n            filter=filter,\n            markname=markname,\n            marktype=marktype,\n            throttle=throttle,\n            **kwds,\n        )\n\n\nclass EventStream(Stream):\n    \"\"\"EventStream schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/EventStream\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass MergedStream(Stream):\n    \"\"\"\n    MergedStream schema wrapper.\n\n    Parameters\n    ----------\n    merge : Sequence[dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`]\n\n    between : Sequence[dict, :class:`Stream`, :class:`EventStream`, :class:`MergedStream`, :class:`DerivedStream`]\n\n    consume : bool\n\n    debounce : float\n\n    filter : str, :class:`Expr`, Sequence[str, :class:`Expr`]\n\n    markname : str\n\n    marktype : :class:`MarkType`, Literal['arc', 'area', 'image', 'group', 'line', 'path', 'rect', 'rule', 'shape', 'symbol', 'text', 'trail']\n\n    throttle : float\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/MergedStream\"}\n\n    def __init__(\n        self,\n        merge: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        between: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        consume: Optional[bool] = Undefined,\n        debounce: Optional[float] = Undefined,\n        filter: Optional[str | SchemaBase | Sequence[str | SchemaBase]] = Undefined,\n        markname: Optional[str] = Undefined,\n        marktype: Optional[SchemaBase | MarkType_T] = Undefined,\n        throttle: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            merge=merge,\n            between=between,\n            consume=consume,\n            debounce=debounce,\n            filter=filter,\n            markname=markname,\n            marktype=marktype,\n            throttle=throttle,\n            **kwds,\n        )\n\n\nclass StringFieldDef(VegaLiteSchema):\n    r\"\"\"\n    StringFieldDef schema wrapper.\n\n    Parameters\n    ----------\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/StringFieldDef\"}\n\n    def __init__(\n        self,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            format=format,\n            formatType=formatType,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass StringFieldDefWithCondition(VegaLiteSchema):\n    r\"\"\"\n    StringFieldDefWithCondition schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`, Sequence[dict, :class:`ConditionalValueDefstringExprRef`, :class:`ConditionalParameterValueDefstringExprRef`, :class:`ConditionalPredicateValueDefstringExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/StringFieldDefWithCondition\"}\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            format=format,\n            formatType=formatType,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass StringValueDefWithCondition(VegaLiteSchema):\n    \"\"\"\n    StringValueDefWithCondition schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : str, dict, :class:`ExprRef`, None\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/StringValueDefWithCondition\"}\n\n    def __init__(\n        self,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(condition=condition, value=value, **kwds)\n\n\nclass StrokeCap(VegaLiteSchema):\n    \"\"\"StrokeCap schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/StrokeCap\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass StrokeJoin(VegaLiteSchema):\n    \"\"\"StrokeJoin schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/StrokeJoin\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass StyleConfigIndex(VegaLiteSchema):\n    \"\"\"\n    StyleConfigIndex schema wrapper.\n\n    Parameters\n    ----------\n    arc : dict, :class:`RectConfig`\n        Arc-specific Config\n    area : dict, :class:`AreaConfig`\n        Area-Specific Config\n    bar : dict, :class:`BarConfig`\n        Bar-Specific Config\n    circle : dict, :class:`MarkConfig`\n        Circle-Specific Config\n    geoshape : dict, :class:`MarkConfig`\n        Geoshape-Specific Config\n    image : dict, :class:`RectConfig`\n        Image-specific Config\n    line : dict, :class:`LineConfig`\n        Line-Specific Config\n    mark : dict, :class:`MarkConfig`\n        Mark Config\n    point : dict, :class:`MarkConfig`\n        Point-Specific Config\n    rect : dict, :class:`RectConfig`\n        Rect-Specific Config\n    rule : dict, :class:`MarkConfig`\n        Rule-Specific Config\n    square : dict, :class:`MarkConfig`\n        Square-Specific Config\n    text : dict, :class:`MarkConfig`\n        Text-Specific Config\n    tick : dict, :class:`TickConfig`\n        Tick-Specific Config\n    trail : dict, :class:`LineConfig`\n        Trail-Specific Config\n    group-subtitle : dict, :class:`MarkConfig`\n        Default style for chart subtitles\n    group-title : dict, :class:`MarkConfig`\n        Default style for chart titles\n    guide-label : dict, :class:`MarkConfig`\n        Default style for axis, legend, and header labels.\n    guide-title : dict, :class:`MarkConfig`\n        Default style for axis, legend, and header titles.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/StyleConfigIndex\"}\n\n    def __init__(\n        self,\n        arc: Optional[SchemaBase | Map] = Undefined,\n        area: Optional[SchemaBase | Map] = Undefined,\n        bar: Optional[SchemaBase | Map] = Undefined,\n        circle: Optional[SchemaBase | Map] = Undefined,\n        geoshape: Optional[SchemaBase | Map] = Undefined,\n        image: Optional[SchemaBase | Map] = Undefined,\n        line: Optional[SchemaBase | Map] = Undefined,\n        mark: Optional[SchemaBase | Map] = Undefined,\n        point: Optional[SchemaBase | Map] = Undefined,\n        rect: Optional[SchemaBase | Map] = Undefined,\n        rule: Optional[SchemaBase | Map] = Undefined,\n        square: Optional[SchemaBase | Map] = Undefined,\n        text: Optional[SchemaBase | Map] = Undefined,\n        tick: Optional[SchemaBase | Map] = Undefined,\n        trail: Optional[SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            arc=arc,\n            area=area,\n            bar=bar,\n            circle=circle,\n            geoshape=geoshape,\n            image=image,\n            line=line,\n            mark=mark,\n            point=point,\n            rect=rect,\n            rule=rule,\n            square=square,\n            text=text,\n            tick=tick,\n            trail=trail,\n            **kwds,\n        )\n\n\nclass SymbolShape(VegaLiteSchema):\n    \"\"\"SymbolShape schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SymbolShape\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Text(VegaLiteSchema):\n    \"\"\"Text schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Text\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass TextBaseline(VegaLiteSchema):\n    \"\"\"TextBaseline schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TextBaseline\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass Baseline(TextBaseline):\n    \"\"\"Baseline schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Baseline\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass TextDef(VegaLiteSchema):\n    \"\"\"TextDef schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TextDef\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass FieldOrDatumDefWithConditionStringDatumDefText(TextDef):\n    \"\"\"\n    FieldOrDatumDefWithConditionStringDatumDefText schema wrapper.\n\n    Parameters\n    ----------\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    condition : dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    datum : str, bool, dict, float, :class:`ExprRef`, :class:`DateTime`, :class:`RepeatRef`, :class:`PrimitiveValue`, None\n        A constant value in data domain.\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`Type`, Literal['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<StringDatumDef,Text>\"\n    }\n\n    def __init__(\n        self,\n        bandPosition: Optional[float] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        datum: Optional[\n            Temporal | Parameter | SchemaBase | Map | PrimitiveValue_T\n        ] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | Type_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            bandPosition=bandPosition,\n            condition=condition,\n            datum=datum,\n            format=format,\n            formatType=formatType,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass FieldOrDatumDefWithConditionStringFieldDefText(TextDef):\n    r\"\"\"\n    FieldOrDatumDefWithConditionStringFieldDefText schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    condition : dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`]\n        One or more value definition(s) with `a parameter or a test predicate\n        <https://vega.github.io/vega-lite/docs/condition.html>`__.\n\n        **Note:** A field definition's ``condition`` property can only contain `conditional\n        value definitions <https://vega.github.io/vega-lite/docs/condition.html#value>`__\n        since Vega-Lite only allows at most one encoded field per encoding channel.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    format : str, dict, :class:`Dict`, :class:`Format`, :class:`TimeFormatSpecifier`\n        The text format specifier for formatting number and date/time in labels of guides\n        (axes, legends, headers) and text marks.\n\n        If the format type is ``\"number\"`` (e.g., for quantitative fields), this is a D3's\n        `number format pattern string <https://github.com/d3/d3-format#locale_format>`__.\n\n        If the format type is ``\"time\"`` (e.g., for temporal fields), this is either:   a)\n        D3's `time format pattern <https://d3js.org/d3-time-format#locale_format>`__ if you\n        desire to set a static time format.\n\n        b) `dynamic time format specifier object\n        <https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format>`__ if you\n        desire to set a dynamic time format that uses different formats depending on the\n        granularity of the input date (e.g., if the date lies on a year, month, date, hour,\n        etc. boundary).\n\n        When used with a `custom formatType\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__, this\n        value will be passed as ``format`` alongside ``datum.value`` to the registered\n        function.\n\n        **Default value:**  Derived from `numberFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for number\n        format and from `timeFormat\n        <https://vega.github.io/vega-lite/docs/config.html#format>`__ config for time\n        format.\n    formatType : str\n        The format type for labels. One of ``\"number\"``, ``\"time\"``, or a `registered custom\n        format type\n        <https://vega.github.io/vega-lite/docs/config.html#custom-format-type>`__.\n\n        **Default value:**\n\n        * ``\"time\"`` for temporal fields and ordinal and nominal fields with ``timeUnit``.\n        * ``\"number\"`` for quantitative fields as well as ordinal and nominal fields without\n          ``timeUnit``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<StringFieldDef,Text>\"\n    }\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        format: Optional[str | SchemaBase | Map] = Undefined,\n        formatType: Optional[str] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            condition=condition,\n            field=field,\n            format=format,\n            formatType=formatType,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass TextDirection(VegaLiteSchema):\n    \"\"\"TextDirection schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TextDirection\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass TickConfig(AnyMarkConfig):\n    \"\"\"\n    TickConfig schema wrapper.\n\n    Parameters\n    ----------\n    align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).\n        One of ``\"left\"``, ``\"right\"``, ``\"center\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    angle : dict, float, :class:`ExprRef`\n        The rotation angle of the text, in degrees.\n    aria : bool, dict, :class:`ExprRef`\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG element, removing the mark item from the ARIA accessibility tree.\n    ariaRole : str, dict, :class:`ExprRef`\n        Sets the type of user interface element of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"role\" attribute. Warning: this\n        property is experimental and may be changed in the future.\n    ariaRoleDescription : str, dict, :class:`ExprRef`\n        A human-readable, author-localized description for the role of the mark item for\n        `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"aria-roledescription\" attribute.\n        Warning: this property is experimental and may be changed in the future.\n    aspect : bool, dict, :class:`ExprRef`\n        Whether to keep aspect ratio of image marks.\n    bandSize : float\n        The width of the ticks.\n\n        **Default value:**  3/4 of step (width step for horizontal ticks and height step for\n        vertical ticks).\n    baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        For text marks, the vertical text baseline. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, ``\"line-bottom\"``, or an\n        expression reference that provides one of the valid values. The ``\"line-top\"`` and\n        ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but are\n        calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.\n\n        For range marks, the vertical alignment of the marks. One of ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    binSpacing : float\n        Offset between bars for binned field. The ideal value for this is either 0\n        (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n        **Default value:** ``1``\n    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']\n        The color blend mode for drawing an item on its current background. Any valid `CSS\n        mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__\n        value can be used.\n\n        **Default value:** ``\"source-over\"``\n    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']\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    continuousBandSize : float\n        The default size of the bars on continuous scales.\n\n        **Default value:** ``5``\n    cornerRadius : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cornerRadiusBottomLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom left corner.\n\n        **Default value:** ``0``\n    cornerRadiusBottomRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top left corner.\n\n        **Default value:** ``0``\n    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']\n        The mouse cursor used over the mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    description : str, dict, :class:`ExprRef`\n        A text description of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.\n    dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl']\n        The direction of the text. One of ``\"ltr\"`` (left-to-right) or ``\"rtl\"``\n        (right-to-left). This property determines on which side is truncated in response to\n        the limit parameter.\n\n        **Default value:** ``\"ltr\"``\n    discreteBandSize : dict, float, :class:`RelativeBandSize`\n        The default size of the bars with discrete dimensions. If unspecified, the default\n        size is  ``step-2``, which provides 2 pixel offset between bars.\n    dx : dict, float, :class:`ExprRef`\n        The horizontal offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    dy : dict, float, :class:`ExprRef`\n        The vertical offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    ellipsis : str, dict, :class:`ExprRef`\n        The ellipsis string for text truncated in response to the limit parameter.\n\n        **Default value:** ``\"…\"``\n    endAngle : dict, float, :class:`ExprRef`\n        The end angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    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\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    fillOpacity : dict, float, :class:`ExprRef`\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    filled : bool\n        Whether the mark's color should be used as fill color instead of stroke color.\n\n        **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well\n        as ``geoshape`` marks for `graticule\n        <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;\n        otherwise, ``true``.\n\n        **Note:** This property cannot be used in a `style config\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n    font : str, dict, :class:`ExprRef`\n        The typeface to set the text in (e.g., ``\"Helvetica Neue\"``).\n    fontSize : dict, float, :class:`ExprRef`\n        The font size, in pixels.\n\n        **Default value:** ``11``\n    fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style (e.g., ``\"italic\"``).\n    fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        The font weight. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``) or a\n        number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400`` and\n        ``\"bold\"`` = ``700``).\n    height : dict, float, :class:`ExprRef`\n        Height of the marks.\n    href : str, dict, :class:`URI`, :class:`ExprRef`\n        A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\n    innerRadius : dict, float, :class:`ExprRef`\n        The inner radius in pixels of arc marks. ``innerRadius`` is an alias for\n        ``radius2``.\n\n        **Default value:** ``0``\n    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']\n        The line interpolation method to use for line and area marks. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"step-before\"``: alternate between vertical and horizontal segments, as in a\n          step function.\n        * ``\"step-after\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    limit : dict, float, :class:`ExprRef`\n        The maximum length of the text mark in pixels. The text value will be automatically\n        truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0`` -- indicating no limit\n    lineBreak : str, dict, :class:`ExprRef`\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property is ignored if the text is array-valued.\n    lineHeight : dict, float, :class:`ExprRef`\n        The line height in pixels (the spacing between subsequent lines of text) for\n        multi-line text marks.\n    minBandSize : dict, float, :class:`ExprRef`\n        The minimum band size for bar and rectangle marks. **Default value:** ``0.25``\n    opacity : dict, float, :class:`ExprRef`\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    order : bool, None\n        For line and trail marks, this ``order`` property can be set to ``null`` or\n        ``false`` to make the lines use the original order in the data sources.\n    orient : :class:`Orientation`, Literal['horizontal', 'vertical']\n        The orientation of a non-stacked bar, tick, area, and line charts. The value is\n        either horizontal (default) or vertical.\n\n        * For bar, rule and tick, this determines whether the size of the bar and tick\n          should be applied to x or y dimension.\n        * For area, this property determines the orient property of the Vega output.\n        * For line and trail marks, this property determines the sort order of the points in\n          the line if ``config.sortLineBy`` is not specified. For stacked charts, this is\n          always determined by the orientation of the stack; therefore explicitly specified\n          value will be ignored.\n    outerRadius : dict, float, :class:`ExprRef`\n        The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.\n\n        **Default value:** ``0``\n    padAngle : dict, float, :class:`ExprRef`\n        The angular padding applied to sides of the arc, in radians.\n    radius : dict, float, :class:`ExprRef`\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    radius2 : dict, float, :class:`ExprRef`\n        The secondary (inner) radius in pixels of arc marks.\n\n        **Default value:** ``0``\n    shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    size : dict, float, :class:`ExprRef`\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    smooth : bool, dict, :class:`ExprRef`\n        A boolean flag (default true) indicating if the image should be smoothed when\n        resized. If false, individual pixels should be scaled directly rather than\n        interpolated with smoothing. For SVG rendering, this option may not work in some\n        browsers due to lack of standardization.\n    startAngle : dict, float, :class:`ExprRef`\n        The start angle in radians for arc marks. A value of ``0`` indicates up (north),\n        increasing values proceed clockwise.\n    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\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash : dict, Sequence[float], :class:`ExprRef`\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset : dict, float, :class:`ExprRef`\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit : dict, float, :class:`ExprRef`\n        The miter limit at which to bevel a line join.\n    strokeOffset : dict, float, :class:`ExprRef`\n        The offset in pixels at which to draw the group stroke and fill. If unspecified, the\n        default behavior is to dynamically offset stroked groups such that 1 pixel stroke\n        widths align with the pixel grid.\n    strokeOpacity : dict, float, :class:`ExprRef`\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth : dict, float, :class:`ExprRef`\n        The stroke width, in pixels.\n    tension : dict, float, :class:`ExprRef`\n        Depending on the interpolation type, sets the tension parameter (for line and area\n        marks).\n    text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`\n        Placeholder text if the ``text`` channel is not specified\n    theta : dict, float, :class:`ExprRef`\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2 : dict, float, :class:`ExprRef`\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    thickness : float\n        Thickness of the tick mark.\n\n        **Default value:**  ``1``\n    time : dict, float, :class:`ExprRef`\n\n    timeUnitBandPosition : float\n        Default relative band position for a time unit. If set to ``0``, the marks will be\n        positioned at the beginning of the time unit band step. If set to ``0.5``, the marks\n        will be positioned in the middle of the time unit band step.\n    timeUnitBandSize : float\n        Default relative band size for a time unit. If set to ``1``, the bandwidth of the\n        marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the\n        marks will be half of the time unit band step.\n    tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None\n        The tooltip text string to show upon mouse hover or an object defining which fields\n        should the tooltip be derived from.\n\n        * If ``tooltip`` is ``true`` or ``{\"content\": \"encoding\"}``, then all fields from\n          ``encoding`` will be used.\n        * If ``tooltip`` is ``{\"content\": \"data\"}``, then all fields that appear in the\n          highlighted data point will be used.\n        * If set to ``null`` or ``false``, then no tooltip will be used.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n        **Default value:** ``null``\n    url : str, dict, :class:`URI`, :class:`ExprRef`\n        The URL of the image file for image marks.\n    width : dict, float, :class:`ExprRef`\n        Width of the marks.\n    x : dict, float, :class:`ExprRef`, Literal['width']\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2 : dict, float, :class:`ExprRef`, Literal['width']\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    y : dict, float, :class:`ExprRef`, Literal['height']\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2 : dict, float, :class:`ExprRef`, Literal['height']\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TickConfig\"}\n\n    def __init__(\n        self,\n        align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        angle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        bandSize: Optional[float] = Undefined,\n        baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined,\n        binSpacing: Optional[float] = Undefined,\n        blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined,\n        color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,\n        continuousBandSize: Optional[float] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusBottomLeft: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusBottomRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusTopRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined,\n        discreteBandSize: Optional[float | SchemaBase | Map] = Undefined,\n        dx: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        dy: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        endAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fill: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        filled: Optional[bool] = Undefined,\n        font: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined,\n        height: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        href: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined,\n        invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined,\n        limit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        minBandSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        order: Optional[bool | None] = Undefined,\n        orient: Optional[SchemaBase | Orientation_T] = Undefined,\n        outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        shape: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        size: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        startAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        stroke: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        strokeDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined,\n        strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        tension: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n        theta: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        thickness: Optional[float] = Undefined,\n        time: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        timeUnitBandPosition: Optional[float] = Undefined,\n        timeUnitBandSize: Optional[float] = Undefined,\n        tooltip: Optional[\n            str | bool | float | Parameter | SchemaBase | Map | None\n        ] = Undefined,\n        url: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        width: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        x: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        x2: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        y: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        y2: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            align=align,\n            angle=angle,\n            aria=aria,\n            ariaRole=ariaRole,\n            ariaRoleDescription=ariaRoleDescription,\n            aspect=aspect,\n            bandSize=bandSize,\n            baseline=baseline,\n            binSpacing=binSpacing,\n            blend=blend,\n            color=color,\n            continuousBandSize=continuousBandSize,\n            cornerRadius=cornerRadius,\n            cornerRadiusBottomLeft=cornerRadiusBottomLeft,\n            cornerRadiusBottomRight=cornerRadiusBottomRight,\n            cornerRadiusTopLeft=cornerRadiusTopLeft,\n            cornerRadiusTopRight=cornerRadiusTopRight,\n            cursor=cursor,\n            description=description,\n            dir=dir,\n            discreteBandSize=discreteBandSize,\n            dx=dx,\n            dy=dy,\n            ellipsis=ellipsis,\n            endAngle=endAngle,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            filled=filled,\n            font=font,\n            fontSize=fontSize,\n            fontStyle=fontStyle,\n            fontWeight=fontWeight,\n            height=height,\n            href=href,\n            innerRadius=innerRadius,\n            interpolate=interpolate,\n            invalid=invalid,\n            limit=limit,\n            lineBreak=lineBreak,\n            lineHeight=lineHeight,\n            minBandSize=minBandSize,\n            opacity=opacity,\n            order=order,\n            orient=orient,\n            outerRadius=outerRadius,\n            padAngle=padAngle,\n            radius=radius,\n            radius2=radius2,\n            shape=shape,\n            size=size,\n            smooth=smooth,\n            startAngle=startAngle,\n            stroke=stroke,\n            strokeCap=strokeCap,\n            strokeDash=strokeDash,\n            strokeDashOffset=strokeDashOffset,\n            strokeJoin=strokeJoin,\n            strokeMiterLimit=strokeMiterLimit,\n            strokeOffset=strokeOffset,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            tension=tension,\n            text=text,\n            theta=theta,\n            theta2=theta2,\n            thickness=thickness,\n            time=time,\n            timeUnitBandPosition=timeUnitBandPosition,\n            timeUnitBandSize=timeUnitBandSize,\n            tooltip=tooltip,\n            url=url,\n            width=width,\n            x=x,\n            x2=x2,\n            y=y,\n            y2=y2,\n            **kwds,\n        )\n\n\nclass TickCount(VegaLiteSchema):\n    \"\"\"TickCount schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TickCount\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass TimeDef(VegaLiteSchema):\n    r\"\"\"\n    TimeDef schema wrapper.\n\n    Parameters\n    ----------\n    shorthand : str, dict, Sequence[str], :class:`RepeatRef`\n        shorthand for field, aggregate, and type\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    rescale : bool\n\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TimeDef\"}\n\n    def __init__(\n        self,\n        shorthand: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        rescale: Optional[bool] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            shorthand=shorthand,\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            rescale=rescale,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass TimeFieldDef(VegaLiteSchema):\n    r\"\"\"\n    TimeFieldDef schema wrapper.\n\n    Parameters\n    ----------\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    rescale : bool\n\n    scale : dict, :class:`Scale`, None\n        An object defining properties of the channel's scale, which is the function that\n        transforms values in the data domain (numbers, dates, strings, etc) to visual values\n        (pixels, colors, sizes) of the encoding channels.\n\n        If ``null``, the scale will be `disabled and the data value will be directly encoded\n        <https://vega.github.io/vega-lite/docs/scale.html#disable>`__.\n\n        **Default value:** If undefined, default `scale properties\n        <https://vega.github.io/vega-lite/docs/scale.html>`__ are applied.\n\n        **See also:** `scale <https://vega.github.io/vega-lite/docs/scale.html>`__\n        documentation.\n    sort : dict, :class:`Sort`, Sequence[str], Sequence[bool], Sequence[float], :class:`SortArray`, :class:`SortOrder`, :class:`AllSortString`, :class:`SortByChannel`, :class:`SortByEncoding`, :class:`EncodingSortField`, :class:`SortByChannelDesc`, Sequence[dict, :class:`DateTime`], Literal['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text', 'ascending', 'descending', 'x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'], None\n        Sort order for the encoded field.\n\n        For continuous fields (quantitative or temporal), ``sort`` can be either\n        ``\"ascending\"`` or ``\"descending\"``.\n\n        For discrete fields, ``sort`` can be one of the following:\n\n        * ``\"ascending\"`` or ``\"descending\"`` -- for sorting by the values' natural order in\n          JavaScript.\n        * `A string indicating an encoding channel name to sort by\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__ (e.g.,\n          ``\"x\"`` or ``\"y\"``) with an optional minus prefix for descending sort (e.g.,\n          ``\"-x\"`` to sort by x-field, descending). This channel string is short-form of `a\n          sort-by-encoding definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding>`__. For\n          example, ``\"sort\": \"-x\"`` is equivalent to ``\"sort\": {\"encoding\": \"x\", \"order\":\n          \"descending\"}``.\n        * `A sort field definition\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-field>`__ for sorting by\n          another field.\n        * `An array specifying the field values in preferred order\n          <https://vega.github.io/vega-lite/docs/sort.html#sort-array>`__. In this case, the\n          sort order will obey the values in the array, followed by any unspecified values\n          in their original order. For discrete time field, values in the sort array can be\n          `date-time definition objects\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__. In addition, for time\n          units ``\"month\"`` and ``\"day\"``, the values can be the month or day names (case\n          insensitive) or their 3-letter initials (e.g., ``\"Mon\"``, ``\"Tue\"``).\n        * ``null`` indicating no sort.\n\n        **Default value:** ``\"ascending\"``\n\n        **Note:** ``null`` and sorting by another channel is not supported for ``row`` and\n        ``column``.\n\n        **See also:** `sort <https://vega.github.io/vega-lite/docs/sort.html>`__\n        documentation.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TimeFieldDef\"}\n\n    def __init__(\n        self,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        rescale: Optional[bool] = Undefined,\n        scale: Optional[SchemaBase | Map | None] = Undefined,\n        sort: Optional[\n            SchemaBase\n            | Sequence[str]\n            | Sequence[bool]\n            | Sequence[float]\n            | Sequence[Temporal | SchemaBase | Map]\n            | Map\n            | AllSortString_T\n            | None\n        ] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            rescale=rescale,\n            scale=scale,\n            sort=sort,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass TimeFormatSpecifier(Format):\n    \"\"\"\n    TimeFormatSpecifier schema wrapper.\n\n    Parameters\n    ----------\n    date : str\n\n    day : str\n\n    hours : str\n\n    milliseconds : str\n\n    minutes : str\n\n    month : str\n\n    quarter : str\n\n    seconds : str\n\n    week : str\n\n    year : str\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TimeFormatSpecifier\"}\n\n    def __init__(\n        self,\n        date: Optional[str] = Undefined,\n        day: Optional[str] = Undefined,\n        hours: Optional[str] = Undefined,\n        milliseconds: Optional[str] = Undefined,\n        minutes: Optional[str] = Undefined,\n        month: Optional[str] = Undefined,\n        quarter: Optional[str] = Undefined,\n        seconds: Optional[str] = Undefined,\n        week: Optional[str] = Undefined,\n        year: Optional[str] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            date=date,\n            day=day,\n            hours=hours,\n            milliseconds=milliseconds,\n            minutes=minutes,\n            month=month,\n            quarter=quarter,\n            seconds=seconds,\n            week=week,\n            year=year,\n            **kwds,\n        )\n\n\nclass TimeInterval(TickCount):\n    \"\"\"TimeInterval schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TimeInterval\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass TimeIntervalStep(TickCount):\n    \"\"\"\n    TimeIntervalStep schema wrapper.\n\n    Parameters\n    ----------\n    interval : :class:`TimeInterval`, Literal['millisecond', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year']\n\n    step : float\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TimeIntervalStep\"}\n\n    def __init__(\n        self,\n        interval: Optional[SchemaBase | TimeInterval_T] = Undefined,\n        step: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(interval=interval, step=step, **kwds)\n\n\nclass TimeLocale(VegaLiteSchema):\n    \"\"\"\n    TimeLocale schema wrapper.\n\n    Locale definition for formatting dates and times.\n\n    Parameters\n    ----------\n    date : str\n        The date (%x) format specifier (e.g., \"%m/%d/%Y\").\n    dateTime : str\n        The date and time (%c) format specifier (e.g., \"%a %b %e %X %Y\").\n    days : Sequence[str], :class:`Vector7string`\n        The full names of the weekdays, starting with Sunday.\n    months : Sequence[str], :class:`Vector12string`\n        The full names of the months (starting with January).\n    periods : Sequence[str], :class:`Vector2string`\n        The A.M. and P.M. equivalents (e.g., [\"AM\", \"PM\"]).\n    shortDays : Sequence[str], :class:`Vector7string`\n        The abbreviated names of the weekdays, starting with Sunday.\n    shortMonths : Sequence[str], :class:`Vector12string`\n        The abbreviated names of the months (starting with January).\n    time : str\n        The time (%X) format specifier (e.g., \"%H:%M:%S\").\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TimeLocale\"}\n\n    def __init__(\n        self,\n        date: Optional[str] = Undefined,\n        dateTime: Optional[str] = Undefined,\n        days: Optional[SchemaBase | Sequence[str]] = Undefined,\n        months: Optional[SchemaBase | Sequence[str]] = Undefined,\n        periods: Optional[SchemaBase | Sequence[str]] = Undefined,\n        shortDays: Optional[SchemaBase | Sequence[str]] = Undefined,\n        shortMonths: Optional[SchemaBase | Sequence[str]] = Undefined,\n        time: Optional[str] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            date=date,\n            dateTime=dateTime,\n            days=days,\n            months=months,\n            periods=periods,\n            shortDays=shortDays,\n            shortMonths=shortMonths,\n            time=time,\n            **kwds,\n        )\n\n\nclass TimeUnit(VegaLiteSchema):\n    \"\"\"TimeUnit schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TimeUnit\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass MultiTimeUnit(TimeUnit):\n    \"\"\"MultiTimeUnit schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/MultiTimeUnit\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass LocalMultiTimeUnit(MultiTimeUnit):\n    \"\"\"LocalMultiTimeUnit schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LocalMultiTimeUnit\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass SingleTimeUnit(TimeUnit):\n    \"\"\"SingleTimeUnit schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SingleTimeUnit\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass LocalSingleTimeUnit(SingleTimeUnit):\n    \"\"\"LocalSingleTimeUnit schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LocalSingleTimeUnit\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass TimeUnitParams(VegaLiteSchema):\n    \"\"\"\n    TimeUnitParams schema wrapper.\n\n    Time Unit Params for encoding predicate, which can specified if the data is  already\n    \"binned\".\n\n    Parameters\n    ----------\n    binned : bool\n        Whether the data has already been binned to this time unit. If true, Vega-Lite will\n        only format the data, marks, and guides, without applying the timeUnit transform to\n        re-bin the data again.\n    maxbins : float\n        If no ``unit`` is specified, maxbins is used to infer time units.\n    step : float\n        The number of steps between bins, in terms of the least significant unit provided.\n    unit : :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`SingleTimeUnit`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Defines how date-time values should be binned.\n    utc : bool\n        True to use UTC timezone. Equivalent to using a ``utc`` prefixed ``TimeUnit``.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TimeUnitParams\"}\n\n    def __init__(\n        self,\n        binned: Optional[bool] = Undefined,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            binned=binned, maxbins=maxbins, step=step, unit=unit, utc=utc, **kwds\n        )\n\n\nclass TimeUnitTransformParams(VegaLiteSchema):\n    \"\"\"\n    TimeUnitTransformParams schema wrapper.\n\n    Parameters\n    ----------\n    maxbins : float\n        If no ``unit`` is specified, maxbins is used to infer time units.\n    step : float\n        The number of steps between bins, in terms of the least significant unit provided.\n    unit : :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`SingleTimeUnit`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Defines how date-time values should be binned.\n    utc : bool\n        True to use UTC timezone. Equivalent to using a ``utc`` prefixed ``TimeUnit``.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TimeUnitTransformParams\"}\n\n    def __init__(\n        self,\n        maxbins: Optional[float] = Undefined,\n        step: Optional[float] = Undefined,\n        unit: Optional[SchemaBase | MultiTimeUnit_T | SingleTimeUnit_T] = Undefined,\n        utc: Optional[bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(maxbins=maxbins, step=step, unit=unit, utc=utc, **kwds)\n\n\nclass TitleAnchor(VegaLiteSchema):\n    \"\"\"TitleAnchor schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TitleAnchor\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass TitleConfig(VegaLiteSchema):\n    \"\"\"\n    TitleConfig schema wrapper.\n\n    Parameters\n    ----------\n    align : :class:`Align`, Literal['left', 'center', 'right']\n        Horizontal text alignment for title text. One of ``\"left\"``, ``\"center\"``, or\n        ``\"right\"``.\n    anchor : dict, :class:`ExprRef`, :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']\n        The anchor position for placing the title and subtitle text. One of ``\"start\"``,\n        ``\"middle\"``, or ``\"end\"``. For example, with an orientation of top these anchor\n        positions map to a left-, center-, or right-aligned title.\n    angle : dict, float, :class:`ExprRef`\n        Angle in degrees of title and subtitle text.\n    aria : bool, dict, :class:`ExprRef`\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG group, removing the title from the ARIA accessibility tree.\n\n        **Default value:** ``true``\n    baseline : :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        Vertical text baseline for title and subtitle text. One of ``\"alphabetic\"``\n        (default), ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or\n        ``\"line-bottom\"``. The ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly\n        to ``\"top\"`` and ``\"bottom\"``, but are calculated relative to the *lineHeight*\n        rather than *fontSize* alone.\n    color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Text color for title text.\n    dx : dict, float, :class:`ExprRef`\n        Delta offset for title and subtitle text x-coordinate.\n    dy : dict, float, :class:`ExprRef`\n        Delta offset for title and subtitle text y-coordinate.\n    font : str, dict, :class:`ExprRef`\n        Font name for title text.\n    fontSize : dict, float, :class:`ExprRef`\n        Font size in pixels for title text.\n    fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        Font style for title text.\n    fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        Font weight for title text. This can be either a string (e.g ``\"bold\"``,\n        ``\"normal\"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where\n        ``\"normal\"`` = ``400`` and ``\"bold\"`` = ``700``).\n    frame : str, dict, :class:`ExprRef`, :class:`TitleFrame`, Literal['bounds', 'group']\n        The reference frame for the anchor position, one of ``\"bounds\"`` (to anchor relative\n        to the full bounding box) or ``\"group\"`` (to anchor relative to the group width or\n        height).\n    limit : dict, float, :class:`ExprRef`\n        The maximum allowed length in pixels of title and subtitle text.\n    lineHeight : dict, float, :class:`ExprRef`\n        Line height in pixels for multi-line title text or title text with ``\"line-top\"`` or\n        ``\"line-bottom\"`` baseline.\n    offset : dict, float, :class:`ExprRef`\n        The orthogonal offset in pixels by which to displace the title group from its\n        position along the edge of the chart.\n    orient : dict, :class:`ExprRef`, :class:`TitleOrient`, Literal['none', 'left', 'right', 'top', 'bottom']\n        Default title orientation (``\"top\"``, ``\"bottom\"``, ``\"left\"``, or ``\"right\"``)\n    subtitleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Text color for subtitle text.\n    subtitleFont : str, dict, :class:`ExprRef`\n        Font name for subtitle text.\n    subtitleFontSize : dict, float, :class:`ExprRef`\n        Font size in pixels for subtitle text.\n    subtitleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        Font style for subtitle text.\n    subtitleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        Font weight for subtitle text. This can be either a string (e.g ``\"bold\"``,\n        ``\"normal\"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where\n        ``\"normal\"`` = ``400`` and ``\"bold\"`` = ``700``).\n    subtitleLineHeight : dict, float, :class:`ExprRef`\n        Line height in pixels for multi-line subtitle text.\n    subtitlePadding : dict, float, :class:`ExprRef`\n        The padding in pixels between title and subtitle text.\n    zindex : dict, float, :class:`ExprRef`\n        The integer z-index indicating the layering of the title group relative to other\n        axis, mark, and legend groups.\n\n        **Default value:** ``0``.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TitleConfig\"}\n\n    def __init__(\n        self,\n        align: Optional[SchemaBase | Align_T] = Undefined,\n        anchor: Optional[Parameter | SchemaBase | Map | TitleAnchor_T] = Undefined,\n        angle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        baseline: Optional[SchemaBase | TextBaseline_T] = Undefined,\n        color: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        dx: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        dy: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        font: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined,\n        frame: Optional[str | Parameter | SchemaBase | Map | TitleFrame_T] = Undefined,\n        limit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[Parameter | SchemaBase | Map | TitleOrient_T] = Undefined,\n        subtitleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        subtitleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        subtitleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        subtitleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        subtitleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        subtitleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        subtitlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        zindex: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            align=align,\n            anchor=anchor,\n            angle=angle,\n            aria=aria,\n            baseline=baseline,\n            color=color,\n            dx=dx,\n            dy=dy,\n            font=font,\n            fontSize=fontSize,\n            fontStyle=fontStyle,\n            fontWeight=fontWeight,\n            frame=frame,\n            limit=limit,\n            lineHeight=lineHeight,\n            offset=offset,\n            orient=orient,\n            subtitleColor=subtitleColor,\n            subtitleFont=subtitleFont,\n            subtitleFontSize=subtitleFontSize,\n            subtitleFontStyle=subtitleFontStyle,\n            subtitleFontWeight=subtitleFontWeight,\n            subtitleLineHeight=subtitleLineHeight,\n            subtitlePadding=subtitlePadding,\n            zindex=zindex,\n            **kwds,\n        )\n\n\nclass TitleFrame(VegaLiteSchema):\n    \"\"\"TitleFrame schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TitleFrame\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass TitleOrient(VegaLiteSchema):\n    \"\"\"TitleOrient schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TitleOrient\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass TitleParams(VegaLiteSchema):\n    \"\"\"\n    TitleParams schema wrapper.\n\n    Parameters\n    ----------\n    text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`\n        The title text.\n    align : :class:`Align`, Literal['left', 'center', 'right']\n        Horizontal text alignment for title text. One of ``\"left\"``, ``\"center\"``, or\n        ``\"right\"``.\n    anchor : :class:`TitleAnchor`, Literal[None, 'start', 'middle', 'end']\n        The anchor position for placing the title. One of ``\"start\"``, ``\"middle\"``, or\n        ``\"end\"``. For example, with an orientation of top these anchor positions map to a\n        left-, center-, or right-aligned title.\n\n        **Default value:** ``\"middle\"`` for `single\n        <https://vega.github.io/vega-lite/docs/spec.html>`__ and `layered\n        <https://vega.github.io/vega-lite/docs/layer.html>`__ views. ``\"start\"`` for other\n        composite views.\n\n        **Note:** `For now <https://github.com/vega/vega-lite/issues/2875>`__, ``anchor`` is\n        only customizable only for `single\n        <https://vega.github.io/vega-lite/docs/spec.html>`__ and `layered\n        <https://vega.github.io/vega-lite/docs/layer.html>`__ views. For other composite\n        views, ``anchor`` is always ``\"start\"``.\n    angle : dict, float, :class:`ExprRef`\n        Angle in degrees of title and subtitle text.\n    aria : bool, dict, :class:`ExprRef`\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG group, removing the title from the ARIA accessibility tree.\n\n        **Default value:** ``true``\n    baseline : :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        Vertical text baseline for title and subtitle text. One of ``\"alphabetic\"``\n        (default), ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, or\n        ``\"line-bottom\"``. The ``\"line-top\"`` and ``\"line-bottom\"`` values operate similarly\n        to ``\"top\"`` and ``\"bottom\"``, but are calculated relative to the *lineHeight*\n        rather than *fontSize* alone.\n    color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Text color for title text.\n    dx : dict, float, :class:`ExprRef`\n        Delta offset for title and subtitle text x-coordinate.\n    dy : dict, float, :class:`ExprRef`\n        Delta offset for title and subtitle text y-coordinate.\n    font : str, dict, :class:`ExprRef`\n        Font name for title text.\n    fontSize : dict, float, :class:`ExprRef`\n        Font size in pixels for title text.\n    fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        Font style for title text.\n    fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        Font weight for title text. This can be either a string (e.g ``\"bold\"``,\n        ``\"normal\"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where\n        ``\"normal\"`` = ``400`` and ``\"bold\"`` = ``700``).\n    frame : str, dict, :class:`ExprRef`, :class:`TitleFrame`, Literal['bounds', 'group']\n        The reference frame for the anchor position, one of ``\"bounds\"`` (to anchor relative\n        to the full bounding box) or ``\"group\"`` (to anchor relative to the group width or\n        height).\n    limit : dict, float, :class:`ExprRef`\n        The maximum allowed length in pixels of title and subtitle text.\n    lineHeight : dict, float, :class:`ExprRef`\n        Line height in pixels for multi-line title text or title text with ``\"line-top\"`` or\n        ``\"line-bottom\"`` baseline.\n    offset : dict, float, :class:`ExprRef`\n        The orthogonal offset in pixels by which to displace the title group from its\n        position along the edge of the chart.\n    orient : dict, :class:`ExprRef`, :class:`TitleOrient`, Literal['none', 'left', 'right', 'top', 'bottom']\n        Default title orientation (``\"top\"``, ``\"bottom\"``, ``\"left\"``, or ``\"right\"``)\n    style : str, Sequence[str]\n        A `mark style property <https://vega.github.io/vega-lite/docs/config.html#style>`__\n        to apply to the title text mark.\n\n        **Default value:** ``\"group-title\"``.\n    subtitle : str, :class:`Text`, Sequence[str]\n        The subtitle Text.\n    subtitleColor : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        Text color for subtitle text.\n    subtitleFont : str, dict, :class:`ExprRef`\n        Font name for subtitle text.\n    subtitleFontSize : dict, float, :class:`ExprRef`\n        Font size in pixels for subtitle text.\n    subtitleFontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        Font style for subtitle text.\n    subtitleFontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        Font weight for subtitle text. This can be either a string (e.g ``\"bold\"``,\n        ``\"normal\"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where\n        ``\"normal\"`` = ``400`` and ``\"bold\"`` = ``700``).\n    subtitleLineHeight : dict, float, :class:`ExprRef`\n        Line height in pixels for multi-line subtitle text.\n    subtitlePadding : dict, float, :class:`ExprRef`\n        The padding in pixels between title and subtitle text.\n    zindex : float\n        The integer z-index indicating the layering of the title group relative to other\n        axis, mark and legend groups.\n\n        **Default value:** ``0``.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TitleParams\"}\n\n    def __init__(\n        self,\n        text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n        align: Optional[SchemaBase | Align_T] = Undefined,\n        anchor: Optional[SchemaBase | TitleAnchor_T] = Undefined,\n        angle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        baseline: Optional[SchemaBase | TextBaseline_T] = Undefined,\n        color: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        dx: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        dy: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        font: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined,\n        frame: Optional[str | Parameter | SchemaBase | Map | TitleFrame_T] = Undefined,\n        limit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        orient: Optional[Parameter | SchemaBase | Map | TitleOrient_T] = Undefined,\n        style: Optional[str | Sequence[str]] = Undefined,\n        subtitle: Optional[str | SchemaBase | Sequence[str]] = Undefined,\n        subtitleColor: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        subtitleFont: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        subtitleFontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        subtitleFontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        subtitleFontWeight: Optional[\n            Parameter | SchemaBase | Map | FontWeight_T\n        ] = Undefined,\n        subtitleLineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        subtitlePadding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        zindex: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            text=text,\n            align=align,\n            anchor=anchor,\n            angle=angle,\n            aria=aria,\n            baseline=baseline,\n            color=color,\n            dx=dx,\n            dy=dy,\n            font=font,\n            fontSize=fontSize,\n            fontStyle=fontStyle,\n            fontWeight=fontWeight,\n            frame=frame,\n            limit=limit,\n            lineHeight=lineHeight,\n            offset=offset,\n            orient=orient,\n            style=style,\n            subtitle=subtitle,\n            subtitleColor=subtitleColor,\n            subtitleFont=subtitleFont,\n            subtitleFontSize=subtitleFontSize,\n            subtitleFontStyle=subtitleFontStyle,\n            subtitleFontWeight=subtitleFontWeight,\n            subtitleLineHeight=subtitleLineHeight,\n            subtitlePadding=subtitlePadding,\n            zindex=zindex,\n            **kwds,\n        )\n\n\nclass TooltipContent(VegaLiteSchema):\n    \"\"\"\n    TooltipContent schema wrapper.\n\n    Parameters\n    ----------\n    content : Literal['encoding', 'data']\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TooltipContent\"}\n\n    def __init__(\n        self, content: Optional[Literal[\"encoding\", \"data\"]] = Undefined, **kwds\n    ):\n        super().__init__(content=content, **kwds)\n\n\nclass TopLevelParameter(VegaLiteSchema):\n    \"\"\"TopLevelParameter schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TopLevelParameter\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass TopLevelSelectionParameter(TopLevelParameter):\n    \"\"\"\n    TopLevelSelectionParameter schema wrapper.\n\n    Parameters\n    ----------\n    name : str, :class:`ParameterName`\n        Required. A unique name for the selection parameter. Selection names should be valid\n        JavaScript identifiers: they should contain only alphanumeric characters (or \"$\", or\n        \"_\") and may not start with a digit. Reserved keywords that may not be used as\n        parameter names are \"datum\", \"event\", \"item\", and \"parent\".\n    select : dict, :class:`SelectionType`, :class:`PointSelectionConfig`, :class:`IntervalSelectionConfig`, Literal['point', 'interval']\n        Determines the default event processing and data query for the selection. Vega-Lite\n        currently supports two selection types:\n\n        * ``\"point\"`` -- to select multiple discrete data values; the first value is\n          selected on ``click`` and additional values toggled on shift-click.\n        * ``\"interval\"`` -- to select a continuous range of data values on ``drag``.\n    bind : dict, :class:`Binding`, :class:`BindInput`, :class:`BindRange`, :class:`BindDirect`, :class:`BindCheckbox`, :class:`LegendBinding`, :class:`BindRadioSelect`, Literal['legend', 'scales'], :class:`LegendStreamBinding`\n        When set, a selection is populated by input elements (also known as dynamic query\n        widgets) or by interacting with the corresponding legend. Direct manipulation\n        interaction is disabled by default; to re-enable it, set the selection's `on\n        <https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties>`__\n        property.\n\n        Legend bindings are restricted to selections that only specify a single field or\n        encoding.\n\n        Query widget binding takes the form of Vega's `input element binding definition\n        <https://vega.github.io/vega/docs/signals/#bind>`__ or can be a mapping between\n        projected field/encodings and binding definitions.\n\n        **See also:** `bind <https://vega.github.io/vega-lite/docs/bind.html>`__\n        documentation.\n    value : str, bool, dict, float, :class:`DateTime`, :class:`SelectionInit`, :class:`PrimitiveValue`, :class:`SelectionInitIntervalMapping`, Sequence[dict, :class:`SelectionInitMapping`], None\n        Initialize the selection with a mapping between `projected channels or field names\n        <https://vega.github.io/vega-lite/docs/selection.html#project>`__ and initial\n        values.\n\n        **See also:** `init <https://vega.github.io/vega-lite/docs/value.html>`__\n        documentation.\n    views : Sequence[str]\n        By default, top-level selections are applied to every view in the visualization. If\n        this property is specified, selections will only be applied to views with the given\n        names.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TopLevelSelectionParameter\"}\n\n    def __init__(\n        self,\n        name: Optional[str | SchemaBase] = Undefined,\n        select: Optional[SchemaBase | Map | SelectionType_T] = Undefined,\n        bind: Optional[SchemaBase | Literal[\"legend\", \"scales\"] | Map] = Undefined,\n        value: Optional[\n            Temporal | SchemaBase | Sequence[SchemaBase | Map] | Map | PrimitiveValue_T\n        ] = Undefined,\n        views: Optional[Sequence[str]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            name=name, select=select, bind=bind, value=value, views=views, **kwds\n        )\n\n\nclass TopLevelSpec(VegaLiteSchema):\n    \"\"\"\n    TopLevelSpec schema wrapper.\n\n    A Vega-Lite top-level specification. This is the root class for all Vega-Lite\n    specifications. (The json schema is generated from this type.)\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TopLevelSpec\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass TopLevelConcatSpec(TopLevelSpec):\n    \"\"\"\n    TopLevelConcatSpec schema wrapper.\n\n    Parameters\n    ----------\n    concat : Sequence[dict, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonNormalizedSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`]\n        A list of views to be concatenated.\n    align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']\n        The alignment to apply to grid rows and columns. The supported string values are\n        ``\"all\"``, ``\"each\"``, and ``\"none\"``.\n\n        * For ``\"none\"``, a flow layout will be used, in which adjacent subviews are simply\n          placed one after the other.\n        * For ``\"each\"``, subviews will be aligned into a clean grid structure, but each row\n          or column may be of variable size.\n        * For ``\"all\"``, subviews will be aligned and each row or column will be sized\n          identically based on the maximum observed size. String values for this property\n          will be applied to both grid rows and columns.\n\n        Alternatively, an object value of the form ``{\"row\": string, \"column\": string}`` can\n        be used to supply different alignments for rows and columns.\n\n        **Default value:** ``\"all\"``.\n    autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y']\n        How the visualization size should be determined. If a string, should be one of\n        ``\"pad\"``, ``\"fit\"`` or ``\"none\"``. Object values can additionally specify\n        parameters for content sizing and automatic resizing.\n\n        **Default value**: ``pad``\n    background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']\n        CSS color property to use as the background of the entire view.\n\n        **Default value:** ``\"white\"``\n    bounds : Literal['full', 'flush']\n        The bounds calculation method to use for determining the extent of a sub-plot. One\n        of ``full`` (the default) or ``flush``.\n\n        * If set to ``full``, the entire calculated bounds (including axes, title, and\n          legend) will be used.\n        * If set to ``flush``, only the specified width and height values for the sub-view\n          will be used. The ``flush`` setting can be useful when attempting to place\n          sub-plots without axes or legends into a uniform grid structure.\n\n        **Default value:** ``\"full\"``\n    center : bool, dict, :class:`RowColboolean`\n        Boolean flag indicating if subviews should be centered relative to their respective\n        rows or columns.\n\n        An object value of the form ``{\"row\": boolean, \"column\": boolean}`` can be used to\n        supply different centering values for rows and columns.\n\n        **Default value:** ``false``\n    columns : float\n        The number of columns to include in the view composition layout.\n\n        **Default value**: ``undefined`` -- An infinite number of columns (a single row)\n        will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the\n        ``column`` channel (for ``facet`` and ``repeat``).\n\n        **Note**:\n\n        1) This property is only for:\n\n        * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)\n        * the ``facet`` and ``repeat`` operator with one field/repetition definition\n          (without row/column nesting)\n\n        2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)\n        and to using the ``row`` channel (for ``facet`` and ``repeat``).\n    config : dict, :class:`Config`\n        Vega-Lite configuration object. This property can only be defined at the top-level\n        of a specification.\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    datasets : dict, :class:`Datasets`\n        A global data store for named datasets. This is a mapping from names to inline\n        datasets. This can be an array of objects or primitive values or a string. Arrays of\n        primitive values are ingested as objects with a ``data`` property.\n    description : str\n        Description of this mark for commenting purpose.\n    name : str\n        Name of the visualization for later reference.\n    padding : dict, float, :class:`ExprRef`, :class:`Padding`\n        The default visualization padding, in pixels, from the edge of the visualization\n        canvas to the data rectangle. If a number, specifies padding for all sides. If an\n        object, the value should have the format ``{\"left\": 5, \"top\": 5, \"right\": 5,\n        \"bottom\": 5}`` to specify padding for each side of the visualization.\n\n        **Default value**: ``5``\n    params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`]\n        Dynamic variables or selections that parameterize a visualization.\n    resolve : dict, :class:`Resolve`\n        Scale, axis, and legend resolutions for view composition specifications.\n    spacing : dict, float, :class:`RowColnumber`\n        The spacing in pixels between sub-views of the composition operator. An object of\n        the form ``{\"row\": number, \"column\": number}`` can be used to set different spacing\n        values for rows and columns.\n\n        **Default value**: Depends on ``\"spacing\"`` property of `the view composition\n        configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__\n        (``20`` by default)\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    usermeta : dict, :class:`Dict`\n        Optional metadata that will be passed to Vega. This object is completely ignored by\n        Vega and Vega-Lite and can be used for custom metadata.\n    $schema : str\n        URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.\n        Unless you have a reason to change this, use\n        ``https://vega.github.io/schema/vega-lite/v6.json``. Setting the ``$schema``\n        property allows automatic validation and autocomplete in editors that support JSON\n        schema.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TopLevelConcatSpec\"}\n\n    def __init__(\n        self,\n        concat: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined,\n        autosize: Optional[SchemaBase | Map | AutosizeType_T] = Undefined,\n        background: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        bounds: Optional[Literal[\"full\", \"flush\"]] = Undefined,\n        center: Optional[bool | SchemaBase | Map] = Undefined,\n        columns: Optional[float] = Undefined,\n        config: Optional[SchemaBase | Map] = Undefined,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        datasets: Optional[SchemaBase | Map] = Undefined,\n        description: Optional[str] = Undefined,\n        name: Optional[str] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        params: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        resolve: Optional[SchemaBase | Map] = Undefined,\n        spacing: Optional[float | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        usermeta: Optional[SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            concat=concat,\n            align=align,\n            autosize=autosize,\n            background=background,\n            bounds=bounds,\n            center=center,\n            columns=columns,\n            config=config,\n            data=data,\n            datasets=datasets,\n            description=description,\n            name=name,\n            padding=padding,\n            params=params,\n            resolve=resolve,\n            spacing=spacing,\n            title=title,\n            transform=transform,\n            usermeta=usermeta,\n            **kwds,\n        )\n\n\nclass TopLevelFacetSpec(TopLevelSpec):\n    \"\"\"\n    TopLevelFacetSpec schema wrapper.\n\n    Parameters\n    ----------\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    facet : dict, :class:`FacetMapping`, :class:`FacetFieldDef`\n        Definition for how to facet the data. One of: 1) `a field definition for faceting\n        the plot by one field\n        <https://vega.github.io/vega-lite/docs/facet.html#field-def>`__ 2) `An object that\n        maps row and column channels to their field definitions\n        <https://vega.github.io/vega-lite/docs/facet.html#mapping>`__\n    spec : dict, :class:`LayerSpec`, :class:`UnitSpecWithFrame`\n        A specification of the view that gets faceted.\n    align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']\n        The alignment to apply to grid rows and columns. The supported string values are\n        ``\"all\"``, ``\"each\"``, and ``\"none\"``.\n\n        * For ``\"none\"``, a flow layout will be used, in which adjacent subviews are simply\n          placed one after the other.\n        * For ``\"each\"``, subviews will be aligned into a clean grid structure, but each row\n          or column may be of variable size.\n        * For ``\"all\"``, subviews will be aligned and each row or column will be sized\n          identically based on the maximum observed size. String values for this property\n          will be applied to both grid rows and columns.\n\n        Alternatively, an object value of the form ``{\"row\": string, \"column\": string}`` can\n        be used to supply different alignments for rows and columns.\n\n        **Default value:** ``\"all\"``.\n    autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y']\n        How the visualization size should be determined. If a string, should be one of\n        ``\"pad\"``, ``\"fit\"`` or ``\"none\"``. Object values can additionally specify\n        parameters for content sizing and automatic resizing.\n\n        **Default value**: ``pad``\n    background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']\n        CSS color property to use as the background of the entire view.\n\n        **Default value:** ``\"white\"``\n    bounds : Literal['full', 'flush']\n        The bounds calculation method to use for determining the extent of a sub-plot. One\n        of ``full`` (the default) or ``flush``.\n\n        * If set to ``full``, the entire calculated bounds (including axes, title, and\n          legend) will be used.\n        * If set to ``flush``, only the specified width and height values for the sub-view\n          will be used. The ``flush`` setting can be useful when attempting to place\n          sub-plots without axes or legends into a uniform grid structure.\n\n        **Default value:** ``\"full\"``\n    center : bool, dict, :class:`RowColboolean`\n        Boolean flag indicating if subviews should be centered relative to their respective\n        rows or columns.\n\n        An object value of the form ``{\"row\": boolean, \"column\": boolean}`` can be used to\n        supply different centering values for rows and columns.\n\n        **Default value:** ``false``\n    columns : float\n        The number of columns to include in the view composition layout.\n\n        **Default value**: ``undefined`` -- An infinite number of columns (a single row)\n        will be assumed. This is equivalent to ``hconcat`` (for ``concat``) and to using the\n        ``column`` channel (for ``facet`` and ``repeat``).\n\n        **Note**:\n\n        1) This property is only for:\n\n        * the general (wrappable) ``concat`` operator (not ``hconcat``/``vconcat``)\n        * the ``facet`` and ``repeat`` operator with one field/repetition definition\n          (without row/column nesting)\n\n        2) Setting the ``columns`` to ``1`` is equivalent to ``vconcat`` (for ``concat``)\n        and to using the ``row`` channel (for ``facet`` and ``repeat``).\n    config : dict, :class:`Config`\n        Vega-Lite configuration object. This property can only be defined at the top-level\n        of a specification.\n    datasets : dict, :class:`Datasets`\n        A global data store for named datasets. This is a mapping from names to inline\n        datasets. This can be an array of objects or primitive values or a string. Arrays of\n        primitive values are ingested as objects with a ``data`` property.\n    description : str\n        Description of this mark for commenting purpose.\n    name : str\n        Name of the visualization for later reference.\n    padding : dict, float, :class:`ExprRef`, :class:`Padding`\n        The default visualization padding, in pixels, from the edge of the visualization\n        canvas to the data rectangle. If a number, specifies padding for all sides. If an\n        object, the value should have the format ``{\"left\": 5, \"top\": 5, \"right\": 5,\n        \"bottom\": 5}`` to specify padding for each side of the visualization.\n\n        **Default value**: ``5``\n    params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`]\n        Dynamic variables or selections that parameterize a visualization.\n    resolve : dict, :class:`Resolve`\n        Scale, axis, and legend resolutions for view composition specifications.\n    spacing : dict, float, :class:`RowColnumber`\n        The spacing in pixels between sub-views of the composition operator. An object of\n        the form ``{\"row\": number, \"column\": number}`` can be used to set different spacing\n        values for rows and columns.\n\n        **Default value**: Depends on ``\"spacing\"`` property of `the view composition\n        configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__\n        (``20`` by default)\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    usermeta : dict, :class:`Dict`\n        Optional metadata that will be passed to Vega. This object is completely ignored by\n        Vega and Vega-Lite and can be used for custom metadata.\n    $schema : str\n        URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.\n        Unless you have a reason to change this, use\n        ``https://vega.github.io/schema/vega-lite/v6.json``. Setting the ``$schema``\n        property allows automatic validation and autocomplete in editors that support JSON\n        schema.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TopLevelFacetSpec\"}\n\n    def __init__(\n        self,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        facet: Optional[SchemaBase | Map] = Undefined,\n        spec: Optional[SchemaBase | Map] = Undefined,\n        align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined,\n        autosize: Optional[SchemaBase | Map | AutosizeType_T] = Undefined,\n        background: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        bounds: Optional[Literal[\"full\", \"flush\"]] = Undefined,\n        center: Optional[bool | SchemaBase | Map] = Undefined,\n        columns: Optional[float] = Undefined,\n        config: Optional[SchemaBase | Map] = Undefined,\n        datasets: Optional[SchemaBase | Map] = Undefined,\n        description: Optional[str] = Undefined,\n        name: Optional[str] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        params: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        resolve: Optional[SchemaBase | Map] = Undefined,\n        spacing: Optional[float | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        usermeta: Optional[SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            data=data,\n            facet=facet,\n            spec=spec,\n            align=align,\n            autosize=autosize,\n            background=background,\n            bounds=bounds,\n            center=center,\n            columns=columns,\n            config=config,\n            datasets=datasets,\n            description=description,\n            name=name,\n            padding=padding,\n            params=params,\n            resolve=resolve,\n            spacing=spacing,\n            title=title,\n            transform=transform,\n            usermeta=usermeta,\n            **kwds,\n        )\n\n\nclass TopLevelHConcatSpec(TopLevelSpec):\n    \"\"\"\n    TopLevelHConcatSpec schema wrapper.\n\n    Parameters\n    ----------\n    hconcat : Sequence[dict, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonNormalizedSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`]\n        A list of views to be concatenated and put into a row.\n    autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y']\n        How the visualization size should be determined. If a string, should be one of\n        ``\"pad\"``, ``\"fit\"`` or ``\"none\"``. Object values can additionally specify\n        parameters for content sizing and automatic resizing.\n\n        **Default value**: ``pad``\n    background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']\n        CSS color property to use as the background of the entire view.\n\n        **Default value:** ``\"white\"``\n    bounds : Literal['full', 'flush']\n        The bounds calculation method to use for determining the extent of a sub-plot. One\n        of ``full`` (the default) or ``flush``.\n\n        * If set to ``full``, the entire calculated bounds (including axes, title, and\n          legend) will be used.\n        * If set to ``flush``, only the specified width and height values for the sub-view\n          will be used. The ``flush`` setting can be useful when attempting to place\n          sub-plots without axes or legends into a uniform grid structure.\n\n        **Default value:** ``\"full\"``\n    center : bool\n        Boolean flag indicating if subviews should be centered relative to their respective\n        rows or columns.\n\n        **Default value:** ``false``\n    config : dict, :class:`Config`\n        Vega-Lite configuration object. This property can only be defined at the top-level\n        of a specification.\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    datasets : dict, :class:`Datasets`\n        A global data store for named datasets. This is a mapping from names to inline\n        datasets. This can be an array of objects or primitive values or a string. Arrays of\n        primitive values are ingested as objects with a ``data`` property.\n    description : str\n        Description of this mark for commenting purpose.\n    name : str\n        Name of the visualization for later reference.\n    padding : dict, float, :class:`ExprRef`, :class:`Padding`\n        The default visualization padding, in pixels, from the edge of the visualization\n        canvas to the data rectangle. If a number, specifies padding for all sides. If an\n        object, the value should have the format ``{\"left\": 5, \"top\": 5, \"right\": 5,\n        \"bottom\": 5}`` to specify padding for each side of the visualization.\n\n        **Default value**: ``5``\n    params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`]\n        Dynamic variables or selections that parameterize a visualization.\n    resolve : dict, :class:`Resolve`\n        Scale, axis, and legend resolutions for view composition specifications.\n    spacing : float\n        The spacing in pixels between sub-views of the concat operator.\n\n        **Default value**: ``10``\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    usermeta : dict, :class:`Dict`\n        Optional metadata that will be passed to Vega. This object is completely ignored by\n        Vega and Vega-Lite and can be used for custom metadata.\n    $schema : str\n        URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.\n        Unless you have a reason to change this, use\n        ``https://vega.github.io/schema/vega-lite/v6.json``. Setting the ``$schema``\n        property allows automatic validation and autocomplete in editors that support JSON\n        schema.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TopLevelHConcatSpec\"}\n\n    def __init__(\n        self,\n        hconcat: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        autosize: Optional[SchemaBase | Map | AutosizeType_T] = Undefined,\n        background: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        bounds: Optional[Literal[\"full\", \"flush\"]] = Undefined,\n        center: Optional[bool] = Undefined,\n        config: Optional[SchemaBase | Map] = Undefined,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        datasets: Optional[SchemaBase | Map] = Undefined,\n        description: Optional[str] = Undefined,\n        name: Optional[str] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        params: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        resolve: Optional[SchemaBase | Map] = Undefined,\n        spacing: Optional[float] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        usermeta: Optional[SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            hconcat=hconcat,\n            autosize=autosize,\n            background=background,\n            bounds=bounds,\n            center=center,\n            config=config,\n            data=data,\n            datasets=datasets,\n            description=description,\n            name=name,\n            padding=padding,\n            params=params,\n            resolve=resolve,\n            spacing=spacing,\n            title=title,\n            transform=transform,\n            usermeta=usermeta,\n            **kwds,\n        )\n\n\nclass TopLevelLayerSpec(TopLevelSpec):\n    \"\"\"\n    TopLevelLayerSpec schema wrapper.\n\n    Parameters\n    ----------\n    layer : Sequence[dict, :class:`UnitSpec`, :class:`LayerSpec`]\n        Layer or single view specifications to be layered.\n\n        **Note**: Specifications inside ``layer`` cannot use ``row`` and ``column`` channels\n        as layering facet specifications is not allowed. Instead, use the `facet operator\n        <https://vega.github.io/vega-lite/docs/facet.html>`__ and place a layer inside a\n        facet.\n    autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y']\n        How the visualization size should be determined. If a string, should be one of\n        ``\"pad\"``, ``\"fit\"`` or ``\"none\"``. Object values can additionally specify\n        parameters for content sizing and automatic resizing.\n\n        **Default value**: ``pad``\n    background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']\n        CSS color property to use as the background of the entire view.\n\n        **Default value:** ``\"white\"``\n    config : dict, :class:`Config`\n        Vega-Lite configuration object. This property can only be defined at the top-level\n        of a specification.\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    datasets : dict, :class:`Datasets`\n        A global data store for named datasets. This is a mapping from names to inline\n        datasets. This can be an array of objects or primitive values or a string. Arrays of\n        primitive values are ingested as objects with a ``data`` property.\n    description : str\n        Description of this mark for commenting purpose.\n    encoding : dict, :class:`SharedEncoding`\n        A shared key-value mapping between encoding channels and definition of fields in the\n        underlying layers.\n    height : dict, float, :class:`Step`, Literal['container']\n        The height of a visualization.\n\n        * For a plot with a continuous y-field, height should be a number.\n        * For a plot with either a discrete y-field or no y-field, height can be either a\n          number indicating a fixed height or an object in the form of ``{step: number}``\n          defining the height per discrete step. (No y-field is equivalent to having one\n          discrete step.)\n        * To enable responsive sizing on height, it should be set to ``\"container\"``.\n\n        **Default value:** Based on ``config.view.continuousHeight`` for a plot with a\n        continuous y-field and ``config.view.discreteHeight`` otherwise.\n\n        **Note:** For plots with `row and column channels\n        <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the\n        height of a single view and the ``\"container\"`` option cannot be used.\n\n        **See also:** `height <https://vega.github.io/vega-lite/docs/size.html>`__\n        documentation.\n    name : str\n        Name of the visualization for later reference.\n    padding : dict, float, :class:`ExprRef`, :class:`Padding`\n        The default visualization padding, in pixels, from the edge of the visualization\n        canvas to the data rectangle. If a number, specifies padding for all sides. If an\n        object, the value should have the format ``{\"left\": 5, \"top\": 5, \"right\": 5,\n        \"bottom\": 5}`` to specify padding for each side of the visualization.\n\n        **Default value**: ``5``\n    params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`]\n        Dynamic variables or selections that parameterize a visualization.\n    projection : dict, :class:`Projection`\n        An object defining properties of the geographic projection shared by underlying\n        layers.\n    resolve : dict, :class:`Resolve`\n        Scale, axis, and legend resolutions for view composition specifications.\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    usermeta : dict, :class:`Dict`\n        Optional metadata that will be passed to Vega. This object is completely ignored by\n        Vega and Vega-Lite and can be used for custom metadata.\n    view : dict, :class:`ViewBackground`\n        An object defining the view background's fill and stroke.\n\n        **Default value:** none (transparent)\n    width : dict, float, :class:`Step`, Literal['container']\n        The width of a visualization.\n\n        * For a plot with a continuous x-field, width should be a number.\n        * For a plot with either a discrete x-field or no x-field, width can be either a\n          number indicating a fixed width or an object in the form of ``{step: number}``\n          defining the width per discrete step. (No x-field is equivalent to having one\n          discrete step.)\n        * To enable responsive sizing on width, it should be set to ``\"container\"``.\n\n        **Default value:** Based on ``config.view.continuousWidth`` for a plot with a\n        continuous x-field and ``config.view.discreteWidth`` otherwise.\n\n        **Note:** For plots with `row and column channels\n        <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the\n        width of a single view and the ``\"container\"`` option cannot be used.\n\n        **See also:** `width <https://vega.github.io/vega-lite/docs/size.html>`__\n        documentation.\n    $schema : str\n        URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.\n        Unless you have a reason to change this, use\n        ``https://vega.github.io/schema/vega-lite/v6.json``. Setting the ``$schema``\n        property allows automatic validation and autocomplete in editors that support JSON\n        schema.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TopLevelLayerSpec\"}\n\n    def __init__(\n        self,\n        layer: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        autosize: Optional[SchemaBase | Map | AutosizeType_T] = Undefined,\n        background: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        config: Optional[SchemaBase | Map] = Undefined,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        datasets: Optional[SchemaBase | Map] = Undefined,\n        description: Optional[str] = Undefined,\n        encoding: Optional[SchemaBase | Map] = Undefined,\n        height: Optional[float | SchemaBase | Literal[\"container\"] | Map] = Undefined,\n        name: Optional[str] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        params: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        projection: Optional[SchemaBase | Map] = Undefined,\n        resolve: Optional[SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        usermeta: Optional[SchemaBase | Map] = Undefined,\n        view: Optional[SchemaBase | Map] = Undefined,\n        width: Optional[float | SchemaBase | Literal[\"container\"] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            layer=layer,\n            autosize=autosize,\n            background=background,\n            config=config,\n            data=data,\n            datasets=datasets,\n            description=description,\n            encoding=encoding,\n            height=height,\n            name=name,\n            padding=padding,\n            params=params,\n            projection=projection,\n            resolve=resolve,\n            title=title,\n            transform=transform,\n            usermeta=usermeta,\n            view=view,\n            width=width,\n            **kwds,\n        )\n\n\nclass TopLevelRepeatSpec(TopLevelSpec):\n    \"\"\"TopLevelRepeatSpec schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TopLevelRepeatSpec\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass TopLevelUnitSpec(TopLevelSpec):\n    \"\"\"\n    TopLevelUnitSpec schema wrapper.\n\n    Parameters\n    ----------\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    mark : dict, :class:`Mark`, :class:`AnyMark`, :class:`BoxPlot`, :class:`MarkDef`, :class:`ErrorBar`, :class:`ErrorBand`, :class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`, :class:`CompositeMark`, :class:`CompositeMarkDef`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape', 'boxplot', 'errorband', 'errorbar']\n        A string describing the mark type (one of ``\"bar\"``, ``\"circle\"``, ``\"square\"``,\n        ``\"tick\"``, ``\"line\"``, ``\"area\"``, ``\"point\"``, ``\"rule\"``, ``\"geoshape\"``, and\n        ``\"text\"``) or a `mark definition object\n        <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.\n    align : dict, :class:`LayoutAlign`, :class:`RowColLayoutAlign`, Literal['all', 'each', 'none']\n        The alignment to apply to grid rows and columns. The supported string values are\n        ``\"all\"``, ``\"each\"``, and ``\"none\"``.\n\n        * For ``\"none\"``, a flow layout will be used, in which adjacent subviews are simply\n          placed one after the other.\n        * For ``\"each\"``, subviews will be aligned into a clean grid structure, but each row\n          or column may be of variable size.\n        * For ``\"all\"``, subviews will be aligned and each row or column will be sized\n          identically based on the maximum observed size. String values for this property\n          will be applied to both grid rows and columns.\n\n        Alternatively, an object value of the form ``{\"row\": string, \"column\": string}`` can\n        be used to supply different alignments for rows and columns.\n\n        **Default value:** ``\"all\"``.\n    autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y']\n        How the visualization size should be determined. If a string, should be one of\n        ``\"pad\"``, ``\"fit\"`` or ``\"none\"``. Object values can additionally specify\n        parameters for content sizing and automatic resizing.\n\n        **Default value**: ``pad``\n    background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']\n        CSS color property to use as the background of the entire view.\n\n        **Default value:** ``\"white\"``\n    bounds : Literal['full', 'flush']\n        The bounds calculation method to use for determining the extent of a sub-plot. One\n        of ``full`` (the default) or ``flush``.\n\n        * If set to ``full``, the entire calculated bounds (including axes, title, and\n          legend) will be used.\n        * If set to ``flush``, only the specified width and height values for the sub-view\n          will be used. The ``flush`` setting can be useful when attempting to place\n          sub-plots without axes or legends into a uniform grid structure.\n\n        **Default value:** ``\"full\"``\n    center : bool, dict, :class:`RowColboolean`\n        Boolean flag indicating if subviews should be centered relative to their respective\n        rows or columns.\n\n        An object value of the form ``{\"row\": boolean, \"column\": boolean}`` can be used to\n        supply different centering values for rows and columns.\n\n        **Default value:** ``false``\n    config : dict, :class:`Config`\n        Vega-Lite configuration object. This property can only be defined at the top-level\n        of a specification.\n    datasets : dict, :class:`Datasets`\n        A global data store for named datasets. This is a mapping from names to inline\n        datasets. This can be an array of objects or primitive values or a string. Arrays of\n        primitive values are ingested as objects with a ``data`` property.\n    description : str\n        Description of this mark for commenting purpose.\n    encoding : dict, :class:`FacetedEncoding`\n        A key-value mapping between encoding channels and definition of fields.\n    height : dict, float, :class:`Step`, Literal['container']\n        The height of a visualization.\n\n        * For a plot with a continuous y-field, height should be a number.\n        * For a plot with either a discrete y-field or no y-field, height can be either a\n          number indicating a fixed height or an object in the form of ``{step: number}``\n          defining the height per discrete step. (No y-field is equivalent to having one\n          discrete step.)\n        * To enable responsive sizing on height, it should be set to ``\"container\"``.\n\n        **Default value:** Based on ``config.view.continuousHeight`` for a plot with a\n        continuous y-field and ``config.view.discreteHeight`` otherwise.\n\n        **Note:** For plots with `row and column channels\n        <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the\n        height of a single view and the ``\"container\"`` option cannot be used.\n\n        **See also:** `height <https://vega.github.io/vega-lite/docs/size.html>`__\n        documentation.\n    name : str\n        Name of the visualization for later reference.\n    padding : dict, float, :class:`ExprRef`, :class:`Padding`\n        The default visualization padding, in pixels, from the edge of the visualization\n        canvas to the data rectangle. If a number, specifies padding for all sides. If an\n        object, the value should have the format ``{\"left\": 5, \"top\": 5, \"right\": 5,\n        \"bottom\": 5}`` to specify padding for each side of the visualization.\n\n        **Default value**: ``5``\n    params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`]\n        An array of parameters that may either be simple variables, or more complex\n        selections that map user input to data queries.\n    projection : dict, :class:`Projection`\n        An object defining properties of geographic projection, which will be applied to\n        ``shape`` path for ``\"geoshape\"`` marks and to ``latitude`` and ``\"longitude\"``\n        channels for other marks.\n    resolve : dict, :class:`Resolve`\n        Scale, axis, and legend resolutions for view composition specifications.\n    spacing : dict, float, :class:`RowColnumber`\n        The spacing in pixels between sub-views of the composition operator. An object of\n        the form ``{\"row\": number, \"column\": number}`` can be used to set different spacing\n        values for rows and columns.\n\n        **Default value**: Depends on ``\"spacing\"`` property of `the view composition\n        configuration <https://vega.github.io/vega-lite/docs/config.html#view-config>`__\n        (``20`` by default)\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    usermeta : dict, :class:`Dict`\n        Optional metadata that will be passed to Vega. This object is completely ignored by\n        Vega and Vega-Lite and can be used for custom metadata.\n    view : dict, :class:`ViewBackground`\n        An object defining the view background's fill and stroke.\n\n        **Default value:** none (transparent)\n    width : dict, float, :class:`Step`, Literal['container']\n        The width of a visualization.\n\n        * For a plot with a continuous x-field, width should be a number.\n        * For a plot with either a discrete x-field or no x-field, width can be either a\n          number indicating a fixed width or an object in the form of ``{step: number}``\n          defining the width per discrete step. (No x-field is equivalent to having one\n          discrete step.)\n        * To enable responsive sizing on width, it should be set to ``\"container\"``.\n\n        **Default value:** Based on ``config.view.continuousWidth`` for a plot with a\n        continuous x-field and ``config.view.discreteWidth`` otherwise.\n\n        **Note:** For plots with `row and column channels\n        <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the\n        width of a single view and the ``\"container\"`` option cannot be used.\n\n        **See also:** `width <https://vega.github.io/vega-lite/docs/size.html>`__\n        documentation.\n    $schema : str\n        URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.\n        Unless you have a reason to change this, use\n        ``https://vega.github.io/schema/vega-lite/v6.json``. Setting the ``$schema``\n        property allows automatic validation and autocomplete in editors that support JSON\n        schema.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TopLevelUnitSpec\"}\n\n    def __init__(\n        self,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        mark: Optional[SchemaBase | Map | Mark_T | CompositeMark_T] = Undefined,\n        align: Optional[SchemaBase | Map | LayoutAlign_T] = Undefined,\n        autosize: Optional[SchemaBase | Map | AutosizeType_T] = Undefined,\n        background: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        bounds: Optional[Literal[\"full\", \"flush\"]] = Undefined,\n        center: Optional[bool | SchemaBase | Map] = Undefined,\n        config: Optional[SchemaBase | Map] = Undefined,\n        datasets: Optional[SchemaBase | Map] = Undefined,\n        description: Optional[str] = Undefined,\n        encoding: Optional[SchemaBase | Map] = Undefined,\n        height: Optional[float | SchemaBase | Literal[\"container\"] | Map] = Undefined,\n        name: Optional[str] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        params: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        projection: Optional[SchemaBase | Map] = Undefined,\n        resolve: Optional[SchemaBase | Map] = Undefined,\n        spacing: Optional[float | SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        usermeta: Optional[SchemaBase | Map] = Undefined,\n        view: Optional[SchemaBase | Map] = Undefined,\n        width: Optional[float | SchemaBase | Literal[\"container\"] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            data=data,\n            mark=mark,\n            align=align,\n            autosize=autosize,\n            background=background,\n            bounds=bounds,\n            center=center,\n            config=config,\n            datasets=datasets,\n            description=description,\n            encoding=encoding,\n            height=height,\n            name=name,\n            padding=padding,\n            params=params,\n            projection=projection,\n            resolve=resolve,\n            spacing=spacing,\n            title=title,\n            transform=transform,\n            usermeta=usermeta,\n            view=view,\n            width=width,\n            **kwds,\n        )\n\n\nclass TopLevelVConcatSpec(TopLevelSpec):\n    \"\"\"\n    TopLevelVConcatSpec schema wrapper.\n\n    Parameters\n    ----------\n    vconcat : Sequence[dict, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonNormalizedSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`]\n        A list of views to be concatenated and put into a column.\n    autosize : dict, :class:`AutosizeType`, :class:`AutoSizeParams`, Literal['pad', 'none', 'fit', 'fit-x', 'fit-y']\n        How the visualization size should be determined. If a string, should be one of\n        ``\"pad\"``, ``\"fit\"`` or ``\"none\"``. Object values can additionally specify\n        parameters for content sizing and automatic resizing.\n\n        **Default value**: ``pad``\n    background : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']\n        CSS color property to use as the background of the entire view.\n\n        **Default value:** ``\"white\"``\n    bounds : Literal['full', 'flush']\n        The bounds calculation method to use for determining the extent of a sub-plot. One\n        of ``full`` (the default) or ``flush``.\n\n        * If set to ``full``, the entire calculated bounds (including axes, title, and\n          legend) will be used.\n        * If set to ``flush``, only the specified width and height values for the sub-view\n          will be used. The ``flush`` setting can be useful when attempting to place\n          sub-plots without axes or legends into a uniform grid structure.\n\n        **Default value:** ``\"full\"``\n    center : bool\n        Boolean flag indicating if subviews should be centered relative to their respective\n        rows or columns.\n\n        **Default value:** ``false``\n    config : dict, :class:`Config`\n        Vega-Lite configuration object. This property can only be defined at the top-level\n        of a specification.\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    datasets : dict, :class:`Datasets`\n        A global data store for named datasets. This is a mapping from names to inline\n        datasets. This can be an array of objects or primitive values or a string. Arrays of\n        primitive values are ingested as objects with a ``data`` property.\n    description : str\n        Description of this mark for commenting purpose.\n    name : str\n        Name of the visualization for later reference.\n    padding : dict, float, :class:`ExprRef`, :class:`Padding`\n        The default visualization padding, in pixels, from the edge of the visualization\n        canvas to the data rectangle. If a number, specifies padding for all sides. If an\n        object, the value should have the format ``{\"left\": 5, \"top\": 5, \"right\": 5,\n        \"bottom\": 5}`` to specify padding for each side of the visualization.\n\n        **Default value**: ``5``\n    params : Sequence[dict, :class:`TopLevelParameter`, :class:`VariableParameter`, :class:`TopLevelSelectionParameter`]\n        Dynamic variables or selections that parameterize a visualization.\n    resolve : dict, :class:`Resolve`\n        Scale, axis, and legend resolutions for view composition specifications.\n    spacing : float\n        The spacing in pixels between sub-views of the concat operator.\n\n        **Default value**: ``10``\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    usermeta : dict, :class:`Dict`\n        Optional metadata that will be passed to Vega. This object is completely ignored by\n        Vega and Vega-Lite and can be used for custom metadata.\n    $schema : str\n        URL to `JSON schema <http://json-schema.org/>`__ for a Vega-Lite specification.\n        Unless you have a reason to change this, use\n        ``https://vega.github.io/schema/vega-lite/v6.json``. Setting the ``$schema``\n        property allows automatic validation and autocomplete in editors that support JSON\n        schema.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TopLevelVConcatSpec\"}\n\n    def __init__(\n        self,\n        vconcat: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        autosize: Optional[SchemaBase | Map | AutosizeType_T] = Undefined,\n        background: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T\n        ] = Undefined,\n        bounds: Optional[Literal[\"full\", \"flush\"]] = Undefined,\n        center: Optional[bool] = Undefined,\n        config: Optional[SchemaBase | Map] = Undefined,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        datasets: Optional[SchemaBase | Map] = Undefined,\n        description: Optional[str] = Undefined,\n        name: Optional[str] = Undefined,\n        padding: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        params: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        resolve: Optional[SchemaBase | Map] = Undefined,\n        spacing: Optional[float] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        usermeta: Optional[SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            vconcat=vconcat,\n            autosize=autosize,\n            background=background,\n            bounds=bounds,\n            center=center,\n            config=config,\n            data=data,\n            datasets=datasets,\n            description=description,\n            name=name,\n            padding=padding,\n            params=params,\n            resolve=resolve,\n            spacing=spacing,\n            title=title,\n            transform=transform,\n            usermeta=usermeta,\n            **kwds,\n        )\n\n\nclass TopoDataFormat(DataFormat):\n    \"\"\"\n    TopoDataFormat schema wrapper.\n\n    Parameters\n    ----------\n    feature : str\n        The name of the TopoJSON object set to convert to a GeoJSON feature collection. For\n        example, in a map of the world, there may be an object set named ``\"countries\"``.\n        Using the feature property, we can extract this set and generate a GeoJSON feature\n        object for each country.\n    mesh : str\n        The name of the TopoJSON object set to convert to mesh. Similar to the ``feature``\n        option, ``mesh`` extracts a named TopoJSON object set.  Unlike the ``feature``\n        option, the corresponding geo data is returned as a single, unified mesh instance,\n        not as individual GeoJSON features. Extracting a mesh is useful for more efficiently\n        drawing borders or other geographic elements that you do not need to associate with\n        specific regions such as individual countries, states or counties.\n    parse : dict, :class:`Parse`, None\n        If set to ``null``, disable type inference based on the spec and only use type\n        inference based on the data. Alternatively, a parsing directive object can be\n        provided for explicit data types. Each property of the object corresponds to a field\n        name, and the value to the desired data type (one of ``\"number\"``, ``\"boolean\"``,\n        ``\"date\"``, or null (do not parse the field)). For example, ``\"parse\":\n        {\"modified_on\": \"date\"}`` parses the ``modified_on`` field in each input record a\n        Date value.\n\n        For ``\"date\"``, we parse data based using JavaScript's `Date.parse()\n        <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse>`__.\n        For Specific date formats can be provided (e.g., ``{foo: \"date:'%m%d%Y'\"}``), using\n        the `d3-time-format syntax <https://github.com/d3/d3-time-format#locale_format>`__.\n        UTC date format parsing is supported similarly (e.g., ``{foo: \"utc:'%m%d%Y'\"}``).\n        See more about `UTC time\n        <https://vega.github.io/vega-lite/docs/timeunit.html#utc>`__\n    type : Literal['topojson']\n        Type of input data: ``\"json\"``, ``\"csv\"``, ``\"tsv\"``, ``\"dsv\"``.\n\n        **Default value:**  The default format type is determined by the extension of the\n        file URL. If no extension is detected, ``\"json\"`` will be used by default.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TopoDataFormat\"}\n\n    def __init__(\n        self,\n        feature: Optional[str] = Undefined,\n        mesh: Optional[str] = Undefined,\n        parse: Optional[SchemaBase | Map | None] = Undefined,\n        type: Optional[Literal[\"topojson\"]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(feature=feature, mesh=mesh, parse=parse, type=type, **kwds)\n\n\nclass Transform(VegaLiteSchema):\n    \"\"\"Transform schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Transform\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass AggregateTransform(Transform):\n    \"\"\"\n    AggregateTransform schema wrapper.\n\n    Parameters\n    ----------\n    aggregate : Sequence[dict, :class:`AggregatedFieldDef`]\n        Array of objects that define fields to aggregate.\n    groupby : Sequence[str, :class:`FieldName`]\n        The data fields to group by. If not specified, a single group containing all data\n        objects will be used.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/AggregateTransform\"}\n\n    def __init__(\n        self,\n        aggregate: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        groupby: Optional[Sequence[str | SchemaBase]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(aggregate=aggregate, groupby=groupby, **kwds)\n\n\nclass BinTransform(Transform):\n    \"\"\"\n    BinTransform schema wrapper.\n\n    Parameters\n    ----------\n    bin : dict, Literal[True], :class:`BinParams`\n        An object indicating bin properties, or simply ``true`` for using default bin\n        parameters.\n    field : str, :class:`FieldName`\n        The data field to bin.\n    as : str, :class:`FieldName`, Sequence[str, :class:`FieldName`]\n        The output fields at which to write the start and end bin values. This can be either\n        a string or an array of strings with two elements denoting the name for the fields\n        for bin start and bin end respectively. If a single string (e.g., ``\"val\"``) is\n        provided, the end field will be ``\"val_end\"``.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BinTransform\"}\n\n    def __init__(\n        self,\n        bin: Optional[SchemaBase | Literal[True] | Map] = Undefined,\n        field: Optional[str | SchemaBase] = Undefined,\n        **kwds,\n    ):\n        super().__init__(bin=bin, field=field, **kwds)\n\n\nclass CalculateTransform(Transform):\n    \"\"\"\n    CalculateTransform schema wrapper.\n\n    Parameters\n    ----------\n    calculate : str\n        A `expression <https://vega.github.io/vega-lite/docs/types.html#expression>`__\n        string. Use the variable ``datum`` to refer to the current data object.\n    as : str, :class:`FieldName`\n        The field for storing the computed formula value.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/CalculateTransform\"}\n\n    def __init__(self, calculate: Optional[str] = Undefined, **kwds):\n        super().__init__(calculate=calculate, **kwds)\n\n\nclass DensityTransform(Transform):\n    \"\"\"\n    DensityTransform schema wrapper.\n\n    Parameters\n    ----------\n    density : str, :class:`FieldName`\n        The data field for which to perform density estimation.\n    bandwidth : float\n        The bandwidth (standard deviation) of the Gaussian kernel. If unspecified or set to\n        zero, the bandwidth value is automatically estimated from the input data using\n        Scott's rule.\n    counts : bool\n        A boolean flag indicating if the output values should be probability estimates\n        (false) or smoothed counts (true).\n\n        **Default value:** ``false``\n    cumulative : bool\n        A boolean flag indicating whether to produce density estimates (false) or cumulative\n        density estimates (true).\n\n        **Default value:** ``false``\n    extent : Sequence[float]\n        A [min, max] domain from which to sample the distribution. If unspecified, the\n        extent will be determined by the observed minimum and maximum values of the density\n        value field.\n    groupby : Sequence[str, :class:`FieldName`]\n        The data fields to group by. If not specified, a single group containing all data\n        objects will be used.\n    maxsteps : float\n        The maximum number of samples to take along the extent domain for plotting the\n        density.\n\n        **Default value:** ``200``\n    minsteps : float\n        The minimum number of samples to take along the extent domain for plotting the\n        density.\n\n        **Default value:** ``25``\n    resolve : Literal['independent', 'shared']\n        Indicates how parameters for multiple densities should be resolved. If\n        ``\"independent\"``, each density may have its own domain extent and dynamic number of\n        curve sample steps. If ``\"shared\"``, the KDE transform will ensure that all\n        densities are defined over a shared domain and curve steps, enabling stacking.\n\n        **Default value:** ``\"shared\"``\n    steps : float\n        The exact number of samples to take along the extent domain for plotting the\n        density. If specified, overrides both minsteps and maxsteps to set an exact number\n        of uniform samples. Potentially useful in conjunction with a fixed extent to ensure\n        consistent sample points for stacked densities.\n    as : Sequence[str, :class:`FieldName`]\n        The output fields for the sample value and corresponding density estimate.\n\n        **Default value:** ``[\"value\", \"density\"]``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/DensityTransform\"}\n\n    def __init__(\n        self,\n        density: Optional[str | SchemaBase] = Undefined,\n        bandwidth: Optional[float] = Undefined,\n        counts: Optional[bool] = Undefined,\n        cumulative: Optional[bool] = Undefined,\n        extent: Optional[Sequence[float]] = Undefined,\n        groupby: Optional[Sequence[str | SchemaBase]] = Undefined,\n        maxsteps: Optional[float] = Undefined,\n        minsteps: Optional[float] = Undefined,\n        resolve: Optional[ResolveMode_T] = Undefined,\n        steps: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            density=density,\n            bandwidth=bandwidth,\n            counts=counts,\n            cumulative=cumulative,\n            extent=extent,\n            groupby=groupby,\n            maxsteps=maxsteps,\n            minsteps=minsteps,\n            resolve=resolve,\n            steps=steps,\n            **kwds,\n        )\n\n\nclass ExtentTransform(Transform):\n    \"\"\"\n    ExtentTransform schema wrapper.\n\n    Parameters\n    ----------\n    extent : str, :class:`FieldName`\n        The field of which to get the extent.\n    param : str, :class:`ParameterName`\n        The output parameter produced by the extent transform.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ExtentTransform\"}\n\n    def __init__(\n        self,\n        extent: Optional[str | SchemaBase] = Undefined,\n        param: Optional[str | SchemaBase] = Undefined,\n        **kwds,\n    ):\n        super().__init__(extent=extent, param=param, **kwds)\n\n\nclass FilterTransform(Transform):\n    \"\"\"\n    FilterTransform schema wrapper.\n\n    Parameters\n    ----------\n    filter : str, dict, :class:`Predicate`, :class:`FieldGTPredicate`, :class:`FieldLTPredicate`, :class:`FieldGTEPredicate`, :class:`FieldLTEPredicate`, :class:`LogicalOrPredicate`, :class:`ParameterPredicate`, :class:`FieldEqualPredicate`, :class:`FieldOneOfPredicate`, :class:`FieldRangePredicate`, :class:`FieldValidPredicate`, :class:`LogicalAndPredicate`, :class:`LogicalNotPredicate`, :class:`PredicateComposition`\n        The ``filter`` property must be a predication definition, which can take one of the\n        following forms:\n\n        1) an `expression <https://vega.github.io/vega-lite/docs/types.html#expression>`__\n        string, where ``datum`` can be used to refer to the current data object. For\n        example, ``{filter: \"datum.b2 > 60\"}`` would make the output data includes only\n        items that have values in the field ``b2`` over 60.\n\n        2) one of the `field predicates\n        <https://vega.github.io/vega-lite/docs/predicate.html#field-predicate>`__: `equal\n        <https://vega.github.io/vega-lite/docs/predicate.html#field-equal-predicate>`__, `lt\n        <https://vega.github.io/vega-lite/docs/predicate.html#lt-predicate>`__, `lte\n        <https://vega.github.io/vega-lite/docs/predicate.html#lte-predicate>`__, `gt\n        <https://vega.github.io/vega-lite/docs/predicate.html#gt-predicate>`__, `gte\n        <https://vega.github.io/vega-lite/docs/predicate.html#gte-predicate>`__, `range\n        <https://vega.github.io/vega-lite/docs/predicate.html#range-predicate>`__, `oneOf\n        <https://vega.github.io/vega-lite/docs/predicate.html#one-of-predicate>`__, or\n        `valid <https://vega.github.io/vega-lite/docs/predicate.html#valid-predicate>`__,\n\n        3) a `selection predicate\n        <https://vega.github.io/vega-lite/docs/predicate.html#selection-predicate>`__, which\n        define the names of a selection that the data point should belong to (or a logical\n        composition of selections).\n\n        4) a `logical composition\n        <https://vega.github.io/vega-lite/docs/predicate.html#composition>`__ of (1), (2),\n        or (3).\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FilterTransform\"}\n\n    def __init__(self, filter: Optional[str | SchemaBase | Map] = Undefined, **kwds):\n        super().__init__(filter=filter, **kwds)\n\n\nclass FlattenTransform(Transform):\n    \"\"\"\n    FlattenTransform schema wrapper.\n\n    Parameters\n    ----------\n    flatten : Sequence[str, :class:`FieldName`]\n        An array of one or more data fields containing arrays to flatten. If multiple fields\n        are specified, their array values should have a parallel structure, ideally with the\n        same length. If the lengths of parallel arrays do not match, the longest array will\n        be used with ``null`` values added for missing entries.\n    as : Sequence[str, :class:`FieldName`]\n        The output field names for extracted array values.\n\n        **Default value:** The field name of the corresponding array field\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FlattenTransform\"}\n\n    def __init__(\n        self, flatten: Optional[Sequence[str | SchemaBase]] = Undefined, **kwds\n    ):\n        super().__init__(flatten=flatten, **kwds)\n\n\nclass FoldTransform(Transform):\n    \"\"\"\n    FoldTransform schema wrapper.\n\n    Parameters\n    ----------\n    fold : Sequence[str, :class:`FieldName`]\n        An array of data fields indicating the properties to fold.\n    as : Sequence[str, :class:`FieldName`]\n        The output field names for the key and value properties produced by the fold\n        transform. **Default value:** ``[\"key\", \"value\"]``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/FoldTransform\"}\n\n    def __init__(self, fold: Optional[Sequence[str | SchemaBase]] = Undefined, **kwds):\n        super().__init__(fold=fold, **kwds)\n\n\nclass ImputeTransform(Transform):\n    \"\"\"\n    ImputeTransform schema wrapper.\n\n    Parameters\n    ----------\n    impute : str, :class:`FieldName`\n        The data field for which the missing values should be imputed.\n    key : str, :class:`FieldName`\n        A key field that uniquely identifies data objects within a group. Missing key values\n        (those occurring in the data but not in the current group) will be imputed.\n    frame : Sequence[float, None]\n        A frame specification as a two-element array used to control the window over which\n        the specified method is applied. The array entries should either be a number\n        indicating the offset from the current data object, or null to indicate unbounded\n        rows preceding or following the current data object. For example, the value ``[-5,\n        5]`` indicates that the window should include five objects preceding and five\n        objects following the current object.\n\n        **Default value:**:  ``[null, null]`` indicating that the window includes all\n        objects.\n    groupby : Sequence[str, :class:`FieldName`]\n        An optional array of fields by which to group the values. Imputation will then be\n        performed on a per-group basis.\n    keyvals : dict, Sequence[Any], :class:`ImputeSequence`\n        Defines the key values that should be considered for imputation. An array of key\n        values or an object defining a `number sequence\n        <https://vega.github.io/vega-lite/docs/impute.html#sequence-def>`__.\n\n        If provided, this will be used in addition to the key values observed within the\n        input data. If not provided, the values will be derived from all unique values of\n        the ``key`` field. For ``impute`` in ``encoding``, the key field is the x-field if\n        the y-field is imputed, or vice versa.\n\n        If there is no impute grouping, this property *must* be specified.\n    method : :class:`ImputeMethod`, Literal['value', 'median', 'max', 'min', 'mean']\n        The imputation method to use for the field value of imputed data objects. One of\n        ``\"value\"``, ``\"mean\"``, ``\"median\"``, ``\"max\"`` or ``\"min\"``.\n\n        **Default value:**  ``\"value\"``\n    value : Any\n        The field value to use when the imputation ``method`` is ``\"value\"``.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ImputeTransform\"}\n\n    def __init__(\n        self,\n        impute: Optional[str | SchemaBase] = Undefined,\n        key: Optional[str | SchemaBase] = Undefined,\n        frame: Optional[Sequence[float | None]] = Undefined,\n        groupby: Optional[Sequence[str | SchemaBase]] = Undefined,\n        keyvals: Optional[SchemaBase | Sequence[Any] | Map] = Undefined,\n        method: Optional[SchemaBase | ImputeMethod_T] = Undefined,\n        value: Optional[Any] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            impute=impute,\n            key=key,\n            frame=frame,\n            groupby=groupby,\n            keyvals=keyvals,\n            method=method,\n            value=value,\n            **kwds,\n        )\n\n\nclass JoinAggregateTransform(Transform):\n    \"\"\"\n    JoinAggregateTransform schema wrapper.\n\n    Parameters\n    ----------\n    joinaggregate : Sequence[dict, :class:`JoinAggregateFieldDef`]\n        The definition of the fields in the join aggregate, and what calculations to use.\n    groupby : Sequence[str, :class:`FieldName`]\n        The data fields for partitioning the data objects into separate groups. If\n        unspecified, all data points will be in a single group.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/JoinAggregateTransform\"}\n\n    def __init__(\n        self,\n        joinaggregate: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        groupby: Optional[Sequence[str | SchemaBase]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(joinaggregate=joinaggregate, groupby=groupby, **kwds)\n\n\nclass LoessTransform(Transform):\n    \"\"\"\n    LoessTransform schema wrapper.\n\n    Parameters\n    ----------\n    loess : str, :class:`FieldName`\n        The data field of the dependent variable to smooth.\n    on : str, :class:`FieldName`\n        The data field of the independent variable to use a predictor.\n    bandwidth : float\n        A bandwidth parameter in the range ``[0, 1]`` that determines the amount of\n        smoothing.\n\n        **Default value:** ``0.3``\n    groupby : Sequence[str, :class:`FieldName`]\n        The data fields to group by. If not specified, a single group containing all data\n        objects will be used.\n    as : Sequence[str, :class:`FieldName`]\n        The output field names for the smoothed points generated by the loess transform.\n\n        **Default value:** The field names of the input x and y values.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LoessTransform\"}\n\n    def __init__(\n        self,\n        loess: Optional[str | SchemaBase] = Undefined,\n        on: Optional[str | SchemaBase] = Undefined,\n        bandwidth: Optional[float] = Undefined,\n        groupby: Optional[Sequence[str | SchemaBase]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            loess=loess, on=on, bandwidth=bandwidth, groupby=groupby, **kwds\n        )\n\n\nclass LookupTransform(Transform):\n    \"\"\"\n    LookupTransform schema wrapper.\n\n    Parameters\n    ----------\n    lookup : str\n        Key in primary data source.\n    default : Any\n        The default value to use if lookup fails.\n\n        **Default value:** ``null``\n    as : str, :class:`FieldName`, Sequence[str, :class:`FieldName`]\n        The output fields on which to store the looked up data values.\n\n        For data lookups, this property may be left blank if ``from.fields`` has been\n        specified (those field names will be used); if ``from.fields`` has not been\n        specified, ``as`` must be a string.\n\n        For selection lookups, this property is optional: if unspecified, looked up values\n        will be stored under a property named for the selection; and if specified, it must\n        correspond to ``from.fields``.\n    from : dict, :class:`LookupData`, :class:`LookupSelection`\n        Data source or selection for secondary data reference.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/LookupTransform\"}\n\n    def __init__(\n        self,\n        lookup: Optional[str] = Undefined,\n        default: Optional[Any] = Undefined,\n        **kwds,\n    ):\n        super().__init__(lookup=lookup, default=default, **kwds)\n\n\nclass PivotTransform(Transform):\n    \"\"\"\n    PivotTransform schema wrapper.\n\n    Parameters\n    ----------\n    pivot : str, :class:`FieldName`\n        The data field to pivot on. The unique values of this field become new field names\n        in the output stream.\n    value : str, :class:`FieldName`\n        The data field to populate pivoted fields. The aggregate values of this field become\n        the values of the new pivoted fields.\n    groupby : Sequence[str, :class:`FieldName`]\n        The optional data fields to group by. If not specified, a single group containing\n        all data objects will be used.\n    limit : float\n        An optional parameter indicating the maximum number of pivoted fields to generate.\n        The default (``0``) applies no limit. The pivoted ``pivot`` names are sorted in\n        ascending order prior to enforcing the limit. **Default value:** ``0``\n    op : :class:`AggregateOp`, Literal['argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        The aggregation operation to apply to grouped ``value`` field values. **Default\n        value:** ``sum``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/PivotTransform\"}\n\n    def __init__(\n        self,\n        pivot: Optional[str | SchemaBase] = Undefined,\n        value: Optional[str | SchemaBase] = Undefined,\n        groupby: Optional[Sequence[str | SchemaBase]] = Undefined,\n        limit: Optional[float] = Undefined,\n        op: Optional[SchemaBase | AggregateOp_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            pivot=pivot, value=value, groupby=groupby, limit=limit, op=op, **kwds\n        )\n\n\nclass QuantileTransform(Transform):\n    \"\"\"\n    QuantileTransform schema wrapper.\n\n    Parameters\n    ----------\n    quantile : str, :class:`FieldName`\n        The data field for which to perform quantile estimation.\n    groupby : Sequence[str, :class:`FieldName`]\n        The data fields to group by. If not specified, a single group containing all data\n        objects will be used.\n    probs : Sequence[float]\n        An array of probabilities in the range (0, 1) for which to compute quantile values.\n        If not specified, the *step* parameter will be used.\n    step : float\n        A probability step size (default 0.01) for sampling quantile values. All values from\n        one-half the step size up to 1 (exclusive) will be sampled. This parameter is only\n        used if the *probs* parameter is not provided.\n    as : Sequence[str, :class:`FieldName`]\n        The output field names for the probability and quantile values.\n\n        **Default value:** ``[\"prob\", \"value\"]``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/QuantileTransform\"}\n\n    def __init__(\n        self,\n        quantile: Optional[str | SchemaBase] = Undefined,\n        groupby: Optional[Sequence[str | SchemaBase]] = Undefined,\n        probs: Optional[Sequence[float]] = Undefined,\n        step: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            quantile=quantile, groupby=groupby, probs=probs, step=step, **kwds\n        )\n\n\nclass RegressionTransform(Transform):\n    \"\"\"\n    RegressionTransform schema wrapper.\n\n    Parameters\n    ----------\n    on : str, :class:`FieldName`\n        The data field of the independent variable to use a predictor.\n    regression : str, :class:`FieldName`\n        The data field of the dependent variable to predict.\n    extent : Sequence[float]\n        A [min, max] domain over the independent (x) field for the starting and ending\n        points of the generated trend line.\n    groupby : Sequence[str, :class:`FieldName`]\n        The data fields to group by. If not specified, a single group containing all data\n        objects will be used.\n    method : Literal['linear', 'log', 'exp', 'pow', 'quad', 'poly']\n        The functional form of the regression model. One of ``\"linear\"``, ``\"log\"``,\n        ``\"exp\"``, ``\"pow\"``, ``\"quad\"``, or ``\"poly\"``.\n\n        **Default value:** ``\"linear\"``\n    order : float\n        The polynomial order (number of coefficients) for the 'poly' method.\n\n        **Default value:** ``3``\n    params : bool\n        A boolean flag indicating if the transform should return the regression model\n        parameters (one object per group), rather than trend line points. The resulting\n        objects include a ``coef`` array of fitted coefficient values (starting with the\n        intercept term and then including terms of increasing order) and an ``rSquared``\n        value (indicating the total variance explained by the model).\n\n        **Default value:** ``false``\n    as : Sequence[str, :class:`FieldName`]\n        The output field names for the smoothed points generated by the regression\n        transform.\n\n        **Default value:** The field names of the input x and y values.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/RegressionTransform\"}\n\n    def __init__(\n        self,\n        on: Optional[str | SchemaBase] = Undefined,\n        regression: Optional[str | SchemaBase] = Undefined,\n        extent: Optional[Sequence[float]] = Undefined,\n        groupby: Optional[Sequence[str | SchemaBase]] = Undefined,\n        method: Optional[\n            Literal[\"linear\", \"log\", \"exp\", \"pow\", \"quad\", \"poly\"]\n        ] = Undefined,\n        order: Optional[float] = Undefined,\n        params: Optional[bool] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            on=on,\n            regression=regression,\n            extent=extent,\n            groupby=groupby,\n            method=method,\n            order=order,\n            params=params,\n            **kwds,\n        )\n\n\nclass SampleTransform(Transform):\n    \"\"\"\n    SampleTransform schema wrapper.\n\n    Parameters\n    ----------\n    sample : float\n        The maximum number of data objects to include in the sample.\n\n        **Default value:** ``1000``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/SampleTransform\"}\n\n    def __init__(self, sample: Optional[float] = Undefined, **kwds):\n        super().__init__(sample=sample, **kwds)\n\n\nclass StackTransform(Transform):\n    \"\"\"\n    StackTransform schema wrapper.\n\n    Parameters\n    ----------\n    groupby : Sequence[str, :class:`FieldName`]\n        The data fields to group by.\n    stack : str, :class:`FieldName`\n        The field which is stacked.\n    offset : Literal['zero', 'center', 'normalize']\n        Mode for stacking marks. One of ``\"zero\"`` (default), ``\"center\"``, or\n        ``\"normalize\"``. The ``\"zero\"`` offset will stack starting at ``0``. The\n        ``\"center\"`` offset will center the stacks. The ``\"normalize\"`` offset will compute\n        percentage values for each stack point, with output values in the range ``[0,1]``.\n\n        **Default value:** ``\"zero\"``\n    sort : Sequence[dict, :class:`SortField`]\n        Field that determines the order of leaves in the stacked charts.\n    as : str, :class:`FieldName`, Sequence[str, :class:`FieldName`]\n        Output field names. This can be either a string or an array of strings with two\n        elements denoting the name for the fields for stack start and stack end\n        respectively. If a single string(e.g., ``\"val\"``) is provided, the end field will be\n        ``\"val_end\"``.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/StackTransform\"}\n\n    def __init__(\n        self,\n        groupby: Optional[Sequence[str | SchemaBase]] = Undefined,\n        stack: Optional[str | SchemaBase] = Undefined,\n        offset: Optional[StackOffset_T] = Undefined,\n        sort: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(groupby=groupby, stack=stack, offset=offset, sort=sort, **kwds)\n\n\nclass TimeUnitTransform(Transform):\n    \"\"\"\n    TimeUnitTransform schema wrapper.\n\n    Parameters\n    ----------\n    field : str, :class:`FieldName`\n        The data field to apply time unit.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`SingleTimeUnit`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, :class:`TimeUnitTransformParams`, Literal['utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        The timeUnit.\n    as : str, :class:`FieldName`\n        The output field to write the timeUnit value.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TimeUnitTransform\"}\n\n    def __init__(\n        self,\n        field: Optional[str | SchemaBase] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(field=field, timeUnit=timeUnit, **kwds)\n\n\nclass Type(VegaLiteSchema):\n    \"\"\"\n    Type schema wrapper.\n\n    Data type based on level of measurement\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Type\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass TypeForShape(VegaLiteSchema):\n    \"\"\"TypeForShape schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TypeForShape\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass TypedFieldDef(VegaLiteSchema):\n    r\"\"\"\n    TypedFieldDef schema wrapper.\n\n    Definition object for a data field, its type and transformation of an encoding channel.\n\n    Parameters\n    ----------\n    aggregate : dict, :class:`Aggregate`, :class:`ArgmaxDef`, :class:`ArgminDef`, :class:`NonArgAggregateOp`, Literal['average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb']\n        Aggregation function for the field (e.g., ``\"mean\"``, ``\"sum\"``, ``\"median\"``,\n        ``\"min\"``, ``\"max\"``, ``\"count\"``).\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `aggregate <https://vega.github.io/vega-lite/docs/aggregate.html>`__\n        documentation.\n    bandPosition : float\n        Relative position on a band of a stacked, binned, time unit, or band scale. For\n        example, the marks will be positioned at the beginning of the band if set to ``0``,\n        and at the middle of the band if set to ``0.5``.\n    bin : bool, dict, Literal['binned'], :class:`BinParams`, None\n        A flag for binning a ``quantitative`` field, `an object defining binning parameters\n        <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__, or indicating\n        that the data for ``x`` or ``y`` channel are binned before they are imported into\n        Vega-Lite (``\"binned\"``).\n\n        * If ``true``, default `binning parameters\n          <https://vega.github.io/vega-lite/docs/bin.html#bin-parameters>`__ will be\n          applied.\n\n        * If ``\"binned\"``, this indicates that the data for the ``x`` (or ``y``) channel are\n          already binned. You can map the bin-start field to ``x`` (or ``y``) and the\n          bin-end field to ``x2`` (or ``y2``). The scale and axis will be formatted similar\n          to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can\n          also set the axis's `tickMinStep\n          <https://vega.github.io/vega-lite/docs/axis.html#ticks>`__ property.\n\n        **Default value:** ``false``\n\n        **See also:** `bin <https://vega.github.io/vega-lite/docs/bin.html>`__\n        documentation.\n    field : str, dict, :class:`Field`, :class:`FieldName`, :class:`RepeatRef`\n        **Required.** A string defining the name of the field from which to pull a data\n        value or an object defining iterated values from the `repeat\n        <https://vega.github.io/vega-lite/docs/repeat.html>`__ operator.\n\n        **See also:** `field <https://vega.github.io/vega-lite/docs/field.html>`__\n        documentation.\n\n        **Notes:** 1)  Dots (``.``) and brackets (``[`` and ``]``) can be used to access\n        nested objects (e.g., ``\"field\": \"foo.bar\"`` and ``\"field\": \"foo['bar']\"``). If\n        field names contain dots or brackets but are not nested, you can use ``\\\\`` to\n        escape dots and brackets (e.g., ``\"a\\\\.b\"`` and ``\"a\\\\[0\\\\]\"``). See more details\n        about escaping in the `field documentation\n        <https://vega.github.io/vega-lite/docs/field.html>`__. 2) ``field`` is not required\n        if ``aggregate`` is ``count``.\n    timeUnit : dict, :class:`TimeUnit`, :class:`MultiTimeUnit`, :class:`BinnedTimeUnit`, :class:`SingleTimeUnit`, :class:`TimeUnitParams`, :class:`UtcMultiTimeUnit`, :class:`UtcSingleTimeUnit`, :class:`LocalMultiTimeUnit`, :class:`LocalSingleTimeUnit`, Literal['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear', 'utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds', 'year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds', 'utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds', 'yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds']\n        Time unit (e.g., ``year``, ``yearmonth``, ``month``, ``hours``) for a temporal\n        field. or `a temporal field that gets casted as ordinal\n        <https://vega.github.io/vega-lite/docs/type.html#cast>`__.\n\n        **Default value:** ``undefined`` (None)\n\n        **See also:** `timeUnit <https://vega.github.io/vega-lite/docs/timeunit.html>`__\n        documentation.\n    title : str, :class:`Text`, Sequence[str], None\n        A title for the field. If ``null``, the title will be removed.\n\n        **Default value:**  derived from the field's name and transformation function\n        (``aggregate``, ``bin`` and ``timeUnit``). If the field has an aggregate function,\n        the function is displayed as part of the title (e.g., ``\"Sum of Profit\"``). If the\n        field is binned or has a time unit applied, the applied function is shown in\n        parentheses (e.g., ``\"Profit (binned)\"``, ``\"Transaction Date (year-month)\"``).\n        Otherwise, the title is simply the field name.\n\n        **Notes**:\n\n        1) You can customize the default field title format by providing the `fieldTitle\n        <https://vega.github.io/vega-lite/docs/config.html#top-level-config>`__ property in\n        the `config <https://vega.github.io/vega-lite/docs/config.html>`__ or `fieldTitle\n        function via the compile function's options\n        <https://vega.github.io/vega-lite/usage/compile.html#field-title>`__.\n\n        2) If both field definition's ``title`` and axis, header, or legend ``title`` are\n        defined, axis/header/legend title will be used.\n    type : :class:`StandardType`, Literal['quantitative', 'ordinal', 'temporal', 'nominal']\n        The type of measurement (``\"quantitative\"``, ``\"temporal\"``, ``\"ordinal\"``, or\n        ``\"nominal\"``) for the encoded field or constant value (``datum``). It can also be a\n        ``\"geojson\"`` type for encoding `'geoshape'\n        <https://vega.github.io/vega-lite/docs/geoshape.html>`__.\n\n        Vega-Lite automatically infers data types in many cases as discussed below. However,\n        type is required for a field if: (1) the field is not nominal and the field encoding\n        has no specified ``aggregate`` (except ``argmin`` and ``argmax``), ``bin``, scale\n        type, custom ``sort`` order, nor ``timeUnit`` or (2) if you wish to use an ordinal\n        scale for a field with ``bin`` or ``timeUnit``.\n\n        **Default value:**\n\n        1) For a data ``field``, ``\"nominal\"`` is the default data type unless the field\n        encoding has ``aggregate``, ``channel``, ``bin``, scale type, ``sort``, or\n        ``timeUnit`` that satisfies the following criteria:\n\n        * ``\"quantitative\"`` is the default type if (1) the encoded field contains ``bin``\n          or ``aggregate`` except ``\"argmin\"`` and ``\"argmax\"``, (2) the encoding channel is\n          ``latitude`` or ``longitude`` channel or (3) if the specified scale type is `a\n          quantitative scale <https://vega.github.io/vega-lite/docs/scale.html#type>`__.\n        * ``\"temporal\"`` is the default type if (1) the encoded field contains ``timeUnit``\n          or (2) the specified scale type is a time or utc scale\n        * ``\"ordinal\"`` is the default type if (1) the encoded field contains a `custom sort\n          order\n          <https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order>`__,\n          (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding\n          channel is ``order``.\n\n        2) For a constant value in data domain (``datum``):\n\n        * ``\"quantitative\"`` if the datum is a number\n        * ``\"nominal\"`` if the datum is a string\n        * ``\"temporal\"`` if the datum is `a date time object\n          <https://vega.github.io/vega-lite/docs/datetime.html>`__\n\n        **Note:**\n\n        * Data ``type`` describes the semantics of the data rather than the primitive data\n          types (number, string, etc.). The same primitive data type can have different\n          types of measurement. For example, numeric data can represent quantitative,\n          ordinal, or nominal data.\n        * Data values for a temporal field can be either a date-time string (e.g.,\n          ``\"2015-03-07 12:32:17\"``, ``\"17:01\"``, ``\"2015-03-16\"``. ``\"2015\"``) or a\n          timestamp number (e.g., ``1552199579097``).\n        * When using with `bin <https://vega.github.io/vega-lite/docs/bin.html>`__, the\n          ``type`` property can be either ``\"quantitative\"`` (for using a linear bin scale)\n          or `\"ordinal\" (for using an ordinal bin scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `timeUnit\n          <https://vega.github.io/vega-lite/docs/timeunit.html>`__, the ``type`` property\n          can be either ``\"temporal\"`` (default, for using a temporal scale) or `\"ordinal\"\n          (for using an ordinal scale)\n          <https://vega.github.io/vega-lite/docs/type.html#cast-bin>`__.\n        * When using with `aggregate\n          <https://vega.github.io/vega-lite/docs/aggregate.html>`__, the ``type`` property\n          refers to the post-aggregation data type. For example, we can calculate count\n          ``distinct`` of a categorical field ``\"cat\"`` using ``{\"aggregate\": \"distinct\",\n          \"field\": \"cat\"}``. The ``\"type\"`` of the aggregate output is ``\"quantitative\"``.\n        * Secondary channels (e.g., ``x2``, ``y2``, ``xError``, ``yError``) do not have\n          ``type`` as they must have exactly the same type as their primary channels (e.g.,\n          ``x``, ``y``).\n\n        **See also:** `type <https://vega.github.io/vega-lite/docs/type.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/TypedFieldDef\"}\n\n    def __init__(\n        self,\n        aggregate: Optional[SchemaBase | Map | NonArgAggregateOp_T] = Undefined,\n        bandPosition: Optional[float] = Undefined,\n        bin: Optional[bool | SchemaBase | Literal[\"binned\"] | Map | None] = Undefined,\n        field: Optional[str | SchemaBase | Map] = Undefined,\n        timeUnit: Optional[\n            SchemaBase | Map | MultiTimeUnit_T | BinnedTimeUnit_T | SingleTimeUnit_T\n        ] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | None] = Undefined,\n        type: Optional[SchemaBase | StandardType_T] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            aggregate=aggregate,\n            bandPosition=bandPosition,\n            bin=bin,\n            field=field,\n            timeUnit=timeUnit,\n            title=title,\n            type=type,\n            **kwds,\n        )\n\n\nclass URI(VegaLiteSchema):\n    \"\"\"URI schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/URI\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass UnitSpec(VegaLiteSchema):\n    \"\"\"\n    UnitSpec schema wrapper.\n\n    Base interface for a unit (single-view) specification.\n\n    Parameters\n    ----------\n    mark : dict, :class:`Mark`, :class:`AnyMark`, :class:`BoxPlot`, :class:`MarkDef`, :class:`ErrorBar`, :class:`ErrorBand`, :class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`, :class:`CompositeMark`, :class:`CompositeMarkDef`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape', 'boxplot', 'errorband', 'errorbar']\n        A string describing the mark type (one of ``\"bar\"``, ``\"circle\"``, ``\"square\"``,\n        ``\"tick\"``, ``\"line\"``, ``\"area\"``, ``\"point\"``, ``\"rule\"``, ``\"geoshape\"``, and\n        ``\"text\"``) or a `mark definition object\n        <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    description : str\n        Description of this mark for commenting purpose.\n    encoding : dict, :class:`Encoding`\n        A key-value mapping between encoding channels and definition of fields.\n    name : str\n        Name of the visualization for later reference.\n    params : Sequence[dict, :class:`SelectionParameter`]\n        An array of parameters that may either be simple variables, or more complex\n        selections that map user input to data queries.\n    projection : dict, :class:`Projection`\n        An object defining properties of geographic projection, which will be applied to\n        ``shape`` path for ``\"geoshape\"`` marks and to ``latitude`` and ``\"longitude\"``\n        channels for other marks.\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/UnitSpec\"}\n\n    def __init__(\n        self,\n        mark: Optional[SchemaBase | Map | Mark_T | CompositeMark_T] = Undefined,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        description: Optional[str] = Undefined,\n        encoding: Optional[SchemaBase | Map] = Undefined,\n        name: Optional[str] = Undefined,\n        params: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        projection: Optional[SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            mark=mark,\n            data=data,\n            description=description,\n            encoding=encoding,\n            name=name,\n            params=params,\n            projection=projection,\n            title=title,\n            transform=transform,\n            **kwds,\n        )\n\n\nclass UnitSpecWithFrame(VegaLiteSchema):\n    \"\"\"\n    UnitSpecWithFrame schema wrapper.\n\n    Parameters\n    ----------\n    mark : dict, :class:`Mark`, :class:`AnyMark`, :class:`BoxPlot`, :class:`MarkDef`, :class:`ErrorBar`, :class:`ErrorBand`, :class:`BoxPlotDef`, :class:`ErrorBarDef`, :class:`ErrorBandDef`, :class:`CompositeMark`, :class:`CompositeMarkDef`, Literal['arc', 'area', 'bar', 'image', 'line', 'point', 'rect', 'rule', 'text', 'tick', 'trail', 'circle', 'square', 'geoshape', 'boxplot', 'errorband', 'errorbar']\n        A string describing the mark type (one of ``\"bar\"``, ``\"circle\"``, ``\"square\"``,\n        ``\"tick\"``, ``\"line\"``, ``\"area\"``, ``\"point\"``, ``\"rule\"``, ``\"geoshape\"``, and\n        ``\"text\"``) or a `mark definition object\n        <https://vega.github.io/vega-lite/docs/mark.html#mark-def>`__.\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    description : str\n        Description of this mark for commenting purpose.\n    encoding : dict, :class:`Encoding`\n        A key-value mapping between encoding channels and definition of fields.\n    height : dict, float, :class:`Step`, Literal['container']\n        The height of a visualization.\n\n        * For a plot with a continuous y-field, height should be a number.\n        * For a plot with either a discrete y-field or no y-field, height can be either a\n          number indicating a fixed height or an object in the form of ``{step: number}``\n          defining the height per discrete step. (No y-field is equivalent to having one\n          discrete step.)\n        * To enable responsive sizing on height, it should be set to ``\"container\"``.\n\n        **Default value:** Based on ``config.view.continuousHeight`` for a plot with a\n        continuous y-field and ``config.view.discreteHeight`` otherwise.\n\n        **Note:** For plots with `row and column channels\n        <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the\n        height of a single view and the ``\"container\"`` option cannot be used.\n\n        **See also:** `height <https://vega.github.io/vega-lite/docs/size.html>`__\n        documentation.\n    name : str\n        Name of the visualization for later reference.\n    params : Sequence[dict, :class:`SelectionParameter`]\n        An array of parameters that may either be simple variables, or more complex\n        selections that map user input to data queries.\n    projection : dict, :class:`Projection`\n        An object defining properties of geographic projection, which will be applied to\n        ``shape`` path for ``\"geoshape\"`` marks and to ``latitude`` and ``\"longitude\"``\n        channels for other marks.\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    view : dict, :class:`ViewBackground`\n        An object defining the view background's fill and stroke.\n\n        **Default value:** none (transparent)\n    width : dict, float, :class:`Step`, Literal['container']\n        The width of a visualization.\n\n        * For a plot with a continuous x-field, width should be a number.\n        * For a plot with either a discrete x-field or no x-field, width can be either a\n          number indicating a fixed width or an object in the form of ``{step: number}``\n          defining the width per discrete step. (No x-field is equivalent to having one\n          discrete step.)\n        * To enable responsive sizing on width, it should be set to ``\"container\"``.\n\n        **Default value:** Based on ``config.view.continuousWidth`` for a plot with a\n        continuous x-field and ``config.view.discreteWidth`` otherwise.\n\n        **Note:** For plots with `row and column channels\n        <https://vega.github.io/vega-lite/docs/encoding.html#facet>`__, this represents the\n        width of a single view and the ``\"container\"`` option cannot be used.\n\n        **See also:** `width <https://vega.github.io/vega-lite/docs/size.html>`__\n        documentation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/UnitSpecWithFrame\"}\n\n    def __init__(\n        self,\n        mark: Optional[SchemaBase | Map | Mark_T | CompositeMark_T] = Undefined,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        description: Optional[str] = Undefined,\n        encoding: Optional[SchemaBase | Map] = Undefined,\n        height: Optional[float | SchemaBase | Literal[\"container\"] | Map] = Undefined,\n        name: Optional[str] = Undefined,\n        params: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        projection: Optional[SchemaBase | Map] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        view: Optional[SchemaBase | Map] = Undefined,\n        width: Optional[float | SchemaBase | Literal[\"container\"] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            mark=mark,\n            data=data,\n            description=description,\n            encoding=encoding,\n            height=height,\n            name=name,\n            params=params,\n            projection=projection,\n            title=title,\n            transform=transform,\n            view=view,\n            width=width,\n            **kwds,\n        )\n\n\nclass UrlData(DataSource):\n    \"\"\"\n    UrlData schema wrapper.\n\n    Parameters\n    ----------\n    url : str\n        An URL from which to load the data set. Use the ``format.type`` property to ensure\n        the loaded data is correctly parsed.\n    format : dict, :class:`DataFormat`, :class:`CsvDataFormat`, :class:`DsvDataFormat`, :class:`JsonDataFormat`, :class:`TopoDataFormat`\n        An object that specifies the format for parsing the data.\n    name : str\n        Provide a placeholder name and bind data at runtime.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/UrlData\"}\n\n    def __init__(\n        self,\n        url: Optional[str] = Undefined,\n        format: Optional[SchemaBase | Map] = Undefined,\n        name: Optional[str] = Undefined,\n        **kwds,\n    ):\n        super().__init__(url=url, format=format, name=name, **kwds)\n\n\nclass UtcMultiTimeUnit(MultiTimeUnit):\n    \"\"\"UtcMultiTimeUnit schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/UtcMultiTimeUnit\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass UtcSingleTimeUnit(SingleTimeUnit):\n    \"\"\"UtcSingleTimeUnit schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/UtcSingleTimeUnit\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass VConcatSpecGenericSpec(Spec, NonNormalizedSpec):\n    \"\"\"\n    VConcatSpecGenericSpec schema wrapper.\n\n    Base interface for a vertical concatenation specification.\n\n    Parameters\n    ----------\n    vconcat : Sequence[dict, :class:`Spec`, :class:`FacetSpec`, :class:`LayerSpec`, :class:`RepeatSpec`, :class:`FacetedUnitSpec`, :class:`LayerRepeatSpec`, :class:`NonLayerRepeatSpec`, :class:`ConcatSpecGenericSpec`, :class:`HConcatSpecGenericSpec`, :class:`VConcatSpecGenericSpec`]\n        A list of views to be concatenated and put into a column.\n    bounds : Literal['full', 'flush']\n        The bounds calculation method to use for determining the extent of a sub-plot. One\n        of ``full`` (the default) or ``flush``.\n\n        * If set to ``full``, the entire calculated bounds (including axes, title, and\n          legend) will be used.\n        * If set to ``flush``, only the specified width and height values for the sub-view\n          will be used. The ``flush`` setting can be useful when attempting to place\n          sub-plots without axes or legends into a uniform grid structure.\n\n        **Default value:** ``\"full\"``\n    center : bool\n        Boolean flag indicating if subviews should be centered relative to their respective\n        rows or columns.\n\n        **Default value:** ``false``\n    data : dict, :class:`Data`, :class:`UrlData`, :class:`Generator`, :class:`NamedData`, :class:`DataSource`, :class:`InlineData`, :class:`SphereGenerator`, :class:`SequenceGenerator`, :class:`GraticuleGenerator`, None\n        An object describing the data source. Set to ``null`` to ignore the parent's data\n        source. If no data is set, it is derived from the parent.\n    description : str\n        Description of this mark for commenting purpose.\n    name : str\n        Name of the visualization for later reference.\n    resolve : dict, :class:`Resolve`\n        Scale, axis, and legend resolutions for view composition specifications.\n    spacing : float\n        The spacing in pixels between sub-views of the concat operator.\n\n        **Default value**: ``10``\n    title : str, dict, :class:`Text`, Sequence[str], :class:`TitleParams`\n        Title for the plot.\n    transform : Sequence[dict, :class:`Transform`, :class:`BinTransform`, :class:`FoldTransform`, :class:`LoessTransform`, :class:`PivotTransform`, :class:`StackTransform`, :class:`ExtentTransform`, :class:`FilterTransform`, :class:`ImputeTransform`, :class:`LookupTransform`, :class:`SampleTransform`, :class:`WindowTransform`, :class:`DensityTransform`, :class:`FlattenTransform`, :class:`QuantileTransform`, :class:`TimeUnitTransform`, :class:`AggregateTransform`, :class:`CalculateTransform`, :class:`RegressionTransform`, :class:`JoinAggregateTransform`]\n        An array of data transformations such as filter and new field calculation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/VConcatSpec<GenericSpec>\"}\n\n    def __init__(\n        self,\n        vconcat: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        bounds: Optional[Literal[\"full\", \"flush\"]] = Undefined,\n        center: Optional[bool] = Undefined,\n        data: Optional[SchemaBase | ChartDataType | Map | None] = Undefined,\n        description: Optional[str] = Undefined,\n        name: Optional[str] = Undefined,\n        resolve: Optional[SchemaBase | Map] = Undefined,\n        spacing: Optional[float] = Undefined,\n        title: Optional[str | SchemaBase | Sequence[str] | Map] = Undefined,\n        transform: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            vconcat=vconcat,\n            bounds=bounds,\n            center=center,\n            data=data,\n            description=description,\n            name=name,\n            resolve=resolve,\n            spacing=spacing,\n            title=title,\n            transform=transform,\n            **kwds,\n        )\n\n\nclass ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull(\n    ColorDef, MarkPropDefGradientstringnull\n):\n    \"\"\"\n    ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefGradientstringnullExprRef`, :class:`ConditionalParameterValueDefGradientstringnullExprRef`, :class:`ConditionalPredicateValueDefGradientstringnullExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : str, dict, :class:`ExprRef`, :class:`Gradient`, :class:`LinearGradient`, :class:`RadialGradient`, None\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,(Gradient|string|null)>\"\n    }\n\n    def __init__(\n        self,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(condition=condition, value=value, **kwds)\n\n\nclass ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull(\n    MarkPropDefstringnullTypeForShape, ShapeDef\n):\n    \"\"\"\n    ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, :class:`ConditionalMarkPropFieldOrDatumDefTypeForShape`, :class:`ConditionalParameterMarkPropFieldOrDatumDefTypeForShape`, :class:`ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : str, dict, :class:`ExprRef`, None\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef<TypeForShape>,(string|null)>\"\n    }\n\n    def __init__(\n        self,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(condition=condition, value=value, **kwds)\n\n\nclass ValueDefWithConditionMarkPropFieldOrDatumDefnumber(\n    MarkPropDefnumber, NumericMarkPropDef\n):\n    \"\"\"\n    ValueDefWithConditionMarkPropFieldOrDatumDefnumber schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, Sequence[dict, :class:`ConditionalValueDefnumberExprRef`, :class:`ConditionalParameterValueDefnumberExprRef`, :class:`ConditionalPredicateValueDefnumberExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : dict, float, :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,number>\"\n    }\n\n    def __init__(\n        self,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        value: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(condition=condition, value=value, **kwds)\n\n\nclass ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray(\n    MarkPropDefnumberArray, NumericArrayMarkPropDef\n):\n    \"\"\"\n    ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`, Sequence[dict, :class:`ConditionalValueDefnumberArrayExprRef`, :class:`ConditionalParameterValueDefnumberArrayExprRef`, :class:`ConditionalPredicateValueDefnumberArrayExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : dict, Sequence[float], :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,number[]>\"\n    }\n\n    def __init__(\n        self,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        value: Optional[Parameter | SchemaBase | Sequence[float] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(condition=condition, value=value, **kwds)\n\n\nclass ValueDefWithConditionMarkPropFieldOrDatumDefstringnull(VegaLiteSchema):\n    \"\"\"\n    ValueDefWithConditionMarkPropFieldOrDatumDefstringnull schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalMarkPropFieldOrDatumDef`, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterMarkPropFieldOrDatumDef`, :class:`ConditionalPredicateMarkPropFieldOrDatumDef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`, Sequence[dict, :class:`ConditionalValueDefstringnullExprRef`, :class:`ConditionalParameterValueDefstringnullExprRef`, :class:`ConditionalPredicateValueDefstringnullExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : str, dict, :class:`ExprRef`, None\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\n        \"$ref\": \"#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,(string|null)>\"\n    }\n\n    def __init__(\n        self,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Map | None] = Undefined,\n        **kwds,\n    ):\n        super().__init__(condition=condition, value=value, **kwds)\n\n\nclass ValueDefWithConditionStringFieldDefText(TextDef):\n    \"\"\"\n    ValueDefWithConditionStringFieldDefText schema wrapper.\n\n    Parameters\n    ----------\n    condition : dict, :class:`ConditionalStringFieldDef`, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterStringFieldDef`, :class:`ConditionalPredicateStringFieldDef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`, Sequence[dict, :class:`ConditionalValueDefTextExprRef`, :class:`ConditionalParameterValueDefTextExprRef`, :class:`ConditionalPredicateValueDefTextExprRef`]\n        A field definition or one or more value definition(s) with a parameter predicate.\n    value : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ValueDefWithCondition<StringFieldDef,Text>\"}\n\n    def __init__(\n        self,\n        condition: Optional[SchemaBase | Sequence[SchemaBase | Map] | Map] = Undefined,\n        value: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(condition=condition, value=value, **kwds)\n\n\nclass ValueDefnumber(OffsetDef):\n    \"\"\"\n    ValueDefnumber schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : float\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ValueDef<number>\"}\n\n    def __init__(self, value: Optional[float] = Undefined, **kwds):\n        super().__init__(value=value, **kwds)\n\n\nclass ValueDefnumberwidthheightExprRef(VegaLiteSchema):\n    \"\"\"\n    ValueDefnumberwidthheightExprRef schema wrapper.\n\n    Definition object for a constant value (primitive value or gradient definition) of an\n    encoding channel.\n\n    Parameters\n    ----------\n    value : dict, float, :class:`ExprRef`, Literal['height', 'width']\n        A constant value in visual domain (e.g., ``\"red\"`` / ``\"#0099ff\"`` / `gradient\n        definition <https://vega.github.io/vega-lite/docs/types.html#gradient>`__ for color,\n        values between ``0`` to ``1`` for opacity).\n    \"\"\"\n\n    _schema = {\"$ref\": '#/definitions/ValueDef<(number|\"width\"|\"height\"|ExprRef)>'}\n\n    def __init__(\n        self,\n        value: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\", \"width\"] | Map\n        ] = Undefined,\n        **kwds,\n    ):\n        super().__init__(value=value, **kwds)\n\n\nclass VariableParameter(TopLevelParameter):\n    \"\"\"\n    VariableParameter schema wrapper.\n\n    Parameters\n    ----------\n    name : str, :class:`ParameterName`\n        A unique name for the variable parameter. Parameter names should be valid JavaScript\n        identifiers: they should contain only alphanumeric characters (or \"$\", or \"_\") and\n        may not start with a digit. Reserved keywords that may not be used as parameter\n        names are \"datum\", \"event\", \"item\", and \"parent\".\n    bind : dict, :class:`Binding`, :class:`BindInput`, :class:`BindRange`, :class:`BindDirect`, :class:`BindCheckbox`, :class:`BindRadioSelect`\n        Binds the parameter to an external input element such as a slider, selection list or\n        radio button group.\n    expr : str, :class:`Expr`\n        An expression for the value of the parameter. This expression may include other\n        parameters, in which case the parameter will automatically update in response to\n        upstream parameter changes.\n    react : bool\n        A boolean flag (default ``true``) indicating if the update expression should be\n        automatically re-evaluated when any upstream signal dependencies update. If\n        ``false``, the update expression will not register any dependencies on other\n        signals, even for initialization.\n\n        **Default value:** ``true``\n    value : Any\n        The `initial value <http://vega.github.io/vega-lite/docs/value.html>`__ of the\n        parameter.\n\n        **Default value:** ``undefined``\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/VariableParameter\"}\n\n    def __init__(\n        self,\n        name: Optional[str | SchemaBase] = Undefined,\n        bind: Optional[SchemaBase | Map] = Undefined,\n        expr: Optional[str | SchemaBase] = Undefined,\n        react: Optional[bool] = Undefined,\n        value: Optional[Any] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            name=name, bind=bind, expr=expr, react=react, value=value, **kwds\n        )\n\n\nclass Vector10string(VegaLiteSchema):\n    \"\"\"Vector10string schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Vector10<string>\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Vector12string(VegaLiteSchema):\n    \"\"\"Vector12string schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Vector12<string>\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Vector2DateTime(SelectionInitInterval):\n    \"\"\"Vector2DateTime schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Vector2<DateTime>\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Vector2Vector2number(VegaLiteSchema):\n    \"\"\"Vector2Vector2number schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Vector2<Vector2<number>>\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Vector2boolean(SelectionInitInterval):\n    \"\"\"Vector2boolean schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Vector2<boolean>\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Vector2number(SelectionInitInterval):\n    \"\"\"Vector2number schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Vector2<number>\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Vector2string(SelectionInitInterval):\n    \"\"\"Vector2string schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Vector2<string>\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Vector3number(VegaLiteSchema):\n    \"\"\"Vector3number schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Vector3<number>\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass Vector7string(VegaLiteSchema):\n    \"\"\"Vector7string schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/Vector7<string>\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass ViewBackground(VegaLiteSchema):\n    \"\"\"\n    ViewBackground schema wrapper.\n\n    Parameters\n    ----------\n    cornerRadius : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cursor : :class:`Cursor`, 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']\n        The mouse cursor used over the view. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    fill : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        The fill color.\n\n        **Default value:** ``undefined``\n    fillOpacity : dict, float, :class:`ExprRef`\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    opacity : dict, float, :class:`ExprRef`\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    stroke : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        The stroke color.\n\n        **Default value:** ``\"#ddd\"``\n    strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash : dict, Sequence[float], :class:`ExprRef`\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset : dict, float, :class:`ExprRef`\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit : dict, float, :class:`ExprRef`\n        The miter limit at which to bevel a line join.\n    strokeOpacity : dict, float, :class:`ExprRef`\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth : dict, float, :class:`ExprRef`\n        The stroke width, in pixels.\n    style : str, Sequence[str]\n        A string or array of strings indicating the name of custom styles to apply to the\n        view background. A style is a named collection of mark property defaults defined\n        within the `style configuration\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an\n        array, later styles will override earlier styles.\n\n        **Default value:** ``\"cell\"`` **Note:** Any specified view background properties\n        will augment the default style.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ViewBackground\"}\n\n    def __init__(\n        self,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cursor: Optional[SchemaBase | Cursor_T] = Undefined,\n        fill: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        stroke: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        strokeDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined,\n        strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        style: Optional[str | Sequence[str]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            cornerRadius=cornerRadius,\n            cursor=cursor,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            opacity=opacity,\n            stroke=stroke,\n            strokeCap=strokeCap,\n            strokeDash=strokeDash,\n            strokeDashOffset=strokeDashOffset,\n            strokeJoin=strokeJoin,\n            strokeMiterLimit=strokeMiterLimit,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            style=style,\n            **kwds,\n        )\n\n\nclass ViewConfig(VegaLiteSchema):\n    \"\"\"\n    ViewConfig schema wrapper.\n\n    Parameters\n    ----------\n    clip : bool\n        Whether the view should be clipped.\n    continuousHeight : float\n        The default height when the plot has a continuous y-field for x or latitude, or has\n        arc marks.\n\n        **Default value:** ``300``\n    continuousWidth : float\n        The default width when the plot has a continuous field for x or longitude, or has\n        arc marks.\n\n        **Default value:** ``300``\n    cornerRadius : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cursor : :class:`Cursor`, 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']\n        The mouse cursor used over the view. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    discreteHeight : dict, float\n        The default height when the plot has non arc marks and either a discrete y-field or\n        no y-field. The height can be either a number indicating a fixed height or an object\n        in the form of ``{step: number}`` defining the height per discrete step.\n\n        **Default value:** a step size based on ``config.view.step``.\n    discreteWidth : dict, float\n        The default width when the plot has non-arc marks and either a discrete x-field or\n        no x-field. The width can be either a number indicating a fixed width or an object\n        in the form of ``{step: number}`` defining the width per discrete step.\n\n        **Default value:** a step size based on ``config.view.step``.\n    fill : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        The fill color.\n\n        **Default value:** ``undefined``\n    fillOpacity : dict, float, :class:`ExprRef`\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    opacity : dict, float, :class:`ExprRef`\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    step : float\n        Default step size for x-/y- discrete fields.\n    stroke : str, dict, :class:`Color`, :class:`ExprRef`, :class:`HexColor`, :class:`ColorName`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple'], None\n        The stroke color.\n\n        **Default value:** ``\"#ddd\"``\n    strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash : dict, Sequence[float], :class:`ExprRef`\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset : dict, float, :class:`ExprRef`\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit : dict, float, :class:`ExprRef`\n        The miter limit at which to bevel a line join.\n    strokeOpacity : dict, float, :class:`ExprRef`\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth : dict, float, :class:`ExprRef`\n        The stroke width, in pixels.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ViewConfig\"}\n\n    def __init__(\n        self,\n        clip: Optional[bool] = Undefined,\n        continuousHeight: Optional[float] = Undefined,\n        continuousWidth: Optional[float] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cursor: Optional[SchemaBase | Cursor_T] = Undefined,\n        discreteHeight: Optional[float | Map] = Undefined,\n        discreteWidth: Optional[float | Map] = Undefined,\n        fill: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        step: Optional[float] = Undefined,\n        stroke: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        strokeDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined,\n        strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            clip=clip,\n            continuousHeight=continuousHeight,\n            continuousWidth=continuousWidth,\n            cornerRadius=cornerRadius,\n            cursor=cursor,\n            discreteHeight=discreteHeight,\n            discreteWidth=discreteWidth,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            opacity=opacity,\n            step=step,\n            stroke=stroke,\n            strokeCap=strokeCap,\n            strokeDash=strokeDash,\n            strokeDashOffset=strokeDashOffset,\n            strokeJoin=strokeJoin,\n            strokeMiterLimit=strokeMiterLimit,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            **kwds,\n        )\n\n\nclass WindowEventType(VegaLiteSchema):\n    \"\"\"WindowEventType schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/WindowEventType\"}\n\n    def __init__(self, *args, **kwds):\n        super().__init__(*args, **kwds)\n\n\nclass EventType(WindowEventType):\n    \"\"\"EventType schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/EventType\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass WindowFieldDef(VegaLiteSchema):\n    \"\"\"\n    WindowFieldDef schema wrapper.\n\n    Parameters\n    ----------\n    op : :class:`AggregateOp`, :class:`WindowOnlyOp`, Literal['argmax', 'argmin', 'average', 'count', 'distinct', 'max', 'mean', 'median', 'min', 'missing', 'product', 'q1', 'q3', 'ci0', 'ci1', 'stderr', 'stdev', 'stdevp', 'sum', 'valid', 'values', 'variance', 'variancep', 'exponential', 'exponentialb', 'row_number', 'rank', 'dense_rank', 'percent_rank', 'cume_dist', 'ntile', 'lag', 'lead', 'first_value', 'last_value', 'nth_value']\n        The window or aggregation operation to apply within a window (e.g., ``\"rank\"``,\n        ``\"lead\"``, ``\"sum\"``, ``\"average\"`` or ``\"count\"``). See the list of all supported\n        operations `here <https://vega.github.io/vega-lite/docs/window.html#ops>`__.\n    field : str, :class:`FieldName`\n        The data field for which to compute the aggregate or window function. This can be\n        omitted for window functions that do not operate over a field such as ``\"count\"``,\n        ``\"rank\"``, ``\"dense_rank\"``.\n    param : float\n        Parameter values for the window functions. Parameter values can be omitted for\n        operations that do not accept a parameter.\n\n        See the list of all supported operations and their parameters `here\n        <https://vega.github.io/vega-lite/docs/transforms/window.html>`__.\n    as : str, :class:`FieldName`\n        The output name for the window operation.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/WindowFieldDef\"}\n\n    def __init__(\n        self,\n        op: Optional[SchemaBase | AggregateOp_T | WindowOnlyOp_T] = Undefined,\n        field: Optional[str | SchemaBase] = Undefined,\n        param: Optional[float] = Undefined,\n        **kwds,\n    ):\n        super().__init__(op=op, field=field, param=param, **kwds)\n\n\nclass WindowOnlyOp(VegaLiteSchema):\n    \"\"\"WindowOnlyOp schema wrapper.\"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/WindowOnlyOp\"}\n\n    def __init__(self, *args):\n        super().__init__(*args)\n\n\nclass WindowTransform(Transform):\n    \"\"\"\n    WindowTransform schema wrapper.\n\n    Parameters\n    ----------\n    window : Sequence[dict, :class:`WindowFieldDef`]\n        The definition of the fields in the window, and what calculations to use.\n    frame : Sequence[float, None]\n        A frame specification as a two-element array indicating how the sliding window\n        should proceed. The array entries should either be a number indicating the offset\n        from the current data object, or null to indicate unbounded rows preceding or\n        following the current data object. The default value is ``[null, 0]``, indicating\n        that the sliding window includes the current object and all preceding objects. The\n        value ``[-5, 5]`` indicates that the window should include five objects preceding\n        and five objects following the current object. Finally, ``[null, null]`` indicates\n        that the window frame should always include all data objects. If you this frame and\n        want to assign the same value to add objects, you can use the simpler `join\n        aggregate transform <https://vega.github.io/vega-lite/docs/joinaggregate.html>`__.\n        The only operators affected are the aggregation operations and the ``first_value``,\n        ``last_value``, and ``nth_value`` window operations. The other window operations are\n        not affected by this.\n\n        **Default value:**:  ``[null, 0]`` (includes the current object and all preceding\n        objects)\n    groupby : Sequence[str, :class:`FieldName`]\n        The data fields for partitioning the data objects into separate windows. If\n        unspecified, all data points will be in a single window.\n    ignorePeers : bool\n        Indicates if the sliding window frame should ignore peer values (data that are\n        considered identical by the sort criteria). The default is false, causing the window\n        frame to expand to include all peer values. If set to true, the window frame will be\n        defined by offset values only. This setting only affects those operations that\n        depend on the window frame, namely aggregation operations and the first_value,\n        last_value, and nth_value window operations.\n\n        **Default value:** ``false``\n    sort : Sequence[dict, :class:`SortField`]\n        A sort field definition for sorting data objects within a window. If two data\n        objects are considered equal by the comparator, they are considered \"peer\" values of\n        equal rank. If sort is not specified, the order is undefined: data objects are\n        processed in the order they are observed and none are considered peers (the\n        ignorePeers parameter is ignored and treated as if set to ``true``).\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/WindowTransform\"}\n\n    def __init__(\n        self,\n        window: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        frame: Optional[Sequence[float | None]] = Undefined,\n        groupby: Optional[Sequence[str | SchemaBase]] = Undefined,\n        ignorePeers: Optional[bool] = Undefined,\n        sort: Optional[Sequence[SchemaBase | Map]] = Undefined,\n        **kwds,\n    ):\n        super().__init__(\n            window=window,\n            frame=frame,\n            groupby=groupby,\n            ignorePeers=ignorePeers,\n            sort=sort,\n            **kwds,\n        )\n"
  },
  {
    "path": "altair/vegalite/v6/schema/mixins.py",
    "content": "# The contents of this file are automatically written by\n# tools/generate_schema_wrapper.py. Do not modify directly.\n\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any, Literal\n\nfrom altair.utils import SchemaBase, Undefined, use_signature\n\nfrom . import core\n\nif TYPE_CHECKING:\n    # ruff: noqa: F405\n    import sys\n    from collections.abc import Sequence\n\n    if sys.version_info >= (3, 11):\n        from typing import Self\n    else:\n        from typing_extensions import Self\n    from altair import Parameter\n    from altair.typing import Optional\n\n    from ._typing import *  # noqa: F403\n\n\nclass _MarkDef(SchemaBase):\n    \"\"\"\n    MarkDef schema wrapper.\n\n    Parameters\n    ----------\n    align : dict, :class:`Align`, :class:`ExprRef`, Literal['left', 'center', 'right']\n        The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule).\n        One of ``\"left\"``, ``\"right\"``, ``\"center\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    angle : dict, float, :class:`ExprRef`\n        The rotation angle of the text, in degrees.\n    aria : bool, dict, :class:`ExprRef`\n        A boolean flag indicating if `ARIA attributes\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ should be\n        included (SVG output only). If ``false``, the \"aria-hidden\" attribute will be set on\n        the output SVG element, removing the mark item from the ARIA accessibility tree.\n    ariaRole : str, dict, :class:`ExprRef`\n        Sets the type of user interface element of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"role\" attribute. Warning: this\n        property is experimental and may be changed in the future.\n    ariaRoleDescription : str, dict, :class:`ExprRef`\n        A human-readable, author-localized description for the role of the mark item for\n        `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the \"aria-roledescription\" attribute.\n        Warning: this property is experimental and may be changed in the future.\n    aspect : bool, dict, :class:`ExprRef`\n        Whether to keep aspect ratio of image marks.\n    bandSize : float\n        The width of the ticks.\n\n        **Default value:**  3/4 of step (width step for horizontal ticks and height step for\n        vertical ticks).\n    baseline : dict, :class:`ExprRef`, :class:`Baseline`, :class:`TextBaseline`, Literal['alphabetic', 'line-bottom', 'line-top', 'top', 'middle', 'bottom']\n        For text marks, the vertical text baseline. One of ``\"alphabetic\"`` (default),\n        ``\"top\"``, ``\"middle\"``, ``\"bottom\"``, ``\"line-top\"``, ``\"line-bottom\"``, or an\n        expression reference that provides one of the valid values. The ``\"line-top\"`` and\n        ``\"line-bottom\"`` values operate similarly to ``\"top\"`` and ``\"bottom\"``, but are\n        calculated relative to the ``lineHeight`` rather than ``fontSize`` alone.\n\n        For range marks, the vertical alignment of the marks. One of ``\"top\"``,\n        ``\"middle\"``, ``\"bottom\"``.\n\n        **Note:** Expression reference is *not* supported for range marks.\n    binSpacing : float\n        Offset between bars for binned field. The ideal value for this is either 0\n        (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n        **Default value:** ``1``\n    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']\n        The color blend mode for drawing an item on its current background. Any valid `CSS\n        mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__\n        value can be used.\n\n        **Default value:** ``\"source-over\"``\n    clip : bool, dict, :class:`ExprRef`\n        Whether a mark be clipped to the enclosing group's width and height.\n    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']\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    continuousBandSize : float\n        The default size of the bars on continuous scales.\n\n        **Default value:** ``5``\n    cornerRadius : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles or arcs' corners.\n\n        **Default value:** ``0``\n    cornerRadiusBottomLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom left corner.\n\n        **Default value:** ``0``\n    cornerRadiusBottomRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' bottom right corner.\n\n        **Default value:** ``0``\n    cornerRadiusEnd : dict, float, :class:`ExprRef`\n        * For vertical bars, top-left and top-right corner radius.\n\n        * For horizontal bars, top-right and bottom-right corner radius.\n    cornerRadiusTopLeft : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top right corner.\n\n        **Default value:** ``0``\n    cornerRadiusTopRight : dict, float, :class:`ExprRef`\n        The radius in pixels of rounded rectangles' top left corner.\n\n        **Default value:** ``0``\n    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']\n        The mouse cursor used over the mark. Any valid `CSS cursor type\n        <https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values>`__ can be used.\n    description : str, dict, :class:`ExprRef`\n        A text description of the mark item for `ARIA accessibility\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA>`__ (SVG output\n        only). If specified, this property determines the `\"aria-label\" attribute\n        <https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute>`__.\n    dir : dict, :class:`ExprRef`, :class:`TextDirection`, Literal['ltr', 'rtl']\n        The direction of the text. One of ``\"ltr\"`` (left-to-right) or ``\"rtl\"``\n        (right-to-left). This property determines on which side is truncated in response to\n        the limit parameter.\n\n        **Default value:** ``\"ltr\"``\n    discreteBandSize : dict, float, :class:`RelativeBandSize`\n        The default size of the bars with discrete dimensions. If unspecified, the default\n        size is  ``step-2``, which provides 2 pixel offset between bars.\n    dx : dict, float, :class:`ExprRef`\n        The horizontal offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    dy : dict, float, :class:`ExprRef`\n        The vertical offset, in pixels, between the text label and its anchor point. The\n        offset is applied after rotation by the *angle* property.\n    ellipsis : str, dict, :class:`ExprRef`\n        The ellipsis string for text truncated in response to the limit parameter.\n\n        **Default value:** ``\"…\"``\n    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\n        Default fill color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove fill.\n\n        **Default value:** (None)\n    fillOpacity : dict, float, :class:`ExprRef`\n        The fill opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    filled : bool\n        Whether the mark's color should be used as fill color instead of stroke color.\n\n        **Default value:** ``false`` for all ``point``, ``line``, and ``rule`` marks as well\n        as ``geoshape`` marks for `graticule\n        <https://vega.github.io/vega-lite/docs/data.html#graticule>`__ data sources;\n        otherwise, ``true``.\n\n        **Note:** This property cannot be used in a `style config\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n    font : str, dict, :class:`ExprRef`\n        The typeface to set the text in (e.g., ``\"Helvetica Neue\"``).\n    fontSize : dict, float, :class:`ExprRef`\n        The font size, in pixels.\n\n        **Default value:** ``11``\n    fontStyle : str, dict, :class:`ExprRef`, :class:`FontStyle`\n        The font style (e.g., ``\"italic\"``).\n    fontWeight : dict, :class:`ExprRef`, :class:`FontWeight`, Literal['normal', 'bold', 'lighter', 'bolder', 100, 200, 300, 400, 500, 600, 700, 800, 900]\n        The font weight. This can be either a string (e.g ``\"bold\"``, ``\"normal\"``) or a\n        number (``100``, ``200``, ``300``, ..., ``900`` where ``\"normal\"`` = ``400`` and\n        ``\"bold\"`` = ``700``).\n    height : dict, float, :class:`ExprRef`, :class:`RelativeBandSize`\n        Height of the marks.  One of:\n\n        * A number representing a fixed pixel height.\n\n        * A relative band size definition.  For example, ``{band: 0.5}`` represents half of\n          the band\n    href : str, dict, :class:`URI`, :class:`ExprRef`\n        A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\n    innerRadius : dict, float, :class:`ExprRef`\n        The inner radius in pixels of arc marks. ``innerRadius`` is an alias for\n        ``radius2``.\n\n        **Default value:** ``0``\n    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']\n        The line interpolation method to use for line and area marks. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"step-before\"``: alternate between vertical and horizontal segments, as in a\n          step function.\n        * ``\"step-after\"``: alternate between horizontal and vertical segments, as in a step\n          function.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    limit : dict, float, :class:`ExprRef`\n        The maximum length of the text mark in pixels. The text value will be automatically\n        truncated if the rendered size exceeds the limit.\n\n        **Default value:** ``0`` -- indicating no limit\n    line : bool, dict, :class:`OverlayMarkDef`\n        A flag for overlaying line on top of area marks, or an object defining the\n        properties of the overlayed lines.\n\n        * If this value is an empty object (``{}``) or ``true``, lines with default\n          properties will be used.\n\n        * If this value is ``false``, no lines would be automatically added to area marks.\n\n        **Default value:** ``false``.\n    lineBreak : str, dict, :class:`ExprRef`\n        A delimiter, such as a newline character, upon which to break text strings into\n        multiple lines. This property is ignored if the text is array-valued.\n    lineHeight : dict, float, :class:`ExprRef`\n        The line height in pixels (the spacing between subsequent lines of text) for\n        multi-line text marks.\n    minBandSize : dict, float, :class:`ExprRef`\n        The minimum band size for bar and rectangle marks. **Default value:** ``0.25``\n    opacity : dict, float, :class:`ExprRef`\n        The overall opacity (value between [0,1]).\n\n        **Default value:** ``0.7`` for non-aggregate plots with ``point``, ``tick``,\n        ``circle``, or ``square`` marks or layered ``bar`` charts and ``1`` otherwise.\n    order : bool, None\n        For line and trail marks, this ``order`` property can be set to ``null`` or\n        ``false`` to make the lines use the original order in the data sources.\n    orient : :class:`Orientation`, Literal['horizontal', 'vertical']\n        The orientation of a non-stacked bar, tick, area, and line charts. The value is\n        either horizontal (default) or vertical.\n\n        * For bar, rule and tick, this determines whether the size of the bar and tick\n          should be applied to x or y dimension.\n        * For area, this property determines the orient property of the Vega output.\n        * For line and trail marks, this property determines the sort order of the points in\n          the line if ``config.sortLineBy`` is not specified. For stacked charts, this is\n          always determined by the orientation of the stack; therefore explicitly specified\n          value will be ignored.\n    outerRadius : dict, float, :class:`ExprRef`\n        The outer radius in pixels of arc marks. ``outerRadius`` is an alias for ``radius``.\n\n        **Default value:** ``0``\n    padAngle : dict, float, :class:`ExprRef`\n        The angular padding applied to sides of the arc, in radians.\n    point : bool, dict, Literal['transparent'], :class:`OverlayMarkDef`\n        A flag for overlaying points on top of line or area marks, or an object defining the\n        properties of the overlayed points.\n\n        * If this property is ``\"transparent\"``, transparent points will be used (for\n          enhancing tooltips and selections).\n\n        * If this property is an empty object (``{}``) or ``true``, filled points with\n          default properties will be used.\n\n        * If this property is ``false``, no points would be automatically added to line or\n          area marks.\n\n        **Default value:** ``false``.\n    radius : dict, float, :class:`ExprRef`\n        For arc mark, the primary (outer) radius in pixels.\n\n        For text marks, polar coordinate radial offset, in pixels, of the text from the\n        origin determined by the ``x`` and ``y`` properties.\n\n        **Default value:** ``min(plot_width, plot_height)/2``\n    radius2 : dict, float, :class:`ExprRef`\n        The secondary (inner) radius in pixels of arc marks.\n\n        **Default value:** ``0``\n    radius2Offset : dict, float, :class:`ExprRef`\n        Offset for radius2.\n    radiusOffset : dict, float, :class:`ExprRef`\n        Offset for radius.\n    shape : str, dict, :class:`ExprRef`, :class:`SymbolShape`\n        Shape of the point marks. Supported values include:\n\n        * plotting shapes: ``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``,\n          ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, or\n          ``\"triangle-left\"``.\n        * the line symbol ``\"stroke\"``\n        * centered directional shapes ``\"arrow\"``, ``\"wedge\"``, or ``\"triangle\"``\n        * a custom `SVG path string\n          <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths>`__ (For correct\n          sizing, custom shape paths should be defined within a square bounding box with\n          coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n        **Default value:** ``\"circle\"``\n    size : dict, float, :class:`ExprRef`\n        Default size for marks.\n\n        * For ``point``/``circle``/``square``, this represents the pixel area of the marks.\n          Note that this value sets the area of the symbol; the side lengths will increase\n          with the square root of this value.\n        * For ``bar``, this represents the band size of the bar, in pixels.\n        * For ``text``, this represents the font size, in pixels.\n\n        **Default value:**\n\n        * ``30`` for point, circle, square marks; width/height's ``step``\n        * ``2`` for bar marks with discrete dimensions;\n        * ``5`` for bar marks with continuous dimensions;\n        * ``11`` for text marks.\n    smooth : bool, dict, :class:`ExprRef`\n        A boolean flag (default true) indicating if the image should be smoothed when\n        resized. If false, individual pixels should be scaled directly rather than\n        interpolated with smoothing. For SVG rendering, this option may not work in some\n        browsers due to lack of standardization.\n    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\n        Default stroke color. This property has higher precedence than ``config.color``. Set\n        to ``null`` to remove stroke.\n\n        **Default value:** (None)\n    strokeCap : dict, :class:`ExprRef`, :class:`StrokeCap`, Literal['butt', 'round', 'square']\n        The stroke cap for line ending style. One of ``\"butt\"``, ``\"round\"``, or\n        ``\"square\"``.\n\n        **Default value:** ``\"butt\"``\n    strokeDash : dict, Sequence[float], :class:`ExprRef`\n        An array of alternating stroke, space lengths for creating dashed or dotted lines.\n    strokeDashOffset : dict, float, :class:`ExprRef`\n        The offset (in pixels) into which to begin drawing with the stroke dash array.\n    strokeJoin : dict, :class:`ExprRef`, :class:`StrokeJoin`, Literal['miter', 'round', 'bevel']\n        The stroke line join method. One of ``\"miter\"``, ``\"round\"`` or ``\"bevel\"``.\n\n        **Default value:** ``\"miter\"``\n    strokeMiterLimit : dict, float, :class:`ExprRef`\n        The miter limit at which to bevel a line join.\n    strokeOffset : dict, float, :class:`ExprRef`\n        The offset in pixels at which to draw the group stroke and fill. If unspecified, the\n        default behavior is to dynamically offset stroked groups such that 1 pixel stroke\n        widths align with the pixel grid.\n    strokeOpacity : dict, float, :class:`ExprRef`\n        The stroke opacity (value between [0,1]).\n\n        **Default value:** ``1``\n    strokeWidth : dict, float, :class:`ExprRef`\n        The stroke width, in pixels.\n    style : str, Sequence[str]\n        A string or array of strings indicating the name of custom styles to apply to the\n        mark. A style is a named collection of mark property defaults defined within the\n        `style configuration\n        <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__. If style is an\n        array, later styles will override earlier styles. Any `mark properties\n        <https://vega.github.io/vega-lite/docs/encoding.html#mark-prop>`__ explicitly\n        defined within the ``encoding`` will override a style default.\n\n        **Default value:** The mark's name. For example, a bar mark will have style\n        ``\"bar\"`` by default. **Note:** Any specified style will augment the default style.\n        For example, a bar mark with ``\"style\": \"foo\"`` will receive from\n        ``config.style.bar`` and ``config.style.foo`` (the specified style ``\"foo\"`` has\n        higher precedence).\n    tension : dict, float, :class:`ExprRef`\n        Depending on the interpolation type, sets the tension parameter (for line and area\n        marks).\n    text : str, dict, :class:`Text`, Sequence[str], :class:`ExprRef`\n        Placeholder text if the ``text`` channel is not specified\n    theta : dict, float, :class:`ExprRef`\n        * For arc marks, the arc length in radians if theta2 is not specified, otherwise the\n          start arc angle. (A value of 0 indicates up or “north”, increasing values proceed\n          clockwise.)\n\n        * For text marks, polar coordinate angle in radians.\n    theta2 : dict, float, :class:`ExprRef`\n        The end angle of arc marks in radians. A value of 0 indicates up or “north”,\n        increasing values proceed clockwise.\n    theta2Offset : dict, float, :class:`ExprRef`\n        Offset for theta2.\n    thetaOffset : dict, float, :class:`ExprRef`\n        Offset for theta.\n    thickness : float\n        Thickness of the tick mark.\n\n        **Default value:**  ``1``\n    time : dict, float, :class:`ExprRef`\n\n    timeUnitBandPosition : float\n        Default relative band position for a time unit. If set to ``0``, the marks will be\n        positioned at the beginning of the time unit band step. If set to ``0.5``, the marks\n        will be positioned in the middle of the time unit band step.\n    timeUnitBandSize : float\n        Default relative band size for a time unit. If set to ``1``, the bandwidth of the\n        marks will be equal to the time unit band step. If set to ``0.5``, bandwidth of the\n        marks will be half of the time unit band step.\n    tooltip : str, bool, dict, float, :class:`ExprRef`, :class:`TooltipContent`, None\n        The tooltip text string to show upon mouse hover or an object defining which fields\n        should the tooltip be derived from.\n\n        * If ``tooltip`` is ``true`` or ``{\"content\": \"encoding\"}``, then all fields from\n          ``encoding`` will be used.\n        * If ``tooltip`` is ``{\"content\": \"data\"}``, then all fields that appear in the\n          highlighted data point will be used.\n        * If set to ``null`` or ``false``, then no tooltip will be used.\n\n        See the `tooltip <https://vega.github.io/vega-lite/docs/tooltip.html>`__\n        documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n        **Default value:** ``null``\n    url : str, dict, :class:`URI`, :class:`ExprRef`\n        The URL of the image file for image marks.\n    width : dict, float, :class:`ExprRef`, :class:`RelativeBandSize`\n        Width of the marks.  One of:\n\n        * A number representing a fixed pixel width.\n\n        * A relative band size definition.  For example, ``{band: 0.5}`` represents half of\n          the band.\n    x : dict, float, :class:`ExprRef`, Literal['width']\n        X coordinates of the marks, or width of horizontal ``\"bar\"`` and ``\"area\"`` without\n        specified ``x2`` or ``width``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2 : dict, float, :class:`ExprRef`, Literal['width']\n        X2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"width\"`` for the width\n        of the plot.\n    x2Offset : dict, float, :class:`ExprRef`\n        Offset for x2-position.\n    xOffset : dict, float, :class:`ExprRef`\n        Offset for x-position.\n    y : dict, float, :class:`ExprRef`, Literal['height']\n        Y coordinates of the marks, or height of vertical ``\"bar\"`` and ``\"area\"`` without\n        specified ``y2`` or ``height``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2 : dict, float, :class:`ExprRef`, Literal['height']\n        Y2 coordinates for ranged ``\"area\"``, ``\"bar\"``, ``\"rect\"``, and  ``\"rule\"``.\n\n        The ``value`` of this channel can be a number or a string ``\"height\"`` for the\n        height of the plot.\n    y2Offset : dict, float, :class:`ExprRef`\n        Offset for y2-position.\n    yOffset : dict, float, :class:`ExprRef`\n        Offset for y-position.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/MarkDef\"}\n\n    def __init__(\n        self,\n        align: Optional[Parameter | SchemaBase | Map | Align_T] = Undefined,\n        angle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        aria: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        ariaRole: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        ariaRoleDescription: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        aspect: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        bandSize: Optional[float] = Undefined,\n        baseline: Optional[Parameter | SchemaBase | Map | TextBaseline_T] = Undefined,\n        binSpacing: Optional[float] = Undefined,\n        blend: Optional[Parameter | SchemaBase | Map | Blend_T] = Undefined,\n        clip: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,\n        continuousBandSize: Optional[float] = Undefined,\n        cornerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusBottomLeft: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusBottomRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cornerRadiusEnd: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusTopLeft: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        cornerRadiusTopRight: Optional[\n            float | Parameter | SchemaBase | Map\n        ] = Undefined,\n        cursor: Optional[Parameter | SchemaBase | Map | Cursor_T] = Undefined,\n        description: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        dir: Optional[Parameter | SchemaBase | Map | TextDirection_T] = Undefined,\n        discreteBandSize: Optional[float | SchemaBase | Map] = Undefined,\n        dx: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        dy: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        ellipsis: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fill: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        fillOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        filled: Optional[bool] = Undefined,\n        font: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        fontStyle: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        fontWeight: Optional[Parameter | SchemaBase | Map | FontWeight_T] = Undefined,\n        height: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        href: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        innerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        interpolate: Optional[Parameter | SchemaBase | Map | Interpolate_T] = Undefined,\n        invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined,\n        limit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        line: Optional[bool | SchemaBase | Map] = Undefined,\n        lineBreak: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        lineHeight: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        minBandSize: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        opacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        order: Optional[bool | None] = Undefined,\n        orient: Optional[SchemaBase | Orientation_T] = Undefined,\n        outerRadius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        padAngle: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        point: Optional[bool | SchemaBase | Literal[\"transparent\"] | Map] = Undefined,\n        radius: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radius2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        radiusOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        shape: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        size: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        smooth: Optional[bool | Parameter | SchemaBase | Map] = Undefined,\n        stroke: Optional[\n            str | Parameter | SchemaBase | Map | ColorName_T | None\n        ] = Undefined,\n        strokeCap: Optional[Parameter | SchemaBase | Map | StrokeCap_T] = Undefined,\n        strokeDash: Optional[\n            Parameter | SchemaBase | Sequence[float] | Map\n        ] = Undefined,\n        strokeDashOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeJoin: Optional[Parameter | SchemaBase | Map | StrokeJoin_T] = Undefined,\n        strokeMiterLimit: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeOpacity: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        strokeWidth: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        style: Optional[str | Sequence[str]] = Undefined,\n        tension: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        text: Optional[str | Parameter | SchemaBase | Sequence[str] | Map] = Undefined,\n        theta: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        theta2: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        theta2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        thetaOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        thickness: Optional[float] = Undefined,\n        time: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        timeUnitBandPosition: Optional[float] = Undefined,\n        timeUnitBandSize: Optional[float] = Undefined,\n        tooltip: Optional[\n            str | bool | float | Parameter | SchemaBase | Map | None\n        ] = Undefined,\n        url: Optional[str | Parameter | SchemaBase | Map] = Undefined,\n        width: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        x: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        x2: Optional[\n            float | Parameter | SchemaBase | Literal[\"width\"] | Map\n        ] = Undefined,\n        x2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        xOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        y: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        y2: Optional[\n            float | Parameter | SchemaBase | Literal[\"height\"] | Map\n        ] = Undefined,\n        y2Offset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        yOffset: Optional[float | Parameter | SchemaBase | Map] = Undefined,\n        **kwds: Any,\n    ):\n        super().__init__(\n            align=align,\n            angle=angle,\n            aria=aria,\n            ariaRole=ariaRole,\n            ariaRoleDescription=ariaRoleDescription,\n            aspect=aspect,\n            bandSize=bandSize,\n            baseline=baseline,\n            binSpacing=binSpacing,\n            blend=blend,\n            clip=clip,\n            color=color,\n            continuousBandSize=continuousBandSize,\n            cornerRadius=cornerRadius,\n            cornerRadiusBottomLeft=cornerRadiusBottomLeft,\n            cornerRadiusBottomRight=cornerRadiusBottomRight,\n            cornerRadiusEnd=cornerRadiusEnd,\n            cornerRadiusTopLeft=cornerRadiusTopLeft,\n            cornerRadiusTopRight=cornerRadiusTopRight,\n            cursor=cursor,\n            description=description,\n            dir=dir,\n            discreteBandSize=discreteBandSize,\n            dx=dx,\n            dy=dy,\n            ellipsis=ellipsis,\n            fill=fill,\n            fillOpacity=fillOpacity,\n            filled=filled,\n            font=font,\n            fontSize=fontSize,\n            fontStyle=fontStyle,\n            fontWeight=fontWeight,\n            height=height,\n            href=href,\n            innerRadius=innerRadius,\n            interpolate=interpolate,\n            invalid=invalid,\n            limit=limit,\n            line=line,\n            lineBreak=lineBreak,\n            lineHeight=lineHeight,\n            minBandSize=minBandSize,\n            opacity=opacity,\n            order=order,\n            orient=orient,\n            outerRadius=outerRadius,\n            padAngle=padAngle,\n            point=point,\n            radius=radius,\n            radius2=radius2,\n            radius2Offset=radius2Offset,\n            radiusOffset=radiusOffset,\n            shape=shape,\n            size=size,\n            smooth=smooth,\n            stroke=stroke,\n            strokeCap=strokeCap,\n            strokeDash=strokeDash,\n            strokeDashOffset=strokeDashOffset,\n            strokeJoin=strokeJoin,\n            strokeMiterLimit=strokeMiterLimit,\n            strokeOffset=strokeOffset,\n            strokeOpacity=strokeOpacity,\n            strokeWidth=strokeWidth,\n            style=style,\n            tension=tension,\n            text=text,\n            theta=theta,\n            theta2=theta2,\n            theta2Offset=theta2Offset,\n            thetaOffset=thetaOffset,\n            thickness=thickness,\n            time=time,\n            timeUnitBandPosition=timeUnitBandPosition,\n            timeUnitBandSize=timeUnitBandSize,\n            tooltip=tooltip,\n            url=url,\n            width=width,\n            x=x,\n            x2=x2,\n            x2Offset=x2Offset,\n            xOffset=xOffset,\n            y=y,\n            y2=y2,\n            y2Offset=y2Offset,\n            yOffset=yOffset,\n            **kwds,\n        )\n\n\nclass _BoxPlotDef(SchemaBase):\n    \"\"\"\n    BoxPlotDef schema wrapper.\n\n    Parameters\n    ----------\n    box : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    clip : bool\n        Whether a composite mark be clipped to the enclosing group's width and height.\n    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']\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    extent : float, Literal['min-max']\n        The extent of the whiskers. Available options include:\n\n        * ``\"min-max\"``: min and max are the lower and upper whiskers respectively.\n        * A number representing multiple of the interquartile range. This number will be\n          multiplied by the IQR to determine whisker boundary, which spans from the smallest\n          data to the largest data within the range *[Q1 - k * IQR, Q3 + k * IQR]* where\n          *Q1* and *Q3* are the first and third quartiles while *IQR* is the interquartile\n          range (*Q3-Q1*).\n\n        **Default value:** ``1.5``.\n    invalid : :class:`MarkInvalidDataMode`, Literal['filter', 'break-paths-filter-domains', 'break-paths-show-domains', 'break-paths-show-path-domains', 'show'], None\n        Invalid data mode, which defines how the marks and corresponding scales should\n        represent invalid values (``null`` and ``NaN`` in continuous scales *without*\n        defined output for invalid values).\n\n        * ``\"filter\"`` — *Exclude* all invalid values from the visualization's *marks* and\n          *scales*. For path marks (for line, area, trail), this option will create paths\n          that connect valid points, as if the data rows with invalid values do not exist.\n\n        * ``\"break-paths-filter-domains\"`` — Break path marks (for line, area, trail) at\n          invalid values.  For non-path marks, this is equivalent to ``\"filter\"``. All\n          *scale* domains will *exclude* these filtered data points.\n\n        * ``\"break-paths-show-domains\"`` — Break paths (for line, area, trail) at invalid\n          values.  Hide invalid values for non-path marks. All *scale* domains will\n          *include* these filtered data points (for both path and non-path marks).\n\n        * ``\"show\"`` or ``null`` — Show all data points in the marks and scale domains. Each\n          scale will use the output for invalid values defined in ``config.scale.invalid``\n          or, if unspecified, by default invalid values will produce the same visual values\n          as zero (if the scale includes zero) or the minimum value (if the scale does not\n          include zero).\n\n        * ``\"break-paths-show-path-domains\"`` (default) — This is equivalent to\n          ``\"break-paths-show-domains\"`` for path-based marks (line/area/trail) and\n          ``\"filter\"`` for non-path marks.\n\n        **Note**: If any channel's scale has an output for invalid values defined in\n        ``config.scale.invalid``, all values for the scales will be considered \"valid\" since\n        they can produce a reasonable output for the scales. Thus, fields for such channels\n        will not be filtered and will not cause path breaks.\n    median : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    opacity : float\n        The opacity (value between [0,1]) of the mark.\n    orient : :class:`Orientation`, Literal['horizontal', 'vertical']\n        Orientation of the box plot. This is normally automatically determined based on\n        types of fields on x and y channels. However, an explicit ``orient`` be specified\n        when the orientation is ambiguous.\n\n        **Default value:** ``\"vertical\"``.\n    outliers : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    size : float\n        Size of the box and median tick of a box plot\n    ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/BoxPlotDef\"}\n\n    def __init__(\n        self,\n        box: Optional[bool | SchemaBase | Map] = Undefined,\n        clip: Optional[bool] = Undefined,\n        color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,\n        extent: Optional[float | Literal[\"min-max\"]] = Undefined,\n        invalid: Optional[SchemaBase | MarkInvalidDataMode_T | None] = Undefined,\n        median: Optional[bool | SchemaBase | Map] = Undefined,\n        opacity: Optional[float] = Undefined,\n        orient: Optional[SchemaBase | Orientation_T] = Undefined,\n        outliers: Optional[bool | SchemaBase | Map] = Undefined,\n        rule: Optional[bool | SchemaBase | Map] = Undefined,\n        size: Optional[float] = Undefined,\n        ticks: Optional[bool | SchemaBase | Map] = Undefined,\n        **kwds: Any,\n    ):\n        super().__init__(\n            box=box,\n            clip=clip,\n            color=color,\n            extent=extent,\n            invalid=invalid,\n            median=median,\n            opacity=opacity,\n            orient=orient,\n            outliers=outliers,\n            rule=rule,\n            size=size,\n            ticks=ticks,\n            **kwds,\n        )\n\n\nclass _ErrorBarDef(SchemaBase):\n    \"\"\"\n    ErrorBarDef schema wrapper.\n\n    Parameters\n    ----------\n    clip : bool\n        Whether a composite mark be clipped to the enclosing group's width and height.\n    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']\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev']\n        The extent of the rule. Available options include:\n\n        * ``\"ci\"``: Extend the rule to the 95% bootstrapped confidence interval of the mean.\n        * ``\"stderr\"``: The size of rule are set to the value of standard error, extending\n          from the mean.\n        * ``\"stdev\"``: The size of rule are set to the value of standard deviation,\n          extending from the mean.\n        * ``\"iqr\"``: Extend the rule to the q1 and q3.\n\n        **Default value:** ``\"stderr\"``.\n    opacity : float\n        The opacity (value between [0,1]) of the mark.\n    orient : :class:`Orientation`, Literal['horizontal', 'vertical']\n        Orientation of the error bar. This is normally automatically determined, but can be\n        specified when the orientation is ambiguous and cannot be automatically determined.\n    rule : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    size : float\n        Size of the ticks of an error bar\n    thickness : float\n        Thickness of the ticks and the bar of an error bar\n    ticks : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ErrorBarDef\"}\n\n    def __init__(\n        self,\n        clip: Optional[bool] = Undefined,\n        color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,\n        extent: Optional[SchemaBase | ErrorBarExtent_T] = Undefined,\n        opacity: Optional[float] = Undefined,\n        orient: Optional[SchemaBase | Orientation_T] = Undefined,\n        rule: Optional[bool | SchemaBase | Map] = Undefined,\n        size: Optional[float] = Undefined,\n        thickness: Optional[float] = Undefined,\n        ticks: Optional[bool | SchemaBase | Map] = Undefined,\n        **kwds: Any,\n    ):\n        super().__init__(\n            clip=clip,\n            color=color,\n            extent=extent,\n            opacity=opacity,\n            orient=orient,\n            rule=rule,\n            size=size,\n            thickness=thickness,\n            ticks=ticks,\n            **kwds,\n        )\n\n\nclass _ErrorBandDef(SchemaBase):\n    \"\"\"\n    ErrorBandDef schema wrapper.\n\n    Parameters\n    ----------\n    band : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    borders : bool, dict, :class:`BarConfig`, :class:`AreaConfig`, :class:`LineConfig`, :class:`MarkConfig`, :class:`RectConfig`, :class:`TickConfig`, :class:`AnyMarkConfig`\n\n    clip : bool\n        Whether a composite mark be clipped to the enclosing group's width and height.\n    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']\n        Default color.\n\n        **Default value:** ``\"#4682b4\"``\n\n        **Note:**\n\n        * This property cannot be used in a `style config\n          <https://vega.github.io/vega-lite/docs/mark.html#style-config>`__.\n        * The ``fill`` and ``stroke`` properties have higher precedence than ``color`` and\n          will override ``color``.\n    extent : :class:`ErrorBarExtent`, Literal['ci', 'iqr', 'stderr', 'stdev']\n        The extent of the band. Available options include:\n\n        * ``\"ci\"``: Extend the band to the 95% bootstrapped confidence interval of the mean.\n        * ``\"stderr\"``: The size of band are set to the value of standard error, extending\n          from the mean.\n        * ``\"stdev\"``: The size of band are set to the value of standard deviation,\n          extending from the mean.\n        * ``\"iqr\"``: Extend the band to the q1 and q3.\n\n        **Default value:** ``\"stderr\"``.\n    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']\n        The line interpolation method for the error band. One of the following:\n\n        * ``\"linear\"``: piecewise linear segments, as in a polyline.\n        * ``\"linear-closed\"``: close the linear segments to form a polygon.\n        * ``\"step\"``: a piecewise constant function (a step function) consisting of\n          alternating horizontal and vertical lines. The y-value changes at the midpoint of\n          each pair of adjacent x-values.\n        * ``\"step-before\"``: a piecewise constant function (a step function) consisting of\n          alternating horizontal and vertical lines. The y-value changes before the x-value.\n        * ``\"step-after\"``: a piecewise constant function (a step function) consisting of\n          alternating horizontal and vertical lines. The y-value changes after the x-value.\n        * ``\"basis\"``: a B-spline, with control point duplication on the ends.\n        * ``\"basis-open\"``: an open B-spline; may not intersect the start or end.\n        * ``\"basis-closed\"``: a closed B-spline, as in a loop.\n        * ``\"cardinal\"``: a Cardinal spline, with control point duplication on the ends.\n        * ``\"cardinal-open\"``: an open Cardinal spline; may not intersect the start or end,\n          but will intersect other control points.\n        * ``\"cardinal-closed\"``: a closed Cardinal spline, as in a loop.\n        * ``\"bundle\"``: equivalent to basis, except the tension parameter is used to\n          straighten the spline.\n        * ``\"monotone\"``: cubic interpolation that preserves monotonicity in y.\n    opacity : float\n        The opacity (value between [0,1]) of the mark.\n    orient : :class:`Orientation`, Literal['horizontal', 'vertical']\n        Orientation of the error band. This is normally automatically determined, but can be\n        specified when the orientation is ambiguous and cannot be automatically determined.\n    tension : float\n        The tension parameter for the interpolation type of the error band.\n    \"\"\"\n\n    _schema = {\"$ref\": \"#/definitions/ErrorBandDef\"}\n\n    def __init__(\n        self,\n        band: Optional[bool | SchemaBase | Map] = Undefined,\n        borders: Optional[bool | SchemaBase | Map] = Undefined,\n        clip: Optional[bool] = Undefined,\n        color: Optional[str | Parameter | SchemaBase | Map | ColorName_T] = Undefined,\n        extent: Optional[SchemaBase | ErrorBarExtent_T] = Undefined,\n        interpolate: Optional[SchemaBase | Interpolate_T] = Undefined,\n        opacity: Optional[float] = Undefined,\n        orient: Optional[SchemaBase | Orientation_T] = Undefined,\n        tension: Optional[float] = Undefined,\n        **kwds: Any,\n    ):\n        super().__init__(\n            band=band,\n            borders=borders,\n            clip=clip,\n            color=color,\n            extent=extent,\n            interpolate=interpolate,\n            opacity=opacity,\n            orient=orient,\n            tension=tension,\n            **kwds,\n        )\n\n\nclass MarkMethodMixin:\n    \"\"\"A mixin class that defines mark methods.\"\"\"\n\n    @use_signature(_MarkDef)\n    def mark_arc(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'arc' (see :class:`MarkDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.MarkDef(type=\"arc\", **kwds)\n        else:\n            copy.mark = \"arc\"\n        return copy\n\n    @use_signature(_MarkDef)\n    def mark_area(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'area' (see :class:`MarkDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.MarkDef(type=\"area\", **kwds)\n        else:\n            copy.mark = \"area\"\n        return copy\n\n    @use_signature(_MarkDef)\n    def mark_bar(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'bar' (see :class:`MarkDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.MarkDef(type=\"bar\", **kwds)\n        else:\n            copy.mark = \"bar\"\n        return copy\n\n    @use_signature(_MarkDef)\n    def mark_image(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'image' (see :class:`MarkDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.MarkDef(type=\"image\", **kwds)\n        else:\n            copy.mark = \"image\"\n        return copy\n\n    @use_signature(_MarkDef)\n    def mark_line(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'line' (see :class:`MarkDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.MarkDef(type=\"line\", **kwds)\n        else:\n            copy.mark = \"line\"\n        return copy\n\n    @use_signature(_MarkDef)\n    def mark_point(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'point' (see :class:`MarkDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.MarkDef(type=\"point\", **kwds)\n        else:\n            copy.mark = \"point\"\n        return copy\n\n    @use_signature(_MarkDef)\n    def mark_rect(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'rect' (see :class:`MarkDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.MarkDef(type=\"rect\", **kwds)\n        else:\n            copy.mark = \"rect\"\n        return copy\n\n    @use_signature(_MarkDef)\n    def mark_rule(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'rule' (see :class:`MarkDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.MarkDef(type=\"rule\", **kwds)\n        else:\n            copy.mark = \"rule\"\n        return copy\n\n    @use_signature(_MarkDef)\n    def mark_text(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'text' (see :class:`MarkDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.MarkDef(type=\"text\", **kwds)\n        else:\n            copy.mark = \"text\"\n        return copy\n\n    @use_signature(_MarkDef)\n    def mark_tick(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'tick' (see :class:`MarkDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.MarkDef(type=\"tick\", **kwds)\n        else:\n            copy.mark = \"tick\"\n        return copy\n\n    @use_signature(_MarkDef)\n    def mark_trail(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'trail' (see :class:`MarkDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.MarkDef(type=\"trail\", **kwds)\n        else:\n            copy.mark = \"trail\"\n        return copy\n\n    @use_signature(_MarkDef)\n    def mark_circle(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'circle' (see :class:`MarkDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.MarkDef(type=\"circle\", **kwds)\n        else:\n            copy.mark = \"circle\"\n        return copy\n\n    @use_signature(_MarkDef)\n    def mark_square(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'square' (see :class:`MarkDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.MarkDef(type=\"square\", **kwds)\n        else:\n            copy.mark = \"square\"\n        return copy\n\n    @use_signature(_MarkDef)\n    def mark_geoshape(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'geoshape' (see :class:`MarkDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.MarkDef(type=\"geoshape\", **kwds)\n        else:\n            copy.mark = \"geoshape\"\n        return copy\n\n    @use_signature(_BoxPlotDef)\n    def mark_boxplot(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'boxplot' (see :class:`BoxPlotDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.BoxPlotDef(type=\"boxplot\", **kwds)\n        else:\n            copy.mark = \"boxplot\"\n        return copy\n\n    @use_signature(_ErrorBarDef)\n    def mark_errorbar(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'errorbar' (see :class:`ErrorBarDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.ErrorBarDef(type=\"errorbar\", **kwds)\n        else:\n            copy.mark = \"errorbar\"\n        return copy\n\n    @use_signature(_ErrorBandDef)\n    def mark_errorband(self, **kwds: Any) -> Self:\n        \"\"\"Set the chart's mark to 'errorband' (see :class:`ErrorBandDef`).\"\"\"\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        if any(val is not Undefined for val in kwds.values()):\n            copy.mark = core.ErrorBandDef(type=\"errorband\", **kwds)\n        else:\n            copy.mark = \"errorband\"\n        return copy\n\n\nclass ConfigMethodMixin:\n    \"\"\"A mixin class that defines config methods.\"\"\"\n\n    @use_signature(core.Config)\n    def configure(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=False)  # type: ignore[attr-defined]\n        copy.config = core.Config(*args, **kwargs)\n        return copy\n\n    @use_signature(core.RectConfig)\n    def configure_arc(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"arc\"] = core.RectConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AreaConfig)\n    def configure_area(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"area\"] = core.AreaConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axis(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axis\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisBand(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisBand\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisBottom(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisBottom\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisDiscrete(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisDiscrete\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisLeft(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisLeft\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisPoint(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisPoint\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisQuantitative(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisQuantitative\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisRight(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisRight\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisTemporal(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisTemporal\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisTop(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisTop\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisX(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisX\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisXBand(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisXBand\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisXDiscrete(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisXDiscrete\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisXPoint(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisXPoint\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisXQuantitative(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisXQuantitative\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisXTemporal(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisXTemporal\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisY(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisY\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisYBand(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisYBand\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisYDiscrete(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisYDiscrete\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisYPoint(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisYPoint\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisYQuantitative(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisYQuantitative\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.AxisConfig)\n    def configure_axisYTemporal(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"axisYTemporal\"] = core.AxisConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.BarConfig)\n    def configure_bar(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"bar\"] = core.BarConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.BoxPlotConfig)\n    def configure_boxplot(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"boxplot\"] = core.BoxPlotConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.MarkConfig)\n    def configure_circle(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"circle\"] = core.MarkConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.CompositionConfig)\n    def configure_concat(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"concat\"] = core.CompositionConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.ErrorBandConfig)\n    def configure_errorband(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"errorband\"] = core.ErrorBandConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.ErrorBarConfig)\n    def configure_errorbar(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"errorbar\"] = core.ErrorBarConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.CompositionConfig)\n    def configure_facet(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"facet\"] = core.CompositionConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.MarkConfig)\n    def configure_geoshape(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"geoshape\"] = core.MarkConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.HeaderConfig)\n    def configure_header(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"header\"] = core.HeaderConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.HeaderConfig)\n    def configure_headerColumn(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"headerColumn\"] = core.HeaderConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.HeaderConfig)\n    def configure_headerFacet(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"headerFacet\"] = core.HeaderConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.HeaderConfig)\n    def configure_headerRow(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"headerRow\"] = core.HeaderConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.RectConfig)\n    def configure_image(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"image\"] = core.RectConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.LegendConfig)\n    def configure_legend(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"legend\"] = core.LegendConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.LineConfig)\n    def configure_line(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"line\"] = core.LineConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.MarkConfig)\n    def configure_mark(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"mark\"] = core.MarkConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.MarkConfig)\n    def configure_point(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"point\"] = core.MarkConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.ProjectionConfig)\n    def configure_projection(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"projection\"] = core.ProjectionConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.RangeConfig)\n    def configure_range(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"range\"] = core.RangeConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.RectConfig)\n    def configure_rect(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"rect\"] = core.RectConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.MarkConfig)\n    def configure_rule(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"rule\"] = core.MarkConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.ScaleConfig)\n    def configure_scale(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"scale\"] = core.ScaleConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.SelectionConfig)\n    def configure_selection(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"selection\"] = core.SelectionConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.MarkConfig)\n    def configure_square(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"square\"] = core.MarkConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.MarkConfig)\n    def configure_text(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"text\"] = core.MarkConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.TickConfig)\n    def configure_tick(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"tick\"] = core.TickConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.TitleConfig)\n    def configure_title(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"title\"] = core.TitleConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.FormatConfig)\n    def configure_tooltipFormat(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"tooltipFormat\"] = core.FormatConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.LineConfig)\n    def configure_trail(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"trail\"] = core.LineConfig(*args, **kwargs)\n        return copy\n\n    @use_signature(core.ViewConfig)\n    def configure_view(self, *args, **kwargs) -> Self:\n        copy = self.copy(deep=[\"config\"])  # type: ignore[attr-defined]\n        if copy.config is Undefined:\n            copy.config = core.Config()\n        copy.config[\"view\"] = core.ViewConfig(*args, **kwargs)\n        return copy\n"
  },
  {
    "path": "altair/vegalite/v6/schema/vega-lite-schema.json",
    "content": "{\n  \"$ref\": \"#/definitions/TopLevelSpec\",\n  \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n  \"definitions\": {\n    \"Aggregate\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/NonArgAggregateOp\"\n        },\n        {\n          \"$ref\": \"#/definitions/ArgmaxDef\"\n        },\n        {\n          \"$ref\": \"#/definitions/ArgminDef\"\n        }\n      ]\n    },\n    \"AggregateOp\": {\n      \"enum\": [\n        \"argmax\",\n        \"argmin\",\n        \"average\",\n        \"count\",\n        \"distinct\",\n        \"max\",\n        \"mean\",\n        \"median\",\n        \"min\",\n        \"missing\",\n        \"product\",\n        \"q1\",\n        \"q3\",\n        \"ci0\",\n        \"ci1\",\n        \"stderr\",\n        \"stdev\",\n        \"stdevp\",\n        \"sum\",\n        \"valid\",\n        \"values\",\n        \"variance\",\n        \"variancep\",\n        \"exponential\",\n        \"exponentialb\"\n      ],\n      \"type\": \"string\"\n    },\n    \"AggregateTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"aggregate\": {\n          \"description\": \"Array of objects that define fields to aggregate.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/AggregatedFieldDef\"\n          },\n          \"type\": \"array\"\n        },\n        \"groupby\": {\n          \"description\": \"The data fields to group by. If not specified, a single group containing all data objects will be used.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"aggregate\"\n      ],\n      \"type\": \"object\"\n    },\n    \"AggregatedFieldDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"as\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The output field names to use for each aggregated field.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The data field for which to compute aggregate function. This is required for all aggregation operations except `\\\"count\\\"`.\"\n        },\n        \"op\": {\n          \"$ref\": \"#/definitions/AggregateOp\",\n          \"description\": \"The aggregation operation to apply to the fields (e.g., `\\\"sum\\\"`, `\\\"average\\\"`, or `\\\"count\\\"`). See the [full list of supported aggregation operations](https://vega.github.io/vega-lite/docs/aggregate.html#ops) for more information.\"\n        }\n      },\n      \"required\": [\n        \"op\",\n        \"as\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Align\": {\n      \"enum\": [\n        \"left\",\n        \"center\",\n        \"right\"\n      ],\n      \"type\": \"string\"\n    },\n    \"AllSortString\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/SortOrder\"\n        },\n        {\n          \"$ref\": \"#/definitions/SortByChannel\"\n        },\n        {\n          \"$ref\": \"#/definitions/SortByChannelDesc\"\n        }\n      ]\n    },\n    \"AnyMark\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/CompositeMark\"\n        },\n        {\n          \"$ref\": \"#/definitions/CompositeMarkDef\"\n        },\n        {\n          \"$ref\": \"#/definitions/Mark\"\n        },\n        {\n          \"$ref\": \"#/definitions/MarkDef\"\n        }\n      ]\n    },\n    \"AnyMarkConfig\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/MarkConfig\"\n        },\n        {\n          \"$ref\": \"#/definitions/AreaConfig\"\n        },\n        {\n          \"$ref\": \"#/definitions/BarConfig\"\n        },\n        {\n          \"$ref\": \"#/definitions/RectConfig\"\n        },\n        {\n          \"$ref\": \"#/definitions/LineConfig\"\n        },\n        {\n          \"$ref\": \"#/definitions/TickConfig\"\n        }\n      ]\n    },\n    \"AreaConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\\\"left\\\"`, `\\\"right\\\"`, `\\\"center\\\"`.\\n\\n__Note:__ Expression reference is *not* supported for range marks.\"\n        },\n        \"angle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The rotation angle of the text, in degrees.\",\n              \"maximum\": 360,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aria\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ariaRole\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ariaRoleDescription\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aspect\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Whether to keep aspect ratio of image marks.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"baseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"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.\\n\\nFor range marks, the vertical alignment of the marks. One of `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`.\\n\\n__Note:__ Expression reference is *not* supported for range marks.\"\n        },\n        \"blend\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Blend\",\n              \"description\": \"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.\\n\\n__Default value: `\\\"source-over\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"color\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default color.\\n\\n__Default value:__ <span style=\\\"color: #4682b4;\\\">&#9632;</span> `\\\"#4682b4\\\"`\\n\\n__Note:__\\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.\"\n        },\n        \"cornerRadius\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles or arcs' corners.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusBottomLeft\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' bottom left corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusBottomRight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' bottom right corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusTopLeft\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' top right corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusTopRight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' top left corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cursor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Cursor\",\n              \"description\": \"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.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"description\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dir\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextDirection\",\n              \"description\": \"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.\\n\\n__Default value:__ `\\\"ltr\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dx\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dy\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ellipsis\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The ellipsis string for text truncated in response to the limit parameter.\\n\\n__Default value:__ `\\\"…\\\"`\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"endAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fill\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\\n\\n__Default value:__ (None)\"\n        },\n        \"fillOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The fill opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"filled\": {\n          \"description\": \"Whether the mark's color should be used as fill color instead of stroke color.\\n\\n__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`.\\n\\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\",\n          \"type\": \"boolean\"\n        },\n        \"font\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The typeface to set the text in (e.g., `\\\"Helvetica Neue\\\"`).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font size, in pixels.\\n\\n__Default value:__ `11`\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"The font style (e.g., `\\\"italic\\\"`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"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`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"height\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Height of the marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"href\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/URI\",\n              \"description\": \"A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"innerRadius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"interpolate\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Interpolate\",\n              \"description\": \"The line interpolation method to use for line and area marks. One of the following:\\n- `\\\"linear\\\"`: piecewise linear segments, as in a polyline.\\n- `\\\"linear-closed\\\"`: close the linear segments to form a polygon.\\n- `\\\"step\\\"`: alternate between horizontal and vertical segments, as in a step function.\\n- `\\\"step-before\\\"`: alternate between vertical and horizontal segments, as in a step function.\\n- `\\\"step-after\\\"`: alternate between horizontal and vertical segments, as in a step function.\\n- `\\\"basis\\\"`: a B-spline, with control point duplication on the ends.\\n- `\\\"basis-open\\\"`: an open B-spline; may not intersect the start or end.\\n- `\\\"basis-closed\\\"`: a closed B-spline, as in a loop.\\n- `\\\"cardinal\\\"`: a Cardinal spline, with control point duplication on the ends.\\n- `\\\"cardinal-open\\\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\\n- `\\\"cardinal-closed\\\"`: a closed Cardinal spline, as in a loop.\\n- `\\\"bundle\\\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\\n- `\\\"monotone\\\"`: cubic interpolation that preserves monotonicity in y.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"invalid\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/MarkInvalidDataMode\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"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).\\n\\n- `\\\"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.\\n\\n- `\\\"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.\\n\\n- `\\\"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).\\n\\n- `\\\"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).\\n\\n- `\\\"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.\\n\\n__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.\"\n        },\n        \"limit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\\n\\n__Default value:__ `0` -- indicating no limit\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"line\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/OverlayMarkDef\"\n            }\n          ],\n          \"description\": \"A flag for overlaying line on top of area marks, or an object defining the properties of the overlayed lines.\\n\\n- If this value is an empty object (`{}`) or `true`, lines with default properties will be used.\\n\\n- If this value is `false`, no lines would be automatically added to area marks.\\n\\n__Default value:__ `false`.\"\n        },\n        \"lineBreak\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"opacity\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The overall opacity (value between [0,1]).\\n\\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"order\": {\n          \"description\": \"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.\",\n          \"type\": [\n            \"null\",\n            \"boolean\"\n          ]\n        },\n        \"orient\": {\n          \"$ref\": \"#/definitions/Orientation\",\n          \"description\": \"The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.\\n- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.\\n- For area, this property determines the orient property of the Vega output.\\n- 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.\"\n        },\n        \"outerRadius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"padAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The angular padding applied to sides of the arc, in radians.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"point\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/OverlayMarkDef\"\n            },\n            {\n              \"const\": \"transparent\",\n              \"type\": \"string\"\n            }\n          ],\n          \"description\": \"A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.\\n\\n- If this property is `\\\"transparent\\\"`, transparent points will be used (for enhancing tooltips and selections).\\n\\n- If this property is an empty object (`{}`) or `true`, filled points with default properties will be used.\\n\\n- If this property is `false`, no points would be automatically added to line or area marks.\\n\\n__Default value:__ `false`.\"\n        },\n        \"radius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"For arc mark, the primary (outer) radius in pixels.\\n\\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\\n\\n__Default value:__ `min(plot_width, plot_height)/2`\",\n          \"minimum\": 0\n        },\n        \"radius2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The secondary (inner) radius in pixels of arc marks.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"shape\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/SymbolShape\"\n                },\n                {\n                  \"type\": \"string\"\n                }\n              ],\n              \"description\": \"Shape of the point marks. Supported values include:\\n- plotting shapes: `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"cross\\\"`, `\\\"diamond\\\"`, `\\\"triangle-up\\\"`, `\\\"triangle-down\\\"`, `\\\"triangle-right\\\"`, or `\\\"triangle-left\\\"`.\\n- the line symbol `\\\"stroke\\\"`\\n- centered directional shapes `\\\"arrow\\\"`, `\\\"wedge\\\"`, or `\\\"triangle\\\"`\\n- 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.)\\n\\n__Default value:__ `\\\"circle\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"size\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default size for marks.\\n- 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.\\n- For `bar`, this represents the band size of the bar, in pixels.\\n- For `text`, this represents the font size, in pixels.\\n\\n__Default value:__\\n- `30` for point, circle, square marks; width/height's `step`\\n- `2` for bar marks with discrete dimensions;\\n- `5` for bar marks with continuous dimensions;\\n- `11` for text marks.\",\n          \"minimum\": 0\n        },\n        \"smooth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"startAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"stroke\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\\n\\n__Default value:__ (None)\"\n        },\n        \"strokeCap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeCap\",\n              \"description\": \"The stroke cap for line ending style. One of `\\\"butt\\\"`, `\\\"round\\\"`, or `\\\"square\\\"`.\\n\\n__Default value:__ `\\\"butt\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating stroke, space lengths for creating dashed or dotted lines.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The offset (in pixels) into which to begin drawing with the stroke dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeJoin\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeJoin\",\n              \"description\": \"The stroke line join method. One of `\\\"miter\\\"`, `\\\"round\\\"` or `\\\"bevel\\\"`.\\n\\n__Default value:__ `\\\"miter\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeMiterLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The miter limit at which to bevel a line join.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke width, in pixels.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"tension\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Depending on the interpolation type, sets the tension parameter (for line and area marks).\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"text\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\",\n              \"description\": \"Placeholder text if the `text` channel is not specified\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"theta\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"- 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.)\\n\\n- For text marks, polar coordinate angle in radians.\",\n          \"maximum\": 360,\n          \"minimum\": 0\n        },\n        \"theta2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise.\"\n        },\n        \"time\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"timeUnitBandPosition\": {\n          \"description\": \"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.\",\n          \"type\": \"number\"\n        },\n        \"timeUnitBandSize\": {\n          \"description\": \"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.\",\n          \"type\": \"number\"\n        },\n        \"tooltip\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/TooltipContent\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\\n\\n- If `tooltip` is `true` or `{\\\"content\\\": \\\"encoding\\\"}`, then all fields from `encoding` will be used.\\n- If `tooltip` is `{\\\"content\\\": \\\"data\\\"}`, then all fields that appear in the highlighted data point will be used.\\n- If set to `null` or `false`, then no tooltip will be used.\\n\\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\\n\\n__Default value:__ `null`\"\n        },\n        \"url\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/URI\",\n              \"description\": \"The URL of the image file for image marks.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"width\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Width of the marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"x\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"X coordinates of the marks, or width of horizontal `\\\"bar\\\"` and `\\\"area\\\"` without specified `x2` or `width`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"x2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"X2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"y\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Y coordinates of the marks, or height of vertical `\\\"bar\\\"` and `\\\"area\\\"` without specified `y2` or `height`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        },\n        \"y2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Y2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ArgmaxDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"argmax\": {\n          \"$ref\": \"#/definitions/FieldName\"\n        }\n      },\n      \"required\": [\n        \"argmax\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ArgminDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"argmin\": {\n          \"$ref\": \"#/definitions/FieldName\"\n        }\n      },\n      \"required\": [\n        \"argmin\"\n      ],\n      \"type\": \"object\"\n    },\n    \"AutoSizeParams\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"contains\": {\n          \"description\": \"Determines how size calculation should be performed, one of `\\\"content\\\"` or `\\\"padding\\\"`. The default setting (`\\\"content\\\"`) interprets the width and height settings as the data rectangle (plotting) dimensions, to which padding is then added. In contrast, the `\\\"padding\\\"` setting includes the padding within the view size calculations, such that the width and height settings indicate the **total** intended size of the view.\\n\\n__Default value__: `\\\"content\\\"`\",\n          \"enum\": [\n            \"content\",\n            \"padding\"\n          ],\n          \"type\": \"string\"\n        },\n        \"resize\": {\n          \"description\": \"A boolean flag indicating if autosize layout should be re-calculated on every view update.\\n\\n__Default value__: `false`\",\n          \"type\": \"boolean\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/AutosizeType\",\n          \"description\": \"The sizing format type. One of `\\\"pad\\\"`, `\\\"fit\\\"`, `\\\"fit-x\\\"`, `\\\"fit-y\\\"`,  or `\\\"none\\\"`. See the [autosize type](https://vega.github.io/vega-lite/docs/size.html#autosize) documentation for descriptions of each.\\n\\n__Default value__: `\\\"pad\\\"`\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"AutosizeType\": {\n      \"enum\": [\n        \"pad\",\n        \"none\",\n        \"fit\",\n        \"fit-x\",\n        \"fit-y\"\n      ],\n      \"type\": \"string\"\n    },\n    \"Axis\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"aria\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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 group, removing the axis from the ARIA accessibility tree.\\n\\n__Default value:__ `true`\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"bandPosition\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An interpolation fraction indicating where, for `band` scales, axis ticks should be positioned. A value of `0` places ticks at the left edge of their bands. A value of `0.5` places ticks in the middle of their bands.\\n\\n __Default value:__ `0.5`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"description\": {\n          \"anyOf\": [\n            {\n              \"description\": \"A text description of this axis for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If the `aria` property is true, for SVG output the [\\\"aria-label\\\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute) will be set to this description. If the description is unspecified it will be automatically generated.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"domain\": {\n          \"description\": \"A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.\\n\\n__Default value:__ `true`\",\n          \"type\": \"boolean\"\n        },\n        \"domainCap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeCap\",\n              \"description\": \"The stroke cap for the domain line's ending style. One of `\\\"butt\\\"`, `\\\"round\\\"` or `\\\"square\\\"`.\\n\\n__Default value:__ `\\\"butt\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"domainColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Color of axis domain line.\\n\\n__Default value:__ `\\\"gray\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"domainDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating [stroke, space] lengths for dashed domain lines.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"domainDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The pixel offset at which to start drawing with the domain dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"domainOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Opacity of the axis domain line.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"domainWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Stroke width of axis domain line\\n\\n__Default value:__ `1`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"format\": {\n          \"$ref\": \"#/definitions/Format\",\n          \"description\": \"The text format specifier for formatting number and date/time in labels of guides (axes, legends, headers) and text marks.\\n\\nIf the format type is `\\\"number\\\"` (e.g., for quantitative fields), this is a D3's [number format pattern string](https://github.com/d3/d3-format#locale_format).\\n\\nIf the format type is `\\\"time\\\"` (e.g., for temporal fields), this is either:   a) D3's [time format pattern](https://d3js.org/d3-time-format#locale_format) if you desire to set a static time format.\\n\\n  b) [dynamic time format specifier object](https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format) if you desire to set a dynamic time format that uses different formats depending on the granularity of the input date (e.g., if the date lies on a year, month, date, hour, etc. boundary).\\n\\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\\n\\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.\"\n        },\n        \"formatType\": {\n          \"description\": \"The format type for labels. One of `\\\"number\\\"`, `\\\"time\\\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\\n\\n__Default value:__\\n- `\\\"time\\\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\\n- `\\\"number\\\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.\",\n          \"type\": \"string\"\n        },\n        \"grid\": {\n          \"description\": \"A boolean flag indicating if grid lines should be included as part of the axis\\n\\n__Default value:__ `true` for [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous) that are not binned; otherwise, `false`.\",\n          \"type\": \"boolean\"\n        },\n        \"gridCap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeCap\",\n              \"description\": \"The stroke cap for grid lines' ending style. One of `\\\"butt\\\"`, `\\\"round\\\"` or `\\\"square\\\"`.\\n\\n__Default value:__ `\\\"butt\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"gridColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Color of gridlines.\\n\\n__Default value:__ `\\\"lightGray\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisColor\"\n            }\n          ]\n        },\n        \"gridDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating [stroke, space] lengths for dashed grid lines.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumberArray\"\n            }\n          ]\n        },\n        \"gridDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The pixel offset at which to start drawing with the grid dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"gridOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke opacity of grid (value between [0,1])\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"gridWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The grid width, in pixels.\\n\\n__Default value:__ `1`\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"labelAlign\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\",\n              \"description\": \"Horizontal text alignment of axis tick labels, overriding the default setting for the current axis orientation.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisLabelAlign\"\n            }\n          ]\n        },\n        \"labelAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The rotation angle of the axis labels.\\n\\n__Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.\",\n              \"maximum\": 360,\n              \"minimum\": -360,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelBaseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\",\n              \"description\": \"Vertical text baseline of axis tick labels, overriding the default setting for the current axis orientation. One of `\\\"alphabetic\\\"` (default), `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`, `\\\"line-top\\\"`, or `\\\"line-bottom\\\"`. The `\\\"line-top\\\"` and `\\\"line-bottom\\\"` values operate similarly to `\\\"top\\\"` and `\\\"bottom\\\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisLabelBaseline\"\n            }\n          ]\n        },\n        \"labelBound\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Indicates if labels should be hidden if they exceed the axis range. If `false` (the default) no bounds overlap analysis is performed. If `true`, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.\\n\\n__Default value:__ `false`.\",\n              \"type\": [\n                \"number\",\n                \"boolean\"\n              ]\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"The color of the tick label, can be in hex color code or regular color name.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisColor\"\n            }\n          ]\n        },\n        \"labelExpr\": {\n          \"description\": \"[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\\n\\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.\",\n          \"type\": \"string\"\n        },\n        \"labelFlush\": {\n          \"description\": \"Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.\\n\\n__Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.\",\n          \"type\": [\n            \"boolean\",\n            \"number\"\n          ]\n        },\n        \"labelFlushOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of `2` will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.\\n\\n__Default value:__ `0`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelFont\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font of the tick label.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisString\"\n            }\n          ]\n        },\n        \"labelFontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font size of the label, in pixels.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"labelFontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"Font style of the title.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisLabelFontStyle\"\n            }\n          ]\n        },\n        \"labelFontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"Font weight of axis tick labels.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisLabelFontWeight\"\n            }\n          ]\n        },\n        \"labelLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Maximum allowed pixel width of axis tick labels.\\n\\n__Default value:__ `180`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelLineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Line height in pixels for multi-line label text or label text with `\\\"line-top\\\"` or `\\\"line-bottom\\\"` baseline.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Position offset in pixels to apply to labels, in addition to tickOffset.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"labelOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The opacity of the labels.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"labelOverlap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LabelOverlap\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The strategy to use for resolving overlap of axis labels. If `false` (the default), no overlap reduction is attempted. If set to `true` or `\\\"parity\\\"`, a strategy of removing every other label is used (this works well for standard linear axes). If set to `\\\"greedy\\\"`, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).\\n\\n__Default value:__ `true` for non-nominal fields with non-log scales; `\\\"greedy\\\"` for log scales; otherwise `false`.\"\n        },\n        \"labelPadding\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The padding in pixels between labels and ticks.\\n\\n__Default value:__ `2`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"labelSeparation\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labels\": {\n          \"description\": \"A boolean flag indicating if labels should be included as part of the axis.\\n\\n__Default value:__ `true`.\",\n          \"type\": \"boolean\"\n        },\n        \"maxExtent\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.\\n\\n__Default value:__ `undefined`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"minExtent\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.\\n\\n__Default value:__ `30` for y-axis; `undefined` for x-axis.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"offset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.\\n\\n__Default value:__ derived from the [axis config](https://vega.github.io/vega-lite/docs/config.html#facet-scale-config)'s `offset` (`0` by default)\"\n        },\n        \"orient\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/AxisOrient\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The orientation of the axis. One of `\\\"top\\\"`, `\\\"bottom\\\"`, `\\\"left\\\"` or `\\\"right\\\"`. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).\\n\\n__Default value:__ `\\\"bottom\\\"` for x-axes and `\\\"left\\\"` for y-axes.\"\n        },\n        \"position\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The anchor position of the axis in pixels. For x-axes with top or bottom orientation, this sets the axis group x coordinate. For y-axes with left or right orientation, this sets the axis group y coordinate.\\n\\n__Default value__: `0`\"\n        },\n        \"style\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"items\": {\n                \"type\": \"string\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property 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.\\n\\n__Default value:__ (none) __Note:__ Any specified style will augment the default style. For example, an x-axis mark with `\\\"style\\\": \\\"foo\\\"` will use `config.axisX` and `config.style.foo` (the specified style `\\\"foo\\\"` has higher precedence).\"\n        },\n        \"tickBand\": {\n          \"anyOf\": [\n            {\n              \"description\": \"For band scales, indicates if ticks and grid lines should be placed at the `\\\"center\\\"` of a band (default) or at the band `\\\"extent\\\"`s to indicate intervals\",\n              \"enum\": [\n                \"center\",\n                \"extent\"\n              ],\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"tickCap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeCap\",\n              \"description\": \"The stroke cap for the tick lines' ending style. One of `\\\"butt\\\"`, `\\\"round\\\"` or `\\\"square\\\"`.\\n\\n__Default value:__ `\\\"butt\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"tickColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"The color of the axis's tick.\\n\\n__Default value:__ `\\\"gray\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisColor\"\n            }\n          ]\n        },\n        \"tickCount\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeInterval\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeIntervalStep\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are \\\"nice\\\" (multiples of 2, 5, 10) and lie within the underlying scale's range.\\n\\nFor scales of type `\\\"time\\\"` or `\\\"utc\\\"`, the tick count can instead be a time interval specifier. Legal string values are `\\\"millisecond\\\"`, `\\\"second\\\"`, `\\\"minute\\\"`, `\\\"hour\\\"`, `\\\"day\\\"`, `\\\"week\\\"`, `\\\"month\\\"`, and `\\\"year\\\"`. Alternatively, an object-valued interval specifier of the form `{\\\"interval\\\": \\\"month\\\", \\\"step\\\": 3}` includes a desired number of interval steps. Here, ticks are generated for each quarter (Jan, Apr, Jul, Oct) boundary.\\n\\n__Default value__: Determine using a formula `ceil(width/40)` for x and `ceil(height/40)` for y.\",\n          \"minimum\": 0\n        },\n        \"tickDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating [stroke, space] lengths for dashed tick mark lines.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumberArray\"\n            }\n          ]\n        },\n        \"tickDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The pixel offset at which to start drawing with the tick mark dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"tickExtra\": {\n          \"description\": \"Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `\\\"bandPosition\\\": 1` and an axis `\\\"padding\\\"` value of `0`.\",\n          \"type\": \"boolean\"\n        },\n        \"tickMinStep\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The minimum desired step between axis ticks, in terms of scale domain values. For example, a value of `1` indicates that ticks should not be less than 1 unit apart. If `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to enforce the minimum step value.\"\n        },\n        \"tickOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Position offset in pixels to apply to ticks, labels, and gridlines.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"tickOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Opacity of the ticks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"tickRound\": {\n          \"description\": \"Boolean flag indicating if pixel position values should be rounded to the nearest integer.\\n\\n__Default value:__ `true`\",\n          \"type\": \"boolean\"\n        },\n        \"tickSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The size in pixels of axis ticks.\\n\\n__Default value:__ `5`\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"tickWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The width, in pixels, of ticks.\\n\\n__Default value:__ `1`\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"ticks\": {\n          \"description\": \"Boolean value that determines whether the axis should include ticks.\\n\\n__Default value:__ `true`\",\n          \"type\": \"boolean\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"titleAlign\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\",\n              \"description\": \"Horizontal text alignment of axis titles.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleAnchor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TitleAnchor\",\n              \"description\": \"Text anchor position for placing axis titles.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Angle in degrees of axis titles.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleBaseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\",\n              \"description\": \"Vertical text baseline for axis titles. One of `\\\"alphabetic\\\"` (default), `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`, `\\\"line-top\\\"`, or `\\\"line-bottom\\\"`. The `\\\"line-top\\\"` and `\\\"line-bottom\\\"` values operate similarly to `\\\"top\\\"` and `\\\"bottom\\\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Color of the title, can be in hex color code or regular color name.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleFont\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Font of the title. (e.g., `\\\"Helvetica Neue\\\"`).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleFontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Font size of the title.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleFontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"Font style of the title.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleFontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"Font weight of the title. This can be either a string (e.g `\\\"bold\\\"`, `\\\"normal\\\"`) or a number (`100`, `200`, `300`, ..., `900` where `\\\"normal\\\"` = `400` and `\\\"bold\\\"` = `700`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Maximum allowed pixel width of axis titles.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleLineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Line height in pixels for multi-line title text or title text with `\\\"line-top\\\"` or `\\\"line-bottom\\\"` baseline.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Opacity of the axis title.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titlePadding\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The padding, in pixels, between title and axis.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleX\": {\n          \"anyOf\": [\n            {\n              \"description\": \"X-coordinate of the axis title relative to the axis group.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleY\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Y-coordinate of the axis title relative to the axis group.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"translate\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Coordinate space translation offset for axis layout. By default, axes are translated by a 0.5 pixel offset for both the x and y coordinates in order to align stroked lines with the pixel grid. However, for vector graphics output these pixel-specific adjustments may be undesirable, in which case translate can be changed (for example, to zero).\\n\\n__Default value:__ `0.5`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"values\": {\n          \"anyOf\": [\n            {\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"items\": {\n                \"type\": \"string\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"items\": {\n                \"type\": \"boolean\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/DateTime\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Explicitly set the visible axis tick values.\"\n        },\n        \"zindex\": {\n          \"description\": \"A non-negative integer indicating the z-index of the axis. If zindex is 0, axes should be drawn behind all chart elements. To put them in front, set `zindex` to `1` or more.\\n\\n__Default value:__ `0` (behind the marks).\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"AxisConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"aria\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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 group, removing the axis from the ARIA accessibility tree.\\n\\n__Default value:__ `true`\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"bandPosition\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An interpolation fraction indicating where, for `band` scales, axis ticks should be positioned. A value of `0` places ticks at the left edge of their bands. A value of `0.5` places ticks in the middle of their bands.\\n\\n __Default value:__ `0.5`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"description\": {\n          \"anyOf\": [\n            {\n              \"description\": \"A text description of this axis for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If the `aria` property is true, for SVG output the [\\\"aria-label\\\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute) will be set to this description. If the description is unspecified it will be automatically generated.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"disable\": {\n          \"description\": \"Disable axis by default.\",\n          \"type\": \"boolean\"\n        },\n        \"domain\": {\n          \"description\": \"A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.\\n\\n__Default value:__ `true`\",\n          \"type\": \"boolean\"\n        },\n        \"domainCap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeCap\",\n              \"description\": \"The stroke cap for the domain line's ending style. One of `\\\"butt\\\"`, `\\\"round\\\"` or `\\\"square\\\"`.\\n\\n__Default value:__ `\\\"butt\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"domainColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Color of axis domain line.\\n\\n__Default value:__ `\\\"gray\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"domainDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating [stroke, space] lengths for dashed domain lines.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"domainDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The pixel offset at which to start drawing with the domain dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"domainOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Opacity of the axis domain line.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"domainWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Stroke width of axis domain line\\n\\n__Default value:__ `1`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"format\": {\n          \"$ref\": \"#/definitions/Format\",\n          \"description\": \"The text format specifier for formatting number and date/time in labels of guides (axes, legends, headers) and text marks.\\n\\nIf the format type is `\\\"number\\\"` (e.g., for quantitative fields), this is a D3's [number format pattern string](https://github.com/d3/d3-format#locale_format).\\n\\nIf the format type is `\\\"time\\\"` (e.g., for temporal fields), this is either:   a) D3's [time format pattern](https://d3js.org/d3-time-format#locale_format) if you desire to set a static time format.\\n\\n  b) [dynamic time format specifier object](https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format) if you desire to set a dynamic time format that uses different formats depending on the granularity of the input date (e.g., if the date lies on a year, month, date, hour, etc. boundary).\\n\\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\\n\\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.\"\n        },\n        \"formatType\": {\n          \"description\": \"The format type for labels. One of `\\\"number\\\"`, `\\\"time\\\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\\n\\n__Default value:__\\n- `\\\"time\\\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\\n- `\\\"number\\\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.\",\n          \"type\": \"string\"\n        },\n        \"grid\": {\n          \"description\": \"A boolean flag indicating if grid lines should be included as part of the axis\\n\\n__Default value:__ `true` for [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous) that are not binned; otherwise, `false`.\",\n          \"type\": \"boolean\"\n        },\n        \"gridCap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeCap\",\n              \"description\": \"The stroke cap for grid lines' ending style. One of `\\\"butt\\\"`, `\\\"round\\\"` or `\\\"square\\\"`.\\n\\n__Default value:__ `\\\"butt\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"gridColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Color of gridlines.\\n\\n__Default value:__ `\\\"lightGray\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisColor\"\n            }\n          ]\n        },\n        \"gridDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating [stroke, space] lengths for dashed grid lines.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumberArray\"\n            }\n          ]\n        },\n        \"gridDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The pixel offset at which to start drawing with the grid dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"gridOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke opacity of grid (value between [0,1])\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"gridWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The grid width, in pixels.\\n\\n__Default value:__ `1`\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"labelAlign\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\",\n              \"description\": \"Horizontal text alignment of axis tick labels, overriding the default setting for the current axis orientation.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisLabelAlign\"\n            }\n          ]\n        },\n        \"labelAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The rotation angle of the axis labels.\\n\\n__Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.\",\n              \"maximum\": 360,\n              \"minimum\": -360,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelBaseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\",\n              \"description\": \"Vertical text baseline of axis tick labels, overriding the default setting for the current axis orientation. One of `\\\"alphabetic\\\"` (default), `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`, `\\\"line-top\\\"`, or `\\\"line-bottom\\\"`. The `\\\"line-top\\\"` and `\\\"line-bottom\\\"` values operate similarly to `\\\"top\\\"` and `\\\"bottom\\\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisLabelBaseline\"\n            }\n          ]\n        },\n        \"labelBound\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Indicates if labels should be hidden if they exceed the axis range. If `false` (the default) no bounds overlap analysis is performed. If `true`, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.\\n\\n__Default value:__ `false`.\",\n              \"type\": [\n                \"number\",\n                \"boolean\"\n              ]\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"The color of the tick label, can be in hex color code or regular color name.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisColor\"\n            }\n          ]\n        },\n        \"labelExpr\": {\n          \"description\": \"[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\\n\\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.\",\n          \"type\": \"string\"\n        },\n        \"labelFlush\": {\n          \"description\": \"Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.\\n\\n__Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.\",\n          \"type\": [\n            \"boolean\",\n            \"number\"\n          ]\n        },\n        \"labelFlushOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of `2` will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.\\n\\n__Default value:__ `0`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelFont\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font of the tick label.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisString\"\n            }\n          ]\n        },\n        \"labelFontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font size of the label, in pixels.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"labelFontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"Font style of the title.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisLabelFontStyle\"\n            }\n          ]\n        },\n        \"labelFontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"Font weight of axis tick labels.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisLabelFontWeight\"\n            }\n          ]\n        },\n        \"labelLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Maximum allowed pixel width of axis tick labels.\\n\\n__Default value:__ `180`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelLineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Line height in pixels for multi-line label text or label text with `\\\"line-top\\\"` or `\\\"line-bottom\\\"` baseline.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Position offset in pixels to apply to labels, in addition to tickOffset.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"labelOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The opacity of the labels.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"labelOverlap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LabelOverlap\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The strategy to use for resolving overlap of axis labels. If `false` (the default), no overlap reduction is attempted. If set to `true` or `\\\"parity\\\"`, a strategy of removing every other label is used (this works well for standard linear axes). If set to `\\\"greedy\\\"`, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).\\n\\n__Default value:__ `true` for non-nominal fields with non-log scales; `\\\"greedy\\\"` for log scales; otherwise `false`.\"\n        },\n        \"labelPadding\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The padding in pixels between labels and ticks.\\n\\n__Default value:__ `2`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"labelSeparation\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labels\": {\n          \"description\": \"A boolean flag indicating if labels should be included as part of the axis.\\n\\n__Default value:__ `true`.\",\n          \"type\": \"boolean\"\n        },\n        \"maxExtent\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.\\n\\n__Default value:__ `undefined`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"minExtent\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.\\n\\n__Default value:__ `30` for y-axis; `undefined` for x-axis.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"offset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.\\n\\n__Default value:__ derived from the [axis config](https://vega.github.io/vega-lite/docs/config.html#facet-scale-config)'s `offset` (`0` by default)\"\n        },\n        \"orient\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/AxisOrient\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The orientation of the axis. One of `\\\"top\\\"`, `\\\"bottom\\\"`, `\\\"left\\\"` or `\\\"right\\\"`. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).\\n\\n__Default value:__ `\\\"bottom\\\"` for x-axes and `\\\"left\\\"` for y-axes.\"\n        },\n        \"position\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The anchor position of the axis in pixels. For x-axes with top or bottom orientation, this sets the axis group x coordinate. For y-axes with left or right orientation, this sets the axis group y coordinate.\\n\\n__Default value__: `0`\"\n        },\n        \"style\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"items\": {\n                \"type\": \"string\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property 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.\\n\\n__Default value:__ (none) __Note:__ Any specified style will augment the default style. For example, an x-axis mark with `\\\"style\\\": \\\"foo\\\"` will use `config.axisX` and `config.style.foo` (the specified style `\\\"foo\\\"` has higher precedence).\"\n        },\n        \"tickBand\": {\n          \"anyOf\": [\n            {\n              \"description\": \"For band scales, indicates if ticks and grid lines should be placed at the `\\\"center\\\"` of a band (default) or at the band `\\\"extent\\\"`s to indicate intervals\",\n              \"enum\": [\n                \"center\",\n                \"extent\"\n              ],\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"tickCap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeCap\",\n              \"description\": \"The stroke cap for the tick lines' ending style. One of `\\\"butt\\\"`, `\\\"round\\\"` or `\\\"square\\\"`.\\n\\n__Default value:__ `\\\"butt\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"tickColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"The color of the axis's tick.\\n\\n__Default value:__ `\\\"gray\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisColor\"\n            }\n          ]\n        },\n        \"tickCount\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeInterval\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeIntervalStep\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are \\\"nice\\\" (multiples of 2, 5, 10) and lie within the underlying scale's range.\\n\\nFor scales of type `\\\"time\\\"` or `\\\"utc\\\"`, the tick count can instead be a time interval specifier. Legal string values are `\\\"millisecond\\\"`, `\\\"second\\\"`, `\\\"minute\\\"`, `\\\"hour\\\"`, `\\\"day\\\"`, `\\\"week\\\"`, `\\\"month\\\"`, and `\\\"year\\\"`. Alternatively, an object-valued interval specifier of the form `{\\\"interval\\\": \\\"month\\\", \\\"step\\\": 3}` includes a desired number of interval steps. Here, ticks are generated for each quarter (Jan, Apr, Jul, Oct) boundary.\\n\\n__Default value__: Determine using a formula `ceil(width/40)` for x and `ceil(height/40)` for y.\",\n          \"minimum\": 0\n        },\n        \"tickDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating [stroke, space] lengths for dashed tick mark lines.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumberArray\"\n            }\n          ]\n        },\n        \"tickDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The pixel offset at which to start drawing with the tick mark dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"tickExtra\": {\n          \"description\": \"Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `\\\"bandPosition\\\": 1` and an axis `\\\"padding\\\"` value of `0`.\",\n          \"type\": \"boolean\"\n        },\n        \"tickMinStep\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The minimum desired step between axis ticks, in terms of scale domain values. For example, a value of `1` indicates that ticks should not be less than 1 unit apart. If `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to enforce the minimum step value.\"\n        },\n        \"tickOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Position offset in pixels to apply to ticks, labels, and gridlines.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"tickOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Opacity of the ticks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"tickRound\": {\n          \"description\": \"Boolean flag indicating if pixel position values should be rounded to the nearest integer.\\n\\n__Default value:__ `true`\",\n          \"type\": \"boolean\"\n        },\n        \"tickSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The size in pixels of axis ticks.\\n\\n__Default value:__ `5`\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"tickWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The width, in pixels, of ticks.\\n\\n__Default value:__ `1`\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalAxisNumber\"\n            }\n          ]\n        },\n        \"ticks\": {\n          \"description\": \"Boolean value that determines whether the axis should include ticks.\\n\\n__Default value:__ `true`\",\n          \"type\": \"boolean\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"titleAlign\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\",\n              \"description\": \"Horizontal text alignment of axis titles.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleAnchor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TitleAnchor\",\n              \"description\": \"Text anchor position for placing axis titles.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Angle in degrees of axis titles.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleBaseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\",\n              \"description\": \"Vertical text baseline for axis titles. One of `\\\"alphabetic\\\"` (default), `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`, `\\\"line-top\\\"`, or `\\\"line-bottom\\\"`. The `\\\"line-top\\\"` and `\\\"line-bottom\\\"` values operate similarly to `\\\"top\\\"` and `\\\"bottom\\\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Color of the title, can be in hex color code or regular color name.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleFont\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Font of the title. (e.g., `\\\"Helvetica Neue\\\"`).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleFontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Font size of the title.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleFontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"Font style of the title.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleFontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"Font weight of the title. This can be either a string (e.g `\\\"bold\\\"`, `\\\"normal\\\"`) or a number (`100`, `200`, `300`, ..., `900` where `\\\"normal\\\"` = `400` and `\\\"bold\\\"` = `700`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Maximum allowed pixel width of axis titles.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleLineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Line height in pixels for multi-line title text or title text with `\\\"line-top\\\"` or `\\\"line-bottom\\\"` baseline.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Opacity of the axis title.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titlePadding\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The padding, in pixels, between title and axis.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleX\": {\n          \"anyOf\": [\n            {\n              \"description\": \"X-coordinate of the axis title relative to the axis group.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleY\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Y-coordinate of the axis title relative to the axis group.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"translate\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Coordinate space translation offset for axis layout. By default, axes are translated by a 0.5 pixel offset for both the x and y coordinates in order to align stroked lines with the pixel grid. However, for vector graphics output these pixel-specific adjustments may be undesirable, in which case translate can be changed (for example, to zero).\\n\\n__Default value:__ `0.5`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"values\": {\n          \"anyOf\": [\n            {\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"items\": {\n                \"type\": \"string\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"items\": {\n                \"type\": \"boolean\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/DateTime\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Explicitly set the visible axis tick values.\"\n        },\n        \"zindex\": {\n          \"description\": \"A non-negative integer indicating the z-index of the axis. If zindex is 0, axes should be drawn behind all chart elements. To put them in front, set `zindex` to `1` or more.\\n\\n__Default value:__ `0` (behind the marks).\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"AxisOrient\": {\n      \"enum\": [\n        \"top\",\n        \"bottom\",\n        \"left\",\n        \"right\"\n      ],\n      \"type\": \"string\"\n    },\n    \"AxisResolveMap\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"x\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"y\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"BBox\": {\n      \"anyOf\": [\n        {\n          \"items\": {\n            \"type\": \"number\"\n          },\n          \"maxItems\": 4,\n          \"minItems\": 4,\n          \"type\": \"array\"\n        },\n        {\n          \"items\": {\n            \"type\": \"number\"\n          },\n          \"maxItems\": 6,\n          \"minItems\": 6,\n          \"type\": \"array\"\n        }\n      ],\n      \"description\": \"Bounding box https://tools.ietf.org/html/rfc7946#section-5\"\n    },\n    \"BarConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\\\"left\\\"`, `\\\"right\\\"`, `\\\"center\\\"`.\\n\\n__Note:__ Expression reference is *not* supported for range marks.\"\n        },\n        \"angle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The rotation angle of the text, in degrees.\",\n              \"maximum\": 360,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aria\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ariaRole\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ariaRoleDescription\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aspect\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Whether to keep aspect ratio of image marks.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"baseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"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.\\n\\nFor range marks, the vertical alignment of the marks. One of `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`.\\n\\n__Note:__ Expression reference is *not* supported for range marks.\"\n        },\n        \"binSpacing\": {\n          \"description\": \"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).\\n\\n__Default value:__ `1`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"blend\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Blend\",\n              \"description\": \"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.\\n\\n__Default value: `\\\"source-over\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"color\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default color.\\n\\n__Default value:__ <span style=\\\"color: #4682b4;\\\">&#9632;</span> `\\\"#4682b4\\\"`\\n\\n__Note:__\\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.\"\n        },\n        \"continuousBandSize\": {\n          \"description\": \"The default size of the bars on continuous scales.\\n\\n__Default value:__ `5`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"cornerRadius\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles or arcs' corners.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusBottomLeft\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' bottom left corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusBottomRight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' bottom right corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusEnd\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"- For vertical bars, top-left and top-right corner radius.\\n\\n- For horizontal bars, top-right and bottom-right corner radius.\"\n        },\n        \"cornerRadiusTopLeft\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' top right corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusTopRight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' top left corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cursor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Cursor\",\n              \"description\": \"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.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"description\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dir\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextDirection\",\n              \"description\": \"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.\\n\\n__Default value:__ `\\\"ltr\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"discreteBandSize\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/RelativeBandSize\"\n            }\n          ],\n          \"description\": \"The default size of the bars with discrete dimensions. If unspecified, the default size is  `step-2`, which provides 2 pixel offset between bars.\",\n          \"minimum\": 0\n        },\n        \"dx\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dy\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ellipsis\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The ellipsis string for text truncated in response to the limit parameter.\\n\\n__Default value:__ `\\\"…\\\"`\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"endAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fill\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\\n\\n__Default value:__ (None)\"\n        },\n        \"fillOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The fill opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"filled\": {\n          \"description\": \"Whether the mark's color should be used as fill color instead of stroke color.\\n\\n__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`.\\n\\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\",\n          \"type\": \"boolean\"\n        },\n        \"font\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The typeface to set the text in (e.g., `\\\"Helvetica Neue\\\"`).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font size, in pixels.\\n\\n__Default value:__ `11`\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"The font style (e.g., `\\\"italic\\\"`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"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`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"height\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Height of the marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"href\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/URI\",\n              \"description\": \"A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"innerRadius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"interpolate\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Interpolate\",\n              \"description\": \"The line interpolation method to use for line and area marks. One of the following:\\n- `\\\"linear\\\"`: piecewise linear segments, as in a polyline.\\n- `\\\"linear-closed\\\"`: close the linear segments to form a polygon.\\n- `\\\"step\\\"`: alternate between horizontal and vertical segments, as in a step function.\\n- `\\\"step-before\\\"`: alternate between vertical and horizontal segments, as in a step function.\\n- `\\\"step-after\\\"`: alternate between horizontal and vertical segments, as in a step function.\\n- `\\\"basis\\\"`: a B-spline, with control point duplication on the ends.\\n- `\\\"basis-open\\\"`: an open B-spline; may not intersect the start or end.\\n- `\\\"basis-closed\\\"`: a closed B-spline, as in a loop.\\n- `\\\"cardinal\\\"`: a Cardinal spline, with control point duplication on the ends.\\n- `\\\"cardinal-open\\\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\\n- `\\\"cardinal-closed\\\"`: a closed Cardinal spline, as in a loop.\\n- `\\\"bundle\\\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\\n- `\\\"monotone\\\"`: cubic interpolation that preserves monotonicity in y.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"invalid\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/MarkInvalidDataMode\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"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).\\n\\n- `\\\"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.\\n\\n- `\\\"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.\\n\\n- `\\\"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).\\n\\n- `\\\"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).\\n\\n- `\\\"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.\\n\\n__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.\"\n        },\n        \"limit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\\n\\n__Default value:__ `0` -- indicating no limit\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lineBreak\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"minBandSize\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The minimum band size for bar and rectangle marks. __Default value:__ `0.25`\"\n        },\n        \"opacity\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The overall opacity (value between [0,1]).\\n\\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"order\": {\n          \"description\": \"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.\",\n          \"type\": [\n            \"null\",\n            \"boolean\"\n          ]\n        },\n        \"orient\": {\n          \"$ref\": \"#/definitions/Orientation\",\n          \"description\": \"The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.\\n- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.\\n- For area, this property determines the orient property of the Vega output.\\n- 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.\"\n        },\n        \"outerRadius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"padAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The angular padding applied to sides of the arc, in radians.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"radius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"For arc mark, the primary (outer) radius in pixels.\\n\\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\\n\\n__Default value:__ `min(plot_width, plot_height)/2`\",\n          \"minimum\": 0\n        },\n        \"radius2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The secondary (inner) radius in pixels of arc marks.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"shape\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/SymbolShape\"\n                },\n                {\n                  \"type\": \"string\"\n                }\n              ],\n              \"description\": \"Shape of the point marks. Supported values include:\\n- plotting shapes: `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"cross\\\"`, `\\\"diamond\\\"`, `\\\"triangle-up\\\"`, `\\\"triangle-down\\\"`, `\\\"triangle-right\\\"`, or `\\\"triangle-left\\\"`.\\n- the line symbol `\\\"stroke\\\"`\\n- centered directional shapes `\\\"arrow\\\"`, `\\\"wedge\\\"`, or `\\\"triangle\\\"`\\n- 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.)\\n\\n__Default value:__ `\\\"circle\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"size\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default size for marks.\\n- 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.\\n- For `bar`, this represents the band size of the bar, in pixels.\\n- For `text`, this represents the font size, in pixels.\\n\\n__Default value:__\\n- `30` for point, circle, square marks; width/height's `step`\\n- `2` for bar marks with discrete dimensions;\\n- `5` for bar marks with continuous dimensions;\\n- `11` for text marks.\",\n          \"minimum\": 0\n        },\n        \"smooth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"startAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"stroke\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\\n\\n__Default value:__ (None)\"\n        },\n        \"strokeCap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeCap\",\n              \"description\": \"The stroke cap for line ending style. One of `\\\"butt\\\"`, `\\\"round\\\"`, or `\\\"square\\\"`.\\n\\n__Default value:__ `\\\"butt\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating stroke, space lengths for creating dashed or dotted lines.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The offset (in pixels) into which to begin drawing with the stroke dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeJoin\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeJoin\",\n              \"description\": \"The stroke line join method. One of `\\\"miter\\\"`, `\\\"round\\\"` or `\\\"bevel\\\"`.\\n\\n__Default value:__ `\\\"miter\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeMiterLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The miter limit at which to bevel a line join.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke width, in pixels.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"tension\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Depending on the interpolation type, sets the tension parameter (for line and area marks).\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"text\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\",\n              \"description\": \"Placeholder text if the `text` channel is not specified\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"theta\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"- 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.)\\n\\n- For text marks, polar coordinate angle in radians.\",\n          \"maximum\": 360,\n          \"minimum\": 0\n        },\n        \"theta2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise.\"\n        },\n        \"time\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"timeUnitBandPosition\": {\n          \"description\": \"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.\",\n          \"type\": \"number\"\n        },\n        \"timeUnitBandSize\": {\n          \"description\": \"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.\",\n          \"type\": \"number\"\n        },\n        \"tooltip\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/TooltipContent\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\\n\\n- If `tooltip` is `true` or `{\\\"content\\\": \\\"encoding\\\"}`, then all fields from `encoding` will be used.\\n- If `tooltip` is `{\\\"content\\\": \\\"data\\\"}`, then all fields that appear in the highlighted data point will be used.\\n- If set to `null` or `false`, then no tooltip will be used.\\n\\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\\n\\n__Default value:__ `null`\"\n        },\n        \"url\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/URI\",\n              \"description\": \"The URL of the image file for image marks.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"width\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Width of the marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"x\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"X coordinates of the marks, or width of horizontal `\\\"bar\\\"` and `\\\"area\\\"` without specified `x2` or `width`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"x2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"X2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"y\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Y coordinates of the marks, or height of vertical `\\\"bar\\\"` and `\\\"area\\\"` without specified `y2` or `height`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        },\n        \"y2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Y2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"BaseTitleNoValueRefs\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"align\": {\n          \"$ref\": \"#/definitions/Align\",\n          \"description\": \"Horizontal text alignment for title text. One of `\\\"left\\\"`, `\\\"center\\\"`, or `\\\"right\\\"`.\"\n        },\n        \"anchor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TitleAnchor\",\n              \"description\": \"The anchor position for placing the title and subtitle text. One of `\\\"start\\\"`, `\\\"middle\\\"`, or `\\\"end\\\"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"angle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Angle in degrees of title and subtitle text.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aria\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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 group, removing the title from the ARIA accessibility tree.\\n\\n__Default value:__ `true`\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"baseline\": {\n          \"$ref\": \"#/definitions/TextBaseline\",\n          \"description\": \"Vertical text baseline for title and subtitle text. One of `\\\"alphabetic\\\"` (default), `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`, `\\\"line-top\\\"`, or `\\\"line-bottom\\\"`. The `\\\"line-top\\\"` and `\\\"line-bottom\\\"` values operate similarly to `\\\"top\\\"` and `\\\"bottom\\\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.\"\n        },\n        \"color\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Text color for title text.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dx\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Delta offset for title and subtitle text x-coordinate.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dy\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Delta offset for title and subtitle text y-coordinate.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"font\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Font name for title text.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Font size in pixels for title text.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"Font style for title text.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"Font weight for title text. This can be either a string (e.g `\\\"bold\\\"`, `\\\"normal\\\"`) or a number (`100`, `200`, `300`, ..., `900` where `\\\"normal\\\"` = `400` and `\\\"bold\\\"` = `700`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"frame\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TitleFrame\"\n                },\n                {\n                  \"type\": \"string\"\n                }\n              ],\n              \"description\": \"The reference frame for the anchor position, one of `\\\"bounds\\\"` (to anchor relative to the full bounding box) or `\\\"group\\\"` (to anchor relative to the group width or height).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"limit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The maximum allowed length in pixels of title and subtitle text.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Line height in pixels for multi-line title text or title text with `\\\"line-top\\\"` or `\\\"line-bottom\\\"` baseline.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"offset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The orthogonal offset in pixels by which to displace the title group from its position along the edge of the chart.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"orient\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TitleOrient\",\n              \"description\": \"Default title orientation (`\\\"top\\\"`, `\\\"bottom\\\"`, `\\\"left\\\"`, or `\\\"right\\\"`)\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"subtitleColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Text color for subtitle text.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"subtitleFont\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Font name for subtitle text.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"subtitleFontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Font size in pixels for subtitle text.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"subtitleFontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"Font style for subtitle text.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"subtitleFontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"Font weight for subtitle text. This can be either a string (e.g `\\\"bold\\\"`, `\\\"normal\\\"`) or a number (`100`, `200`, `300`, ..., `900` where `\\\"normal\\\"` = `400` and `\\\"bold\\\"` = `700`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"subtitleLineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Line height in pixels for multi-line subtitle text.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"subtitlePadding\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The padding in pixels between title and subtitle text.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"zindex\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The integer z-index indicating the layering of the title group relative to other axis, mark, and legend groups.\\n\\n__Default value:__ `0`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"Baseline\": {\n      \"enum\": [\n        \"top\",\n        \"middle\",\n        \"bottom\"\n      ],\n      \"type\": \"string\"\n    },\n    \"BinExtent\": {\n      \"anyOf\": [\n        {\n          \"items\": {\n            \"type\": \"number\"\n          },\n          \"maxItems\": 2,\n          \"minItems\": 2,\n          \"type\": \"array\"\n        },\n        {\n          \"$ref\": \"#/definitions/ParameterExtent\"\n        }\n      ]\n    },\n    \"BinParams\": {\n      \"additionalProperties\": false,\n      \"description\": \"Binning properties or boolean flag for determining whether to bin data or not.\",\n      \"properties\": {\n        \"anchor\": {\n          \"description\": \"A value in the binned domain at which to anchor the bins, shifting the bin boundaries if necessary to ensure that a boundary aligns with the anchor value.\\n\\n__Default value:__ the minimum bin extent value\",\n          \"type\": \"number\"\n        },\n        \"base\": {\n          \"description\": \"The number base to use for automatic bin determination (default is base 10).\\n\\n__Default value:__ `10`\",\n          \"type\": \"number\"\n        },\n        \"binned\": {\n          \"description\": \"When set to `true`, Vega-Lite treats the input data as already binned.\",\n          \"type\": \"boolean\"\n        },\n        \"divide\": {\n          \"description\": \"Scale factors indicating allowable subdivisions. The default value is [5, 2], which indicates that for base 10 numbers (the default base), the method may consider dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the given constraints.\\n\\n__Default value:__ `[5, 2]`\",\n          \"items\": {\n            \"type\": \"number\"\n          },\n          \"maxItems\": 2,\n          \"minItems\": 1,\n          \"type\": \"array\"\n        },\n        \"extent\": {\n          \"$ref\": \"#/definitions/BinExtent\",\n          \"description\": \"A two-element (`[min, max]`) array indicating the range of desired bin values.\"\n        },\n        \"maxbins\": {\n          \"description\": \"Maximum number of bins.\\n\\n__Default value:__ `6` for `row`, `column` and `shape` channels; `10` for other channels\",\n          \"minimum\": 2,\n          \"type\": \"number\"\n        },\n        \"minstep\": {\n          \"description\": \"A minimum allowable step size (particularly useful for integer values).\",\n          \"type\": \"number\"\n        },\n        \"nice\": {\n          \"description\": \"If true, attempts to make the bin boundaries use human-friendly boundaries, such as multiples of ten.\\n\\n__Default value:__ `true`\",\n          \"type\": \"boolean\"\n        },\n        \"step\": {\n          \"description\": \"An exact step size to use between bins.\\n\\n__Note:__ If provided, options such as maxbins will be ignored.\",\n          \"type\": \"number\"\n        },\n        \"steps\": {\n          \"description\": \"An array of allowable step sizes to choose from.\",\n          \"items\": {\n            \"type\": \"number\"\n          },\n          \"minItems\": 1,\n          \"type\": \"array\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"BinTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"as\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FieldName\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/FieldName\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"The output fields at which to write the start and end bin values. This can be either a string or an array of strings with two elements denoting the name for the fields for bin start and bin end respectively. If a single string (e.g., `\\\"val\\\"`) is provided, the end field will be `\\\"val_end\\\"`.\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"const\": true,\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            }\n          ],\n          \"description\": \"An object indicating bin properties, or simply `true` for using default bin parameters.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The data field to bin.\"\n        }\n      },\n      \"required\": [\n        \"bin\",\n        \"field\",\n        \"as\"\n      ],\n      \"type\": \"object\"\n    },\n    \"BindCheckbox\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"debounce\": {\n          \"description\": \"If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.\",\n          \"type\": \"number\"\n        },\n        \"element\": {\n          \"$ref\": \"#/definitions/Element\",\n          \"description\": \"An optional CSS selector string indicating the parent element to which the input element should be added. By default, all input elements are added within the parent container of the Vega view.\"\n        },\n        \"input\": {\n          \"const\": \"checkbox\",\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"description\": \"By default, the signal name is used to label input elements. This `name` property can be used instead to specify a custom label for the bound signal.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"input\"\n      ],\n      \"type\": \"object\"\n    },\n    \"BindDirect\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"debounce\": {\n          \"description\": \"If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.\",\n          \"type\": \"number\"\n        },\n        \"element\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Element\"\n            },\n            {\n              \"additionalProperties\": false,\n              \"type\": \"object\"\n            }\n          ],\n          \"description\": \"An input element that exposes a _value_ property and supports the [EventTarget](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) interface, or a CSS selector string to such an element. When the element updates and dispatches an event, the _value_ property will be used as the new, bound signal value. When the signal updates independent of the element, the _value_ property will be set to the signal value and a new event will be dispatched on the element.\"\n        },\n        \"event\": {\n          \"description\": \"The event (default `\\\"input\\\"`) to listen for to track changes on the external element.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"element\"\n      ],\n      \"type\": \"object\"\n    },\n    \"BindInput\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"autocomplete\": {\n          \"description\": \"A hint for form autofill. See the [HTML autocomplete attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for additional information.\",\n          \"type\": \"string\"\n        },\n        \"debounce\": {\n          \"description\": \"If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.\",\n          \"type\": \"number\"\n        },\n        \"element\": {\n          \"$ref\": \"#/definitions/Element\",\n          \"description\": \"An optional CSS selector string indicating the parent element to which the input element should be added. By default, all input elements are added within the parent container of the Vega view.\"\n        },\n        \"input\": {\n          \"description\": \"The type of input element to use. The valid values are `\\\"checkbox\\\"`, `\\\"radio\\\"`, `\\\"range\\\"`, `\\\"select\\\"`, and any other legal [HTML form input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input).\",\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"description\": \"By default, the signal name is used to label input elements. This `name` property can be used instead to specify a custom label for the bound signal.\",\n          \"type\": \"string\"\n        },\n        \"placeholder\": {\n          \"description\": \"Text that appears in the form control when it has no value set.\",\n          \"type\": \"string\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"BindRadioSelect\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"debounce\": {\n          \"description\": \"If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.\",\n          \"type\": \"number\"\n        },\n        \"element\": {\n          \"$ref\": \"#/definitions/Element\",\n          \"description\": \"An optional CSS selector string indicating the parent element to which the input element should be added. By default, all input elements are added within the parent container of the Vega view.\"\n        },\n        \"input\": {\n          \"enum\": [\n            \"radio\",\n            \"select\"\n          ],\n          \"type\": \"string\"\n        },\n        \"labels\": {\n          \"description\": \"An array of label strings to represent the `options` values. If unspecified, the `options` value will be coerced to a string and used as the label.\",\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"type\": \"array\"\n        },\n        \"name\": {\n          \"description\": \"By default, the signal name is used to label input elements. This `name` property can be used instead to specify a custom label for the bound signal.\",\n          \"type\": \"string\"\n        },\n        \"options\": {\n          \"description\": \"An array of options to select from.\",\n          \"items\": {},\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"input\",\n        \"options\"\n      ],\n      \"type\": \"object\"\n    },\n    \"BindRange\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"debounce\": {\n          \"description\": \"If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.\",\n          \"type\": \"number\"\n        },\n        \"element\": {\n          \"$ref\": \"#/definitions/Element\",\n          \"description\": \"An optional CSS selector string indicating the parent element to which the input element should be added. By default, all input elements are added within the parent container of the Vega view.\"\n        },\n        \"input\": {\n          \"const\": \"range\",\n          \"type\": \"string\"\n        },\n        \"max\": {\n          \"description\": \"Sets the maximum slider value. Defaults to the larger of the signal value and `100`.\",\n          \"type\": \"number\"\n        },\n        \"min\": {\n          \"description\": \"Sets the minimum slider value. Defaults to the smaller of the signal value and `0`.\",\n          \"type\": \"number\"\n        },\n        \"name\": {\n          \"description\": \"By default, the signal name is used to label input elements. This `name` property can be used instead to specify a custom label for the bound signal.\",\n          \"type\": \"string\"\n        },\n        \"step\": {\n          \"description\": \"Sets the minimum slider increment. If undefined, the step size will be automatically determined based on the `min` and `max` values.\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"input\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Binding\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/BindCheckbox\"\n        },\n        {\n          \"$ref\": \"#/definitions/BindRadioSelect\"\n        },\n        {\n          \"$ref\": \"#/definitions/BindRange\"\n        },\n        {\n          \"$ref\": \"#/definitions/BindInput\"\n        },\n        {\n          \"$ref\": \"#/definitions/BindDirect\"\n        }\n      ]\n    },\n    \"BinnedTimeUnit\": {\n      \"enum\": [\n        \"binnedyear\",\n        \"binnedyearquarter\",\n        \"binnedyearquartermonth\",\n        \"binnedyearmonth\",\n        \"binnedyearmonthdate\",\n        \"binnedyearmonthdatehours\",\n        \"binnedyearmonthdatehoursminutes\",\n        \"binnedyearmonthdatehoursminutesseconds\",\n        \"binnedyearweek\",\n        \"binnedyearweekday\",\n        \"binnedyearweekdayhours\",\n        \"binnedyearweekdayhoursminutes\",\n        \"binnedyearweekdayhoursminutesseconds\",\n        \"binnedyeardayofyear\",\n        \"binnedutcyear\",\n        \"binnedutcyearquarter\",\n        \"binnedutcyearquartermonth\",\n        \"binnedutcyearmonth\",\n        \"binnedutcyearmonthdate\",\n        \"binnedutcyearmonthdatehours\",\n        \"binnedutcyearmonthdatehoursminutes\",\n        \"binnedutcyearmonthdatehoursminutesseconds\",\n        \"binnedutcyearweek\",\n        \"binnedutcyearweekday\",\n        \"binnedutcyearweekdayhours\",\n        \"binnedutcyearweekdayhoursminutes\",\n        \"binnedutcyearweekdayhoursminutesseconds\",\n        \"binnedutcyeardayofyear\"\n      ],\n      \"type\": \"string\"\n    },\n    \"Blend\": {\n      \"enum\": [\n        null,\n        \"multiply\",\n        \"screen\",\n        \"overlay\",\n        \"darken\",\n        \"lighten\",\n        \"color-dodge\",\n        \"color-burn\",\n        \"hard-light\",\n        \"soft-light\",\n        \"difference\",\n        \"exclusion\",\n        \"hue\",\n        \"saturation\",\n        \"color\",\n        \"luminosity\"\n      ],\n      \"type\": [\n        \"null\",\n        \"string\"\n      ]\n    },\n    \"BoxPlot\": {\n      \"const\": \"boxplot\",\n      \"type\": \"string\"\n    },\n    \"BoxPlotConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"box\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        },\n        \"extent\": {\n          \"anyOf\": [\n            {\n              \"const\": \"min-max\",\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"number\"\n            }\n          ],\n          \"description\": \"The extent of the whiskers. Available options include:\\n- `\\\"min-max\\\"`: min and max are the lower and upper whiskers respectively.\\n- 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_).\\n\\n__Default value:__ `1.5`.\"\n        },\n        \"median\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        },\n        \"outliers\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        },\n        \"rule\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        },\n        \"size\": {\n          \"description\": \"Size of the box and median tick of a box plot\",\n          \"type\": \"number\"\n        },\n        \"ticks\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"BoxPlotDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"box\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        },\n        \"clip\": {\n          \"description\": \"Whether a composite mark be clipped to the enclosing group’s width and height.\",\n          \"type\": \"boolean\"\n        },\n        \"color\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default color.\\n\\n__Default value:__ <span style=\\\"color: #4682b4;\\\">&#9632;</span> `\\\"#4682b4\\\"`\\n\\n__Note:__\\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.\"\n        },\n        \"extent\": {\n          \"anyOf\": [\n            {\n              \"const\": \"min-max\",\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"number\"\n            }\n          ],\n          \"description\": \"The extent of the whiskers. Available options include:\\n- `\\\"min-max\\\"`: min and max are the lower and upper whiskers respectively.\\n- 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_).\\n\\n__Default value:__ `1.5`.\"\n        },\n        \"invalid\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/MarkInvalidDataMode\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"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).\\n\\n- `\\\"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.\\n\\n- `\\\"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.\\n\\n- `\\\"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).\\n\\n- `\\\"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).\\n\\n- `\\\"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.\\n\\n__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.\"\n        },\n        \"median\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        },\n        \"opacity\": {\n          \"description\": \"The opacity (value between [0,1]) of the mark.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"orient\": {\n          \"$ref\": \"#/definitions/Orientation\",\n          \"description\": \"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.\\n\\n__Default value:__ `\\\"vertical\\\"`.\"\n        },\n        \"outliers\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        },\n        \"rule\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        },\n        \"size\": {\n          \"description\": \"Size of the box and median tick of a box plot\",\n          \"type\": \"number\"\n        },\n        \"ticks\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/BoxPlot\",\n          \"description\": \"The mark type. This could a primitive mark type (one of `\\\"bar\\\"`, `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"tick\\\"`, `\\\"line\\\"`, `\\\"area\\\"`, `\\\"point\\\"`, `\\\"geoshape\\\"`, `\\\"rule\\\"`, and `\\\"text\\\"`) or a composite mark type (`\\\"boxplot\\\"`, `\\\"errorband\\\"`, `\\\"errorbar\\\"`).\"\n        }\n      },\n      \"required\": [\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"BrushConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"cursor\": {\n          \"$ref\": \"#/definitions/Cursor\",\n          \"description\": \"The mouse cursor used over the interval mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used.\"\n        },\n        \"fill\": {\n          \"$ref\": \"#/definitions/Color\",\n          \"description\": \"The fill color of the interval mark.\\n\\n__Default value:__ `\\\"#333333\\\"`\"\n        },\n        \"fillOpacity\": {\n          \"description\": \"The fill opacity of the interval mark (a value between `0` and `1`).\\n\\n__Default value:__ `0.125`\",\n          \"type\": \"number\"\n        },\n        \"stroke\": {\n          \"$ref\": \"#/definitions/Color\",\n          \"description\": \"The stroke color of the interval mark.\\n\\n__Default value:__ `\\\"#ffffff\\\"`\"\n        },\n        \"strokeDash\": {\n          \"description\": \"An array of alternating stroke and space lengths, for creating dashed or dotted lines.\",\n          \"items\": {\n            \"type\": \"number\"\n          },\n          \"type\": \"array\"\n        },\n        \"strokeDashOffset\": {\n          \"description\": \"The offset (in pixels) with which to begin drawing the stroke dash array.\",\n          \"type\": \"number\"\n        },\n        \"strokeOpacity\": {\n          \"description\": \"The stroke opacity of the interval mark (a value between `0` and `1`).\",\n          \"type\": \"number\"\n        },\n        \"strokeWidth\": {\n          \"description\": \"The stroke width of the interval mark.\",\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"CalculateTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"as\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The field for storing the computed formula value.\"\n        },\n        \"calculate\": {\n          \"description\": \"A [expression](https://vega.github.io/vega-lite/docs/types.html#expression) string. Use the variable `datum` to refer to the current data object.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"calculate\",\n        \"as\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Categorical\": {\n      \"enum\": [\n        \"accent\",\n        \"category10\",\n        \"category20\",\n        \"category20b\",\n        \"category20c\",\n        \"dark2\",\n        \"paired\",\n        \"pastel1\",\n        \"pastel2\",\n        \"set1\",\n        \"set2\",\n        \"set3\",\n        \"tableau10\",\n        \"tableau20\",\n        \"observable10\"\n      ],\n      \"type\": \"string\"\n    },\n    \"Color\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ColorName\"\n        },\n        {\n          \"$ref\": \"#/definitions/HexColor\"\n        },\n        {\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ColorDef\": {\n      \"$ref\": \"#/definitions/MarkPropDef<(Gradient|string|null)>\"\n    },\n    \"ColorName\": {\n      \"enum\": [\n        \"black\",\n        \"silver\",\n        \"gray\",\n        \"white\",\n        \"maroon\",\n        \"red\",\n        \"purple\",\n        \"fuchsia\",\n        \"green\",\n        \"lime\",\n        \"olive\",\n        \"yellow\",\n        \"navy\",\n        \"blue\",\n        \"teal\",\n        \"aqua\",\n        \"orange\",\n        \"aliceblue\",\n        \"antiquewhite\",\n        \"aquamarine\",\n        \"azure\",\n        \"beige\",\n        \"bisque\",\n        \"blanchedalmond\",\n        \"blueviolet\",\n        \"brown\",\n        \"burlywood\",\n        \"cadetblue\",\n        \"chartreuse\",\n        \"chocolate\",\n        \"coral\",\n        \"cornflowerblue\",\n        \"cornsilk\",\n        \"crimson\",\n        \"cyan\",\n        \"darkblue\",\n        \"darkcyan\",\n        \"darkgoldenrod\",\n        \"darkgray\",\n        \"darkgreen\",\n        \"darkgrey\",\n        \"darkkhaki\",\n        \"darkmagenta\",\n        \"darkolivegreen\",\n        \"darkorange\",\n        \"darkorchid\",\n        \"darkred\",\n        \"darksalmon\",\n        \"darkseagreen\",\n        \"darkslateblue\",\n        \"darkslategray\",\n        \"darkslategrey\",\n        \"darkturquoise\",\n        \"darkviolet\",\n        \"deeppink\",\n        \"deepskyblue\",\n        \"dimgray\",\n        \"dimgrey\",\n        \"dodgerblue\",\n        \"firebrick\",\n        \"floralwhite\",\n        \"forestgreen\",\n        \"gainsboro\",\n        \"ghostwhite\",\n        \"gold\",\n        \"goldenrod\",\n        \"greenyellow\",\n        \"grey\",\n        \"honeydew\",\n        \"hotpink\",\n        \"indianred\",\n        \"indigo\",\n        \"ivory\",\n        \"khaki\",\n        \"lavender\",\n        \"lavenderblush\",\n        \"lawngreen\",\n        \"lemonchiffon\",\n        \"lightblue\",\n        \"lightcoral\",\n        \"lightcyan\",\n        \"lightgoldenrodyellow\",\n        \"lightgray\",\n        \"lightgreen\",\n        \"lightgrey\",\n        \"lightpink\",\n        \"lightsalmon\",\n        \"lightseagreen\",\n        \"lightskyblue\",\n        \"lightslategray\",\n        \"lightslategrey\",\n        \"lightsteelblue\",\n        \"lightyellow\",\n        \"limegreen\",\n        \"linen\",\n        \"magenta\",\n        \"mediumaquamarine\",\n        \"mediumblue\",\n        \"mediumorchid\",\n        \"mediumpurple\",\n        \"mediumseagreen\",\n        \"mediumslateblue\",\n        \"mediumspringgreen\",\n        \"mediumturquoise\",\n        \"mediumvioletred\",\n        \"midnightblue\",\n        \"mintcream\",\n        \"mistyrose\",\n        \"moccasin\",\n        \"navajowhite\",\n        \"oldlace\",\n        \"olivedrab\",\n        \"orangered\",\n        \"orchid\",\n        \"palegoldenrod\",\n        \"palegreen\",\n        \"paleturquoise\",\n        \"palevioletred\",\n        \"papayawhip\",\n        \"peachpuff\",\n        \"peru\",\n        \"pink\",\n        \"plum\",\n        \"powderblue\",\n        \"rosybrown\",\n        \"royalblue\",\n        \"saddlebrown\",\n        \"salmon\",\n        \"sandybrown\",\n        \"seagreen\",\n        \"seashell\",\n        \"sienna\",\n        \"skyblue\",\n        \"slateblue\",\n        \"slategray\",\n        \"slategrey\",\n        \"snow\",\n        \"springgreen\",\n        \"steelblue\",\n        \"tan\",\n        \"thistle\",\n        \"tomato\",\n        \"turquoise\",\n        \"violet\",\n        \"wheat\",\n        \"whitesmoke\",\n        \"yellowgreen\",\n        \"rebeccapurple\"\n      ],\n      \"type\": \"string\"\n    },\n    \"ColorScheme\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/Categorical\"\n        },\n        {\n          \"$ref\": \"#/definitions/SequentialSingleHue\"\n        },\n        {\n          \"$ref\": \"#/definitions/SequentialMultiHue\"\n        },\n        {\n          \"$ref\": \"#/definitions/Diverging\"\n        },\n        {\n          \"$ref\": \"#/definitions/Cyclical\"\n        }\n      ]\n    },\n    \"Encoding\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"angle\": {\n          \"$ref\": \"#/definitions/NumericMarkPropDef\",\n          \"description\": \"Rotation angle of point and text marks.\"\n        },\n        \"color\": {\n          \"$ref\": \"#/definitions/ColorDef\",\n          \"description\": \"Color of the marks – either fill or stroke color based on  the `filled` property of mark definition. By default, `color` represents fill color for `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"tick\\\"`, `\\\"text\\\"`, `\\\"trail\\\"`, `\\\"circle\\\"`, and `\\\"square\\\"` / stroke color for `\\\"line\\\"` and `\\\"point\\\"`.\\n\\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\\n\\n_Note:_ 1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. The `fill` or `stroke` encodings have higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified. 2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme).\"\n        },\n        \"description\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StringFieldDefWithCondition\"\n            },\n            {\n              \"$ref\": \"#/definitions/StringValueDefWithCondition\"\n            }\n          ],\n          \"description\": \"A text description of this mark for ARIA accessibility (SVG output only). For SVG output the `\\\"aria-label\\\"` attribute will be set to this description.\"\n        },\n        \"detail\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FieldDefWithoutScale\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/FieldDefWithoutScale\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"Additional levels of detail for grouping data in aggregate views and in line, trail, and area marks without mapping data to a specific visual channel.\"\n        },\n        \"fill\": {\n          \"$ref\": \"#/definitions/ColorDef\",\n          \"description\": \"Fill color of the marks. __Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\\n\\n_Note:_ The `fill` encoding has higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified.\"\n        },\n        \"fillOpacity\": {\n          \"$ref\": \"#/definitions/NumericMarkPropDef\",\n          \"description\": \"Fill opacity of the marks.\\n\\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity` property.\"\n        },\n        \"href\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StringFieldDefWithCondition\"\n            },\n            {\n              \"$ref\": \"#/definitions/StringValueDefWithCondition\"\n            }\n          ],\n          \"description\": \"A URL to load upon mouse click.\"\n        },\n        \"key\": {\n          \"$ref\": \"#/definitions/FieldDefWithoutScale\",\n          \"description\": \"A data field to use as a unique key for data binding. When a visualization’s data is updated, the key value will be used to match data elements to existing mark instances. Use a key channel to enable object constancy for transitions over dynamic data.\"\n        },\n        \"latitude\": {\n          \"$ref\": \"#/definitions/LatLongDef\",\n          \"description\": \"Latitude position of geographically projected marks.\"\n        },\n        \"latitude2\": {\n          \"$ref\": \"#/definitions/Position2Def\",\n          \"description\": \"Latitude-2 position for geographically projected ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\"\n        },\n        \"longitude\": {\n          \"$ref\": \"#/definitions/LatLongDef\",\n          \"description\": \"Longitude position of geographically projected marks.\"\n        },\n        \"longitude2\": {\n          \"$ref\": \"#/definitions/Position2Def\",\n          \"description\": \"Longitude-2 position for geographically projected ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\"\n        },\n        \"opacity\": {\n          \"$ref\": \"#/definitions/NumericMarkPropDef\",\n          \"description\": \"Opacity of the marks.\\n\\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity` property.\"\n        },\n        \"order\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/OrderFieldDef\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/OrderFieldDef\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/OrderValueDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/OrderOnlyDef\"\n            }\n          ],\n          \"description\": \"Order of the marks.\\n- For stacked marks, this `order` channel encodes [stack order](https://vega.github.io/vega-lite/docs/stack.html#order).\\n- For line and trail marks, this `order` channel encodes order of data points in the lines. This can be useful for creating [a connected scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html). Setting `order` to `{\\\"value\\\": null}` makes the line marks use the original order in the data sources.\\n- Otherwise, this `order` channel encodes layer order of the marks.\\n\\n__Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating additional aggregation grouping.\"\n        },\n        \"radius\": {\n          \"$ref\": \"#/definitions/PolarDef\",\n          \"description\": \"The outer radius in pixels of arc marks.\"\n        },\n        \"radius2\": {\n          \"$ref\": \"#/definitions/Position2Def\",\n          \"description\": \"The inner radius in pixels of arc marks.\"\n        },\n        \"shape\": {\n          \"$ref\": \"#/definitions/ShapeDef\",\n          \"description\": \"Shape of the mark.\\n\\n1. For `point` marks the 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.)\\n\\n2. For `geoshape` marks it should be a field definition of the geojson data\\n\\n__Default value:__ If undefined, the default shape depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#point-config)'s `shape` property. (`\\\"circle\\\"` if unset.)\"\n        },\n        \"size\": {\n          \"$ref\": \"#/definitions/NumericMarkPropDef\",\n          \"description\": \"Size of the mark.\\n- For `\\\"point\\\"`, `\\\"square\\\"` and `\\\"circle\\\"`, – the symbol size, or pixel area of the mark.\\n- For `\\\"bar\\\"` and `\\\"tick\\\"` – the bar and tick's size.\\n- For `\\\"text\\\"` – the text's font size.\\n- Size is unsupported for `\\\"line\\\"`, `\\\"area\\\"`, and `\\\"rect\\\"`. (Use `\\\"trail\\\"` instead of line with varying size)\"\n        },\n        \"stroke\": {\n          \"$ref\": \"#/definitions/ColorDef\",\n          \"description\": \"Stroke color of the marks. __Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\\n\\n_Note:_ The `stroke` encoding has higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified.\"\n        },\n        \"strokeDash\": {\n          \"$ref\": \"#/definitions/NumericArrayMarkPropDef\",\n          \"description\": \"Stroke dash of the marks.\\n\\n__Default value:__ `[1,0]` (No dash).\"\n        },\n        \"strokeOpacity\": {\n          \"$ref\": \"#/definitions/NumericMarkPropDef\",\n          \"description\": \"Stroke opacity of the marks.\\n\\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity` property.\"\n        },\n        \"strokeWidth\": {\n          \"$ref\": \"#/definitions/NumericMarkPropDef\",\n          \"description\": \"Stroke width of the marks.\\n\\n__Default value:__ If undefined, the default stroke width depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth` property.\"\n        },\n        \"text\": {\n          \"$ref\": \"#/definitions/TextDef\",\n          \"description\": \"Text of the `text` mark.\"\n        },\n        \"theta\": {\n          \"$ref\": \"#/definitions/PolarDef\",\n          \"description\": \"- 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.)\\n\\n- For text marks, polar coordinate angle in radians.\"\n        },\n        \"theta2\": {\n          \"$ref\": \"#/definitions/Position2Def\",\n          \"description\": \"The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise.\"\n        },\n        \"time\": {\n          \"$ref\": \"#/definitions/TimeDef\"\n        },\n        \"tooltip\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StringFieldDefWithCondition\"\n            },\n            {\n              \"$ref\": \"#/definitions/StringValueDefWithCondition\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/StringFieldDef\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"The tooltip text to show upon mouse hover. Specifying `tooltip` encoding overrides [the `tooltip` property in the mark definition](https://vega.github.io/vega-lite/docs/mark.html#mark-def).\\n\\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\"\n        },\n        \"url\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StringFieldDefWithCondition\"\n            },\n            {\n              \"$ref\": \"#/definitions/StringValueDefWithCondition\"\n            }\n          ],\n          \"description\": \"The URL of an image mark.\"\n        },\n        \"x\": {\n          \"$ref\": \"#/definitions/PositionDef\",\n          \"description\": \"X coordinates of the marks, or width of horizontal `\\\"bar\\\"` and `\\\"area\\\"` without specified `x2` or `width`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"x2\": {\n          \"$ref\": \"#/definitions/Position2Def\",\n          \"description\": \"X2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"xError\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SecondaryFieldDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ValueDef<number>\"\n            }\n          ],\n          \"description\": \"Error value of x coordinates for error specified `\\\"errorbar\\\"` and `\\\"errorband\\\"`.\"\n        },\n        \"xError2\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SecondaryFieldDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ValueDef<number>\"\n            }\n          ],\n          \"description\": \"Secondary error value of x coordinates for error specified `\\\"errorbar\\\"` and `\\\"errorband\\\"`.\"\n        },\n        \"xOffset\": {\n          \"$ref\": \"#/definitions/OffsetDef\",\n          \"description\": \"Offset of x-position of the marks\"\n        },\n        \"y\": {\n          \"$ref\": \"#/definitions/PositionDef\",\n          \"description\": \"Y coordinates of the marks, or height of vertical `\\\"bar\\\"` and `\\\"area\\\"` without specified `y2` or `height`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        },\n        \"y2\": {\n          \"$ref\": \"#/definitions/Position2Def\",\n          \"description\": \"Y2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        },\n        \"yError\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SecondaryFieldDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ValueDef<number>\"\n            }\n          ],\n          \"description\": \"Error value of y coordinates for error specified `\\\"errorbar\\\"` and `\\\"errorband\\\"`.\"\n        },\n        \"yError2\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SecondaryFieldDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ValueDef<number>\"\n            }\n          ],\n          \"description\": \"Secondary error value of y coordinates for error specified `\\\"errorbar\\\"` and `\\\"errorband\\\"`.\"\n        },\n        \"yOffset\": {\n          \"$ref\": \"#/definitions/OffsetDef\",\n          \"description\": \"Offset of y-position of the marks\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"CompositeMark\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/BoxPlot\"\n        },\n        {\n          \"$ref\": \"#/definitions/ErrorBar\"\n        },\n        {\n          \"$ref\": \"#/definitions/ErrorBand\"\n        }\n      ]\n    },\n    \"CompositeMarkDef\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/BoxPlotDef\"\n        },\n        {\n          \"$ref\": \"#/definitions/ErrorBarDef\"\n        },\n        {\n          \"$ref\": \"#/definitions/ErrorBandDef\"\n        }\n      ]\n    },\n    \"CompositionConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"columns\": {\n          \"description\": \"The number of columns to include in the view composition layout.\\n\\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\\n\\n__Note__:\\n\\n1) This property is only for:\\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\\n\\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).\",\n          \"type\": \"number\"\n        },\n        \"spacing\": {\n          \"description\": \"The default spacing in pixels between composed sub-views.\\n\\n__Default value__: `20`\",\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ConditionalMarkPropFieldOrDatumDef\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ConditionalPredicate<MarkPropFieldOrDatumDef>\"\n        },\n        {\n          \"$ref\": \"#/definitions/ConditionalParameter<MarkPropFieldOrDatumDef>\"\n        }\n      ]\n    },\n    \"ConditionalMarkPropFieldOrDatumDef<TypeForShape>\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ConditionalPredicate<MarkPropFieldOrDatumDef<TypeForShape>>\"\n        },\n        {\n          \"$ref\": \"#/definitions/ConditionalParameter<MarkPropFieldOrDatumDef<TypeForShape>>\"\n        }\n      ]\n    },\n    \"ConditionalStringFieldDef\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ConditionalPredicate<StringFieldDef>\"\n        },\n        {\n          \"$ref\": \"#/definitions/ConditionalParameter<StringFieldDef>\"\n        }\n      ]\n    },\n    \"ConditionalValueDef<(Gradient|string|null|ExprRef)>\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ConditionalPredicate<ValueDef<(Gradient|string|null|ExprRef)>>\"\n        },\n        {\n          \"$ref\": \"#/definitions/ConditionalParameter<ValueDef<(Gradient|string|null|ExprRef)>>\"\n        }\n      ]\n    },\n    \"ConditionalValueDef<(Text|ExprRef)>\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ConditionalPredicate<ValueDef<(Text|ExprRef)>>\"\n        },\n        {\n          \"$ref\": \"#/definitions/ConditionalParameter<ValueDef<(Text|ExprRef)>>\"\n        }\n      ]\n    },\n    \"ConditionalValueDef<(number[]|ExprRef)>\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ConditionalPredicate<ValueDef<(number[]|ExprRef)>>\"\n        },\n        {\n          \"$ref\": \"#/definitions/ConditionalParameter<ValueDef<(number[]|ExprRef)>>\"\n        }\n      ]\n    },\n    \"ConditionalValueDef<(number|ExprRef)>\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ConditionalPredicate<ValueDef<(number|ExprRef)>>\"\n        },\n        {\n          \"$ref\": \"#/definitions/ConditionalParameter<ValueDef<(number|ExprRef)>>\"\n        }\n      ]\n    },\n    \"ConditionalValueDef<(string|ExprRef)>\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ConditionalPredicate<ValueDef<(string|ExprRef)>>\"\n        },\n        {\n          \"$ref\": \"#/definitions/ConditionalParameter<ValueDef<(string|ExprRef)>>\"\n        }\n      ]\n    },\n    \"ConditionalValueDef<(string|null|ExprRef)>\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ConditionalPredicate<ValueDef<(string|null|ExprRef)>>\"\n        },\n        {\n          \"$ref\": \"#/definitions/ConditionalParameter<ValueDef<(string|null|ExprRef)>>\"\n        }\n      ]\n    },\n    \"ConditionalValueDef<number>\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ConditionalPredicate<ValueDef<number>>\"\n        },\n        {\n          \"$ref\": \"#/definitions/ConditionalParameter<ValueDef<number>>\"\n        }\n      ]\n    },\n    \"ConditionalAxisColor\": {\n      \"$ref\": \"#/definitions/ConditionalAxisProperty<(Color|null)>\"\n    },\n    \"ConditionalAxisLabelAlign\": {\n      \"$ref\": \"#/definitions/ConditionalAxisProperty<(Align|null)>\"\n    },\n    \"ConditionalAxisLabelBaseline\": {\n      \"$ref\": \"#/definitions/ConditionalAxisProperty<(TextBaseline|null)>\"\n    },\n    \"ConditionalAxisLabelFontStyle\": {\n      \"$ref\": \"#/definitions/ConditionalAxisProperty<(FontStyle|null)>\"\n    },\n    \"ConditionalAxisLabelFontWeight\": {\n      \"$ref\": \"#/definitions/ConditionalAxisProperty<(FontWeight|null)>\"\n    },\n    \"ConditionalAxisNumber\": {\n      \"$ref\": \"#/definitions/ConditionalAxisProperty<(number|null)>\"\n    },\n    \"ConditionalAxisNumberArray\": {\n      \"$ref\": \"#/definitions/ConditionalAxisProperty<(number[]|null)>\"\n    },\n    \"ConditionalAxisProperty<(Align|null)>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Align\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"required\": [\n            \"condition\",\n            \"value\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"expr\": {\n              \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"condition\",\n            \"expr\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalAxisProperty<(Color|null)>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"required\": [\n            \"condition\",\n            \"value\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"expr\": {\n              \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"condition\",\n            \"expr\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalAxisProperty<(FontStyle|null)>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/FontStyle\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"required\": [\n            \"condition\",\n            \"value\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"expr\": {\n              \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"condition\",\n            \"expr\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalAxisProperty<(FontWeight|null)>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/FontWeight\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"required\": [\n            \"condition\",\n            \"value\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"expr\": {\n              \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"condition\",\n            \"expr\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalAxisProperty<(TextBaseline|null)>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TextBaseline\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"required\": [\n            \"condition\",\n            \"value\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"expr\": {\n              \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"condition\",\n            \"expr\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalAxisProperty<(number[]|null)>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"items\": {\n                    \"type\": \"number\"\n                  },\n                  \"type\": \"array\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"required\": [\n            \"condition\",\n            \"value\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"expr\": {\n              \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"condition\",\n            \"expr\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalAxisProperty<(number|null)>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"value\": {\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\",\n              \"type\": [\n                \"number\",\n                \"null\"\n              ]\n            }\n          },\n          \"required\": [\n            \"condition\",\n            \"value\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"expr\": {\n              \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"condition\",\n            \"expr\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalAxisProperty<(string|null)>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"value\": {\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\",\n              \"type\": [\n                \"string\",\n                \"null\"\n              ]\n            }\n          },\n          \"required\": [\n            \"condition\",\n            \"value\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"expr\": {\n              \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"condition\",\n            \"expr\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalAxisString\": {\n      \"$ref\": \"#/definitions/ConditionalAxisProperty<(string|null)>\"\n    },\n    \"ConditionalParameter<MarkPropFieldOrDatumDef>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"empty\": {\n              \"description\": \"For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.\",\n              \"type\": \"boolean\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"param\": {\n              \"$ref\": \"#/definitions/ParameterName\",\n              \"description\": \"Filter using a parameter name.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/StandardType\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            }\n          },\n          \"required\": [\n            \"param\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"empty\": {\n              \"description\": \"For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.\",\n              \"type\": \"boolean\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"param\": {\n              \"$ref\": \"#/definitions/ParameterName\",\n              \"description\": \"Filter using a parameter name.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/Type\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            }\n          },\n          \"required\": [\n            \"param\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalParameter<MarkPropFieldOrDatumDef<TypeForShape>>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"empty\": {\n              \"description\": \"For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.\",\n              \"type\": \"boolean\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"param\": {\n              \"$ref\": \"#/definitions/ParameterName\",\n              \"description\": \"Filter using a parameter name.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/TypeForShape\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            }\n          },\n          \"required\": [\n            \"param\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"empty\": {\n              \"description\": \"For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.\",\n              \"type\": \"boolean\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"param\": {\n              \"$ref\": \"#/definitions/ParameterName\",\n              \"description\": \"Filter using a parameter name.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/Type\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            }\n          },\n          \"required\": [\n            \"param\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalParameter<StringFieldDef>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"const\": \"binned\",\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"empty\": {\n          \"description\": \"For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.\",\n          \"type\": \"boolean\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"format\": {\n          \"$ref\": \"#/definitions/Format\",\n          \"description\": \"The text format specifier for formatting number and date/time in labels of guides (axes, legends, headers) and text marks.\\n\\nIf the format type is `\\\"number\\\"` (e.g., for quantitative fields), this is a D3's [number format pattern string](https://github.com/d3/d3-format#locale_format).\\n\\nIf the format type is `\\\"time\\\"` (e.g., for temporal fields), this is either:   a) D3's [time format pattern](https://d3js.org/d3-time-format#locale_format) if you desire to set a static time format.\\n\\n  b) [dynamic time format specifier object](https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format) if you desire to set a dynamic time format that uses different formats depending on the granularity of the input date (e.g., if the date lies on a year, month, date, hour, etc. boundary).\\n\\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\\n\\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.\"\n        },\n        \"formatType\": {\n          \"description\": \"The format type for labels. One of `\\\"number\\\"`, `\\\"time\\\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\\n\\n__Default value:__\\n- `\\\"time\\\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\\n- `\\\"number\\\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.\",\n          \"type\": \"string\"\n        },\n        \"param\": {\n          \"$ref\": \"#/definitions/ParameterName\",\n          \"description\": \"Filter using a parameter name.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"required\": [\n        \"param\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ConditionalParameter<ValueDef<(Gradient|string|null|ExprRef)>>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"empty\": {\n          \"description\": \"For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.\",\n          \"type\": \"boolean\"\n        },\n        \"param\": {\n          \"$ref\": \"#/definitions/ParameterName\",\n          \"description\": \"Filter using a parameter name.\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"required\": [\n        \"param\",\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ConditionalParameter<ValueDef<(Text|ExprRef)>>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"empty\": {\n          \"description\": \"For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.\",\n          \"type\": \"boolean\"\n        },\n        \"param\": {\n          \"$ref\": \"#/definitions/ParameterName\",\n          \"description\": \"Filter using a parameter name.\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"required\": [\n        \"param\",\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ConditionalParameter<ValueDef<(number[]|ExprRef)>>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"empty\": {\n          \"description\": \"For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.\",\n          \"type\": \"boolean\"\n        },\n        \"param\": {\n          \"$ref\": \"#/definitions/ParameterName\",\n          \"description\": \"Filter using a parameter name.\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"required\": [\n        \"param\",\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ConditionalParameter<ValueDef<(number|ExprRef)>>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"empty\": {\n          \"description\": \"For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.\",\n          \"type\": \"boolean\"\n        },\n        \"param\": {\n          \"$ref\": \"#/definitions/ParameterName\",\n          \"description\": \"Filter using a parameter name.\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"required\": [\n        \"param\",\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ConditionalParameter<ValueDef<(string|ExprRef)>>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"empty\": {\n          \"description\": \"For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.\",\n          \"type\": \"boolean\"\n        },\n        \"param\": {\n          \"$ref\": \"#/definitions/ParameterName\",\n          \"description\": \"Filter using a parameter name.\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"required\": [\n        \"param\",\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ConditionalParameter<ValueDef<(string|null|ExprRef)>>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"empty\": {\n          \"description\": \"For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.\",\n          \"type\": \"boolean\"\n        },\n        \"param\": {\n          \"$ref\": \"#/definitions/ParameterName\",\n          \"description\": \"Filter using a parameter name.\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"required\": [\n        \"param\",\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ConditionalParameter<ValueDef<number>>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"empty\": {\n          \"description\": \"For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.\",\n          \"type\": \"boolean\"\n        },\n        \"param\": {\n          \"$ref\": \"#/definitions/ParameterName\",\n          \"description\": \"Filter using a parameter name.\"\n        },\n        \"value\": {\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"param\",\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Align\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"required\": [\n            \"test\",\n            \"value\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"expr\": {\n              \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n              \"type\": \"string\"\n            },\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            }\n          },\n          \"required\": [\n            \"expr\",\n            \"test\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"required\": [\n            \"test\",\n            \"value\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"expr\": {\n              \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n              \"type\": \"string\"\n            },\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            }\n          },\n          \"required\": [\n            \"expr\",\n            \"test\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/FontStyle\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"required\": [\n            \"test\",\n            \"value\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"expr\": {\n              \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n              \"type\": \"string\"\n            },\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            }\n          },\n          \"required\": [\n            \"expr\",\n            \"test\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/FontWeight\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"required\": [\n            \"test\",\n            \"value\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"expr\": {\n              \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n              \"type\": \"string\"\n            },\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            }\n          },\n          \"required\": [\n            \"expr\",\n            \"test\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TextBaseline\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"required\": [\n            \"test\",\n            \"value\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"expr\": {\n              \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n              \"type\": \"string\"\n            },\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            }\n          },\n          \"required\": [\n            \"expr\",\n            \"test\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"items\": {\n                    \"type\": \"number\"\n                  },\n                  \"type\": \"array\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"required\": [\n            \"test\",\n            \"value\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"expr\": {\n              \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n              \"type\": \"string\"\n            },\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            }\n          },\n          \"required\": [\n            \"expr\",\n            \"test\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            },\n            \"value\": {\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\",\n              \"type\": [\n                \"number\",\n                \"null\"\n              ]\n            }\n          },\n          \"required\": [\n            \"test\",\n            \"value\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"expr\": {\n              \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n              \"type\": \"string\"\n            },\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            }\n          },\n          \"required\": [\n            \"expr\",\n            \"test\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            },\n            \"value\": {\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\",\n              \"type\": [\n                \"string\",\n                \"null\"\n              ]\n            }\n          },\n          \"required\": [\n            \"test\",\n            \"value\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"expr\": {\n              \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n              \"type\": \"string\"\n            },\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            }\n          },\n          \"required\": [\n            \"expr\",\n            \"test\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalPredicate<MarkPropFieldOrDatumDef>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/StandardType\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            }\n          },\n          \"required\": [\n            \"test\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/Type\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            }\n          },\n          \"required\": [\n            \"test\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalPredicate<MarkPropFieldOrDatumDef<TypeForShape>>\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/TypeForShape\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            }\n          },\n          \"required\": [\n            \"test\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"test\": {\n              \"$ref\": \"#/definitions/PredicateComposition\",\n              \"description\": \"Predicate for triggering the condition\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/Type\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            }\n          },\n          \"required\": [\n            \"test\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ConditionalPredicate<StringFieldDef>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"const\": \"binned\",\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"format\": {\n          \"$ref\": \"#/definitions/Format\",\n          \"description\": \"The text format specifier for formatting number and date/time in labels of guides (axes, legends, headers) and text marks.\\n\\nIf the format type is `\\\"number\\\"` (e.g., for quantitative fields), this is a D3's [number format pattern string](https://github.com/d3/d3-format#locale_format).\\n\\nIf the format type is `\\\"time\\\"` (e.g., for temporal fields), this is either:   a) D3's [time format pattern](https://d3js.org/d3-time-format#locale_format) if you desire to set a static time format.\\n\\n  b) [dynamic time format specifier object](https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format) if you desire to set a dynamic time format that uses different formats depending on the granularity of the input date (e.g., if the date lies on a year, month, date, hour, etc. boundary).\\n\\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\\n\\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.\"\n        },\n        \"formatType\": {\n          \"description\": \"The format type for labels. One of `\\\"number\\\"`, `\\\"time\\\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\\n\\n__Default value:__\\n- `\\\"time\\\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\\n- `\\\"number\\\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.\",\n          \"type\": \"string\"\n        },\n        \"test\": {\n          \"$ref\": \"#/definitions/PredicateComposition\",\n          \"description\": \"Predicate for triggering the condition\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"required\": [\n        \"test\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ConditionalPredicate<ValueDef<(Gradient|string|null|ExprRef)>>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"test\": {\n          \"$ref\": \"#/definitions/PredicateComposition\",\n          \"description\": \"Predicate for triggering the condition\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"required\": [\n        \"test\",\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ConditionalPredicate<ValueDef<(Text|ExprRef)>>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"test\": {\n          \"$ref\": \"#/definitions/PredicateComposition\",\n          \"description\": \"Predicate for triggering the condition\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"required\": [\n        \"test\",\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ConditionalPredicate<ValueDef<(number[]|ExprRef)>>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"test\": {\n          \"$ref\": \"#/definitions/PredicateComposition\",\n          \"description\": \"Predicate for triggering the condition\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"required\": [\n        \"test\",\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ConditionalPredicate<ValueDef<(number|ExprRef)>>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"test\": {\n          \"$ref\": \"#/definitions/PredicateComposition\",\n          \"description\": \"Predicate for triggering the condition\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"required\": [\n        \"test\",\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ConditionalPredicate<ValueDef<(string|ExprRef)>>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"test\": {\n          \"$ref\": \"#/definitions/PredicateComposition\",\n          \"description\": \"Predicate for triggering the condition\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"required\": [\n        \"test\",\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ConditionalPredicate<ValueDef<(string|null|ExprRef)>>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"test\": {\n          \"$ref\": \"#/definitions/PredicateComposition\",\n          \"description\": \"Predicate for triggering the condition\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"required\": [\n        \"test\",\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ConditionalPredicate<ValueDef<number>>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"test\": {\n          \"$ref\": \"#/definitions/PredicateComposition\",\n          \"description\": \"Predicate for triggering the condition\"\n        },\n        \"value\": {\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"test\",\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Config\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"arc\": {\n          \"$ref\": \"#/definitions/RectConfig\",\n          \"description\": \"Arc-specific Config\"\n        },\n        \"area\": {\n          \"$ref\": \"#/definitions/AreaConfig\",\n          \"description\": \"Area-Specific Config\"\n        },\n        \"aria\": {\n          \"description\": \"A boolean flag indicating if ARIA default attributes should be included for marks and guides (SVG output only). If false, the `\\\"aria-hidden\\\"` attribute will be set for all guides, removing them from the ARIA accessibility tree and Vega-Lite will not generate default descriptions for marks.\\n\\n__Default value:__ `true`.\",\n          \"type\": \"boolean\"\n        },\n        \"autosize\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/AutosizeType\"\n            },\n            {\n              \"$ref\": \"#/definitions/AutoSizeParams\"\n            }\n          ],\n          \"description\": \"How the visualization size should be determined. If a string, should be one of `\\\"pad\\\"`, `\\\"fit\\\"` or `\\\"none\\\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\\n\\n__Default value__: `pad`\"\n        },\n        \"axis\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Axis configuration, which determines default properties for all `x` and `y` [axes](https://vega.github.io/vega-lite/docs/axis.html). For a full list of axis configuration options, please see the [corresponding section of the axis documentation](https://vega.github.io/vega-lite/docs/axis.html#config).\"\n        },\n        \"axisBand\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for axes with \\\"band\\\" scales.\"\n        },\n        \"axisBottom\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for x-axis along the bottom edge of the chart.\"\n        },\n        \"axisDiscrete\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for axes with \\\"point\\\" or \\\"band\\\" scales.\"\n        },\n        \"axisLeft\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for y-axis along the left edge of the chart.\"\n        },\n        \"axisPoint\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for axes with \\\"point\\\" scales.\"\n        },\n        \"axisQuantitative\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for quantitative axes.\"\n        },\n        \"axisRight\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for y-axis along the right edge of the chart.\"\n        },\n        \"axisTemporal\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for temporal axes.\"\n        },\n        \"axisTop\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for x-axis along the top edge of the chart.\"\n        },\n        \"axisX\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"X-axis specific config.\"\n        },\n        \"axisXBand\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for x-axes with \\\"band\\\" scales.\"\n        },\n        \"axisXDiscrete\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for x-axes with \\\"point\\\" or \\\"band\\\" scales.\"\n        },\n        \"axisXPoint\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for x-axes with \\\"point\\\" scales.\"\n        },\n        \"axisXQuantitative\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for x-quantitative axes.\"\n        },\n        \"axisXTemporal\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for x-temporal axes.\"\n        },\n        \"axisY\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Y-axis specific config.\"\n        },\n        \"axisYBand\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for y-axes with \\\"band\\\" scales.\"\n        },\n        \"axisYDiscrete\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for y-axes with \\\"point\\\" or \\\"band\\\" scales.\"\n        },\n        \"axisYPoint\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for y-axes with \\\"point\\\" scales.\"\n        },\n        \"axisYQuantitative\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for y-quantitative axes.\"\n        },\n        \"axisYTemporal\": {\n          \"$ref\": \"#/definitions/AxisConfig\",\n          \"description\": \"Config for y-temporal axes.\"\n        },\n        \"background\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"CSS color property to use as the background of the entire view.\\n\\n__Default value:__ `\\\"white\\\"`\"\n        },\n        \"bar\": {\n          \"$ref\": \"#/definitions/BarConfig\",\n          \"description\": \"Bar-Specific Config\"\n        },\n        \"boxplot\": {\n          \"$ref\": \"#/definitions/BoxPlotConfig\",\n          \"description\": \"Box Config\"\n        },\n        \"circle\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Circle-Specific Config\"\n        },\n        \"concat\": {\n          \"$ref\": \"#/definitions/CompositionConfig\",\n          \"description\": \"Default configuration for all concatenation and repeat view composition operators (`concat`, `hconcat`, `vconcat`, and `repeat`)\"\n        },\n        \"countTitle\": {\n          \"description\": \"Default axis and legend title for count fields.\\n\\n__Default value:__ `'Count of Records`.\",\n          \"type\": \"string\"\n        },\n        \"customFormatTypes\": {\n          \"description\": \"Allow the `formatType` property for text marks and guides to accept a custom formatter function [registered as a Vega expression](https://vega.github.io/vega-lite/usage/compile.html#format-type).\",\n          \"type\": \"boolean\"\n        },\n        \"errorband\": {\n          \"$ref\": \"#/definitions/ErrorBandConfig\",\n          \"description\": \"ErrorBand Config\"\n        },\n        \"errorbar\": {\n          \"$ref\": \"#/definitions/ErrorBarConfig\",\n          \"description\": \"ErrorBar Config\"\n        },\n        \"facet\": {\n          \"$ref\": \"#/definitions/CompositionConfig\",\n          \"description\": \"Default configuration for the `facet` view composition operator\"\n        },\n        \"fieldTitle\": {\n          \"description\": \"Defines how Vega-Lite generates title for fields. There are three possible styles:\\n- `\\\"verbal\\\"` (Default) - displays function in a verbal style (e.g., \\\"Sum of field\\\", \\\"Year-month of date\\\", \\\"field (binned)\\\").\\n- `\\\"function\\\"` - displays function using parentheses and capitalized texts (e.g., \\\"SUM(field)\\\", \\\"YEARMONTH(date)\\\", \\\"BIN(field)\\\").\\n- `\\\"plain\\\"` - displays only the field name without functions (e.g., \\\"field\\\", \\\"date\\\", \\\"field\\\").\",\n          \"enum\": [\n            \"verbal\",\n            \"functional\",\n            \"plain\"\n          ],\n          \"type\": \"string\"\n        },\n        \"font\": {\n          \"description\": \"Default font for all text marks, titles, and labels.\",\n          \"type\": \"string\"\n        },\n        \"geoshape\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Geoshape-Specific Config\"\n        },\n        \"header\": {\n          \"$ref\": \"#/definitions/HeaderConfig\",\n          \"description\": \"Header configuration, which determines default properties for all [headers](https://vega.github.io/vega-lite/docs/header.html).\\n\\nFor a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config).\"\n        },\n        \"headerColumn\": {\n          \"$ref\": \"#/definitions/HeaderConfig\",\n          \"description\": \"Header configuration, which determines default properties for column [headers](https://vega.github.io/vega-lite/docs/header.html).\\n\\nFor a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config).\"\n        },\n        \"headerFacet\": {\n          \"$ref\": \"#/definitions/HeaderConfig\",\n          \"description\": \"Header configuration, which determines default properties for non-row/column facet [headers](https://vega.github.io/vega-lite/docs/header.html).\\n\\nFor a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config).\"\n        },\n        \"headerRow\": {\n          \"$ref\": \"#/definitions/HeaderConfig\",\n          \"description\": \"Header configuration, which determines default properties for row [headers](https://vega.github.io/vega-lite/docs/header.html).\\n\\nFor a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config).\"\n        },\n        \"image\": {\n          \"$ref\": \"#/definitions/RectConfig\",\n          \"description\": \"Image-specific Config\"\n        },\n        \"legend\": {\n          \"$ref\": \"#/definitions/LegendConfig\",\n          \"description\": \"Legend configuration, which determines default properties for all [legends](https://vega.github.io/vega-lite/docs/legend.html). For a full list of legend configuration options, please see the [corresponding section of in the legend documentation](https://vega.github.io/vega-lite/docs/legend.html#config).\"\n        },\n        \"line\": {\n          \"$ref\": \"#/definitions/LineConfig\",\n          \"description\": \"Line-Specific Config\"\n        },\n        \"lineBreak\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property provides a global default for text marks, which is overridden by mark or style config settings, and by the lineBreak mark encoding channel. If signal-valued, either string or regular expression (regexp) values are valid.\"\n        },\n        \"locale\": {\n          \"$ref\": \"#/definitions/Locale\",\n          \"description\": \"Locale definitions for string parsing and formatting of number and date values. The locale object should contain `number` and/or `time` properties with [locale definitions](https://vega.github.io/vega/docs/api/locale/). Locale definitions provided in the config block may be overridden by the View constructor locale option.\"\n        },\n        \"mark\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Mark Config\"\n        },\n        \"normalizedNumberFormat\": {\n          \"description\": \"If normalizedNumberFormatType is not specified, D3 number format for axis labels, text marks, and tooltips of normalized stacked fields (fields with `stack: \\\"normalize\\\"`). For example `\\\"s\\\"` for SI units. Use [D3's number format pattern](https://github.com/d3/d3-format#locale_format).\\n\\nIf `config.normalizedNumberFormatType` is specified and `config.customFormatTypes` is `true`, this value will be passed as `format` alongside `datum.value` to the `config.numberFormatType` function. __Default value:__ `%`\",\n          \"type\": \"string\"\n        },\n        \"normalizedNumberFormatType\": {\n          \"description\": \"[Custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for `config.normalizedNumberFormat`.\\n\\n__Default value:__ `undefined` -- This is equilvalent to call D3-format, which is exposed as [`format` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#format). __Note:__ You must also set `customFormatTypes` to `true` to use this feature.\",\n          \"type\": \"string\"\n        },\n        \"numberFormat\": {\n          \"description\": \"If numberFormatType is not specified, D3 number format for guide labels, text marks, and tooltips of non-normalized fields (fields *without* `stack: \\\"normalize\\\"`). For example `\\\"s\\\"` for SI units. Use [D3's number format pattern](https://github.com/d3/d3-format#locale_format).\\n\\nIf `config.numberFormatType` is specified and `config.customFormatTypes` is `true`, this value will be passed as `format` alongside `datum.value` to the `config.numberFormatType` function.\",\n          \"type\": \"string\"\n        },\n        \"numberFormatType\": {\n          \"description\": \"[Custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for `config.numberFormat`.\\n\\n__Default value:__ `undefined` -- This is equilvalent to call D3-format, which is exposed as [`format` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#format). __Note:__ You must also set `customFormatTypes` to `true` to use this feature.\",\n          \"type\": \"string\"\n        },\n        \"padding\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Padding\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\\\"left\\\": 5, \\\"top\\\": 5, \\\"right\\\": 5, \\\"bottom\\\": 5}` to specify padding for each side of the visualization.\\n\\n__Default value__: `5`\"\n        },\n        \"params\": {\n          \"description\": \"Dynamic variables or selections that parameterize a visualization.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/TopLevelParameter\"\n          },\n          \"type\": \"array\"\n        },\n        \"point\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Point-Specific Config\"\n        },\n        \"projection\": {\n          \"$ref\": \"#/definitions/ProjectionConfig\",\n          \"description\": \"Projection configuration, which determines default properties for all [projections](https://vega.github.io/vega-lite/docs/projection.html). For a full list of projection configuration options, please see the [corresponding section of the projection documentation](https://vega.github.io/vega-lite/docs/projection.html#config).\"\n        },\n        \"range\": {\n          \"$ref\": \"#/definitions/RangeConfig\",\n          \"description\": \"An object hash that defines default range arrays or schemes for using with scales. For a full list of scale range configuration options, please see the [corresponding section of the scale documentation](https://vega.github.io/vega-lite/docs/scale.html#config).\"\n        },\n        \"rect\": {\n          \"$ref\": \"#/definitions/RectConfig\",\n          \"description\": \"Rect-Specific Config\"\n        },\n        \"rule\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Rule-Specific Config\"\n        },\n        \"scale\": {\n          \"$ref\": \"#/definitions/ScaleConfig\",\n          \"description\": \"Scale configuration determines default properties for all [scales](https://vega.github.io/vega-lite/docs/scale.html). For a full list of scale configuration options, please see the [corresponding section of the scale documentation](https://vega.github.io/vega-lite/docs/scale.html#config).\"\n        },\n        \"selection\": {\n          \"$ref\": \"#/definitions/SelectionConfig\",\n          \"description\": \"An object hash for defining default properties for each type of selections.\"\n        },\n        \"square\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Square-Specific Config\"\n        },\n        \"style\": {\n          \"$ref\": \"#/definitions/StyleConfigIndex\",\n          \"description\": \"An object hash that defines key-value mappings to determine default properties for marks with a given [style](https://vega.github.io/vega-lite/docs/mark.html#mark-def). The keys represent styles names; the values have to be valid [mark configuration objects](https://vega.github.io/vega-lite/docs/mark.html#config).\"\n        },\n        \"text\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Text-Specific Config\"\n        },\n        \"tick\": {\n          \"$ref\": \"#/definitions/TickConfig\",\n          \"description\": \"Tick-Specific Config\"\n        },\n        \"timeFormat\": {\n          \"description\": \"Default time format for raw time values (without time units) in text marks, legend labels and header labels.\\n\\n__Default value:__ `\\\"%b %d, %Y\\\"` __Note:__ Axes automatically determine the format for each label automatically so this config does not affect axes.\",\n          \"type\": \"string\"\n        },\n        \"timeFormatType\": {\n          \"description\": \"[Custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for `config.timeFormat`.\\n\\n__Default value:__ `undefined` -- This is equilvalent to call D3-time-format, which is exposed as [`timeFormat` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#timeFormat). __Note:__ You must also set `customFormatTypes` to `true` and there must *not* be a `timeUnit` defined to use this feature.\",\n          \"type\": \"string\"\n        },\n        \"title\": {\n          \"$ref\": \"#/definitions/TitleConfig\",\n          \"description\": \"Title configuration, which determines default properties for all [titles](https://vega.github.io/vega-lite/docs/title.html). For a full list of title configuration options, please see the [corresponding section of the title documentation](https://vega.github.io/vega-lite/docs/title.html#config).\"\n        },\n        \"tooltipFormat\": {\n          \"$ref\": \"#/definitions/FormatConfig\",\n          \"description\": \"Define [custom format configuration](https://vega.github.io/vega-lite/docs/config.html#format) for tooltips. If unspecified, default format config will be applied.\"\n        },\n        \"trail\": {\n          \"$ref\": \"#/definitions/LineConfig\",\n          \"description\": \"Trail-Specific Config\"\n        },\n        \"view\": {\n          \"$ref\": \"#/definitions/ViewConfig\",\n          \"description\": \"Default properties for [single view plots](https://vega.github.io/vega-lite/docs/spec.html#single).\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"CsvDataFormat\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"parse\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Parse\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"If set to `null`, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\\\"number\\\"`, `\\\"boolean\\\"`, `\\\"date\\\"`, or null (do not parse the field)). For example, `\\\"parse\\\": {\\\"modified_on\\\": \\\"date\\\"}` parses the `modified_on` field in each input record a Date value.\\n\\nFor `\\\"date\\\"`, we parse data based using JavaScript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). For Specific date formats can be provided (e.g., `{foo: \\\"date:'%m%d%Y'\\\"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: \\\"utc:'%m%d%Y'\\\"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)\"\n        },\n        \"type\": {\n          \"description\": \"Type of input data: `\\\"json\\\"`, `\\\"csv\\\"`, `\\\"tsv\\\"`, `\\\"dsv\\\"`.\\n\\n__Default value:__  The default format type is determined by the extension of the file URL. If no extension is detected, `\\\"json\\\"` will be used by default.\",\n          \"enum\": [\n            \"csv\",\n            \"tsv\"\n          ],\n          \"type\": \"string\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"Cursor\": {\n      \"enum\": [\n        \"auto\",\n        \"default\",\n        \"none\",\n        \"context-menu\",\n        \"help\",\n        \"pointer\",\n        \"progress\",\n        \"wait\",\n        \"cell\",\n        \"crosshair\",\n        \"text\",\n        \"vertical-text\",\n        \"alias\",\n        \"copy\",\n        \"move\",\n        \"no-drop\",\n        \"not-allowed\",\n        \"e-resize\",\n        \"n-resize\",\n        \"ne-resize\",\n        \"nw-resize\",\n        \"s-resize\",\n        \"se-resize\",\n        \"sw-resize\",\n        \"w-resize\",\n        \"ew-resize\",\n        \"ns-resize\",\n        \"nesw-resize\",\n        \"nwse-resize\",\n        \"col-resize\",\n        \"row-resize\",\n        \"all-scroll\",\n        \"zoom-in\",\n        \"zoom-out\",\n        \"grab\",\n        \"grabbing\"\n      ],\n      \"type\": \"string\"\n    },\n    \"Cyclical\": {\n      \"enum\": [\n        \"rainbow\",\n        \"sinebow\"\n      ],\n      \"type\": \"string\"\n    },\n    \"Data\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/DataSource\"\n        },\n        {\n          \"$ref\": \"#/definitions/Generator\"\n        }\n      ]\n    },\n    \"DataFormat\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/CsvDataFormat\"\n        },\n        {\n          \"$ref\": \"#/definitions/DsvDataFormat\"\n        },\n        {\n          \"$ref\": \"#/definitions/JsonDataFormat\"\n        },\n        {\n          \"$ref\": \"#/definitions/TopoDataFormat\"\n        }\n      ]\n    },\n    \"DataSource\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/UrlData\"\n        },\n        {\n          \"$ref\": \"#/definitions/InlineData\"\n        },\n        {\n          \"$ref\": \"#/definitions/NamedData\"\n        }\n      ]\n    },\n    \"Datasets\": {\n      \"$ref\": \"#/definitions/Dict<InlineDataset>\"\n    },\n    \"DateTime\": {\n      \"additionalProperties\": false,\n      \"description\": \"Object for defining datetime in Vega-Lite Filter. If both month and quarter are provided, month has higher precedence. `day` cannot be combined with other date. We accept string for month and day names.\",\n      \"properties\": {\n        \"date\": {\n          \"description\": \"Integer value representing the date (day of the month) from 1-31.\",\n          \"maximum\": 31,\n          \"minimum\": 1,\n          \"type\": \"number\"\n        },\n        \"day\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Day\"\n            },\n            {\n              \"type\": \"string\"\n            }\n          ],\n          \"description\": \"Value representing the day of a week. This can be one of: (1) integer value -- `1` represents Monday; (2) case-insensitive day name (e.g., `\\\"Monday\\\"`); (3) case-insensitive, 3-character short day name (e.g., `\\\"Mon\\\"`).\\n\\n**Warning:** A DateTime definition object with `day`** should not be combined with `year`, `quarter`, `month`, or `date`.\"\n        },\n        \"hours\": {\n          \"description\": \"Integer value representing the hour of a day from 0-23.\",\n          \"maximum\": 24,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"milliseconds\": {\n          \"description\": \"Integer value representing the millisecond segment of time.\",\n          \"maximum\": 1000,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"minutes\": {\n          \"description\": \"Integer value representing the minute segment of time from 0-59.\",\n          \"maximum\": 60,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"month\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Month\"\n            },\n            {\n              \"type\": \"string\"\n            }\n          ],\n          \"description\": \"One of: (1) integer value representing the month from `1`-`12`. `1` represents January; (2) case-insensitive month name (e.g., `\\\"January\\\"`); (3) case-insensitive, 3-character short month name (e.g., `\\\"Jan\\\"`).\"\n        },\n        \"quarter\": {\n          \"description\": \"Integer value representing the quarter of the year (from 1-4).\",\n          \"maximum\": 4,\n          \"minimum\": 1,\n          \"type\": \"number\"\n        },\n        \"seconds\": {\n          \"description\": \"Integer value representing the second segment (0-59) of a time value\",\n          \"maximum\": 60,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"utc\": {\n          \"description\": \"A boolean flag indicating if date time is in utc time. If false, the date time is in local time\",\n          \"type\": \"boolean\"\n        },\n        \"year\": {\n          \"description\": \"Integer value representing the year.\",\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"DatumDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"datum\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/PrimitiveValue\"\n            },\n            {\n              \"$ref\": \"#/definitions/DateTime\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/RepeatRef\"\n            }\n          ],\n          \"description\": \"A constant value in data domain.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/Type\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"Day\": {\n      \"maximum\": 7,\n      \"minimum\": 1,\n      \"type\": \"number\"\n    },\n    \"DensityTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"as\": {\n          \"description\": \"The output fields for the sample value and corresponding density estimate.\\n\\n__Default value:__ `[\\\"value\\\", \\\"density\\\"]`\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"maxItems\": 2,\n          \"minItems\": 2,\n          \"type\": \"array\"\n        },\n        \"bandwidth\": {\n          \"description\": \"The bandwidth (standard deviation) of the Gaussian kernel. If unspecified or set to zero, the bandwidth value is automatically estimated from the input data using Scott’s rule.\",\n          \"type\": \"number\"\n        },\n        \"counts\": {\n          \"description\": \"A boolean flag indicating if the output values should be probability estimates (false) or smoothed counts (true).\\n\\n__Default value:__ `false`\",\n          \"type\": \"boolean\"\n        },\n        \"cumulative\": {\n          \"description\": \"A boolean flag indicating whether to produce density estimates (false) or cumulative density estimates (true).\\n\\n__Default value:__ `false`\",\n          \"type\": \"boolean\"\n        },\n        \"density\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The data field for which to perform density estimation.\"\n        },\n        \"extent\": {\n          \"description\": \"A [min, max] domain from which to sample the distribution. If unspecified, the extent will be determined by the observed minimum and maximum values of the density value field.\",\n          \"items\": {\n            \"type\": \"number\"\n          },\n          \"maxItems\": 2,\n          \"minItems\": 2,\n          \"type\": \"array\"\n        },\n        \"groupby\": {\n          \"description\": \"The data fields to group by. If not specified, a single group containing all data objects will be used.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        },\n        \"maxsteps\": {\n          \"description\": \"The maximum number of samples to take along the extent domain for plotting the density.\\n\\n__Default value:__ `200`\",\n          \"type\": \"number\"\n        },\n        \"minsteps\": {\n          \"description\": \"The minimum number of samples to take along the extent domain for plotting the density.\\n\\n__Default value:__ `25`\",\n          \"type\": \"number\"\n        },\n        \"resolve\": {\n          \"description\": \"Indicates how parameters for multiple densities should be resolved. If `\\\"independent\\\"`, each density may have its own domain extent and dynamic number of curve sample steps. If `\\\"shared\\\"`, the KDE transform will ensure that all densities are defined over a shared domain and curve steps, enabling stacking.\\n\\n__Default value:__ `\\\"shared\\\"`\",\n          \"enum\": [\n            \"independent\",\n            \"shared\"\n          ],\n          \"type\": \"string\"\n        },\n        \"steps\": {\n          \"description\": \"The exact number of samples to take along the extent domain for plotting the density. If specified, overrides both minsteps and maxsteps to set an exact number of uniform samples. Potentially useful in conjunction with a fixed extent to ensure consistent sample points for stacked densities.\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"density\"\n      ],\n      \"type\": \"object\"\n    },\n    \"DerivedStream\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"between\": {\n          \"items\": {\n            \"$ref\": \"#/definitions/Stream\"\n          },\n          \"type\": \"array\"\n        },\n        \"consume\": {\n          \"type\": \"boolean\"\n        },\n        \"debounce\": {\n          \"type\": \"number\"\n        },\n        \"filter\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Expr\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/Expr\"\n              },\n              \"type\": \"array\"\n            }\n          ]\n        },\n        \"markname\": {\n          \"type\": \"string\"\n        },\n        \"marktype\": {\n          \"$ref\": \"#/definitions/MarkType\"\n        },\n        \"stream\": {\n          \"$ref\": \"#/definitions/Stream\"\n        },\n        \"throttle\": {\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"stream\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Dict<InlineDataset>\": {\n      \"additionalProperties\": {\n        \"$ref\": \"#/definitions/InlineDataset\"\n      },\n      \"type\": \"object\"\n    },\n    \"Dict<SelectionInit>\": {\n      \"additionalProperties\": {\n        \"$ref\": \"#/definitions/SelectionInit\"\n      },\n      \"type\": \"object\"\n    },\n    \"Dict<SelectionInitInterval>\": {\n      \"additionalProperties\": {\n        \"$ref\": \"#/definitions/SelectionInitInterval\"\n      },\n      \"type\": \"object\"\n    },\n    \"Dict\": {\n      \"additionalProperties\": {},\n      \"type\": \"object\"\n    },\n    \"Diverging\": {\n      \"enum\": [\n        \"blueorange\",\n        \"blueorange-3\",\n        \"blueorange-4\",\n        \"blueorange-5\",\n        \"blueorange-6\",\n        \"blueorange-7\",\n        \"blueorange-8\",\n        \"blueorange-9\",\n        \"blueorange-10\",\n        \"blueorange-11\",\n        \"brownbluegreen\",\n        \"brownbluegreen-3\",\n        \"brownbluegreen-4\",\n        \"brownbluegreen-5\",\n        \"brownbluegreen-6\",\n        \"brownbluegreen-7\",\n        \"brownbluegreen-8\",\n        \"brownbluegreen-9\",\n        \"brownbluegreen-10\",\n        \"brownbluegreen-11\",\n        \"purplegreen\",\n        \"purplegreen-3\",\n        \"purplegreen-4\",\n        \"purplegreen-5\",\n        \"purplegreen-6\",\n        \"purplegreen-7\",\n        \"purplegreen-8\",\n        \"purplegreen-9\",\n        \"purplegreen-10\",\n        \"purplegreen-11\",\n        \"pinkyellowgreen\",\n        \"pinkyellowgreen-3\",\n        \"pinkyellowgreen-4\",\n        \"pinkyellowgreen-5\",\n        \"pinkyellowgreen-6\",\n        \"pinkyellowgreen-7\",\n        \"pinkyellowgreen-8\",\n        \"pinkyellowgreen-9\",\n        \"pinkyellowgreen-10\",\n        \"pinkyellowgreen-11\",\n        \"purpleorange\",\n        \"purpleorange-3\",\n        \"purpleorange-4\",\n        \"purpleorange-5\",\n        \"purpleorange-6\",\n        \"purpleorange-7\",\n        \"purpleorange-8\",\n        \"purpleorange-9\",\n        \"purpleorange-10\",\n        \"purpleorange-11\",\n        \"redblue\",\n        \"redblue-3\",\n        \"redblue-4\",\n        \"redblue-5\",\n        \"redblue-6\",\n        \"redblue-7\",\n        \"redblue-8\",\n        \"redblue-9\",\n        \"redblue-10\",\n        \"redblue-11\",\n        \"redgrey\",\n        \"redgrey-3\",\n        \"redgrey-4\",\n        \"redgrey-5\",\n        \"redgrey-6\",\n        \"redgrey-7\",\n        \"redgrey-8\",\n        \"redgrey-9\",\n        \"redgrey-10\",\n        \"redgrey-11\",\n        \"redyellowblue\",\n        \"redyellowblue-3\",\n        \"redyellowblue-4\",\n        \"redyellowblue-5\",\n        \"redyellowblue-6\",\n        \"redyellowblue-7\",\n        \"redyellowblue-8\",\n        \"redyellowblue-9\",\n        \"redyellowblue-10\",\n        \"redyellowblue-11\",\n        \"redyellowgreen\",\n        \"redyellowgreen-3\",\n        \"redyellowgreen-4\",\n        \"redyellowgreen-5\",\n        \"redyellowgreen-6\",\n        \"redyellowgreen-7\",\n        \"redyellowgreen-8\",\n        \"redyellowgreen-9\",\n        \"redyellowgreen-10\",\n        \"redyellowgreen-11\",\n        \"spectral\",\n        \"spectral-3\",\n        \"spectral-4\",\n        \"spectral-5\",\n        \"spectral-6\",\n        \"spectral-7\",\n        \"spectral-8\",\n        \"spectral-9\",\n        \"spectral-10\",\n        \"spectral-11\"\n      ],\n      \"type\": \"string\"\n    },\n    \"DomainUnionWith\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"unionWith\": {\n          \"description\": \"Customized domain values to be union with the field's values or explicitly defined domain. Should be an array of valid scale domain values.\",\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"type\": \"number\"\n              },\n              {\n                \"type\": \"string\"\n              },\n              {\n                \"type\": \"boolean\"\n              },\n              {\n                \"$ref\": \"#/definitions/DateTime\"\n              }\n            ]\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"unionWith\"\n      ],\n      \"type\": \"object\"\n    },\n    \"DsvDataFormat\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"delimiter\": {\n          \"description\": \"The delimiter between records. The delimiter must be a single character (i.e., a single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are not.\",\n          \"maxLength\": 1,\n          \"minLength\": 1,\n          \"type\": \"string\"\n        },\n        \"parse\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Parse\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"If set to `null`, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\\\"number\\\"`, `\\\"boolean\\\"`, `\\\"date\\\"`, or null (do not parse the field)). For example, `\\\"parse\\\": {\\\"modified_on\\\": \\\"date\\\"}` parses the `modified_on` field in each input record a Date value.\\n\\nFor `\\\"date\\\"`, we parse data based using JavaScript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). For Specific date formats can be provided (e.g., `{foo: \\\"date:'%m%d%Y'\\\"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: \\\"utc:'%m%d%Y'\\\"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)\"\n        },\n        \"type\": {\n          \"const\": \"dsv\",\n          \"description\": \"Type of input data: `\\\"json\\\"`, `\\\"csv\\\"`, `\\\"tsv\\\"`, `\\\"dsv\\\"`.\\n\\n__Default value:__  The default format type is determined by the extension of the file URL. If no extension is detected, `\\\"json\\\"` will be used by default.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"delimiter\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Element\": {\n      \"type\": \"string\"\n    },\n    \"EncodingSortField\": {\n      \"additionalProperties\": false,\n      \"description\": \"A sort definition for sorting a discrete scale in an encoding field definition.\",\n      \"properties\": {\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"The data [field](https://vega.github.io/vega-lite/docs/field.html) to sort by.\\n\\n__Default value:__ If unspecified, defaults to the field specified in the outer data reference.\"\n        },\n        \"op\": {\n          \"$ref\": \"#/definitions/NonArgAggregateOp\",\n          \"description\": \"An [aggregate operation](https://vega.github.io/vega-lite/docs/aggregate.html#ops) to perform on the field prior to sorting (e.g., `\\\"count\\\"`, `\\\"mean\\\"` and `\\\"median\\\"`). An aggregation is required when there are multiple values of the sort field for each encoded data field. The input data objects will be aggregated, grouped by the encoded data field.\\n\\nFor a full list of operations, please see the documentation for [aggregate](https://vega.github.io/vega-lite/docs/aggregate.html#ops).\\n\\n__Default value:__ `\\\"sum\\\"` for stacked plots. Otherwise, `\\\"min\\\"`.\"\n        },\n        \"order\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SortOrder\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"The sort order. One of `\\\"ascending\\\"` (default), `\\\"descending\\\"`, or `null` (do not sort).\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ErrorBand\": {\n      \"const\": \"errorband\",\n      \"type\": \"string\"\n    },\n    \"ErrorBandConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"band\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        },\n        \"borders\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        },\n        \"extent\": {\n          \"$ref\": \"#/definitions/ErrorBarExtent\",\n          \"description\": \"The extent of the band. Available options include:\\n- `\\\"ci\\\"`: Extend the band to the 95% bootstrapped confidence interval of the mean.\\n- `\\\"stderr\\\"`: The size of band are set to the value of standard error, extending from the mean.\\n- `\\\"stdev\\\"`: The size of band are set to the value of standard deviation, extending from the mean.\\n- `\\\"iqr\\\"`: Extend the band to the q1 and q3.\\n\\n__Default value:__ `\\\"stderr\\\"`.\"\n        },\n        \"interpolate\": {\n          \"$ref\": \"#/definitions/Interpolate\",\n          \"description\": \"The line interpolation method for the error band. One of the following:\\n- `\\\"linear\\\"`: piecewise linear segments, as in a polyline.\\n- `\\\"linear-closed\\\"`: close the linear segments to form a polygon.\\n- `\\\"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.\\n- `\\\"step-before\\\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes before the x-value.\\n- `\\\"step-after\\\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes after the x-value.\\n- `\\\"basis\\\"`: a B-spline, with control point duplication on the ends.\\n- `\\\"basis-open\\\"`: an open B-spline; may not intersect the start or end.\\n- `\\\"basis-closed\\\"`: a closed B-spline, as in a loop.\\n- `\\\"cardinal\\\"`: a Cardinal spline, with control point duplication on the ends.\\n- `\\\"cardinal-open\\\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\\n- `\\\"cardinal-closed\\\"`: a closed Cardinal spline, as in a loop.\\n- `\\\"bundle\\\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\\n- `\\\"monotone\\\"`: cubic interpolation that preserves monotonicity in y.\"\n        },\n        \"tension\": {\n          \"description\": \"The tension parameter for the interpolation type of the error band.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ErrorBandDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"band\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        },\n        \"borders\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        },\n        \"clip\": {\n          \"description\": \"Whether a composite mark be clipped to the enclosing group’s width and height.\",\n          \"type\": \"boolean\"\n        },\n        \"color\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default color.\\n\\n__Default value:__ <span style=\\\"color: #4682b4;\\\">&#9632;</span> `\\\"#4682b4\\\"`\\n\\n__Note:__\\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.\"\n        },\n        \"extent\": {\n          \"$ref\": \"#/definitions/ErrorBarExtent\",\n          \"description\": \"The extent of the band. Available options include:\\n- `\\\"ci\\\"`: Extend the band to the 95% bootstrapped confidence interval of the mean.\\n- `\\\"stderr\\\"`: The size of band are set to the value of standard error, extending from the mean.\\n- `\\\"stdev\\\"`: The size of band are set to the value of standard deviation, extending from the mean.\\n- `\\\"iqr\\\"`: Extend the band to the q1 and q3.\\n\\n__Default value:__ `\\\"stderr\\\"`.\"\n        },\n        \"interpolate\": {\n          \"$ref\": \"#/definitions/Interpolate\",\n          \"description\": \"The line interpolation method for the error band. One of the following:\\n- `\\\"linear\\\"`: piecewise linear segments, as in a polyline.\\n- `\\\"linear-closed\\\"`: close the linear segments to form a polygon.\\n- `\\\"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.\\n- `\\\"step-before\\\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes before the x-value.\\n- `\\\"step-after\\\"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes after the x-value.\\n- `\\\"basis\\\"`: a B-spline, with control point duplication on the ends.\\n- `\\\"basis-open\\\"`: an open B-spline; may not intersect the start or end.\\n- `\\\"basis-closed\\\"`: a closed B-spline, as in a loop.\\n- `\\\"cardinal\\\"`: a Cardinal spline, with control point duplication on the ends.\\n- `\\\"cardinal-open\\\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\\n- `\\\"cardinal-closed\\\"`: a closed Cardinal spline, as in a loop.\\n- `\\\"bundle\\\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\\n- `\\\"monotone\\\"`: cubic interpolation that preserves monotonicity in y.\"\n        },\n        \"opacity\": {\n          \"description\": \"The opacity (value between [0,1]) of the mark.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"orient\": {\n          \"$ref\": \"#/definitions/Orientation\",\n          \"description\": \"Orientation of the error band. This is normally automatically determined, but can be specified when the orientation is ambiguous and cannot be automatically determined.\"\n        },\n        \"tension\": {\n          \"description\": \"The tension parameter for the interpolation type of the error band.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/ErrorBand\",\n          \"description\": \"The mark type. This could a primitive mark type (one of `\\\"bar\\\"`, `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"tick\\\"`, `\\\"line\\\"`, `\\\"area\\\"`, `\\\"point\\\"`, `\\\"geoshape\\\"`, `\\\"rule\\\"`, and `\\\"text\\\"`) or a composite mark type (`\\\"boxplot\\\"`, `\\\"errorband\\\"`, `\\\"errorbar\\\"`).\"\n        }\n      },\n      \"required\": [\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ErrorBar\": {\n      \"const\": \"errorbar\",\n      \"type\": \"string\"\n    },\n    \"ErrorBarConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"extent\": {\n          \"$ref\": \"#/definitions/ErrorBarExtent\",\n          \"description\": \"The extent of the rule. Available options include:\\n- `\\\"ci\\\"`: Extend the rule to the 95% bootstrapped confidence interval of the mean.\\n- `\\\"stderr\\\"`: The size of rule are set to the value of standard error, extending from the mean.\\n- `\\\"stdev\\\"`: The size of rule are set to the value of standard deviation, extending from the mean.\\n- `\\\"iqr\\\"`: Extend the rule to the q1 and q3.\\n\\n__Default value:__ `\\\"stderr\\\"`.\"\n        },\n        \"rule\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        },\n        \"size\": {\n          \"description\": \"Size of the ticks of an error bar\",\n          \"type\": \"number\"\n        },\n        \"thickness\": {\n          \"description\": \"Thickness of the ticks and the bar of an error bar\",\n          \"type\": \"number\"\n        },\n        \"ticks\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ErrorBarDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"clip\": {\n          \"description\": \"Whether a composite mark be clipped to the enclosing group’s width and height.\",\n          \"type\": \"boolean\"\n        },\n        \"color\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default color.\\n\\n__Default value:__ <span style=\\\"color: #4682b4;\\\">&#9632;</span> `\\\"#4682b4\\\"`\\n\\n__Note:__\\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.\"\n        },\n        \"extent\": {\n          \"$ref\": \"#/definitions/ErrorBarExtent\",\n          \"description\": \"The extent of the rule. Available options include:\\n- `\\\"ci\\\"`: Extend the rule to the 95% bootstrapped confidence interval of the mean.\\n- `\\\"stderr\\\"`: The size of rule are set to the value of standard error, extending from the mean.\\n- `\\\"stdev\\\"`: The size of rule are set to the value of standard deviation, extending from the mean.\\n- `\\\"iqr\\\"`: Extend the rule to the q1 and q3.\\n\\n__Default value:__ `\\\"stderr\\\"`.\"\n        },\n        \"opacity\": {\n          \"description\": \"The opacity (value between [0,1]) of the mark.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"orient\": {\n          \"$ref\": \"#/definitions/Orientation\",\n          \"description\": \"Orientation of the error bar. This is normally automatically determined, but can be specified when the orientation is ambiguous and cannot be automatically determined.\"\n        },\n        \"rule\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        },\n        \"size\": {\n          \"description\": \"Size of the ticks of an error bar\",\n          \"type\": \"number\"\n        },\n        \"thickness\": {\n          \"description\": \"Thickness of the ticks and the bar of an error bar\",\n          \"type\": \"number\"\n        },\n        \"ticks\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/AnyMarkConfig\"\n            }\n          ]\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/ErrorBar\",\n          \"description\": \"The mark type. This could a primitive mark type (one of `\\\"bar\\\"`, `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"tick\\\"`, `\\\"line\\\"`, `\\\"area\\\"`, `\\\"point\\\"`, `\\\"geoshape\\\"`, `\\\"rule\\\"`, and `\\\"text\\\"`) or a composite mark type (`\\\"boxplot\\\"`, `\\\"errorband\\\"`, `\\\"errorbar\\\"`).\"\n        }\n      },\n      \"required\": [\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ErrorBarExtent\": {\n      \"enum\": [\n        \"ci\",\n        \"iqr\",\n        \"stderr\",\n        \"stdev\"\n      ],\n      \"type\": \"string\"\n    },\n    \"EventStream\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"between\": {\n              \"items\": {\n                \"$ref\": \"#/definitions/Stream\"\n              },\n              \"type\": \"array\"\n            },\n            \"consume\": {\n              \"type\": \"boolean\"\n            },\n            \"debounce\": {\n              \"type\": \"number\"\n            },\n            \"filter\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Expr\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/Expr\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"markname\": {\n              \"type\": \"string\"\n            },\n            \"marktype\": {\n              \"$ref\": \"#/definitions/MarkType\"\n            },\n            \"source\": {\n              \"enum\": [\n                \"view\",\n                \"scope\"\n              ],\n              \"type\": \"string\"\n            },\n            \"throttle\": {\n              \"type\": \"number\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/EventType\"\n            }\n          },\n          \"required\": [\n            \"type\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"between\": {\n              \"items\": {\n                \"$ref\": \"#/definitions/Stream\"\n              },\n              \"type\": \"array\"\n            },\n            \"consume\": {\n              \"type\": \"boolean\"\n            },\n            \"debounce\": {\n              \"type\": \"number\"\n            },\n            \"filter\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Expr\"\n                },\n                {\n                  \"items\": {\n                    \"$ref\": \"#/definitions/Expr\"\n                  },\n                  \"type\": \"array\"\n                }\n              ]\n            },\n            \"markname\": {\n              \"type\": \"string\"\n            },\n            \"marktype\": {\n              \"$ref\": \"#/definitions/MarkType\"\n            },\n            \"source\": {\n              \"const\": \"window\",\n              \"type\": \"string\"\n            },\n            \"throttle\": {\n              \"type\": \"number\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/WindowEventType\"\n            }\n          },\n          \"required\": [\n            \"source\",\n            \"type\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"EventType\": {\n      \"enum\": [\n        \"click\",\n        \"dblclick\",\n        \"dragenter\",\n        \"dragleave\",\n        \"dragover\",\n        \"keydown\",\n        \"keypress\",\n        \"keyup\",\n        \"mousedown\",\n        \"mousemove\",\n        \"mouseout\",\n        \"mouseover\",\n        \"mouseup\",\n        \"mousewheel\",\n        \"pointerdown\",\n        \"pointermove\",\n        \"pointerout\",\n        \"pointerover\",\n        \"pointerup\",\n        \"timer\",\n        \"touchend\",\n        \"touchmove\",\n        \"touchstart\",\n        \"wheel\"\n      ],\n      \"type\": \"string\"\n    },\n    \"Expr\": {\n      \"type\": \"string\"\n    },\n    \"ExprRef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"expr\": {\n          \"description\": \"Vega expression (which can refer to Vega-Lite parameters).\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"expr\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ExtentTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"extent\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The field of which to get the extent.\"\n        },\n        \"param\": {\n          \"$ref\": \"#/definitions/ParameterName\",\n          \"description\": \"The output parameter produced by the extent transform.\"\n        }\n      },\n      \"required\": [\n        \"extent\",\n        \"param\"\n      ],\n      \"type\": \"object\"\n    },\n    \"FacetEncodingFieldDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LayoutAlign\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<LayoutAlign>\"\n            }\n          ],\n          \"description\": \"The alignment to apply to grid rows and columns. The supported string values are `\\\"all\\\"`, `\\\"each\\\"`, and `\\\"none\\\"`.\\n\\n- For `\\\"none\\\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\\n- For `\\\"each\\\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\\n- For `\\\"all\\\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\\n\\nAlternatively, an object value of the form `{\\\"row\\\": string, \\\"column\\\": string}` can be used to supply different alignments for rows and columns.\\n\\n__Default value:__ `\\\"all\\\"`.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"bounds\": {\n          \"description\": \"The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\\n\\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\\n\\n__Default value:__ `\\\"full\\\"`\",\n          \"enum\": [\n            \"full\",\n            \"flush\"\n          ],\n          \"type\": \"string\"\n        },\n        \"center\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<boolean>\"\n            }\n          ],\n          \"description\": \"Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\\n\\nAn object value of the form `{\\\"row\\\": boolean, \\\"column\\\": boolean}` can be used to supply different centering values for rows and columns.\\n\\n__Default value:__ `false`\"\n        },\n        \"columns\": {\n          \"description\": \"The number of columns to include in the view composition layout.\\n\\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\\n\\n__Note__:\\n\\n1) This property is only for:\\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\\n\\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).\",\n          \"type\": \"number\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"header\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Header\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of a facet's header.\"\n        },\n        \"sort\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SortArray\"\n            },\n            {\n              \"$ref\": \"#/definitions/SortOrder\"\n            },\n            {\n              \"$ref\": \"#/definitions/EncodingSortField\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` is not supported for `row` and `column`.\"\n        },\n        \"spacing\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<number>\"\n            }\n          ],\n          \"description\": \"The spacing in pixels between sub-views of the composition operator. An object of the form `{\\\"row\\\": number, \\\"column\\\": number}` can be used to set different spacing values for rows and columns.\\n\\n__Default value__: Depends on `\\\"spacing\\\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"FacetFieldDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"header\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Header\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of a facet's header.\"\n        },\n        \"sort\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SortArray\"\n            },\n            {\n              \"$ref\": \"#/definitions/SortOrder\"\n            },\n            {\n              \"$ref\": \"#/definitions/EncodingSortField\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` is not supported for `row` and `column`.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"FacetMapping\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"column\": {\n          \"$ref\": \"#/definitions/FacetFieldDef\",\n          \"description\": \"A field definition for the horizontal facet of trellis plots.\"\n        },\n        \"row\": {\n          \"$ref\": \"#/definitions/FacetFieldDef\",\n          \"description\": \"A field definition for the vertical facet of trellis plots.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"FacetedEncoding\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"angle\": {\n          \"$ref\": \"#/definitions/NumericMarkPropDef\",\n          \"description\": \"Rotation angle of point and text marks.\"\n        },\n        \"color\": {\n          \"$ref\": \"#/definitions/ColorDef\",\n          \"description\": \"Color of the marks – either fill or stroke color based on  the `filled` property of mark definition. By default, `color` represents fill color for `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"tick\\\"`, `\\\"text\\\"`, `\\\"trail\\\"`, `\\\"circle\\\"`, and `\\\"square\\\"` / stroke color for `\\\"line\\\"` and `\\\"point\\\"`.\\n\\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\\n\\n_Note:_ 1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. The `fill` or `stroke` encodings have higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified. 2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme).\"\n        },\n        \"column\": {\n          \"$ref\": \"#/definitions/RowColumnEncodingFieldDef\",\n          \"description\": \"A field definition for the horizontal facet of trellis plots.\"\n        },\n        \"description\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StringFieldDefWithCondition\"\n            },\n            {\n              \"$ref\": \"#/definitions/StringValueDefWithCondition\"\n            }\n          ],\n          \"description\": \"A text description of this mark for ARIA accessibility (SVG output only). For SVG output the `\\\"aria-label\\\"` attribute will be set to this description.\"\n        },\n        \"detail\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FieldDefWithoutScale\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/FieldDefWithoutScale\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"Additional levels of detail for grouping data in aggregate views and in line, trail, and area marks without mapping data to a specific visual channel.\"\n        },\n        \"facet\": {\n          \"$ref\": \"#/definitions/FacetEncodingFieldDef\",\n          \"description\": \"A field definition for the (flexible) facet of trellis plots.\\n\\nIf either `row` or `column` is specified, this channel will be ignored.\"\n        },\n        \"fill\": {\n          \"$ref\": \"#/definitions/ColorDef\",\n          \"description\": \"Fill color of the marks. __Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\\n\\n_Note:_ The `fill` encoding has higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified.\"\n        },\n        \"fillOpacity\": {\n          \"$ref\": \"#/definitions/NumericMarkPropDef\",\n          \"description\": \"Fill opacity of the marks.\\n\\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity` property.\"\n        },\n        \"href\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StringFieldDefWithCondition\"\n            },\n            {\n              \"$ref\": \"#/definitions/StringValueDefWithCondition\"\n            }\n          ],\n          \"description\": \"A URL to load upon mouse click.\"\n        },\n        \"key\": {\n          \"$ref\": \"#/definitions/FieldDefWithoutScale\",\n          \"description\": \"A data field to use as a unique key for data binding. When a visualization’s data is updated, the key value will be used to match data elements to existing mark instances. Use a key channel to enable object constancy for transitions over dynamic data.\"\n        },\n        \"latitude\": {\n          \"$ref\": \"#/definitions/LatLongDef\",\n          \"description\": \"Latitude position of geographically projected marks.\"\n        },\n        \"latitude2\": {\n          \"$ref\": \"#/definitions/Position2Def\",\n          \"description\": \"Latitude-2 position for geographically projected ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\"\n        },\n        \"longitude\": {\n          \"$ref\": \"#/definitions/LatLongDef\",\n          \"description\": \"Longitude position of geographically projected marks.\"\n        },\n        \"longitude2\": {\n          \"$ref\": \"#/definitions/Position2Def\",\n          \"description\": \"Longitude-2 position for geographically projected ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\"\n        },\n        \"opacity\": {\n          \"$ref\": \"#/definitions/NumericMarkPropDef\",\n          \"description\": \"Opacity of the marks.\\n\\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity` property.\"\n        },\n        \"order\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/OrderFieldDef\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/OrderFieldDef\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/OrderValueDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/OrderOnlyDef\"\n            }\n          ],\n          \"description\": \"Order of the marks.\\n- For stacked marks, this `order` channel encodes [stack order](https://vega.github.io/vega-lite/docs/stack.html#order).\\n- For line and trail marks, this `order` channel encodes order of data points in the lines. This can be useful for creating [a connected scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html). Setting `order` to `{\\\"value\\\": null}` makes the line marks use the original order in the data sources.\\n- Otherwise, this `order` channel encodes layer order of the marks.\\n\\n__Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating additional aggregation grouping.\"\n        },\n        \"radius\": {\n          \"$ref\": \"#/definitions/PolarDef\",\n          \"description\": \"The outer radius in pixels of arc marks.\"\n        },\n        \"radius2\": {\n          \"$ref\": \"#/definitions/Position2Def\",\n          \"description\": \"The inner radius in pixels of arc marks.\"\n        },\n        \"row\": {\n          \"$ref\": \"#/definitions/RowColumnEncodingFieldDef\",\n          \"description\": \"A field definition for the vertical facet of trellis plots.\"\n        },\n        \"shape\": {\n          \"$ref\": \"#/definitions/ShapeDef\",\n          \"description\": \"Shape of the mark.\\n\\n1. For `point` marks the 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.)\\n\\n2. For `geoshape` marks it should be a field definition of the geojson data\\n\\n__Default value:__ If undefined, the default shape depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#point-config)'s `shape` property. (`\\\"circle\\\"` if unset.)\"\n        },\n        \"size\": {\n          \"$ref\": \"#/definitions/NumericMarkPropDef\",\n          \"description\": \"Size of the mark.\\n- For `\\\"point\\\"`, `\\\"square\\\"` and `\\\"circle\\\"`, – the symbol size, or pixel area of the mark.\\n- For `\\\"bar\\\"` and `\\\"tick\\\"` – the bar and tick's size.\\n- For `\\\"text\\\"` – the text's font size.\\n- Size is unsupported for `\\\"line\\\"`, `\\\"area\\\"`, and `\\\"rect\\\"`. (Use `\\\"trail\\\"` instead of line with varying size)\"\n        },\n        \"stroke\": {\n          \"$ref\": \"#/definitions/ColorDef\",\n          \"description\": \"Stroke color of the marks. __Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\\n\\n_Note:_ The `stroke` encoding has higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified.\"\n        },\n        \"strokeDash\": {\n          \"$ref\": \"#/definitions/NumericArrayMarkPropDef\",\n          \"description\": \"Stroke dash of the marks.\\n\\n__Default value:__ `[1,0]` (No dash).\"\n        },\n        \"strokeOpacity\": {\n          \"$ref\": \"#/definitions/NumericMarkPropDef\",\n          \"description\": \"Stroke opacity of the marks.\\n\\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity` property.\"\n        },\n        \"strokeWidth\": {\n          \"$ref\": \"#/definitions/NumericMarkPropDef\",\n          \"description\": \"Stroke width of the marks.\\n\\n__Default value:__ If undefined, the default stroke width depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth` property.\"\n        },\n        \"text\": {\n          \"$ref\": \"#/definitions/TextDef\",\n          \"description\": \"Text of the `text` mark.\"\n        },\n        \"theta\": {\n          \"$ref\": \"#/definitions/PolarDef\",\n          \"description\": \"- 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.)\\n\\n- For text marks, polar coordinate angle in radians.\"\n        },\n        \"theta2\": {\n          \"$ref\": \"#/definitions/Position2Def\",\n          \"description\": \"The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise.\"\n        },\n        \"time\": {\n          \"$ref\": \"#/definitions/TimeDef\"\n        },\n        \"tooltip\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StringFieldDefWithCondition\"\n            },\n            {\n              \"$ref\": \"#/definitions/StringValueDefWithCondition\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/StringFieldDef\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"The tooltip text to show upon mouse hover. Specifying `tooltip` encoding overrides [the `tooltip` property in the mark definition](https://vega.github.io/vega-lite/docs/mark.html#mark-def).\\n\\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\"\n        },\n        \"url\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StringFieldDefWithCondition\"\n            },\n            {\n              \"$ref\": \"#/definitions/StringValueDefWithCondition\"\n            }\n          ],\n          \"description\": \"The URL of an image mark.\"\n        },\n        \"x\": {\n          \"$ref\": \"#/definitions/PositionDef\",\n          \"description\": \"X coordinates of the marks, or width of horizontal `\\\"bar\\\"` and `\\\"area\\\"` without specified `x2` or `width`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"x2\": {\n          \"$ref\": \"#/definitions/Position2Def\",\n          \"description\": \"X2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"xError\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SecondaryFieldDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ValueDef<number>\"\n            }\n          ],\n          \"description\": \"Error value of x coordinates for error specified `\\\"errorbar\\\"` and `\\\"errorband\\\"`.\"\n        },\n        \"xError2\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SecondaryFieldDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ValueDef<number>\"\n            }\n          ],\n          \"description\": \"Secondary error value of x coordinates for error specified `\\\"errorbar\\\"` and `\\\"errorband\\\"`.\"\n        },\n        \"xOffset\": {\n          \"$ref\": \"#/definitions/OffsetDef\",\n          \"description\": \"Offset of x-position of the marks\"\n        },\n        \"y\": {\n          \"$ref\": \"#/definitions/PositionDef\",\n          \"description\": \"Y coordinates of the marks, or height of vertical `\\\"bar\\\"` and `\\\"area\\\"` without specified `y2` or `height`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        },\n        \"y2\": {\n          \"$ref\": \"#/definitions/Position2Def\",\n          \"description\": \"Y2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        },\n        \"yError\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SecondaryFieldDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ValueDef<number>\"\n            }\n          ],\n          \"description\": \"Error value of y coordinates for error specified `\\\"errorbar\\\"` and `\\\"errorband\\\"`.\"\n        },\n        \"yError2\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SecondaryFieldDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ValueDef<number>\"\n            }\n          ],\n          \"description\": \"Secondary error value of y coordinates for error specified `\\\"errorbar\\\"` and `\\\"errorband\\\"`.\"\n        },\n        \"yOffset\": {\n          \"$ref\": \"#/definitions/OffsetDef\",\n          \"description\": \"Offset of y-position of the marks\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"FacetedUnitSpec\": {\n      \"additionalProperties\": false,\n      \"description\": \"Unit spec that can have a composite mark and row or column channels (shorthand for a facet spec).\",\n      \"properties\": {\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LayoutAlign\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<LayoutAlign>\"\n            }\n          ],\n          \"description\": \"The alignment to apply to grid rows and columns. The supported string values are `\\\"all\\\"`, `\\\"each\\\"`, and `\\\"none\\\"`.\\n\\n- For `\\\"none\\\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\\n- For `\\\"each\\\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\\n- For `\\\"all\\\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\\n\\nAlternatively, an object value of the form `{\\\"row\\\": string, \\\"column\\\": string}` can be used to supply different alignments for rows and columns.\\n\\n__Default value:__ `\\\"all\\\"`.\"\n        },\n        \"bounds\": {\n          \"description\": \"The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\\n\\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\\n\\n__Default value:__ `\\\"full\\\"`\",\n          \"enum\": [\n            \"full\",\n            \"flush\"\n          ],\n          \"type\": \"string\"\n        },\n        \"center\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<boolean>\"\n            }\n          ],\n          \"description\": \"Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\\n\\nAn object value of the form `{\\\"row\\\": boolean, \\\"column\\\": boolean}` can be used to supply different centering values for rows and columns.\\n\\n__Default value:__ `false`\"\n        },\n        \"data\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Data\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n        },\n        \"description\": {\n          \"description\": \"Description of this mark for commenting purpose.\",\n          \"type\": \"string\"\n        },\n        \"encoding\": {\n          \"$ref\": \"#/definitions/FacetedEncoding\",\n          \"description\": \"A key-value mapping between encoding channels and definition of fields.\"\n        },\n        \"height\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"container\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/Step\"\n            }\n          ],\n          \"description\": \"The height of a visualization.\\n\\n- For a plot with a continuous y-field, height should be a number.\\n- For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.)\\n- To enable responsive sizing on height, it should be set to `\\\"container\\\"`.\\n\\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\\n\\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `\\\"container\\\"` option cannot be used.\\n\\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation.\"\n        },\n        \"mark\": {\n          \"$ref\": \"#/definitions/AnyMark\",\n          \"description\": \"A string describing the mark type (one of `\\\"bar\\\"`, `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"tick\\\"`, `\\\"line\\\"`, `\\\"area\\\"`, `\\\"point\\\"`, `\\\"rule\\\"`, `\\\"geoshape\\\"`, and `\\\"text\\\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def).\"\n        },\n        \"name\": {\n          \"description\": \"Name of the visualization for later reference.\",\n          \"type\": \"string\"\n        },\n        \"params\": {\n          \"description\": \"An array of parameters that may either be simple variables, or more complex selections that map user input to data queries.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/SelectionParameter\"\n          },\n          \"type\": \"array\"\n        },\n        \"projection\": {\n          \"$ref\": \"#/definitions/Projection\",\n          \"description\": \"An object defining properties of geographic projection, which will be applied to `shape` path for `\\\"geoshape\\\"` marks and to `latitude` and `\\\"longitude\\\"` channels for other marks.\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/Resolve\",\n          \"description\": \"Scale, axis, and legend resolutions for view composition specifications.\"\n        },\n        \"spacing\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<number>\"\n            }\n          ],\n          \"description\": \"The spacing in pixels between sub-views of the composition operator. An object of the form `{\\\"row\\\": number, \\\"column\\\": number}` can be used to set different spacing values for rows and columns.\\n\\n__Default value__: Depends on `\\\"spacing\\\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/TitleParams\"\n            }\n          ],\n          \"description\": \"Title for the plot.\"\n        },\n        \"transform\": {\n          \"description\": \"An array of data transformations such as filter and new field calculation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Transform\"\n          },\n          \"type\": \"array\"\n        },\n        \"view\": {\n          \"$ref\": \"#/definitions/ViewBackground\",\n          \"description\": \"An object defining the view background's fill and stroke.\\n\\n__Default value:__ none (transparent)\"\n        },\n        \"width\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"container\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/Step\"\n            }\n          ],\n          \"description\": \"The width of a visualization.\\n\\n- For a plot with a continuous x-field, width should be a number.\\n- For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.)\\n- To enable responsive sizing on width, it should be set to `\\\"container\\\"`.\\n\\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\\n\\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `\\\"container\\\"` option cannot be used.\\n\\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation.\"\n        }\n      },\n      \"required\": [\n        \"mark\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Feature\": {\n      \"additionalProperties\": false,\n      \"description\": \"A feature object which contains a geometry and associated properties. https://tools.ietf.org/html/rfc7946#section-3.2\",\n      \"properties\": {\n        \"bbox\": {\n          \"$ref\": \"#/definitions/BBox\",\n          \"description\": \"Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. The value of the bbox member is an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. https://tools.ietf.org/html/rfc7946#section-5\"\n        },\n        \"geometry\": {\n          \"$ref\": \"#/definitions/Geometry\",\n          \"description\": \"The feature's geometry\"\n        },\n        \"id\": {\n          \"description\": \"A value that uniquely identifies this feature in a https://tools.ietf.org/html/rfc7946#section-3.2.\",\n          \"type\": [\n            \"string\",\n            \"number\"\n          ]\n        },\n        \"properties\": {\n          \"$ref\": \"#/definitions/GeoJsonProperties\",\n          \"description\": \"Properties associated with this feature.\"\n        },\n        \"type\": {\n          \"const\": \"Feature\",\n          \"description\": \"Specifies the type of GeoJSON object.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"geometry\",\n        \"properties\",\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Feature<Geometry,GeoJsonProperties>\": {\n      \"additionalProperties\": false,\n      \"description\": \"A feature object which contains a geometry and associated properties. https://tools.ietf.org/html/rfc7946#section-3.2\",\n      \"properties\": {\n        \"bbox\": {\n          \"$ref\": \"#/definitions/BBox\",\n          \"description\": \"Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. The value of the bbox member is an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. https://tools.ietf.org/html/rfc7946#section-5\"\n        },\n        \"geometry\": {\n          \"$ref\": \"#/definitions/Geometry\",\n          \"description\": \"The feature's geometry\"\n        },\n        \"id\": {\n          \"description\": \"A value that uniquely identifies this feature in a https://tools.ietf.org/html/rfc7946#section-3.2.\",\n          \"type\": [\n            \"string\",\n            \"number\"\n          ]\n        },\n        \"properties\": {\n          \"$ref\": \"#/definitions/GeoJsonProperties\",\n          \"description\": \"Properties associated with this feature.\"\n        },\n        \"type\": {\n          \"const\": \"Feature\",\n          \"description\": \"Specifies the type of GeoJSON object.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"geometry\",\n        \"properties\",\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"FeatureCollection\": {\n      \"additionalProperties\": false,\n      \"description\": \"A collection of feature objects.  https://tools.ietf.org/html/rfc7946#section-3.3\",\n      \"properties\": {\n        \"bbox\": {\n          \"$ref\": \"#/definitions/BBox\",\n          \"description\": \"Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. The value of the bbox member is an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. https://tools.ietf.org/html/rfc7946#section-5\"\n        },\n        \"features\": {\n          \"items\": {\n            \"$ref\": \"#/definitions/Feature<Geometry,GeoJsonProperties>\"\n          },\n          \"type\": \"array\"\n        },\n        \"type\": {\n          \"const\": \"FeatureCollection\",\n          \"description\": \"Specifies the type of GeoJSON object.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"features\",\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Field\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/FieldName\"\n        },\n        {\n          \"$ref\": \"#/definitions/RepeatRef\"\n        }\n      ]\n    },\n    \"FieldDefWithoutScale\": {\n      \"$ref\": \"#/definitions/TypedFieldDef\",\n      \"description\": \"Field Def without scale (and without bin: \\\"binned\\\" support).\"\n    },\n    \"FieldEqualPredicate\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"equal\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/DateTime\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The value that the field should be equal to.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"Field to be tested.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit for the field to be tested.\"\n        }\n      },\n      \"required\": [\n        \"equal\",\n        \"field\"\n      ],\n      \"type\": \"object\"\n    },\n    \"FieldGTEPredicate\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"field\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"Field to be tested.\"\n        },\n        \"gte\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/DateTime\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The value that the field should be greater than or equals to.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit for the field to be tested.\"\n        }\n      },\n      \"required\": [\n        \"field\",\n        \"gte\"\n      ],\n      \"type\": \"object\"\n    },\n    \"FieldGTPredicate\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"field\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"Field to be tested.\"\n        },\n        \"gt\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/DateTime\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The value that the field should be greater than.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit for the field to be tested.\"\n        }\n      },\n      \"required\": [\n        \"field\",\n        \"gt\"\n      ],\n      \"type\": \"object\"\n    },\n    \"FieldLTEPredicate\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"field\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"Field to be tested.\"\n        },\n        \"lte\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/DateTime\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The value that the field should be less than or equals to.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit for the field to be tested.\"\n        }\n      },\n      \"required\": [\n        \"field\",\n        \"lte\"\n      ],\n      \"type\": \"object\"\n    },\n    \"FieldLTPredicate\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"field\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"Field to be tested.\"\n        },\n        \"lt\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/DateTime\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The value that the field should be less than.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit for the field to be tested.\"\n        }\n      },\n      \"required\": [\n        \"field\",\n        \"lt\"\n      ],\n      \"type\": \"object\"\n    },\n    \"FieldName\": {\n      \"type\": \"string\"\n    },\n    \"FieldOneOfPredicate\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"field\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"Field to be tested.\"\n        },\n        \"oneOf\": {\n          \"anyOf\": [\n            {\n              \"items\": {\n                \"type\": \"string\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"items\": {\n                \"type\": \"boolean\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/DateTime\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"A set of values that the `field`'s value should be a member of, for a data item included in the filtered data.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit for the field to be tested.\"\n        }\n      },\n      \"required\": [\n        \"field\",\n        \"oneOf\"\n      ],\n      \"type\": \"object\"\n    },\n    \"FieldOrDatumDefWithCondition<DatumDef,(Gradient|string|null)>\": {\n      \"additionalProperties\": false,\n      \"description\": \"A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }\",\n      \"properties\": {\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n        },\n        \"datum\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/PrimitiveValue\"\n            },\n            {\n              \"$ref\": \"#/definitions/DateTime\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/RepeatRef\"\n            }\n          ],\n          \"description\": \"A constant value in data domain.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/Type\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"FieldOrDatumDefWithCondition<DatumDef,(string|null)>\": {\n      \"additionalProperties\": false,\n      \"description\": \"A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }\",\n      \"properties\": {\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n        },\n        \"datum\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/PrimitiveValue\"\n            },\n            {\n              \"$ref\": \"#/definitions/DateTime\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/RepeatRef\"\n            }\n          ],\n          \"description\": \"A constant value in data domain.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/Type\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"FieldOrDatumDefWithCondition<DatumDef,number>\": {\n      \"additionalProperties\": false,\n      \"description\": \"A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }\",\n      \"properties\": {\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n        },\n        \"datum\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/PrimitiveValue\"\n            },\n            {\n              \"$ref\": \"#/definitions/DateTime\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/RepeatRef\"\n            }\n          ],\n          \"description\": \"A constant value in data domain.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/Type\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"FieldOrDatumDefWithCondition<DatumDef,number[]>\": {\n      \"additionalProperties\": false,\n      \"description\": \"A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }\",\n      \"properties\": {\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(number[]|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(number[]|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n        },\n        \"datum\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/PrimitiveValue\"\n            },\n            {\n              \"$ref\": \"#/definitions/DateTime\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/RepeatRef\"\n            }\n          ],\n          \"description\": \"A constant value in data domain.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/Type\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"FieldOrDatumDefWithCondition<MarkPropFieldDef,(Gradient|string|null)>\": {\n      \"additionalProperties\": false,\n      \"description\": \"A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }\",\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"legend\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Legend\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n        },\n        \"scale\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Scale\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n        },\n        \"sort\": {\n          \"$ref\": \"#/definitions/Sort\",\n          \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"FieldOrDatumDefWithCondition<MarkPropFieldDef,number>\": {\n      \"additionalProperties\": false,\n      \"description\": \"A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }\",\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"legend\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Legend\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n        },\n        \"scale\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Scale\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n        },\n        \"sort\": {\n          \"$ref\": \"#/definitions/Sort\",\n          \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"FieldOrDatumDefWithCondition<MarkPropFieldDef,number[]>\": {\n      \"additionalProperties\": false,\n      \"description\": \"A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }\",\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(number[]|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(number[]|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"legend\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Legend\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n        },\n        \"scale\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Scale\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n        },\n        \"sort\": {\n          \"$ref\": \"#/definitions/Sort\",\n          \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"FieldOrDatumDefWithCondition<MarkPropFieldDef<TypeForShape>,(string|null)>\": {\n      \"additionalProperties\": false,\n      \"description\": \"A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }\",\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"legend\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Legend\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n        },\n        \"scale\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Scale\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n        },\n        \"sort\": {\n          \"$ref\": \"#/definitions/Sort\",\n          \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/TypeForShape\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"FieldOrDatumDefWithCondition<StringDatumDef,Text>\": {\n      \"additionalProperties\": false,\n      \"description\": \"A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }\",\n      \"properties\": {\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(Text|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(Text|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n        },\n        \"datum\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/PrimitiveValue\"\n            },\n            {\n              \"$ref\": \"#/definitions/DateTime\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/RepeatRef\"\n            }\n          ],\n          \"description\": \"A constant value in data domain.\"\n        },\n        \"format\": {\n          \"$ref\": \"#/definitions/Format\",\n          \"description\": \"The text format specifier for formatting number and date/time in labels of guides (axes, legends, headers) and text marks.\\n\\nIf the format type is `\\\"number\\\"` (e.g., for quantitative fields), this is a D3's [number format pattern string](https://github.com/d3/d3-format#locale_format).\\n\\nIf the format type is `\\\"time\\\"` (e.g., for temporal fields), this is either:   a) D3's [time format pattern](https://d3js.org/d3-time-format#locale_format) if you desire to set a static time format.\\n\\n  b) [dynamic time format specifier object](https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format) if you desire to set a dynamic time format that uses different formats depending on the granularity of the input date (e.g., if the date lies on a year, month, date, hour, etc. boundary).\\n\\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\\n\\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.\"\n        },\n        \"formatType\": {\n          \"description\": \"The format type for labels. One of `\\\"number\\\"`, `\\\"time\\\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\\n\\n__Default value:__\\n- `\\\"time\\\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\\n- `\\\"number\\\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.\",\n          \"type\": \"string\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/Type\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"FieldOrDatumDefWithCondition<StringFieldDef,Text>\": {\n      \"additionalProperties\": false,\n      \"description\": \"A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }\",\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"const\": \"binned\",\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(Text|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(Text|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"format\": {\n          \"$ref\": \"#/definitions/Format\",\n          \"description\": \"The text format specifier for formatting number and date/time in labels of guides (axes, legends, headers) and text marks.\\n\\nIf the format type is `\\\"number\\\"` (e.g., for quantitative fields), this is a D3's [number format pattern string](https://github.com/d3/d3-format#locale_format).\\n\\nIf the format type is `\\\"time\\\"` (e.g., for temporal fields), this is either:   a) D3's [time format pattern](https://d3js.org/d3-time-format#locale_format) if you desire to set a static time format.\\n\\n  b) [dynamic time format specifier object](https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format) if you desire to set a dynamic time format that uses different formats depending on the granularity of the input date (e.g., if the date lies on a year, month, date, hour, etc. boundary).\\n\\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\\n\\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.\"\n        },\n        \"formatType\": {\n          \"description\": \"The format type for labels. One of `\\\"number\\\"`, `\\\"time\\\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\\n\\n__Default value:__\\n- `\\\"time\\\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\\n- `\\\"number\\\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.\",\n          \"type\": \"string\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"FieldOrDatumDefWithCondition<StringFieldDef,string>\": {\n      \"additionalProperties\": false,\n      \"description\": \"A FieldDef with Condition<ValueDef> {   condition: {value: ...},   field: ...,   ... }\",\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"const\": \"binned\",\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(string|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(string|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"format\": {\n          \"$ref\": \"#/definitions/Format\",\n          \"description\": \"The text format specifier for formatting number and date/time in labels of guides (axes, legends, headers) and text marks.\\n\\nIf the format type is `\\\"number\\\"` (e.g., for quantitative fields), this is a D3's [number format pattern string](https://github.com/d3/d3-format#locale_format).\\n\\nIf the format type is `\\\"time\\\"` (e.g., for temporal fields), this is either:   a) D3's [time format pattern](https://d3js.org/d3-time-format#locale_format) if you desire to set a static time format.\\n\\n  b) [dynamic time format specifier object](https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format) if you desire to set a dynamic time format that uses different formats depending on the granularity of the input date (e.g., if the date lies on a year, month, date, hour, etc. boundary).\\n\\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\\n\\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.\"\n        },\n        \"formatType\": {\n          \"description\": \"The format type for labels. One of `\\\"number\\\"`, `\\\"time\\\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\\n\\n__Default value:__\\n- `\\\"time\\\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\\n- `\\\"number\\\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.\",\n          \"type\": \"string\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"FieldRange\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"field\": {\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"field\"\n      ],\n      \"type\": \"object\"\n    },\n    \"FieldRangePredicate\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"field\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"Field to be tested.\"\n        },\n        \"range\": {\n          \"anyOf\": [\n            {\n              \"items\": {\n                \"anyOf\": [\n                  {\n                    \"type\": \"number\"\n                  },\n                  {\n                    \"$ref\": \"#/definitions/DateTime\"\n                  },\n                  {\n                    \"type\": \"null\"\n                  },\n                  {\n                    \"$ref\": \"#/definitions/ExprRef\"\n                  }\n                ]\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"An array of inclusive minimum and maximum values for a field value of a data item to be included in the filtered data.\",\n          \"maxItems\": 2,\n          \"minItems\": 2\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit for the field to be tested.\"\n        }\n      },\n      \"required\": [\n        \"field\",\n        \"range\"\n      ],\n      \"type\": \"object\"\n    },\n    \"FieldValidPredicate\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"field\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"Field to be tested.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit for the field to be tested.\"\n        },\n        \"valid\": {\n          \"description\": \"If set to true the field's value has to be valid, meaning both not `null` and not [`NaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN).\",\n          \"type\": \"boolean\"\n        }\n      },\n      \"required\": [\n        \"field\",\n        \"valid\"\n      ],\n      \"type\": \"object\"\n    },\n    \"FilterTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"filter\": {\n          \"$ref\": \"#/definitions/PredicateComposition\",\n          \"description\": \"The `filter` property must be a predication definition, which can take one of the following forms:\\n\\n1) an [expression](https://vega.github.io/vega-lite/docs/types.html#expression) string, where `datum` can be used to refer to the current data object. For example, `{filter: \\\"datum.b2 > 60\\\"}` would make the output data includes only items that have values in the field `b2` over 60.\\n\\n2) one of the [field predicates](https://vega.github.io/vega-lite/docs/predicate.html#field-predicate): [`equal`](https://vega.github.io/vega-lite/docs/predicate.html#field-equal-predicate), [`lt`](https://vega.github.io/vega-lite/docs/predicate.html#lt-predicate), [`lte`](https://vega.github.io/vega-lite/docs/predicate.html#lte-predicate), [`gt`](https://vega.github.io/vega-lite/docs/predicate.html#gt-predicate), [`gte`](https://vega.github.io/vega-lite/docs/predicate.html#gte-predicate), [`range`](https://vega.github.io/vega-lite/docs/predicate.html#range-predicate), [`oneOf`](https://vega.github.io/vega-lite/docs/predicate.html#one-of-predicate), or [`valid`](https://vega.github.io/vega-lite/docs/predicate.html#valid-predicate),\\n\\n3) a [selection predicate](https://vega.github.io/vega-lite/docs/predicate.html#selection-predicate), which define the names of a selection that the data point should belong to (or a logical composition of selections).\\n\\n4) a [logical composition](https://vega.github.io/vega-lite/docs/predicate.html#composition) of (1), (2), or (3).\"\n        }\n      },\n      \"required\": [\n        \"filter\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Fit\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/GeoJsonFeature\"\n        },\n        {\n          \"$ref\": \"#/definitions/GeoJsonFeatureCollection\"\n        },\n        {\n          \"items\": {\n            \"$ref\": \"#/definitions/GeoJsonFeature\"\n          },\n          \"type\": \"array\"\n        }\n      ]\n    },\n    \"FlattenTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"as\": {\n          \"description\": \"The output field names for extracted array values.\\n\\n__Default value:__ The field name of the corresponding array field\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        },\n        \"flatten\": {\n          \"description\": \"An array of one or more data fields containing arrays to flatten. If multiple fields are specified, their array values should have a parallel structure, ideally with the same length. If the lengths of parallel arrays do not match, the longest array will be used with `null` values added for missing entries.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"flatten\"\n      ],\n      \"type\": \"object\"\n    },\n    \"FoldTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"as\": {\n          \"description\": \"The output field names for the key and value properties produced by the fold transform. __Default value:__ `[\\\"key\\\", \\\"value\\\"]`\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"maxItems\": 2,\n          \"minItems\": 2,\n          \"type\": \"array\"\n        },\n        \"fold\": {\n          \"description\": \"An array of data fields indicating the properties to fold.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"fold\"\n      ],\n      \"type\": \"object\"\n    },\n    \"FontStyle\": {\n      \"type\": \"string\"\n    },\n    \"FontWeight\": {\n      \"enum\": [\n        \"normal\",\n        \"bold\",\n        \"lighter\",\n        \"bolder\",\n        100,\n        200,\n        300,\n        400,\n        500,\n        600,\n        700,\n        800,\n        900\n      ],\n      \"type\": [\n        \"string\",\n        \"number\"\n      ]\n    },\n    \"Format\": {\n      \"anyOf\": [\n        {\n          \"type\": \"string\"\n        },\n        {\n          \"$ref\": \"#/definitions/TimeFormatSpecifier\"\n        },\n        {\n          \"$ref\": \"#/definitions/Dict\"\n        }\n      ]\n    },\n    \"FormatConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"normalizedNumberFormat\": {\n          \"description\": \"If normalizedNumberFormatType is not specified, D3 number format for axis labels, text marks, and tooltips of normalized stacked fields (fields with `stack: \\\"normalize\\\"`). For example `\\\"s\\\"` for SI units. Use [D3's number format pattern](https://github.com/d3/d3-format#locale_format).\\n\\nIf `config.normalizedNumberFormatType` is specified and `config.customFormatTypes` is `true`, this value will be passed as `format` alongside `datum.value` to the `config.numberFormatType` function. __Default value:__ `%`\",\n          \"type\": \"string\"\n        },\n        \"normalizedNumberFormatType\": {\n          \"description\": \"[Custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for `config.normalizedNumberFormat`.\\n\\n__Default value:__ `undefined` -- This is equilvalent to call D3-format, which is exposed as [`format` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#format). __Note:__ You must also set `customFormatTypes` to `true` to use this feature.\",\n          \"type\": \"string\"\n        },\n        \"numberFormat\": {\n          \"description\": \"If numberFormatType is not specified, D3 number format for guide labels, text marks, and tooltips of non-normalized fields (fields *without* `stack: \\\"normalize\\\"`). For example `\\\"s\\\"` for SI units. Use [D3's number format pattern](https://github.com/d3/d3-format#locale_format).\\n\\nIf `config.numberFormatType` is specified and `config.customFormatTypes` is `true`, this value will be passed as `format` alongside `datum.value` to the `config.numberFormatType` function.\",\n          \"type\": \"string\"\n        },\n        \"numberFormatType\": {\n          \"description\": \"[Custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for `config.numberFormat`.\\n\\n__Default value:__ `undefined` -- This is equilvalent to call D3-format, which is exposed as [`format` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#format). __Note:__ You must also set `customFormatTypes` to `true` to use this feature.\",\n          \"type\": \"string\"\n        },\n        \"timeFormat\": {\n          \"description\": \"Default time format for raw time values (without time units) in text marks, legend labels and header labels.\\n\\n__Default value:__ `\\\"%b %d, %Y\\\"` __Note:__ Axes automatically determine the format for each label automatically so this config does not affect axes.\",\n          \"type\": \"string\"\n        },\n        \"timeFormatType\": {\n          \"description\": \"[Custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type) for `config.timeFormat`.\\n\\n__Default value:__ `undefined` -- This is equilvalent to call D3-time-format, which is exposed as [`timeFormat` in Vega-Expression](https://vega.github.io/vega/docs/expressions/#timeFormat). __Note:__ You must also set `customFormatTypes` to `true` and there must *not* be a `timeUnit` defined to use this feature.\",\n          \"type\": \"string\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"Generator\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/SequenceGenerator\"\n        },\n        {\n          \"$ref\": \"#/definitions/SphereGenerator\"\n        },\n        {\n          \"$ref\": \"#/definitions/GraticuleGenerator\"\n        }\n      ]\n    },\n    \"ConcatSpec<GenericSpec>\": {\n      \"additionalProperties\": false,\n      \"description\": \"Base interface for a generalized concatenation specification.\",\n      \"properties\": {\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LayoutAlign\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<LayoutAlign>\"\n            }\n          ],\n          \"description\": \"The alignment to apply to grid rows and columns. The supported string values are `\\\"all\\\"`, `\\\"each\\\"`, and `\\\"none\\\"`.\\n\\n- For `\\\"none\\\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\\n- For `\\\"each\\\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\\n- For `\\\"all\\\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\\n\\nAlternatively, an object value of the form `{\\\"row\\\": string, \\\"column\\\": string}` can be used to supply different alignments for rows and columns.\\n\\n__Default value:__ `\\\"all\\\"`.\"\n        },\n        \"bounds\": {\n          \"description\": \"The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\\n\\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\\n\\n__Default value:__ `\\\"full\\\"`\",\n          \"enum\": [\n            \"full\",\n            \"flush\"\n          ],\n          \"type\": \"string\"\n        },\n        \"center\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<boolean>\"\n            }\n          ],\n          \"description\": \"Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\\n\\nAn object value of the form `{\\\"row\\\": boolean, \\\"column\\\": boolean}` can be used to supply different centering values for rows and columns.\\n\\n__Default value:__ `false`\"\n        },\n        \"columns\": {\n          \"description\": \"The number of columns to include in the view composition layout.\\n\\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\\n\\n__Note__:\\n\\n1) This property is only for:\\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\\n\\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).\",\n          \"type\": \"number\"\n        },\n        \"concat\": {\n          \"description\": \"A list of views to be concatenated.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Spec\"\n          },\n          \"type\": \"array\"\n        },\n        \"data\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Data\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n        },\n        \"description\": {\n          \"description\": \"Description of this mark for commenting purpose.\",\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"description\": \"Name of the visualization for later reference.\",\n          \"type\": \"string\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/Resolve\",\n          \"description\": \"Scale, axis, and legend resolutions for view composition specifications.\"\n        },\n        \"spacing\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<number>\"\n            }\n          ],\n          \"description\": \"The spacing in pixels between sub-views of the composition operator. An object of the form `{\\\"row\\\": number, \\\"column\\\": number}` can be used to set different spacing values for rows and columns.\\n\\n__Default value__: Depends on `\\\"spacing\\\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/TitleParams\"\n            }\n          ],\n          \"description\": \"Title for the plot.\"\n        },\n        \"transform\": {\n          \"description\": \"An array of data transformations such as filter and new field calculation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Transform\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"concat\"\n      ],\n      \"type\": \"object\"\n    },\n    \"FacetSpec\": {\n      \"additionalProperties\": false,\n      \"description\": \"Base interface for a facet specification.\",\n      \"properties\": {\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LayoutAlign\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<LayoutAlign>\"\n            }\n          ],\n          \"description\": \"The alignment to apply to grid rows and columns. The supported string values are `\\\"all\\\"`, `\\\"each\\\"`, and `\\\"none\\\"`.\\n\\n- For `\\\"none\\\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\\n- For `\\\"each\\\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\\n- For `\\\"all\\\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\\n\\nAlternatively, an object value of the form `{\\\"row\\\": string, \\\"column\\\": string}` can be used to supply different alignments for rows and columns.\\n\\n__Default value:__ `\\\"all\\\"`.\"\n        },\n        \"bounds\": {\n          \"description\": \"The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\\n\\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\\n\\n__Default value:__ `\\\"full\\\"`\",\n          \"enum\": [\n            \"full\",\n            \"flush\"\n          ],\n          \"type\": \"string\"\n        },\n        \"center\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<boolean>\"\n            }\n          ],\n          \"description\": \"Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\\n\\nAn object value of the form `{\\\"row\\\": boolean, \\\"column\\\": boolean}` can be used to supply different centering values for rows and columns.\\n\\n__Default value:__ `false`\"\n        },\n        \"columns\": {\n          \"description\": \"The number of columns to include in the view composition layout.\\n\\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\\n\\n__Note__:\\n\\n1) This property is only for:\\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\\n\\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).\",\n          \"type\": \"number\"\n        },\n        \"data\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Data\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n        },\n        \"description\": {\n          \"description\": \"Description of this mark for commenting purpose.\",\n          \"type\": \"string\"\n        },\n        \"facet\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FacetFieldDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/FacetMapping\"\n            }\n          ],\n          \"description\": \"Definition for how to facet the data. One of: 1) [a field definition for faceting the plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def) 2) [An object that maps `row` and `column` channels to their field definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)\"\n        },\n        \"name\": {\n          \"description\": \"Name of the visualization for later reference.\",\n          \"type\": \"string\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/Resolve\",\n          \"description\": \"Scale, axis, and legend resolutions for view composition specifications.\"\n        },\n        \"spacing\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<number>\"\n            }\n          ],\n          \"description\": \"The spacing in pixels between sub-views of the composition operator. An object of the form `{\\\"row\\\": number, \\\"column\\\": number}` can be used to set different spacing values for rows and columns.\\n\\n__Default value__: Depends on `\\\"spacing\\\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)\"\n        },\n        \"spec\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LayerSpec\"\n            },\n            {\n              \"$ref\": \"#/definitions/FacetedUnitSpec\"\n            }\n          ],\n          \"description\": \"A specification of the view that gets faceted.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/TitleParams\"\n            }\n          ],\n          \"description\": \"Title for the plot.\"\n        },\n        \"transform\": {\n          \"description\": \"An array of data transformations such as filter and new field calculation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Transform\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"facet\",\n        \"spec\"\n      ],\n      \"type\": \"object\"\n    },\n    \"HConcatSpec<GenericSpec>\": {\n      \"additionalProperties\": false,\n      \"description\": \"Base interface for a horizontal concatenation specification.\",\n      \"properties\": {\n        \"bounds\": {\n          \"description\": \"The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\\n\\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\\n\\n__Default value:__ `\\\"full\\\"`\",\n          \"enum\": [\n            \"full\",\n            \"flush\"\n          ],\n          \"type\": \"string\"\n        },\n        \"center\": {\n          \"description\": \"Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\\n\\n__Default value:__ `false`\",\n          \"type\": \"boolean\"\n        },\n        \"data\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Data\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n        },\n        \"description\": {\n          \"description\": \"Description of this mark for commenting purpose.\",\n          \"type\": \"string\"\n        },\n        \"hconcat\": {\n          \"description\": \"A list of views to be concatenated and put into a row.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Spec\"\n          },\n          \"type\": \"array\"\n        },\n        \"name\": {\n          \"description\": \"Name of the visualization for later reference.\",\n          \"type\": \"string\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/Resolve\",\n          \"description\": \"Scale, axis, and legend resolutions for view composition specifications.\"\n        },\n        \"spacing\": {\n          \"description\": \"The spacing in pixels between sub-views of the concat operator.\\n\\n__Default value__: `10`\",\n          \"type\": \"number\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/TitleParams\"\n            }\n          ],\n          \"description\": \"Title for the plot.\"\n        },\n        \"transform\": {\n          \"description\": \"An array of data transformations such as filter and new field calculation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Transform\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"hconcat\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Spec\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/FacetedUnitSpec\"\n        },\n        {\n          \"$ref\": \"#/definitions/LayerSpec\"\n        },\n        {\n          \"$ref\": \"#/definitions/RepeatSpec\"\n        },\n        {\n          \"$ref\": \"#/definitions/FacetSpec\"\n        },\n        {\n          \"$ref\": \"#/definitions/ConcatSpec<GenericSpec>\"\n        },\n        {\n          \"$ref\": \"#/definitions/VConcatSpec<GenericSpec>\"\n        },\n        {\n          \"$ref\": \"#/definitions/HConcatSpec<GenericSpec>\"\n        }\n      ],\n      \"description\": \"Any specification in Vega-Lite.\"\n    },\n    \"GenericUnitSpec<Encoding,AnyMark>\": {\n      \"additionalProperties\": false,\n      \"description\": \"Base interface for a unit (single-view) specification.\",\n      \"properties\": {\n        \"data\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Data\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n        },\n        \"description\": {\n          \"description\": \"Description of this mark for commenting purpose.\",\n          \"type\": \"string\"\n        },\n        \"encoding\": {\n          \"$ref\": \"#/definitions/Encoding\",\n          \"description\": \"A key-value mapping between encoding channels and definition of fields.\"\n        },\n        \"mark\": {\n          \"$ref\": \"#/definitions/AnyMark\",\n          \"description\": \"A string describing the mark type (one of `\\\"bar\\\"`, `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"tick\\\"`, `\\\"line\\\"`, `\\\"area\\\"`, `\\\"point\\\"`, `\\\"rule\\\"`, `\\\"geoshape\\\"`, and `\\\"text\\\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def).\"\n        },\n        \"name\": {\n          \"description\": \"Name of the visualization for later reference.\",\n          \"type\": \"string\"\n        },\n        \"params\": {\n          \"description\": \"An array of parameters that may either be simple variables, or more complex selections that map user input to data queries.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/SelectionParameter\"\n          },\n          \"type\": \"array\"\n        },\n        \"projection\": {\n          \"$ref\": \"#/definitions/Projection\",\n          \"description\": \"An object defining properties of geographic projection, which will be applied to `shape` path for `\\\"geoshape\\\"` marks and to `latitude` and `\\\"longitude\\\"` channels for other marks.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/TitleParams\"\n            }\n          ],\n          \"description\": \"Title for the plot.\"\n        },\n        \"transform\": {\n          \"description\": \"An array of data transformations such as filter and new field calculation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Transform\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"mark\"\n      ],\n      \"type\": \"object\"\n    },\n    \"VConcatSpec<GenericSpec>\": {\n      \"additionalProperties\": false,\n      \"description\": \"Base interface for a vertical concatenation specification.\",\n      \"properties\": {\n        \"bounds\": {\n          \"description\": \"The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\\n\\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\\n\\n__Default value:__ `\\\"full\\\"`\",\n          \"enum\": [\n            \"full\",\n            \"flush\"\n          ],\n          \"type\": \"string\"\n        },\n        \"center\": {\n          \"description\": \"Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\\n\\n__Default value:__ `false`\",\n          \"type\": \"boolean\"\n        },\n        \"data\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Data\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n        },\n        \"description\": {\n          \"description\": \"Description of this mark for commenting purpose.\",\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"description\": \"Name of the visualization for later reference.\",\n          \"type\": \"string\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/Resolve\",\n          \"description\": \"Scale, axis, and legend resolutions for view composition specifications.\"\n        },\n        \"spacing\": {\n          \"description\": \"The spacing in pixels between sub-views of the concat operator.\\n\\n__Default value__: `10`\",\n          \"type\": \"number\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/TitleParams\"\n            }\n          ],\n          \"description\": \"Title for the plot.\"\n        },\n        \"transform\": {\n          \"description\": \"An array of data transformations such as filter and new field calculation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Transform\"\n          },\n          \"type\": \"array\"\n        },\n        \"vconcat\": {\n          \"description\": \"A list of views to be concatenated and put into a column.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Spec\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"vconcat\"\n      ],\n      \"type\": \"object\"\n    },\n    \"GeoJsonFeature\": {\n      \"$ref\": \"#/definitions/Feature\"\n    },\n    \"GeoJsonFeatureCollection\": {\n      \"$ref\": \"#/definitions/FeatureCollection\"\n    },\n    \"GeoJsonProperties\": {\n      \"anyOf\": [\n        {\n          \"type\": \"object\"\n        },\n        {\n          \"type\": \"null\"\n        }\n      ]\n    },\n    \"Geometry\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/Point\"\n        },\n        {\n          \"$ref\": \"#/definitions/MultiPoint\"\n        },\n        {\n          \"$ref\": \"#/definitions/LineString\"\n        },\n        {\n          \"$ref\": \"#/definitions/MultiLineString\"\n        },\n        {\n          \"$ref\": \"#/definitions/Polygon\"\n        },\n        {\n          \"$ref\": \"#/definitions/MultiPolygon\"\n        },\n        {\n          \"$ref\": \"#/definitions/GeometryCollection\"\n        }\n      ],\n      \"description\": \"Geometry object. https://tools.ietf.org/html/rfc7946#section-3\"\n    },\n    \"GeometryCollection\": {\n      \"additionalProperties\": false,\n      \"description\": \"Geometry Collection https://tools.ietf.org/html/rfc7946#section-3.1.8\",\n      \"properties\": {\n        \"bbox\": {\n          \"$ref\": \"#/definitions/BBox\",\n          \"description\": \"Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. The value of the bbox member is an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. https://tools.ietf.org/html/rfc7946#section-5\"\n        },\n        \"geometries\": {\n          \"items\": {\n            \"$ref\": \"#/definitions/Geometry\"\n          },\n          \"type\": \"array\"\n        },\n        \"type\": {\n          \"const\": \"GeometryCollection\",\n          \"description\": \"Specifies the type of GeoJSON object.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"geometries\",\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Gradient\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/LinearGradient\"\n        },\n        {\n          \"$ref\": \"#/definitions/RadialGradient\"\n        }\n      ]\n    },\n    \"GradientStop\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"color\": {\n          \"$ref\": \"#/definitions/Color\",\n          \"description\": \"The color value at this point in the gradient.\"\n        },\n        \"offset\": {\n          \"description\": \"The offset fraction for the color stop, indicating its position within the gradient.\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"offset\",\n        \"color\"\n      ],\n      \"type\": \"object\"\n    },\n    \"GraticuleGenerator\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"graticule\": {\n          \"anyOf\": [\n            {\n              \"const\": true,\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/GraticuleParams\"\n            }\n          ],\n          \"description\": \"Generate graticule GeoJSON data for geographic reference lines.\"\n        },\n        \"name\": {\n          \"description\": \"Provide a placeholder name and bind data at runtime.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"graticule\"\n      ],\n      \"type\": \"object\"\n    },\n    \"GraticuleParams\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"extent\": {\n          \"$ref\": \"#/definitions/Vector2<Vector2<number>>\",\n          \"description\": \"Sets both the major and minor extents to the same values.\"\n        },\n        \"extentMajor\": {\n          \"$ref\": \"#/definitions/Vector2<Vector2<number>>\",\n          \"description\": \"The major extent of the graticule as a two-element array of coordinates.\"\n        },\n        \"extentMinor\": {\n          \"$ref\": \"#/definitions/Vector2<Vector2<number>>\",\n          \"description\": \"The minor extent of the graticule as a two-element array of coordinates.\"\n        },\n        \"precision\": {\n          \"description\": \"The precision of the graticule in degrees.\\n\\n__Default value:__ `2.5`\",\n          \"type\": \"number\"\n        },\n        \"step\": {\n          \"$ref\": \"#/definitions/Vector2<number>\",\n          \"description\": \"Sets both the major and minor step angles to the same values.\"\n        },\n        \"stepMajor\": {\n          \"$ref\": \"#/definitions/Vector2<number>\",\n          \"description\": \"The major step angles of the graticule.\\n\\n\\n__Default value:__ `[90, 360]`\"\n        },\n        \"stepMinor\": {\n          \"$ref\": \"#/definitions/Vector2<number>\",\n          \"description\": \"The minor step angles of the graticule.\\n\\n__Default value:__ `[10, 10]`\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"Header\": {\n      \"additionalProperties\": false,\n      \"description\": \"Headers of row / column channels for faceted plots.\",\n      \"properties\": {\n        \"format\": {\n          \"$ref\": \"#/definitions/Format\",\n          \"description\": \"The text format specifier for formatting number and date/time in labels of guides (axes, legends, headers) and text marks.\\n\\nIf the format type is `\\\"number\\\"` (e.g., for quantitative fields), this is a D3's [number format pattern string](https://github.com/d3/d3-format#locale_format).\\n\\nIf the format type is `\\\"time\\\"` (e.g., for temporal fields), this is either:   a) D3's [time format pattern](https://d3js.org/d3-time-format#locale_format) if you desire to set a static time format.\\n\\n  b) [dynamic time format specifier object](https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format) if you desire to set a dynamic time format that uses different formats depending on the granularity of the input date (e.g., if the date lies on a year, month, date, hour, etc. boundary).\\n\\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\\n\\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.\"\n        },\n        \"formatType\": {\n          \"description\": \"The format type for labels. One of `\\\"number\\\"`, `\\\"time\\\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\\n\\n__Default value:__\\n- `\\\"time\\\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\\n- `\\\"number\\\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.\",\n          \"type\": \"string\"\n        },\n        \"labelAlign\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Horizontal text alignment of header labels. One of `\\\"left\\\"`, `\\\"center\\\"`, or `\\\"right\\\"`.\"\n        },\n        \"labelAnchor\": {\n          \"$ref\": \"#/definitions/TitleAnchor\",\n          \"description\": \"The anchor position for placing the labels. One of `\\\"start\\\"`, `\\\"middle\\\"`, or `\\\"end\\\"`. For example, with a label orientation of top these anchor positions map to a left-, center-, or right-aligned label.\"\n        },\n        \"labelAngle\": {\n          \"description\": \"The rotation angle of the header labels.\\n\\n__Default value:__ `0` for column header, `-90` for row header.\",\n          \"maximum\": 360,\n          \"minimum\": -360,\n          \"type\": \"number\"\n        },\n        \"labelBaseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The vertical text baseline for the header labels. One of `\\\"alphabetic\\\"` (default), `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`, `\\\"line-top\\\"`, or `\\\"line-bottom\\\"`. The `\\\"line-top\\\"` and `\\\"line-bottom\\\"` values operate similarly to `\\\"top\\\"` and `\\\"bottom\\\"`, but are calculated relative to the `titleLineHeight` rather than `titleFontSize` alone.\"\n        },\n        \"labelColor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The color of the header label, can be in hex color code or regular color name.\"\n        },\n        \"labelExpr\": {\n          \"description\": \"[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\\n\\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the header's backing `datum` object.\",\n          \"type\": \"string\"\n        },\n        \"labelFont\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The font of the header label.\"\n        },\n        \"labelFontSize\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The font size of the header label, in pixels.\",\n          \"minimum\": 0\n        },\n        \"labelFontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The font style of the header label.\"\n        },\n        \"labelFontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The font weight of the header label.\"\n        },\n        \"labelLimit\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\\n\\n__Default value:__ `0`, indicating no limit\"\n        },\n        \"labelLineHeight\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Line height in pixels for multi-line header labels or title text with `\\\"line-top\\\"` or `\\\"line-bottom\\\"` baseline.\"\n        },\n        \"labelOrient\": {\n          \"$ref\": \"#/definitions/Orient\",\n          \"description\": \"The orientation of the header label. One of `\\\"top\\\"`, `\\\"bottom\\\"`, `\\\"left\\\"` or `\\\"right\\\"`.\"\n        },\n        \"labelPadding\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The padding, in pixel, between facet header's label and the plot.\\n\\n__Default value:__ `10`\"\n        },\n        \"labels\": {\n          \"description\": \"A boolean flag indicating if labels should be included as part of the header.\\n\\n__Default value:__ `true`.\",\n          \"type\": \"boolean\"\n        },\n        \"orient\": {\n          \"$ref\": \"#/definitions/Orient\",\n          \"description\": \"Shortcut for setting both labelOrient and titleOrient.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"titleAlign\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Horizontal text alignment (to the anchor) of header titles.\"\n        },\n        \"titleAnchor\": {\n          \"$ref\": \"#/definitions/TitleAnchor\",\n          \"description\": \"The anchor position for placing the title. One of `\\\"start\\\"`, `\\\"middle\\\"`, or `\\\"end\\\"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.\"\n        },\n        \"titleAngle\": {\n          \"description\": \"The rotation angle of the header title.\\n\\n__Default value:__ `0`.\",\n          \"maximum\": 360,\n          \"minimum\": -360,\n          \"type\": \"number\"\n        },\n        \"titleBaseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The vertical text baseline for the header title. One of `\\\"alphabetic\\\"` (default), `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`, `\\\"line-top\\\"`, or `\\\"line-bottom\\\"`. The `\\\"line-top\\\"` and `\\\"line-bottom\\\"` values operate similarly to `\\\"top\\\"` and `\\\"bottom\\\"`, but are calculated relative to the `titleLineHeight` rather than `titleFontSize` alone.\\n\\n__Default value:__ `\\\"middle\\\"`\"\n        },\n        \"titleColor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Color of the header title, can be in hex color code or regular color name.\"\n        },\n        \"titleFont\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Font of the header title. (e.g., `\\\"Helvetica Neue\\\"`).\"\n        },\n        \"titleFontSize\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Font size of the header title.\",\n          \"minimum\": 0\n        },\n        \"titleFontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The font style of the header title.\"\n        },\n        \"titleFontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Font weight of the header title. This can be either a string (e.g `\\\"bold\\\"`, `\\\"normal\\\"`) or a number (`100`, `200`, `300`, ..., `900` where `\\\"normal\\\"` = `400` and `\\\"bold\\\"` = `700`).\"\n        },\n        \"titleLimit\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\\n\\n__Default value:__ `0`, indicating no limit\"\n        },\n        \"titleLineHeight\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Line height in pixels for multi-line header title text or title text with `\\\"line-top\\\"` or `\\\"line-bottom\\\"` baseline.\"\n        },\n        \"titleOrient\": {\n          \"$ref\": \"#/definitions/Orient\",\n          \"description\": \"The orientation of the header title. One of `\\\"top\\\"`, `\\\"bottom\\\"`, `\\\"left\\\"` or `\\\"right\\\"`.\"\n        },\n        \"titlePadding\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The padding, in pixel, between facet header's title and the label.\\n\\n__Default value:__ `10`\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"HeaderConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"format\": {\n          \"$ref\": \"#/definitions/Format\",\n          \"description\": \"The text format specifier for formatting number and date/time in labels of guides (axes, legends, headers) and text marks.\\n\\nIf the format type is `\\\"number\\\"` (e.g., for quantitative fields), this is a D3's [number format pattern string](https://github.com/d3/d3-format#locale_format).\\n\\nIf the format type is `\\\"time\\\"` (e.g., for temporal fields), this is either:   a) D3's [time format pattern](https://d3js.org/d3-time-format#locale_format) if you desire to set a static time format.\\n\\n  b) [dynamic time format specifier object](https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format) if you desire to set a dynamic time format that uses different formats depending on the granularity of the input date (e.g., if the date lies on a year, month, date, hour, etc. boundary).\\n\\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\\n\\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.\"\n        },\n        \"formatType\": {\n          \"description\": \"The format type for labels. One of `\\\"number\\\"`, `\\\"time\\\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\\n\\n__Default value:__\\n- `\\\"time\\\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\\n- `\\\"number\\\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.\",\n          \"type\": \"string\"\n        },\n        \"labelAlign\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Horizontal text alignment of header labels. One of `\\\"left\\\"`, `\\\"center\\\"`, or `\\\"right\\\"`.\"\n        },\n        \"labelAnchor\": {\n          \"$ref\": \"#/definitions/TitleAnchor\",\n          \"description\": \"The anchor position for placing the labels. One of `\\\"start\\\"`, `\\\"middle\\\"`, or `\\\"end\\\"`. For example, with a label orientation of top these anchor positions map to a left-, center-, or right-aligned label.\"\n        },\n        \"labelAngle\": {\n          \"description\": \"The rotation angle of the header labels.\\n\\n__Default value:__ `0` for column header, `-90` for row header.\",\n          \"maximum\": 360,\n          \"minimum\": -360,\n          \"type\": \"number\"\n        },\n        \"labelBaseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The vertical text baseline for the header labels. One of `\\\"alphabetic\\\"` (default), `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`, `\\\"line-top\\\"`, or `\\\"line-bottom\\\"`. The `\\\"line-top\\\"` and `\\\"line-bottom\\\"` values operate similarly to `\\\"top\\\"` and `\\\"bottom\\\"`, but are calculated relative to the `titleLineHeight` rather than `titleFontSize` alone.\"\n        },\n        \"labelColor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The color of the header label, can be in hex color code or regular color name.\"\n        },\n        \"labelExpr\": {\n          \"description\": \"[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\\n\\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the header's backing `datum` object.\",\n          \"type\": \"string\"\n        },\n        \"labelFont\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The font of the header label.\"\n        },\n        \"labelFontSize\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The font size of the header label, in pixels.\",\n          \"minimum\": 0\n        },\n        \"labelFontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The font style of the header label.\"\n        },\n        \"labelFontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The font weight of the header label.\"\n        },\n        \"labelLimit\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\\n\\n__Default value:__ `0`, indicating no limit\"\n        },\n        \"labelLineHeight\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Line height in pixels for multi-line header labels or title text with `\\\"line-top\\\"` or `\\\"line-bottom\\\"` baseline.\"\n        },\n        \"labelOrient\": {\n          \"$ref\": \"#/definitions/Orient\",\n          \"description\": \"The orientation of the header label. One of `\\\"top\\\"`, `\\\"bottom\\\"`, `\\\"left\\\"` or `\\\"right\\\"`.\"\n        },\n        \"labelPadding\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The padding, in pixel, between facet header's label and the plot.\\n\\n__Default value:__ `10`\"\n        },\n        \"labels\": {\n          \"description\": \"A boolean flag indicating if labels should be included as part of the header.\\n\\n__Default value:__ `true`.\",\n          \"type\": \"boolean\"\n        },\n        \"orient\": {\n          \"$ref\": \"#/definitions/Orient\",\n          \"description\": \"Shortcut for setting both labelOrient and titleOrient.\"\n        },\n        \"title\": {\n          \"description\": \"Set to null to disable title for the axis, legend, or header.\",\n          \"type\": \"null\"\n        },\n        \"titleAlign\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Horizontal text alignment (to the anchor) of header titles.\"\n        },\n        \"titleAnchor\": {\n          \"$ref\": \"#/definitions/TitleAnchor\",\n          \"description\": \"The anchor position for placing the title. One of `\\\"start\\\"`, `\\\"middle\\\"`, or `\\\"end\\\"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.\"\n        },\n        \"titleAngle\": {\n          \"description\": \"The rotation angle of the header title.\\n\\n__Default value:__ `0`.\",\n          \"maximum\": 360,\n          \"minimum\": -360,\n          \"type\": \"number\"\n        },\n        \"titleBaseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The vertical text baseline for the header title. One of `\\\"alphabetic\\\"` (default), `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`, `\\\"line-top\\\"`, or `\\\"line-bottom\\\"`. The `\\\"line-top\\\"` and `\\\"line-bottom\\\"` values operate similarly to `\\\"top\\\"` and `\\\"bottom\\\"`, but are calculated relative to the `titleLineHeight` rather than `titleFontSize` alone.\\n\\n__Default value:__ `\\\"middle\\\"`\"\n        },\n        \"titleColor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Color of the header title, can be in hex color code or regular color name.\"\n        },\n        \"titleFont\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Font of the header title. (e.g., `\\\"Helvetica Neue\\\"`).\"\n        },\n        \"titleFontSize\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Font size of the header title.\",\n          \"minimum\": 0\n        },\n        \"titleFontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The font style of the header title.\"\n        },\n        \"titleFontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Font weight of the header title. This can be either a string (e.g `\\\"bold\\\"`, `\\\"normal\\\"`) or a number (`100`, `200`, `300`, ..., `900` where `\\\"normal\\\"` = `400` and `\\\"bold\\\"` = `700`).\"\n        },\n        \"titleLimit\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\\n\\n__Default value:__ `0`, indicating no limit\"\n        },\n        \"titleLineHeight\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Line height in pixels for multi-line header title text or title text with `\\\"line-top\\\"` or `\\\"line-bottom\\\"` baseline.\"\n        },\n        \"titleOrient\": {\n          \"$ref\": \"#/definitions/Orient\",\n          \"description\": \"The orientation of the header title. One of `\\\"top\\\"`, `\\\"bottom\\\"`, `\\\"left\\\"` or `\\\"right\\\"`.\"\n        },\n        \"titlePadding\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The padding, in pixel, between facet header's title and the label.\\n\\n__Default value:__ `10`\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"HexColor\": {\n      \"format\": \"color-hex\",\n      \"type\": \"string\"\n    },\n    \"ImputeMethod\": {\n      \"enum\": [\n        \"value\",\n        \"median\",\n        \"max\",\n        \"min\",\n        \"mean\"\n      ],\n      \"type\": \"string\"\n    },\n    \"ImputeParams\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"frame\": {\n          \"description\": \"A frame specification as a two-element array used to control the window over which the specified method is applied. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. For example, the value `[-5, 5]` indicates that the window should include five objects preceding and five objects following the current object.\\n\\n__Default value:__:  `[null, null]` indicating that the window includes all objects.\",\n          \"items\": {\n            \"type\": [\n              \"null\",\n              \"number\"\n            ]\n          },\n          \"maxItems\": 2,\n          \"minItems\": 2,\n          \"type\": \"array\"\n        },\n        \"keyvals\": {\n          \"anyOf\": [\n            {\n              \"items\": {},\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ImputeSequence\"\n            }\n          ],\n          \"description\": \"Defines the key values that should be considered for imputation. An array of key values or an object defining a [number sequence](https://vega.github.io/vega-lite/docs/impute.html#sequence-def).\\n\\nIf provided, this will be used in addition to the key values observed within the input data. If not provided, the values will be derived from all unique values of the `key` field. For `impute` in `encoding`, the key field is the x-field if the y-field is imputed, or vice versa.\\n\\nIf there is no impute grouping, this property _must_ be specified.\"\n        },\n        \"method\": {\n          \"$ref\": \"#/definitions/ImputeMethod\",\n          \"description\": \"The imputation method to use for the field value of imputed data objects. One of `\\\"value\\\"`, `\\\"mean\\\"`, `\\\"median\\\"`, `\\\"max\\\"` or `\\\"min\\\"`.\\n\\n__Default value:__  `\\\"value\\\"`\"\n        },\n        \"value\": {\n          \"description\": \"The field value to use when the imputation `method` is `\\\"value\\\"`.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ImputeSequence\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"start\": {\n          \"description\": \"The starting value of the sequence. __Default value:__ `0`\",\n          \"type\": \"number\"\n        },\n        \"step\": {\n          \"description\": \"The step value between sequence entries. __Default value:__ `1` or `-1` if `stop < start`\",\n          \"type\": \"number\"\n        },\n        \"stop\": {\n          \"description\": \"The ending value(exclusive) of the sequence.\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"stop\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ImputeTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"frame\": {\n          \"description\": \"A frame specification as a two-element array used to control the window over which the specified method is applied. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. For example, the value `[-5, 5]` indicates that the window should include five objects preceding and five objects following the current object.\\n\\n__Default value:__:  `[null, null]` indicating that the window includes all objects.\",\n          \"items\": {\n            \"type\": [\n              \"null\",\n              \"number\"\n            ]\n          },\n          \"maxItems\": 2,\n          \"minItems\": 2,\n          \"type\": \"array\"\n        },\n        \"groupby\": {\n          \"description\": \"An optional array of fields by which to group the values. Imputation will then be performed on a per-group basis.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        },\n        \"impute\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The data field for which the missing values should be imputed.\"\n        },\n        \"key\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"A key field that uniquely identifies data objects within a group. Missing key values (those occurring in the data but not in the current group) will be imputed.\"\n        },\n        \"keyvals\": {\n          \"anyOf\": [\n            {\n              \"items\": {},\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ImputeSequence\"\n            }\n          ],\n          \"description\": \"Defines the key values that should be considered for imputation. An array of key values or an object defining a [number sequence](https://vega.github.io/vega-lite/docs/impute.html#sequence-def).\\n\\nIf provided, this will be used in addition to the key values observed within the input data. If not provided, the values will be derived from all unique values of the `key` field. For `impute` in `encoding`, the key field is the x-field if the y-field is imputed, or vice versa.\\n\\nIf there is no impute grouping, this property _must_ be specified.\"\n        },\n        \"method\": {\n          \"$ref\": \"#/definitions/ImputeMethod\",\n          \"description\": \"The imputation method to use for the field value of imputed data objects. One of `\\\"value\\\"`, `\\\"mean\\\"`, `\\\"median\\\"`, `\\\"max\\\"` or `\\\"min\\\"`.\\n\\n__Default value:__  `\\\"value\\\"`\"\n        },\n        \"value\": {\n          \"description\": \"The field value to use when the imputation `method` is `\\\"value\\\"`.\"\n        }\n      },\n      \"required\": [\n        \"impute\",\n        \"key\"\n      ],\n      \"type\": \"object\"\n    },\n    \"InlineData\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"format\": {\n          \"$ref\": \"#/definitions/DataFormat\",\n          \"description\": \"An object that specifies the format for parsing the data.\"\n        },\n        \"name\": {\n          \"description\": \"Provide a placeholder name and bind data at runtime.\",\n          \"type\": \"string\"\n        },\n        \"values\": {\n          \"$ref\": \"#/definitions/InlineDataset\",\n          \"description\": \"The full data set, included inline. This can be an array of objects or primitive values, an object, or a string. Arrays of primitive values are ingested as objects with a `data` property. Strings are parsed according to the specified format type.\"\n        }\n      },\n      \"required\": [\n        \"values\"\n      ],\n      \"type\": \"object\"\n    },\n    \"InlineDataset\": {\n      \"anyOf\": [\n        {\n          \"items\": {\n            \"type\": \"number\"\n          },\n          \"type\": \"array\"\n        },\n        {\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"type\": \"array\"\n        },\n        {\n          \"items\": {\n            \"type\": \"boolean\"\n          },\n          \"type\": \"array\"\n        },\n        {\n          \"items\": {\n            \"type\": \"object\"\n          },\n          \"type\": \"array\"\n        },\n        {\n          \"type\": \"string\"\n        },\n        {\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"Interpolate\": {\n      \"enum\": [\n        \"basis\",\n        \"basis-open\",\n        \"basis-closed\",\n        \"bundle\",\n        \"cardinal\",\n        \"cardinal-open\",\n        \"cardinal-closed\",\n        \"catmull-rom\",\n        \"linear\",\n        \"linear-closed\",\n        \"monotone\",\n        \"natural\",\n        \"step\",\n        \"step-before\",\n        \"step-after\"\n      ],\n      \"type\": \"string\"\n    },\n    \"IntervalSelectionConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"clear\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Stream\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"boolean\"\n            }\n          ],\n          \"description\": \"Clears the selection, emptying it of all values. This property can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable clear.\\n\\n__Default value:__ `dblclick`.\\n\\n__See also:__ [`clear` examples ](https://vega.github.io/vega-lite/docs/selection.html#clear) in the documentation.\"\n        },\n        \"encodings\": {\n          \"description\": \"An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\\n\\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/SingleDefUnitChannel\"\n          },\n          \"type\": \"array\"\n        },\n        \"fields\": {\n          \"description\": \"An array of field names whose values must match for a data tuple to fall within the selection.\\n\\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        },\n        \"mark\": {\n          \"$ref\": \"#/definitions/BrushConfig\",\n          \"description\": \"An interval selection also adds a rectangle mark to depict the extents of the interval. The `mark` property can be used to customize the appearance of the mark.\\n\\n__See also:__ [`mark` examples](https://vega.github.io/vega-lite/docs/selection.html#mark) in the documentation.\"\n        },\n        \"on\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Stream\"\n            },\n            {\n              \"type\": \"string\"\n            }\n          ],\n          \"description\": \"A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters).\\n\\n__See also:__ [`on` examples](https://vega.github.io/vega-lite/docs/selection.html#on) in the documentation.\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/SelectionResolution\",\n          \"description\": \"With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\\n\\nOne of:\\n- `\\\"global\\\"` -- only one brush exists for the entire SPLOM. When the user begins to drag, any previous brushes are cleared, and a new one is constructed.\\n- `\\\"union\\\"` -- each cell contains its own brush, and points are highlighted if they lie within _any_ of these individual brushes.\\n- `\\\"intersect\\\"` -- each cell contains its own brush, and points are highlighted only if they fall within _all_ of these individual brushes.\\n\\n__Default value:__ `global`.\\n\\n__See also:__ [`resolve` examples](https://vega.github.io/vega-lite/docs/selection.html#resolve) in the documentation.\"\n        },\n        \"translate\": {\n          \"description\": \"When truthy, allows a user to interactively move an interval selection back-and-forth. Can be `true`, `false` (to disable panning), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) which must include a start and end event to trigger continuous panning. Discrete panning (e.g., pressing the left/right arrow keys) will be supported in future versions.\\n\\n__Default value:__ `true`, which corresponds to `[pointerdown, window:pointerup] > window:pointermove!`. This default allows users to clicks and drags within an interval selection to reposition it.\\n\\n__See also:__ [`translate` examples](https://vega.github.io/vega-lite/docs/selection.html#translate) in the documentation.\",\n          \"type\": [\n            \"string\",\n            \"boolean\"\n          ]\n        },\n        \"type\": {\n          \"const\": \"interval\",\n          \"description\": \"Determines the default event processing and data query for the selection. Vega-Lite currently supports two selection types:\\n\\n- `\\\"point\\\"` -- to select multiple discrete data values; the first value is selected on `click` and additional values toggled on shift-click.\\n- `\\\"interval\\\"` -- to select a continuous range of data values on `drag`.\",\n          \"type\": \"string\"\n        },\n        \"zoom\": {\n          \"description\": \"When truthy, allows a user to interactively resize an interval selection. Can be `true`, `false` (to disable zooming), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/). Currently, only `wheel` events are supported, but custom event streams can still be used to specify filters, debouncing, and throttling. Future versions will expand the set of events that can trigger this transformation.\\n\\n__Default value:__ `true`, which corresponds to `wheel!`. This default allows users to use the mouse wheel to resize an interval selection.\\n\\n__See also:__ [`zoom` examples](https://vega.github.io/vega-lite/docs/selection.html#zoom) in the documentation.\",\n          \"type\": [\n            \"string\",\n            \"boolean\"\n          ]\n        }\n      },\n      \"required\": [\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"IntervalSelectionConfigWithoutType\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"clear\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Stream\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"boolean\"\n            }\n          ],\n          \"description\": \"Clears the selection, emptying it of all values. This property can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable clear.\\n\\n__Default value:__ `dblclick`.\\n\\n__See also:__ [`clear` examples ](https://vega.github.io/vega-lite/docs/selection.html#clear) in the documentation.\"\n        },\n        \"encodings\": {\n          \"description\": \"An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\\n\\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/SingleDefUnitChannel\"\n          },\n          \"type\": \"array\"\n        },\n        \"fields\": {\n          \"description\": \"An array of field names whose values must match for a data tuple to fall within the selection.\\n\\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        },\n        \"mark\": {\n          \"$ref\": \"#/definitions/BrushConfig\",\n          \"description\": \"An interval selection also adds a rectangle mark to depict the extents of the interval. The `mark` property can be used to customize the appearance of the mark.\\n\\n__See also:__ [`mark` examples](https://vega.github.io/vega-lite/docs/selection.html#mark) in the documentation.\"\n        },\n        \"on\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Stream\"\n            },\n            {\n              \"type\": \"string\"\n            }\n          ],\n          \"description\": \"A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters).\\n\\n__See also:__ [`on` examples](https://vega.github.io/vega-lite/docs/selection.html#on) in the documentation.\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/SelectionResolution\",\n          \"description\": \"With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\\n\\nOne of:\\n- `\\\"global\\\"` -- only one brush exists for the entire SPLOM. When the user begins to drag, any previous brushes are cleared, and a new one is constructed.\\n- `\\\"union\\\"` -- each cell contains its own brush, and points are highlighted if they lie within _any_ of these individual brushes.\\n- `\\\"intersect\\\"` -- each cell contains its own brush, and points are highlighted only if they fall within _all_ of these individual brushes.\\n\\n__Default value:__ `global`.\\n\\n__See also:__ [`resolve` examples](https://vega.github.io/vega-lite/docs/selection.html#resolve) in the documentation.\"\n        },\n        \"translate\": {\n          \"description\": \"When truthy, allows a user to interactively move an interval selection back-and-forth. Can be `true`, `false` (to disable panning), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) which must include a start and end event to trigger continuous panning. Discrete panning (e.g., pressing the left/right arrow keys) will be supported in future versions.\\n\\n__Default value:__ `true`, which corresponds to `[pointerdown, window:pointerup] > window:pointermove!`. This default allows users to clicks and drags within an interval selection to reposition it.\\n\\n__See also:__ [`translate` examples](https://vega.github.io/vega-lite/docs/selection.html#translate) in the documentation.\",\n          \"type\": [\n            \"string\",\n            \"boolean\"\n          ]\n        },\n        \"zoom\": {\n          \"description\": \"When truthy, allows a user to interactively resize an interval selection. Can be `true`, `false` (to disable zooming), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/). Currently, only `wheel` events are supported, but custom event streams can still be used to specify filters, debouncing, and throttling. Future versions will expand the set of events that can trigger this transformation.\\n\\n__Default value:__ `true`, which corresponds to `wheel!`. This default allows users to use the mouse wheel to resize an interval selection.\\n\\n__See also:__ [`zoom` examples](https://vega.github.io/vega-lite/docs/selection.html#zoom) in the documentation.\",\n          \"type\": [\n            \"string\",\n            \"boolean\"\n          ]\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"JoinAggregateFieldDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"as\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The output name for the join aggregate operation.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The data field for which to compute the aggregate function. This can be omitted for functions that do not operate over a field such as `\\\"count\\\"`.\"\n        },\n        \"op\": {\n          \"$ref\": \"#/definitions/AggregateOp\",\n          \"description\": \"The aggregation operation to apply (e.g., `\\\"sum\\\"`, `\\\"average\\\"` or `\\\"count\\\"`). See the list of all supported operations [here](https://vega.github.io/vega-lite/docs/aggregate.html#ops).\"\n        }\n      },\n      \"required\": [\n        \"op\",\n        \"as\"\n      ],\n      \"type\": \"object\"\n    },\n    \"JoinAggregateTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"groupby\": {\n          \"description\": \"The data fields for partitioning the data objects into separate groups. If unspecified, all data points will be in a single group.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        },\n        \"joinaggregate\": {\n          \"description\": \"The definition of the fields in the join aggregate, and what calculations to use.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/JoinAggregateFieldDef\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"joinaggregate\"\n      ],\n      \"type\": \"object\"\n    },\n    \"JsonDataFormat\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"parse\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Parse\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"If set to `null`, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\\\"number\\\"`, `\\\"boolean\\\"`, `\\\"date\\\"`, or null (do not parse the field)). For example, `\\\"parse\\\": {\\\"modified_on\\\": \\\"date\\\"}` parses the `modified_on` field in each input record a Date value.\\n\\nFor `\\\"date\\\"`, we parse data based using JavaScript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). For Specific date formats can be provided (e.g., `{foo: \\\"date:'%m%d%Y'\\\"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: \\\"utc:'%m%d%Y'\\\"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)\"\n        },\n        \"property\": {\n          \"description\": \"The JSON property containing the desired data. This parameter can be used when the loaded JSON file may have surrounding structure or meta-data. For example `\\\"property\\\": \\\"values.features\\\"` is equivalent to retrieving `json.values.features` from the loaded JSON object.\",\n          \"type\": \"string\"\n        },\n        \"type\": {\n          \"const\": \"json\",\n          \"description\": \"Type of input data: `\\\"json\\\"`, `\\\"csv\\\"`, `\\\"tsv\\\"`, `\\\"dsv\\\"`.\\n\\n__Default value:__  The default format type is determined by the extension of the file URL. If no extension is detected, `\\\"json\\\"` will be used by default.\",\n          \"type\": \"string\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"LabelOverlap\": {\n      \"anyOf\": [\n        {\n          \"type\": \"boolean\"\n        },\n        {\n          \"const\": \"parity\",\n          \"type\": \"string\"\n        },\n        {\n          \"const\": \"greedy\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"LatLongDef\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/LatLongFieldDef\"\n        },\n        {\n          \"$ref\": \"#/definitions/DatumDef\"\n        }\n      ]\n    },\n    \"LatLongFieldDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\",\n          \"type\": \"null\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"const\": \"quantitative\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\",\n          \"type\": \"string\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"LayerRepeatMapping\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"column\": {\n          \"description\": \"An array of fields to be repeated horizontally.\",\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"type\": \"array\"\n        },\n        \"layer\": {\n          \"description\": \"An array of fields to be repeated as layers.\",\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"type\": \"array\"\n        },\n        \"row\": {\n          \"description\": \"An array of fields to be repeated vertically.\",\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"layer\"\n      ],\n      \"type\": \"object\"\n    },\n    \"LayerRepeatSpec\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LayoutAlign\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<LayoutAlign>\"\n            }\n          ],\n          \"description\": \"The alignment to apply to grid rows and columns. The supported string values are `\\\"all\\\"`, `\\\"each\\\"`, and `\\\"none\\\"`.\\n\\n- For `\\\"none\\\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\\n- For `\\\"each\\\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\\n- For `\\\"all\\\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\\n\\nAlternatively, an object value of the form `{\\\"row\\\": string, \\\"column\\\": string}` can be used to supply different alignments for rows and columns.\\n\\n__Default value:__ `\\\"all\\\"`.\"\n        },\n        \"bounds\": {\n          \"description\": \"The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\\n\\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\\n\\n__Default value:__ `\\\"full\\\"`\",\n          \"enum\": [\n            \"full\",\n            \"flush\"\n          ],\n          \"type\": \"string\"\n        },\n        \"center\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<boolean>\"\n            }\n          ],\n          \"description\": \"Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\\n\\nAn object value of the form `{\\\"row\\\": boolean, \\\"column\\\": boolean}` can be used to supply different centering values for rows and columns.\\n\\n__Default value:__ `false`\"\n        },\n        \"columns\": {\n          \"description\": \"The number of columns to include in the view composition layout.\\n\\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\\n\\n__Note__:\\n\\n1) This property is only for:\\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\\n\\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).\",\n          \"type\": \"number\"\n        },\n        \"data\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Data\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n        },\n        \"description\": {\n          \"description\": \"Description of this mark for commenting purpose.\",\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"description\": \"Name of the visualization for later reference.\",\n          \"type\": \"string\"\n        },\n        \"repeat\": {\n          \"$ref\": \"#/definitions/LayerRepeatMapping\",\n          \"description\": \"Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If `\\\"repeat\\\"` is an array, the field can be referred to as `{\\\"repeat\\\": \\\"repeat\\\"}`. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps `\\\"row\\\"` and/or `\\\"column\\\"` to the listed fields to be repeated along the particular orientations. The objects `{\\\"repeat\\\": \\\"row\\\"}` and `{\\\"repeat\\\": \\\"column\\\"}` can be used to refer to the repeated field respectively.\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/Resolve\",\n          \"description\": \"Scale, axis, and legend resolutions for view composition specifications.\"\n        },\n        \"spacing\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<number>\"\n            }\n          ],\n          \"description\": \"The spacing in pixels between sub-views of the composition operator. An object of the form `{\\\"row\\\": number, \\\"column\\\": number}` can be used to set different spacing values for rows and columns.\\n\\n__Default value__: Depends on `\\\"spacing\\\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)\"\n        },\n        \"spec\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LayerSpec\"\n            },\n            {\n              \"$ref\": \"#/definitions/UnitSpecWithFrame\"\n            }\n          ],\n          \"description\": \"A specification of the view that gets repeated.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/TitleParams\"\n            }\n          ],\n          \"description\": \"Title for the plot.\"\n        },\n        \"transform\": {\n          \"description\": \"An array of data transformations such as filter and new field calculation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Transform\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"repeat\",\n        \"spec\"\n      ],\n      \"type\": \"object\"\n    },\n    \"LayerSpec\": {\n      \"additionalProperties\": false,\n      \"description\": \"A full layered plot specification, which may contains `encoding` and `projection` properties that will be applied to underlying unit (single-view) specifications.\",\n      \"properties\": {\n        \"data\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Data\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n        },\n        \"description\": {\n          \"description\": \"Description of this mark for commenting purpose.\",\n          \"type\": \"string\"\n        },\n        \"encoding\": {\n          \"$ref\": \"#/definitions/SharedEncoding\",\n          \"description\": \"A shared key-value mapping between encoding channels and definition of fields in the underlying layers.\"\n        },\n        \"height\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"container\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/Step\"\n            }\n          ],\n          \"description\": \"The height of a visualization.\\n\\n- For a plot with a continuous y-field, height should be a number.\\n- For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.)\\n- To enable responsive sizing on height, it should be set to `\\\"container\\\"`.\\n\\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\\n\\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `\\\"container\\\"` option cannot be used.\\n\\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation.\"\n        },\n        \"layer\": {\n          \"description\": \"Layer or single view specifications to be layered.\\n\\n__Note__: Specifications inside `layer` cannot use `row` and `column` channels as layering facet specifications is not allowed. Instead, use the [facet operator](https://vega.github.io/vega-lite/docs/facet.html) and place a layer inside a facet.\",\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/definitions/LayerSpec\"\n              },\n              {\n                \"$ref\": \"#/definitions/UnitSpec\"\n              }\n            ]\n          },\n          \"type\": \"array\"\n        },\n        \"name\": {\n          \"description\": \"Name of the visualization for later reference.\",\n          \"type\": \"string\"\n        },\n        \"projection\": {\n          \"$ref\": \"#/definitions/Projection\",\n          \"description\": \"An object defining properties of the geographic projection shared by underlying layers.\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/Resolve\",\n          \"description\": \"Scale, axis, and legend resolutions for view composition specifications.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/TitleParams\"\n            }\n          ],\n          \"description\": \"Title for the plot.\"\n        },\n        \"transform\": {\n          \"description\": \"An array of data transformations such as filter and new field calculation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Transform\"\n          },\n          \"type\": \"array\"\n        },\n        \"view\": {\n          \"$ref\": \"#/definitions/ViewBackground\",\n          \"description\": \"An object defining the view background's fill and stroke.\\n\\n__Default value:__ none (transparent)\"\n        },\n        \"width\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"container\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/Step\"\n            }\n          ],\n          \"description\": \"The width of a visualization.\\n\\n- For a plot with a continuous x-field, width should be a number.\\n- For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.)\\n- To enable responsive sizing on width, it should be set to `\\\"container\\\"`.\\n\\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\\n\\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `\\\"container\\\"` option cannot be used.\\n\\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation.\"\n        }\n      },\n      \"required\": [\n        \"layer\"\n      ],\n      \"type\": \"object\"\n    },\n    \"LayoutAlign\": {\n      \"enum\": [\n        \"all\",\n        \"each\",\n        \"none\"\n      ],\n      \"type\": \"string\"\n    },\n    \"Legend\": {\n      \"additionalProperties\": false,\n      \"description\": \"Properties of a legend or boolean flag for determining whether to show it.\",\n      \"properties\": {\n        \"aria\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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 group, removing the legend from the ARIA accessibility tree.\\n\\n__Default value:__ `true`\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"clipHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The height in pixels to clip symbol legend entries and limit their size.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"columnPadding\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The horizontal padding in pixels between symbol legend entries.\\n\\n__Default value:__ `10`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"columns\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The number of columns in which to arrange symbol legend entries. A value of `0` or lower indicates a single row with one column per entry.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadius\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Corner radius for the full legend.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"description\": {\n          \"anyOf\": [\n            {\n              \"description\": \"A text description of this legend for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If the `aria` property is true, for SVG output the [\\\"aria-label\\\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute) will be set to this description. If the description is unspecified it will be automatically generated.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"direction\": {\n          \"$ref\": \"#/definitions/Orientation\",\n          \"description\": \"The direction of the legend, one of `\\\"vertical\\\"` or `\\\"horizontal\\\"`.\\n\\n__Default value:__\\n- For top-/bottom-`orient`ed legends, `\\\"horizontal\\\"`\\n- For left-/right-`orient`ed legends, `\\\"vertical\\\"`\\n- For top/bottom-left/right-`orient`ed legends, `\\\"horizontal\\\"` for gradient legends and `\\\"vertical\\\"` for symbol legends.\"\n        },\n        \"fillColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Background fill color for the full legend.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"format\": {\n          \"$ref\": \"#/definitions/Format\",\n          \"description\": \"The text format specifier for formatting number and date/time in labels of guides (axes, legends, headers) and text marks.\\n\\nIf the format type is `\\\"number\\\"` (e.g., for quantitative fields), this is a D3's [number format pattern string](https://github.com/d3/d3-format#locale_format).\\n\\nIf the format type is `\\\"time\\\"` (e.g., for temporal fields), this is either:   a) D3's [time format pattern](https://d3js.org/d3-time-format#locale_format) if you desire to set a static time format.\\n\\n  b) [dynamic time format specifier object](https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format) if you desire to set a dynamic time format that uses different formats depending on the granularity of the input date (e.g., if the date lies on a year, month, date, hour, etc. boundary).\\n\\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\\n\\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.\"\n        },\n        \"formatType\": {\n          \"description\": \"The format type for labels. One of `\\\"number\\\"`, `\\\"time\\\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\\n\\n__Default value:__\\n- `\\\"time\\\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\\n- `\\\"number\\\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.\",\n          \"type\": \"string\"\n        },\n        \"gradientLength\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The length in pixels of the primary axis of a color gradient. This value corresponds to the height of a vertical gradient or the width of a horizontal gradient.\\n\\n__Default value:__ `200`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"gradientOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Opacity of the color gradient.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"gradientStrokeColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"The color of the gradient stroke, can be in hex color code or regular color name.\\n\\n__Default value:__ `\\\"lightGray\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"gradientStrokeWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The width of the gradient stroke, in pixels.\\n\\n__Default value:__ `0`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"gradientThickness\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The thickness in pixels of the color gradient. This value corresponds to the width of a vertical gradient or the height of a horizontal gradient.\\n\\n__Default value:__ `16`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"gridAlign\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LayoutAlign\",\n              \"description\": \"The alignment to apply to symbol legends rows and columns. The supported string values are `\\\"all\\\"`, `\\\"each\\\"` (the default), and `none`. For more information, see the [grid layout documentation](https://vega.github.io/vega/docs/layout).\\n\\n__Default value:__ `\\\"each\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelAlign\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\",\n              \"description\": \"The alignment of the legend label, can be left, center, or right.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelBaseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\",\n              \"description\": \"The position of the baseline of legend label, can be `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`, or `\\\"alphabetic\\\"`.\\n\\n__Default value:__ `\\\"middle\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"The color of the legend label, can be in hex color code or regular color name.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelExpr\": {\n          \"description\": \"[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\\n\\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the legend's backing `datum` object.\",\n          \"type\": \"string\"\n        },\n        \"labelFont\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font of the legend label.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelFontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font size of legend label.\\n\\n__Default value:__ `10`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelFontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"The font style of legend label.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelFontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"The font weight of legend label.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Maximum allowed pixel width of legend tick labels.\\n\\n__Default value:__ `160`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The offset of the legend label.\\n\\n__Default value:__ `4`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Opacity of labels.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelOverlap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LabelOverlap\",\n              \"description\": \"The strategy to use for resolving overlap of labels in gradient legends. If `false`, no overlap reduction is attempted. If set to `true` (default) or `\\\"parity\\\"`, a strategy of removing every other label is used. If set to `\\\"greedy\\\"`, a linear scan of the labels is performed, removing any label that overlaps with the last visible label (this often works better for log-scaled axes).\\n\\n__Default value:__ `true`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelPadding\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Padding in pixels between the legend and legend labels.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelSeparation\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"legendX\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Custom x-position for legend with orient \\\"none\\\".\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"legendY\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Custom y-position for legend with orient \\\"none\\\".\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"offset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The offset in pixels by which to displace the legend from the data rectangle and axes.\\n\\n__Default value:__ `18`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"orient\": {\n          \"$ref\": \"#/definitions/LegendOrient\",\n          \"description\": \"The orientation of the legend, which determines how the legend is positioned within the scene. One of `\\\"left\\\"`, `\\\"right\\\"`, `\\\"top\\\"`, `\\\"bottom\\\"`, `\\\"top-left\\\"`, `\\\"top-right\\\"`, `\\\"bottom-left\\\"`, `\\\"bottom-right\\\"`, `\\\"none\\\"`.\\n\\n__Default value:__ `\\\"right\\\"`\"\n        },\n        \"padding\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The padding between the border and content of the legend group.\\n\\n__Default value:__ `0`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"rowPadding\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The vertical padding in pixels between symbol legend entries.\\n\\n__Default value:__ `2`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Border stroke color for the full legend.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating [stroke, space] lengths for dashed symbol strokes.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The pixel offset at which to start drawing with the symbol stroke dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolFillColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"The color of the legend symbol,\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The maximum number of allowed entries for a symbol legend. Additional entries will be dropped.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Horizontal pixel offset for legend symbols.\\n\\n__Default value:__ `0`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Opacity of the legend symbols.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The size of the legend symbol, in pixels.\\n\\n__Default value:__ `100`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolStrokeColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Stroke color for legend symbols.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolStrokeWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The width of the symbol's stroke.\\n\\n__Default value:__ `1.5`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolType\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SymbolShape\",\n              \"description\": \"The symbol shape. One of the plotting shapes `circle` (default), `square`, `cross`, `diamond`, `triangle-up`, `triangle-down`, `triangle-right`, or `triangle-left`, the line symbol `stroke`, or one of the centered directional shapes `arrow`, `wedge`, or `triangle`. Alternatively, a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) can be provided. 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.\\n\\n__Default value:__ `\\\"circle\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"tickCount\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TickCount\",\n              \"description\": \"The desired number of tick values for quantitative legends.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"tickMinStep\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The minimum desired step between legend ticks, in terms of scale domain values. For example, a value of `1` indicates that ticks should not be less than 1 unit apart. If `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to enforce the minimum step value.\\n\\n__Default value__: `undefined`\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"titleAlign\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\",\n              \"description\": \"Horizontal text alignment for legend titles.\\n\\n__Default value:__ `\\\"left\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleAnchor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TitleAnchor\",\n              \"description\": \"Text anchor position for placing legend titles.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleBaseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\",\n              \"description\": \"Vertical text baseline for legend titles.  One of `\\\"alphabetic\\\"` (default), `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`, `\\\"line-top\\\"`, or `\\\"line-bottom\\\"`. The `\\\"line-top\\\"` and `\\\"line-bottom\\\"` values operate similarly to `\\\"top\\\"` and `\\\"bottom\\\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.\\n\\n__Default value:__ `\\\"top\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"The color of the legend title, can be in hex color code or regular color name.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleFont\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font of the legend title.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleFontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font size of the legend title.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleFontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"The font style of the legend title.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleFontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"The font weight of the legend title. This can be either a string (e.g `\\\"bold\\\"`, `\\\"normal\\\"`) or a number (`100`, `200`, `300`, ..., `900` where `\\\"normal\\\"` = `400` and `\\\"bold\\\"` = `700`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Maximum allowed pixel width of legend titles.\\n\\n__Default value:__ `180`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleLineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Line height in pixels for multi-line title text or title text with `\\\"line-top\\\"` or `\\\"line-bottom\\\"` baseline.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Opacity of the legend title.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleOrient\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Orient\",\n              \"description\": \"Orientation of the legend title.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titlePadding\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The padding, in pixels, between title and legend.\\n\\n__Default value:__ `5`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"type\": {\n          \"description\": \"The type of the legend. Use `\\\"symbol\\\"` to create a discrete legend and `\\\"gradient\\\"` for a continuous color gradient.\\n\\n__Default value:__ `\\\"gradient\\\"` for non-binned quantitative fields and temporal fields; `\\\"symbol\\\"` otherwise.\",\n          \"enum\": [\n            \"symbol\",\n            \"gradient\"\n          ],\n          \"type\": \"string\"\n        },\n        \"values\": {\n          \"anyOf\": [\n            {\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"items\": {\n                \"type\": \"string\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"items\": {\n                \"type\": \"boolean\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/DateTime\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Explicitly set the visible legend values.\"\n        },\n        \"zindex\": {\n          \"description\": \"A non-negative integer indicating the z-index of the legend. If zindex is 0, legend should be drawn behind all chart elements. To put them in front, use zindex = 1.\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"LegendBinding\": {\n      \"anyOf\": [\n        {\n          \"const\": \"legend\",\n          \"type\": \"string\"\n        },\n        {\n          \"$ref\": \"#/definitions/LegendStreamBinding\"\n        }\n      ]\n    },\n    \"LegendConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"aria\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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 group, removing the legend from the ARIA accessibility tree.\\n\\n__Default value:__ `true`\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"clipHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The height in pixels to clip symbol legend entries and limit their size.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"columnPadding\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The horizontal padding in pixels between symbol legend entries.\\n\\n__Default value:__ `10`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"columns\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The number of columns in which to arrange symbol legend entries. A value of `0` or lower indicates a single row with one column per entry.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadius\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Corner radius for the full legend.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"description\": {\n          \"anyOf\": [\n            {\n              \"description\": \"A text description of this legend for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If the `aria` property is true, for SVG output the [\\\"aria-label\\\" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute) will be set to this description. If the description is unspecified it will be automatically generated.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"direction\": {\n          \"$ref\": \"#/definitions/Orientation\",\n          \"description\": \"The direction of the legend, one of `\\\"vertical\\\"` or `\\\"horizontal\\\"`.\\n\\n__Default value:__\\n- For top-/bottom-`orient`ed legends, `\\\"horizontal\\\"`\\n- For left-/right-`orient`ed legends, `\\\"vertical\\\"`\\n- For top/bottom-left/right-`orient`ed legends, `\\\"horizontal\\\"` for gradient legends and `\\\"vertical\\\"` for symbol legends.\"\n        },\n        \"disable\": {\n          \"description\": \"Disable legend by default\",\n          \"type\": \"boolean\"\n        },\n        \"fillColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Background fill color for the full legend.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"gradientDirection\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Orientation\",\n              \"description\": \"The default direction (`\\\"horizontal\\\"` or `\\\"vertical\\\"`) for gradient legends.\\n\\n__Default value:__ `\\\"vertical\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"gradientHorizontalMaxLength\": {\n          \"description\": \"Max legend length for a horizontal gradient when `config.legend.gradientLength` is undefined.\\n\\n__Default value:__ `200`\",\n          \"type\": \"number\"\n        },\n        \"gradientHorizontalMinLength\": {\n          \"description\": \"Min legend length for a horizontal gradient when `config.legend.gradientLength` is undefined.\\n\\n__Default value:__ `100`\",\n          \"type\": \"number\"\n        },\n        \"gradientLabelLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The maximum allowed length in pixels of color ramp gradient labels.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"gradientLabelOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Vertical offset in pixels for color ramp gradient labels.\\n\\n__Default value:__ `2`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"gradientLength\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The length in pixels of the primary axis of a color gradient. This value corresponds to the height of a vertical gradient or the width of a horizontal gradient.\\n\\n__Default value:__ `200`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"gradientOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Opacity of the color gradient.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"gradientStrokeColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"The color of the gradient stroke, can be in hex color code or regular color name.\\n\\n__Default value:__ `\\\"lightGray\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"gradientStrokeWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The width of the gradient stroke, in pixels.\\n\\n__Default value:__ `0`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"gradientThickness\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The thickness in pixels of the color gradient. This value corresponds to the width of a vertical gradient or the height of a horizontal gradient.\\n\\n__Default value:__ `16`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"gradientVerticalMaxLength\": {\n          \"description\": \"Max legend length for a vertical gradient when `config.legend.gradientLength` is undefined.\\n\\n__Default value:__ `200`\",\n          \"type\": \"number\"\n        },\n        \"gradientVerticalMinLength\": {\n          \"description\": \"Min legend length for a vertical gradient when `config.legend.gradientLength` is undefined.\\n\\n__Default value:__ `100`\",\n          \"type\": \"number\"\n        },\n        \"gridAlign\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LayoutAlign\",\n              \"description\": \"The alignment to apply to symbol legends rows and columns. The supported string values are `\\\"all\\\"`, `\\\"each\\\"` (the default), and `none`. For more information, see the [grid layout documentation](https://vega.github.io/vega/docs/layout).\\n\\n__Default value:__ `\\\"each\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelAlign\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\",\n              \"description\": \"The alignment of the legend label, can be left, center, or right.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelBaseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\",\n              \"description\": \"The position of the baseline of legend label, can be `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`, or `\\\"alphabetic\\\"`.\\n\\n__Default value:__ `\\\"middle\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"The color of the legend label, can be in hex color code or regular color name.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelFont\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font of the legend label.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelFontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font size of legend label.\\n\\n__Default value:__ `10`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelFontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"The font style of legend label.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelFontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"The font weight of legend label.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Maximum allowed pixel width of legend tick labels.\\n\\n__Default value:__ `160`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The offset of the legend label.\\n\\n__Default value:__ `4`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Opacity of labels.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelOverlap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LabelOverlap\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The strategy to use for resolving overlap of labels in gradient legends. If `false`, no overlap reduction is attempted. If set to `true` or `\\\"parity\\\"`, a strategy of removing every other label is used. If set to `\\\"greedy\\\"`, a linear scan of the labels is performed, removing any label that overlaps with the last visible label (this often works better for log-scaled axes).\\n\\n__Default value:__ `\\\"greedy\\\"` for log scales otherwise `true`.\"\n        },\n        \"labelPadding\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Padding in pixels between the legend and legend labels.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"labelSeparation\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"layout\": {\n          \"$ref\": \"#/definitions/ExprRef\"\n        },\n        \"legendX\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Custom x-position for legend with orient \\\"none\\\".\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"legendY\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Custom y-position for legend with orient \\\"none\\\".\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"offset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The offset in pixels by which to displace the legend from the data rectangle and axes.\\n\\n__Default value:__ `18`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"orient\": {\n          \"$ref\": \"#/definitions/LegendOrient\",\n          \"description\": \"The orientation of the legend, which determines how the legend is positioned within the scene. One of `\\\"left\\\"`, `\\\"right\\\"`, `\\\"top\\\"`, `\\\"bottom\\\"`, `\\\"top-left\\\"`, `\\\"top-right\\\"`, `\\\"bottom-left\\\"`, `\\\"bottom-right\\\"`, `\\\"none\\\"`.\\n\\n__Default value:__ `\\\"right\\\"`\"\n        },\n        \"padding\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The padding between the border and content of the legend group.\\n\\n__Default value:__ `0`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"rowPadding\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The vertical padding in pixels between symbol legend entries.\\n\\n__Default value:__ `2`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Border stroke color for the full legend.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Border stroke dash pattern for the full legend.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Border stroke width for the full legend.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolBaseFillColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Default fill color for legend symbols. Only applied if there is no `\\\"fill\\\"` scale color encoding for the legend.\\n\\n__Default value:__ `\\\"transparent\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolBaseStrokeColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Default stroke color for legend symbols. Only applied if there is no `\\\"fill\\\"` scale color encoding for the legend.\\n\\n__Default value:__ `\\\"gray\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating [stroke, space] lengths for dashed symbol strokes.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The pixel offset at which to start drawing with the symbol stroke dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolDirection\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Orientation\",\n              \"description\": \"The default direction (`\\\"horizontal\\\"` or `\\\"vertical\\\"`) for symbol legends.\\n\\n__Default value:__ `\\\"vertical\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolFillColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"The color of the legend symbol,\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The maximum number of allowed entries for a symbol legend. Additional entries will be dropped.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Horizontal pixel offset for legend symbols.\\n\\n__Default value:__ `0`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Opacity of the legend symbols.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The size of the legend symbol, in pixels.\\n\\n__Default value:__ `100`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolStrokeColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Stroke color for legend symbols.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolStrokeWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The width of the symbol's stroke.\\n\\n__Default value:__ `1.5`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"symbolType\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SymbolShape\",\n              \"description\": \"The symbol shape. One of the plotting shapes `circle` (default), `square`, `cross`, `diamond`, `triangle-up`, `triangle-down`, `triangle-right`, or `triangle-left`, the line symbol `stroke`, or one of the centered directional shapes `arrow`, `wedge`, or `triangle`. Alternatively, a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) can be provided. 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.\\n\\n__Default value:__ `\\\"circle\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"tickCount\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TickCount\",\n              \"description\": \"The desired number of tick values for quantitative legends.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"title\": {\n          \"description\": \"Set to null to disable title for the axis, legend, or header.\",\n          \"type\": \"null\"\n        },\n        \"titleAlign\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\",\n              \"description\": \"Horizontal text alignment for legend titles.\\n\\n__Default value:__ `\\\"left\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleAnchor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TitleAnchor\",\n              \"description\": \"Text anchor position for placing legend titles.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleBaseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\",\n              \"description\": \"Vertical text baseline for legend titles.  One of `\\\"alphabetic\\\"` (default), `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`, `\\\"line-top\\\"`, or `\\\"line-bottom\\\"`. The `\\\"line-top\\\"` and `\\\"line-bottom\\\"` values operate similarly to `\\\"top\\\"` and `\\\"bottom\\\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.\\n\\n__Default value:__ `\\\"top\\\"`.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"The color of the legend title, can be in hex color code or regular color name.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleFont\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font of the legend title.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleFontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font size of the legend title.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleFontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"The font style of the legend title.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleFontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"The font weight of the legend title. This can be either a string (e.g `\\\"bold\\\"`, `\\\"normal\\\"`) or a number (`100`, `200`, `300`, ..., `900` where `\\\"normal\\\"` = `400` and `\\\"bold\\\"` = `700`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Maximum allowed pixel width of legend titles.\\n\\n__Default value:__ `180`.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleLineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Line height in pixels for multi-line title text or title text with `\\\"line-top\\\"` or `\\\"line-bottom\\\"` baseline.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Opacity of the legend title.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titleOrient\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Orient\",\n              \"description\": \"Orientation of the legend title.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"titlePadding\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The padding, in pixels, between title and legend.\\n\\n__Default value:__ `5`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"unselectedOpacity\": {\n          \"description\": \"The opacity of unselected legend entries.\\n\\n__Default value:__ 0.35.\",\n          \"type\": \"number\"\n        },\n        \"zindex\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The integer z-index indicating the layering of the legend group relative to other axis, mark, and legend groups.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"LegendOrient\": {\n      \"enum\": [\n        \"none\",\n        \"left\",\n        \"right\",\n        \"top\",\n        \"bottom\",\n        \"top-left\",\n        \"top-right\",\n        \"bottom-left\",\n        \"bottom-right\"\n      ],\n      \"type\": \"string\"\n    },\n    \"LegendResolveMap\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"angle\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"color\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"fill\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"fillOpacity\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"opacity\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"shape\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"size\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"stroke\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"strokeDash\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"strokeOpacity\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"strokeWidth\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"time\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"LegendStreamBinding\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"legend\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/Stream\"\n            }\n          ]\n        }\n      },\n      \"required\": [\n        \"legend\"\n      ],\n      \"type\": \"object\"\n    },\n    \"LineConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\\\"left\\\"`, `\\\"right\\\"`, `\\\"center\\\"`.\\n\\n__Note:__ Expression reference is *not* supported for range marks.\"\n        },\n        \"angle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The rotation angle of the text, in degrees.\",\n              \"maximum\": 360,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aria\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ariaRole\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ariaRoleDescription\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aspect\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Whether to keep aspect ratio of image marks.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"baseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"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.\\n\\nFor range marks, the vertical alignment of the marks. One of `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`.\\n\\n__Note:__ Expression reference is *not* supported for range marks.\"\n        },\n        \"blend\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Blend\",\n              \"description\": \"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.\\n\\n__Default value: `\\\"source-over\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"color\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default color.\\n\\n__Default value:__ <span style=\\\"color: #4682b4;\\\">&#9632;</span> `\\\"#4682b4\\\"`\\n\\n__Note:__\\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.\"\n        },\n        \"cornerRadius\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles or arcs' corners.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusBottomLeft\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' bottom left corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusBottomRight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' bottom right corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusTopLeft\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' top right corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusTopRight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' top left corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cursor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Cursor\",\n              \"description\": \"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.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"description\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dir\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextDirection\",\n              \"description\": \"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.\\n\\n__Default value:__ `\\\"ltr\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dx\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dy\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ellipsis\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The ellipsis string for text truncated in response to the limit parameter.\\n\\n__Default value:__ `\\\"…\\\"`\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"endAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fill\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\\n\\n__Default value:__ (None)\"\n        },\n        \"fillOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The fill opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"filled\": {\n          \"description\": \"Whether the mark's color should be used as fill color instead of stroke color.\\n\\n__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`.\\n\\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\",\n          \"type\": \"boolean\"\n        },\n        \"font\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The typeface to set the text in (e.g., `\\\"Helvetica Neue\\\"`).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font size, in pixels.\\n\\n__Default value:__ `11`\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"The font style (e.g., `\\\"italic\\\"`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"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`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"height\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Height of the marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"href\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/URI\",\n              \"description\": \"A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"innerRadius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"interpolate\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Interpolate\",\n              \"description\": \"The line interpolation method to use for line and area marks. One of the following:\\n- `\\\"linear\\\"`: piecewise linear segments, as in a polyline.\\n- `\\\"linear-closed\\\"`: close the linear segments to form a polygon.\\n- `\\\"step\\\"`: alternate between horizontal and vertical segments, as in a step function.\\n- `\\\"step-before\\\"`: alternate between vertical and horizontal segments, as in a step function.\\n- `\\\"step-after\\\"`: alternate between horizontal and vertical segments, as in a step function.\\n- `\\\"basis\\\"`: a B-spline, with control point duplication on the ends.\\n- `\\\"basis-open\\\"`: an open B-spline; may not intersect the start or end.\\n- `\\\"basis-closed\\\"`: a closed B-spline, as in a loop.\\n- `\\\"cardinal\\\"`: a Cardinal spline, with control point duplication on the ends.\\n- `\\\"cardinal-open\\\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\\n- `\\\"cardinal-closed\\\"`: a closed Cardinal spline, as in a loop.\\n- `\\\"bundle\\\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\\n- `\\\"monotone\\\"`: cubic interpolation that preserves monotonicity in y.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"invalid\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/MarkInvalidDataMode\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"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).\\n\\n- `\\\"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.\\n\\n- `\\\"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.\\n\\n- `\\\"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).\\n\\n- `\\\"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).\\n\\n- `\\\"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.\\n\\n__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.\"\n        },\n        \"limit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\\n\\n__Default value:__ `0` -- indicating no limit\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lineBreak\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"opacity\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The overall opacity (value between [0,1]).\\n\\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"order\": {\n          \"description\": \"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.\",\n          \"type\": [\n            \"null\",\n            \"boolean\"\n          ]\n        },\n        \"orient\": {\n          \"$ref\": \"#/definitions/Orientation\",\n          \"description\": \"The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.\\n- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.\\n- For area, this property determines the orient property of the Vega output.\\n- 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.\"\n        },\n        \"outerRadius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"padAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The angular padding applied to sides of the arc, in radians.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"point\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/OverlayMarkDef\"\n            },\n            {\n              \"const\": \"transparent\",\n              \"type\": \"string\"\n            }\n          ],\n          \"description\": \"A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.\\n\\n- If this property is `\\\"transparent\\\"`, transparent points will be used (for enhancing tooltips and selections).\\n\\n- If this property is an empty object (`{}`) or `true`, filled points with default properties will be used.\\n\\n- If this property is `false`, no points would be automatically added to line or area marks.\\n\\n__Default value:__ `false`.\"\n        },\n        \"radius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"For arc mark, the primary (outer) radius in pixels.\\n\\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\\n\\n__Default value:__ `min(plot_width, plot_height)/2`\",\n          \"minimum\": 0\n        },\n        \"radius2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The secondary (inner) radius in pixels of arc marks.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"shape\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/SymbolShape\"\n                },\n                {\n                  \"type\": \"string\"\n                }\n              ],\n              \"description\": \"Shape of the point marks. Supported values include:\\n- plotting shapes: `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"cross\\\"`, `\\\"diamond\\\"`, `\\\"triangle-up\\\"`, `\\\"triangle-down\\\"`, `\\\"triangle-right\\\"`, or `\\\"triangle-left\\\"`.\\n- the line symbol `\\\"stroke\\\"`\\n- centered directional shapes `\\\"arrow\\\"`, `\\\"wedge\\\"`, or `\\\"triangle\\\"`\\n- 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.)\\n\\n__Default value:__ `\\\"circle\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"size\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default size for marks.\\n- 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.\\n- For `bar`, this represents the band size of the bar, in pixels.\\n- For `text`, this represents the font size, in pixels.\\n\\n__Default value:__\\n- `30` for point, circle, square marks; width/height's `step`\\n- `2` for bar marks with discrete dimensions;\\n- `5` for bar marks with continuous dimensions;\\n- `11` for text marks.\",\n          \"minimum\": 0\n        },\n        \"smooth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"startAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"stroke\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\\n\\n__Default value:__ (None)\"\n        },\n        \"strokeCap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeCap\",\n              \"description\": \"The stroke cap for line ending style. One of `\\\"butt\\\"`, `\\\"round\\\"`, or `\\\"square\\\"`.\\n\\n__Default value:__ `\\\"butt\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating stroke, space lengths for creating dashed or dotted lines.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The offset (in pixels) into which to begin drawing with the stroke dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeJoin\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeJoin\",\n              \"description\": \"The stroke line join method. One of `\\\"miter\\\"`, `\\\"round\\\"` or `\\\"bevel\\\"`.\\n\\n__Default value:__ `\\\"miter\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeMiterLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The miter limit at which to bevel a line join.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke width, in pixels.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"tension\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Depending on the interpolation type, sets the tension parameter (for line and area marks).\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"text\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\",\n              \"description\": \"Placeholder text if the `text` channel is not specified\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"theta\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"- 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.)\\n\\n- For text marks, polar coordinate angle in radians.\",\n          \"maximum\": 360,\n          \"minimum\": 0\n        },\n        \"theta2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise.\"\n        },\n        \"time\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"timeUnitBandPosition\": {\n          \"description\": \"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.\",\n          \"type\": \"number\"\n        },\n        \"timeUnitBandSize\": {\n          \"description\": \"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.\",\n          \"type\": \"number\"\n        },\n        \"tooltip\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/TooltipContent\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\\n\\n- If `tooltip` is `true` or `{\\\"content\\\": \\\"encoding\\\"}`, then all fields from `encoding` will be used.\\n- If `tooltip` is `{\\\"content\\\": \\\"data\\\"}`, then all fields that appear in the highlighted data point will be used.\\n- If set to `null` or `false`, then no tooltip will be used.\\n\\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\\n\\n__Default value:__ `null`\"\n        },\n        \"url\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/URI\",\n              \"description\": \"The URL of the image file for image marks.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"width\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Width of the marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"x\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"X coordinates of the marks, or width of horizontal `\\\"bar\\\"` and `\\\"area\\\"` without specified `x2` or `width`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"x2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"X2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"y\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Y coordinates of the marks, or height of vertical `\\\"bar\\\"` and `\\\"area\\\"` without specified `y2` or `height`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        },\n        \"y2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Y2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"LineString\": {\n      \"additionalProperties\": false,\n      \"description\": \"LineString geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.4\",\n      \"properties\": {\n        \"bbox\": {\n          \"$ref\": \"#/definitions/BBox\",\n          \"description\": \"Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. The value of the bbox member is an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. https://tools.ietf.org/html/rfc7946#section-5\"\n        },\n        \"coordinates\": {\n          \"items\": {\n            \"$ref\": \"#/definitions/Position\"\n          },\n          \"type\": \"array\"\n        },\n        \"type\": {\n          \"const\": \"LineString\",\n          \"description\": \"Specifies the type of GeoJSON object.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"coordinates\",\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"LinearGradient\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"gradient\": {\n          \"const\": \"linear\",\n          \"description\": \"The type of gradient. Use `\\\"linear\\\"` for a linear gradient.\",\n          \"type\": \"string\"\n        },\n        \"id\": {\n          \"type\": \"string\"\n        },\n        \"stops\": {\n          \"description\": \"An array of gradient stops defining the gradient color sequence.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/GradientStop\"\n          },\n          \"type\": \"array\"\n        },\n        \"x1\": {\n          \"description\": \"The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\\n\\n__Default value:__ `0`\",\n          \"type\": \"number\"\n        },\n        \"x2\": {\n          \"description\": \"The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\\n\\n__Default value:__ `1`\",\n          \"type\": \"number\"\n        },\n        \"y1\": {\n          \"description\": \"The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\\n\\n__Default value:__ `0`\",\n          \"type\": \"number\"\n        },\n        \"y2\": {\n          \"description\": \"The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\\n\\n__Default value:__ `0`\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"gradient\",\n        \"stops\"\n      ],\n      \"type\": \"object\"\n    },\n    \"LocalMultiTimeUnit\": {\n      \"enum\": [\n        \"yearquarter\",\n        \"yearquartermonth\",\n        \"yearmonth\",\n        \"yearmonthdate\",\n        \"yearmonthdatehours\",\n        \"yearmonthdatehoursminutes\",\n        \"yearmonthdatehoursminutesseconds\",\n        \"yearweek\",\n        \"yearweekday\",\n        \"yearweekdayhours\",\n        \"yearweekdayhoursminutes\",\n        \"yearweekdayhoursminutesseconds\",\n        \"yeardayofyear\",\n        \"quartermonth\",\n        \"monthdate\",\n        \"monthdatehours\",\n        \"monthdatehoursminutes\",\n        \"monthdatehoursminutesseconds\",\n        \"weekday\",\n        \"weekdayhours\",\n        \"weekdayhoursminutes\",\n        \"weekdayhoursminutesseconds\",\n        \"dayhours\",\n        \"dayhoursminutes\",\n        \"dayhoursminutesseconds\",\n        \"hoursminutes\",\n        \"hoursminutesseconds\",\n        \"minutesseconds\",\n        \"secondsmilliseconds\"\n      ],\n      \"type\": \"string\"\n    },\n    \"LocalSingleTimeUnit\": {\n      \"enum\": [\n        \"year\",\n        \"quarter\",\n        \"month\",\n        \"week\",\n        \"day\",\n        \"dayofyear\",\n        \"date\",\n        \"hours\",\n        \"minutes\",\n        \"seconds\",\n        \"milliseconds\"\n      ],\n      \"type\": \"string\"\n    },\n    \"Locale\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"number\": {\n          \"$ref\": \"#/definitions/NumberLocale\"\n        },\n        \"time\": {\n          \"$ref\": \"#/definitions/TimeLocale\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"LoessTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"as\": {\n          \"description\": \"The output field names for the smoothed points generated by the loess transform.\\n\\n__Default value:__ The field names of the input x and y values.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"maxItems\": 2,\n          \"minItems\": 2,\n          \"type\": \"array\"\n        },\n        \"bandwidth\": {\n          \"description\": \"A bandwidth parameter in the range `[0, 1]` that determines the amount of smoothing.\\n\\n__Default value:__ `0.3`\",\n          \"type\": \"number\"\n        },\n        \"groupby\": {\n          \"description\": \"The data fields to group by. If not specified, a single group containing all data objects will be used.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        },\n        \"loess\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The data field of the dependent variable to smooth.\"\n        },\n        \"on\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The data field of the independent variable to use a predictor.\"\n        }\n      },\n      \"required\": [\n        \"loess\",\n        \"on\"\n      ],\n      \"type\": \"object\"\n    },\n    \"LogicalAnd<Predicate>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"and\": {\n          \"items\": {\n            \"$ref\": \"#/definitions/PredicateComposition\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"and\"\n      ],\n      \"type\": \"object\"\n    },\n    \"PredicateComposition\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/LogicalNot<Predicate>\"\n        },\n        {\n          \"$ref\": \"#/definitions/LogicalAnd<Predicate>\"\n        },\n        {\n          \"$ref\": \"#/definitions/LogicalOr<Predicate>\"\n        },\n        {\n          \"$ref\": \"#/definitions/Predicate\"\n        }\n      ]\n    },\n    \"LogicalNot<Predicate>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"not\": {\n          \"$ref\": \"#/definitions/PredicateComposition\"\n        }\n      },\n      \"required\": [\n        \"not\"\n      ],\n      \"type\": \"object\"\n    },\n    \"LogicalOr<Predicate>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"or\": {\n          \"items\": {\n            \"$ref\": \"#/definitions/PredicateComposition\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"or\"\n      ],\n      \"type\": \"object\"\n    },\n    \"LookupData\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"data\": {\n          \"$ref\": \"#/definitions/Data\",\n          \"description\": \"Secondary data source to lookup in.\"\n        },\n        \"fields\": {\n          \"description\": \"Fields in foreign data or selection to lookup. If not specified, the entire object is queried.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        },\n        \"key\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"Key in data to lookup.\"\n        }\n      },\n      \"required\": [\n        \"data\",\n        \"key\"\n      ],\n      \"type\": \"object\"\n    },\n    \"LookupSelection\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"fields\": {\n          \"description\": \"Fields in foreign data or selection to lookup. If not specified, the entire object is queried.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        },\n        \"key\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"Key in data to lookup.\"\n        },\n        \"param\": {\n          \"$ref\": \"#/definitions/ParameterName\",\n          \"description\": \"Selection parameter name to look up.\"\n        }\n      },\n      \"required\": [\n        \"key\",\n        \"param\"\n      ],\n      \"type\": \"object\"\n    },\n    \"LookupTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"as\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FieldName\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/FieldName\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"The output fields on which to store the looked up data values.\\n\\nFor data lookups, this property may be left blank if `from.fields` has been specified (those field names will be used); if `from.fields` has not been specified, `as` must be a string.\\n\\nFor selection lookups, this property is optional: if unspecified, looked up values will be stored under a property named for the selection; and if specified, it must correspond to `from.fields`.\"\n        },\n        \"default\": {\n          \"description\": \"The default value to use if lookup fails.\\n\\n__Default value:__ `null`\"\n        },\n        \"from\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LookupData\"\n            },\n            {\n              \"$ref\": \"#/definitions/LookupSelection\"\n            }\n          ],\n          \"description\": \"Data source or selection for secondary data reference.\"\n        },\n        \"lookup\": {\n          \"description\": \"Key in primary data source.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"lookup\",\n        \"from\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Mark\": {\n      \"description\": \"All types of primitive marks.\",\n      \"enum\": [\n        \"arc\",\n        \"area\",\n        \"bar\",\n        \"image\",\n        \"line\",\n        \"point\",\n        \"rect\",\n        \"rule\",\n        \"text\",\n        \"tick\",\n        \"trail\",\n        \"circle\",\n        \"square\",\n        \"geoshape\"\n      ],\n      \"type\": \"string\"\n    },\n    \"MarkConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\\\"left\\\"`, `\\\"right\\\"`, `\\\"center\\\"`.\\n\\n__Note:__ Expression reference is *not* supported for range marks.\"\n        },\n        \"angle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The rotation angle of the text, in degrees.\",\n              \"maximum\": 360,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aria\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ariaRole\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ariaRoleDescription\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aspect\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Whether to keep aspect ratio of image marks.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"baseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"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.\\n\\nFor range marks, the vertical alignment of the marks. One of `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`.\\n\\n__Note:__ Expression reference is *not* supported for range marks.\"\n        },\n        \"blend\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Blend\",\n              \"description\": \"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.\\n\\n__Default value: `\\\"source-over\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"color\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default color.\\n\\n__Default value:__ <span style=\\\"color: #4682b4;\\\">&#9632;</span> `\\\"#4682b4\\\"`\\n\\n__Note:__\\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.\"\n        },\n        \"cornerRadius\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles or arcs' corners.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusBottomLeft\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' bottom left corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusBottomRight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' bottom right corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusTopLeft\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' top right corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusTopRight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' top left corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cursor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Cursor\",\n              \"description\": \"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.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"description\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dir\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextDirection\",\n              \"description\": \"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.\\n\\n__Default value:__ `\\\"ltr\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dx\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dy\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ellipsis\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The ellipsis string for text truncated in response to the limit parameter.\\n\\n__Default value:__ `\\\"…\\\"`\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"endAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fill\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\\n\\n__Default value:__ (None)\"\n        },\n        \"fillOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The fill opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"filled\": {\n          \"description\": \"Whether the mark's color should be used as fill color instead of stroke color.\\n\\n__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`.\\n\\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\",\n          \"type\": \"boolean\"\n        },\n        \"font\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The typeface to set the text in (e.g., `\\\"Helvetica Neue\\\"`).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font size, in pixels.\\n\\n__Default value:__ `11`\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"The font style (e.g., `\\\"italic\\\"`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"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`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"height\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Height of the marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"href\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/URI\",\n              \"description\": \"A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"innerRadius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"interpolate\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Interpolate\",\n              \"description\": \"The line interpolation method to use for line and area marks. One of the following:\\n- `\\\"linear\\\"`: piecewise linear segments, as in a polyline.\\n- `\\\"linear-closed\\\"`: close the linear segments to form a polygon.\\n- `\\\"step\\\"`: alternate between horizontal and vertical segments, as in a step function.\\n- `\\\"step-before\\\"`: alternate between vertical and horizontal segments, as in a step function.\\n- `\\\"step-after\\\"`: alternate between horizontal and vertical segments, as in a step function.\\n- `\\\"basis\\\"`: a B-spline, with control point duplication on the ends.\\n- `\\\"basis-open\\\"`: an open B-spline; may not intersect the start or end.\\n- `\\\"basis-closed\\\"`: a closed B-spline, as in a loop.\\n- `\\\"cardinal\\\"`: a Cardinal spline, with control point duplication on the ends.\\n- `\\\"cardinal-open\\\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\\n- `\\\"cardinal-closed\\\"`: a closed Cardinal spline, as in a loop.\\n- `\\\"bundle\\\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\\n- `\\\"monotone\\\"`: cubic interpolation that preserves monotonicity in y.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"invalid\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/MarkInvalidDataMode\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"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).\\n\\n- `\\\"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.\\n\\n- `\\\"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.\\n\\n- `\\\"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).\\n\\n- `\\\"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).\\n\\n- `\\\"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.\\n\\n__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.\"\n        },\n        \"limit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\\n\\n__Default value:__ `0` -- indicating no limit\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lineBreak\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"opacity\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The overall opacity (value between [0,1]).\\n\\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"order\": {\n          \"description\": \"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.\",\n          \"type\": [\n            \"null\",\n            \"boolean\"\n          ]\n        },\n        \"orient\": {\n          \"$ref\": \"#/definitions/Orientation\",\n          \"description\": \"The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.\\n- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.\\n- For area, this property determines the orient property of the Vega output.\\n- 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.\"\n        },\n        \"outerRadius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"padAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The angular padding applied to sides of the arc, in radians.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"radius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"For arc mark, the primary (outer) radius in pixels.\\n\\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\\n\\n__Default value:__ `min(plot_width, plot_height)/2`\",\n          \"minimum\": 0\n        },\n        \"radius2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The secondary (inner) radius in pixels of arc marks.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"shape\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/SymbolShape\"\n                },\n                {\n                  \"type\": \"string\"\n                }\n              ],\n              \"description\": \"Shape of the point marks. Supported values include:\\n- plotting shapes: `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"cross\\\"`, `\\\"diamond\\\"`, `\\\"triangle-up\\\"`, `\\\"triangle-down\\\"`, `\\\"triangle-right\\\"`, or `\\\"triangle-left\\\"`.\\n- the line symbol `\\\"stroke\\\"`\\n- centered directional shapes `\\\"arrow\\\"`, `\\\"wedge\\\"`, or `\\\"triangle\\\"`\\n- 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.)\\n\\n__Default value:__ `\\\"circle\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"size\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default size for marks.\\n- 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.\\n- For `bar`, this represents the band size of the bar, in pixels.\\n- For `text`, this represents the font size, in pixels.\\n\\n__Default value:__\\n- `30` for point, circle, square marks; width/height's `step`\\n- `2` for bar marks with discrete dimensions;\\n- `5` for bar marks with continuous dimensions;\\n- `11` for text marks.\",\n          \"minimum\": 0\n        },\n        \"smooth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"startAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"stroke\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\\n\\n__Default value:__ (None)\"\n        },\n        \"strokeCap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeCap\",\n              \"description\": \"The stroke cap for line ending style. One of `\\\"butt\\\"`, `\\\"round\\\"`, or `\\\"square\\\"`.\\n\\n__Default value:__ `\\\"butt\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating stroke, space lengths for creating dashed or dotted lines.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The offset (in pixels) into which to begin drawing with the stroke dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeJoin\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeJoin\",\n              \"description\": \"The stroke line join method. One of `\\\"miter\\\"`, `\\\"round\\\"` or `\\\"bevel\\\"`.\\n\\n__Default value:__ `\\\"miter\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeMiterLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The miter limit at which to bevel a line join.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke width, in pixels.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"tension\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Depending on the interpolation type, sets the tension parameter (for line and area marks).\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"text\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\",\n              \"description\": \"Placeholder text if the `text` channel is not specified\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"theta\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"- 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.)\\n\\n- For text marks, polar coordinate angle in radians.\",\n          \"maximum\": 360,\n          \"minimum\": 0\n        },\n        \"theta2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise.\"\n        },\n        \"time\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"timeUnitBandPosition\": {\n          \"description\": \"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.\",\n          \"type\": \"number\"\n        },\n        \"timeUnitBandSize\": {\n          \"description\": \"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.\",\n          \"type\": \"number\"\n        },\n        \"tooltip\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/TooltipContent\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\\n\\n- If `tooltip` is `true` or `{\\\"content\\\": \\\"encoding\\\"}`, then all fields from `encoding` will be used.\\n- If `tooltip` is `{\\\"content\\\": \\\"data\\\"}`, then all fields that appear in the highlighted data point will be used.\\n- If set to `null` or `false`, then no tooltip will be used.\\n\\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\\n\\n__Default value:__ `null`\"\n        },\n        \"url\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/URI\",\n              \"description\": \"The URL of the image file for image marks.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"width\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Width of the marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"x\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"X coordinates of the marks, or width of horizontal `\\\"bar\\\"` and `\\\"area\\\"` without specified `x2` or `width`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"x2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"X2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"y\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Y coordinates of the marks, or height of vertical `\\\"bar\\\"` and `\\\"area\\\"` without specified `y2` or `height`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        },\n        \"y2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Y2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"MarkDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\\\"left\\\"`, `\\\"right\\\"`, `\\\"center\\\"`.\\n\\n__Note:__ Expression reference is *not* supported for range marks.\"\n        },\n        \"angle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The rotation angle of the text, in degrees.\",\n              \"maximum\": 360,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aria\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ariaRole\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ariaRoleDescription\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aspect\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Whether to keep aspect ratio of image marks.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"bandSize\": {\n          \"description\": \"The width of the ticks.\\n\\n__Default value:__  3/4 of step (width step for horizontal ticks and height step for vertical ticks).\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"baseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"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.\\n\\nFor range marks, the vertical alignment of the marks. One of `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`.\\n\\n__Note:__ Expression reference is *not* supported for range marks.\"\n        },\n        \"binSpacing\": {\n          \"description\": \"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).\\n\\n__Default value:__ `1`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"blend\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Blend\",\n              \"description\": \"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.\\n\\n__Default value: `\\\"source-over\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"clip\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Whether a mark be clipped to the enclosing group’s width and height.\"\n        },\n        \"color\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default color.\\n\\n__Default value:__ <span style=\\\"color: #4682b4;\\\">&#9632;</span> `\\\"#4682b4\\\"`\\n\\n__Note:__\\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.\"\n        },\n        \"continuousBandSize\": {\n          \"description\": \"The default size of the bars on continuous scales.\\n\\n__Default value:__ `5`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"cornerRadius\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles or arcs' corners.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusBottomLeft\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' bottom left corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusBottomRight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' bottom right corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusEnd\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"- For vertical bars, top-left and top-right corner radius.\\n\\n- For horizontal bars, top-right and bottom-right corner radius.\"\n        },\n        \"cornerRadiusTopLeft\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' top right corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusTopRight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' top left corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cursor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Cursor\",\n              \"description\": \"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.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"description\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dir\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextDirection\",\n              \"description\": \"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.\\n\\n__Default value:__ `\\\"ltr\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"discreteBandSize\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/RelativeBandSize\"\n            }\n          ],\n          \"description\": \"The default size of the bars with discrete dimensions. If unspecified, the default size is  `step-2`, which provides 2 pixel offset between bars.\",\n          \"minimum\": 0\n        },\n        \"dx\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dy\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ellipsis\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The ellipsis string for text truncated in response to the limit parameter.\\n\\n__Default value:__ `\\\"…\\\"`\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fill\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\\n\\n__Default value:__ (None)\"\n        },\n        \"fillOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The fill opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"filled\": {\n          \"description\": \"Whether the mark's color should be used as fill color instead of stroke color.\\n\\n__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`.\\n\\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\",\n          \"type\": \"boolean\"\n        },\n        \"font\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The typeface to set the text in (e.g., `\\\"Helvetica Neue\\\"`).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font size, in pixels.\\n\\n__Default value:__ `11`\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"The font style (e.g., `\\\"italic\\\"`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"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`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"height\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/RelativeBandSize\"\n            }\n          ],\n          \"description\": \"Height of the marks.  One of:\\n\\n- A number representing a fixed pixel height.\\n\\n- A relative band size definition.  For example, `{band: 0.5}` represents half of the band\"\n        },\n        \"href\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/URI\",\n              \"description\": \"A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"innerRadius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"interpolate\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Interpolate\",\n              \"description\": \"The line interpolation method to use for line and area marks. One of the following:\\n- `\\\"linear\\\"`: piecewise linear segments, as in a polyline.\\n- `\\\"linear-closed\\\"`: close the linear segments to form a polygon.\\n- `\\\"step\\\"`: alternate between horizontal and vertical segments, as in a step function.\\n- `\\\"step-before\\\"`: alternate between vertical and horizontal segments, as in a step function.\\n- `\\\"step-after\\\"`: alternate between horizontal and vertical segments, as in a step function.\\n- `\\\"basis\\\"`: a B-spline, with control point duplication on the ends.\\n- `\\\"basis-open\\\"`: an open B-spline; may not intersect the start or end.\\n- `\\\"basis-closed\\\"`: a closed B-spline, as in a loop.\\n- `\\\"cardinal\\\"`: a Cardinal spline, with control point duplication on the ends.\\n- `\\\"cardinal-open\\\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\\n- `\\\"cardinal-closed\\\"`: a closed Cardinal spline, as in a loop.\\n- `\\\"bundle\\\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\\n- `\\\"monotone\\\"`: cubic interpolation that preserves monotonicity in y.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"invalid\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/MarkInvalidDataMode\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"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).\\n\\n- `\\\"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.\\n\\n- `\\\"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.\\n\\n- `\\\"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).\\n\\n- `\\\"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).\\n\\n- `\\\"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.\\n\\n__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.\"\n        },\n        \"limit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\\n\\n__Default value:__ `0` -- indicating no limit\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"line\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/OverlayMarkDef\"\n            }\n          ],\n          \"description\": \"A flag for overlaying line on top of area marks, or an object defining the properties of the overlayed lines.\\n\\n- If this value is an empty object (`{}`) or `true`, lines with default properties will be used.\\n\\n- If this value is `false`, no lines would be automatically added to area marks.\\n\\n__Default value:__ `false`.\"\n        },\n        \"lineBreak\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"minBandSize\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The minimum band size for bar and rectangle marks. __Default value:__ `0.25`\"\n        },\n        \"opacity\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The overall opacity (value between [0,1]).\\n\\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"order\": {\n          \"description\": \"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.\",\n          \"type\": [\n            \"null\",\n            \"boolean\"\n          ]\n        },\n        \"orient\": {\n          \"$ref\": \"#/definitions/Orientation\",\n          \"description\": \"The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.\\n- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.\\n- For area, this property determines the orient property of the Vega output.\\n- 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.\"\n        },\n        \"outerRadius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"padAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The angular padding applied to sides of the arc, in radians.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"point\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/OverlayMarkDef\"\n            },\n            {\n              \"const\": \"transparent\",\n              \"type\": \"string\"\n            }\n          ],\n          \"description\": \"A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.\\n\\n- If this property is `\\\"transparent\\\"`, transparent points will be used (for enhancing tooltips and selections).\\n\\n- If this property is an empty object (`{}`) or `true`, filled points with default properties will be used.\\n\\n- If this property is `false`, no points would be automatically added to line or area marks.\\n\\n__Default value:__ `false`.\"\n        },\n        \"radius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"For arc mark, the primary (outer) radius in pixels.\\n\\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\\n\\n__Default value:__ `min(plot_width, plot_height)/2`\",\n          \"minimum\": 0\n        },\n        \"radius2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The secondary (inner) radius in pixels of arc marks.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"radius2Offset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Offset for radius2.\"\n        },\n        \"radiusOffset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Offset for radius.\"\n        },\n        \"shape\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/SymbolShape\"\n                },\n                {\n                  \"type\": \"string\"\n                }\n              ],\n              \"description\": \"Shape of the point marks. Supported values include:\\n- plotting shapes: `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"cross\\\"`, `\\\"diamond\\\"`, `\\\"triangle-up\\\"`, `\\\"triangle-down\\\"`, `\\\"triangle-right\\\"`, or `\\\"triangle-left\\\"`.\\n- the line symbol `\\\"stroke\\\"`\\n- centered directional shapes `\\\"arrow\\\"`, `\\\"wedge\\\"`, or `\\\"triangle\\\"`\\n- 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.)\\n\\n__Default value:__ `\\\"circle\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"size\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default size for marks.\\n- 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.\\n- For `bar`, this represents the band size of the bar, in pixels.\\n- For `text`, this represents the font size, in pixels.\\n\\n__Default value:__\\n- `30` for point, circle, square marks; width/height's `step`\\n- `2` for bar marks with discrete dimensions;\\n- `5` for bar marks with continuous dimensions;\\n- `11` for text marks.\",\n          \"minimum\": 0\n        },\n        \"smooth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"stroke\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\\n\\n__Default value:__ (None)\"\n        },\n        \"strokeCap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeCap\",\n              \"description\": \"The stroke cap for line ending style. One of `\\\"butt\\\"`, `\\\"round\\\"`, or `\\\"square\\\"`.\\n\\n__Default value:__ `\\\"butt\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating stroke, space lengths for creating dashed or dotted lines.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The offset (in pixels) into which to begin drawing with the stroke dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeJoin\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeJoin\",\n              \"description\": \"The stroke line join method. One of `\\\"miter\\\"`, `\\\"round\\\"` or `\\\"bevel\\\"`.\\n\\n__Default value:__ `\\\"miter\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeMiterLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The miter limit at which to bevel a line join.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke width, in pixels.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"style\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"items\": {\n                \"type\": \"string\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"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.\\n\\n__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).\"\n        },\n        \"tension\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Depending on the interpolation type, sets the tension parameter (for line and area marks).\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"text\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\",\n              \"description\": \"Placeholder text if the `text` channel is not specified\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"theta\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"- 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.)\\n\\n- For text marks, polar coordinate angle in radians.\",\n          \"maximum\": 360,\n          \"minimum\": 0\n        },\n        \"theta2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise.\"\n        },\n        \"theta2Offset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Offset for theta2.\"\n        },\n        \"thetaOffset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Offset for theta.\"\n        },\n        \"thickness\": {\n          \"description\": \"Thickness of the tick mark.\\n\\n__Default value:__  `1`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"time\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"timeUnitBandPosition\": {\n          \"description\": \"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.\",\n          \"type\": \"number\"\n        },\n        \"timeUnitBandSize\": {\n          \"description\": \"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.\",\n          \"type\": \"number\"\n        },\n        \"tooltip\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/TooltipContent\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\\n\\n- If `tooltip` is `true` or `{\\\"content\\\": \\\"encoding\\\"}`, then all fields from `encoding` will be used.\\n- If `tooltip` is `{\\\"content\\\": \\\"data\\\"}`, then all fields that appear in the highlighted data point will be used.\\n- If set to `null` or `false`, then no tooltip will be used.\\n\\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\\n\\n__Default value:__ `null`\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/Mark\",\n          \"description\": \"The mark type. This could a primitive mark type (one of `\\\"bar\\\"`, `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"tick\\\"`, `\\\"line\\\"`, `\\\"area\\\"`, `\\\"point\\\"`, `\\\"geoshape\\\"`, `\\\"rule\\\"`, and `\\\"text\\\"`) or a composite mark type (`\\\"boxplot\\\"`, `\\\"errorband\\\"`, `\\\"errorbar\\\"`).\"\n        },\n        \"url\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/URI\",\n              \"description\": \"The URL of the image file for image marks.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"width\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/RelativeBandSize\"\n            }\n          ],\n          \"description\": \"Width of the marks.  One of:\\n\\n- A number representing a fixed pixel width.\\n\\n- A relative band size definition.  For example, `{band: 0.5}` represents half of the band.\"\n        },\n        \"x\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"X coordinates of the marks, or width of horizontal `\\\"bar\\\"` and `\\\"area\\\"` without specified `x2` or `width`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"x2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"X2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"x2Offset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Offset for x2-position.\"\n        },\n        \"xOffset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Offset for x-position.\"\n        },\n        \"y\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Y coordinates of the marks, or height of vertical `\\\"bar\\\"` and `\\\"area\\\"` without specified `y2` or `height`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        },\n        \"y2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Y2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        },\n        \"y2Offset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Offset for y2-position.\"\n        },\n        \"yOffset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Offset for y-position.\"\n        }\n      },\n      \"required\": [\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"MarkInvalidDataMode\": {\n      \"enum\": [\n        \"filter\",\n        \"break-paths-filter-domains\",\n        \"break-paths-show-domains\",\n        \"break-paths-show-path-domains\",\n        \"show\"\n      ],\n      \"type\": \"string\"\n    },\n    \"MarkPropDef<(Gradient|string|null)>\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef,(Gradient|string|null)>\"\n        },\n        {\n          \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<DatumDef,(Gradient|string|null)>\"\n        },\n        {\n          \"$ref\": \"#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,(Gradient|string|null)>\"\n        }\n      ]\n    },\n    \"MarkPropDef<(string|null),TypeForShape>\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef<TypeForShape>,(string|null)>\"\n        },\n        {\n          \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<DatumDef,(string|null)>\"\n        },\n        {\n          \"$ref\": \"#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef<TypeForShape>,(string|null)>\"\n        }\n      ]\n    },\n    \"MarkPropDef<number>\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef,number>\"\n        },\n        {\n          \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<DatumDef,number>\"\n        },\n        {\n          \"$ref\": \"#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,number>\"\n        }\n      ]\n    },\n    \"MarkPropDef<number[]>\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef,number[]>\"\n        },\n        {\n          \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<DatumDef,number[]>\"\n        },\n        {\n          \"$ref\": \"#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,number[]>\"\n        }\n      ]\n    },\n    \"MarkType\": {\n      \"enum\": [\n        \"arc\",\n        \"area\",\n        \"image\",\n        \"group\",\n        \"line\",\n        \"path\",\n        \"rect\",\n        \"rule\",\n        \"shape\",\n        \"symbol\",\n        \"text\",\n        \"trail\"\n      ],\n      \"type\": \"string\"\n    },\n    \"MergedStream\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"between\": {\n          \"items\": {\n            \"$ref\": \"#/definitions/Stream\"\n          },\n          \"type\": \"array\"\n        },\n        \"consume\": {\n          \"type\": \"boolean\"\n        },\n        \"debounce\": {\n          \"type\": \"number\"\n        },\n        \"filter\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Expr\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/Expr\"\n              },\n              \"type\": \"array\"\n            }\n          ]\n        },\n        \"markname\": {\n          \"type\": \"string\"\n        },\n        \"marktype\": {\n          \"$ref\": \"#/definitions/MarkType\"\n        },\n        \"merge\": {\n          \"items\": {\n            \"$ref\": \"#/definitions/Stream\"\n          },\n          \"type\": \"array\"\n        },\n        \"throttle\": {\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"merge\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Month\": {\n      \"maximum\": 12,\n      \"minimum\": 1,\n      \"type\": \"number\"\n    },\n    \"MultiLineString\": {\n      \"additionalProperties\": false,\n      \"description\": \"MultiLineString geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.5\",\n      \"properties\": {\n        \"bbox\": {\n          \"$ref\": \"#/definitions/BBox\",\n          \"description\": \"Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. The value of the bbox member is an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. https://tools.ietf.org/html/rfc7946#section-5\"\n        },\n        \"coordinates\": {\n          \"items\": {\n            \"items\": {\n              \"$ref\": \"#/definitions/Position\"\n            },\n            \"type\": \"array\"\n          },\n          \"type\": \"array\"\n        },\n        \"type\": {\n          \"const\": \"MultiLineString\",\n          \"description\": \"Specifies the type of GeoJSON object.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"coordinates\",\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"MultiPoint\": {\n      \"additionalProperties\": false,\n      \"description\": \"MultiPoint geometry object.  https://tools.ietf.org/html/rfc7946#section-3.1.3\",\n      \"properties\": {\n        \"bbox\": {\n          \"$ref\": \"#/definitions/BBox\",\n          \"description\": \"Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. The value of the bbox member is an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. https://tools.ietf.org/html/rfc7946#section-5\"\n        },\n        \"coordinates\": {\n          \"items\": {\n            \"$ref\": \"#/definitions/Position\"\n          },\n          \"type\": \"array\"\n        },\n        \"type\": {\n          \"const\": \"MultiPoint\",\n          \"description\": \"Specifies the type of GeoJSON object.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"coordinates\",\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"MultiPolygon\": {\n      \"additionalProperties\": false,\n      \"description\": \"MultiPolygon geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.7\",\n      \"properties\": {\n        \"bbox\": {\n          \"$ref\": \"#/definitions/BBox\",\n          \"description\": \"Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. The value of the bbox member is an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. https://tools.ietf.org/html/rfc7946#section-5\"\n        },\n        \"coordinates\": {\n          \"items\": {\n            \"items\": {\n              \"items\": {\n                \"$ref\": \"#/definitions/Position\"\n              },\n              \"type\": \"array\"\n            },\n            \"type\": \"array\"\n          },\n          \"type\": \"array\"\n        },\n        \"type\": {\n          \"const\": \"MultiPolygon\",\n          \"description\": \"Specifies the type of GeoJSON object.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"coordinates\",\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"MultiTimeUnit\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/LocalMultiTimeUnit\"\n        },\n        {\n          \"$ref\": \"#/definitions/UtcMultiTimeUnit\"\n        }\n      ]\n    },\n    \"NamedData\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"format\": {\n          \"$ref\": \"#/definitions/DataFormat\",\n          \"description\": \"An object that specifies the format for parsing the data.\"\n        },\n        \"name\": {\n          \"description\": \"Provide a placeholder name and bind data at runtime.\\n\\nNew data may change the layout but Vega does not always resize the chart. To update the layout when the data updates, set [autosize](https://vega.github.io/vega-lite/docs/size.html#autosize) or explicitly use [view.resize](https://vega.github.io/vega/docs/api/view/#view_resize).\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"name\"\n      ],\n      \"type\": \"object\"\n    },\n    \"NonArgAggregateOp\": {\n      \"enum\": [\n        \"average\",\n        \"count\",\n        \"distinct\",\n        \"max\",\n        \"mean\",\n        \"median\",\n        \"min\",\n        \"missing\",\n        \"product\",\n        \"q1\",\n        \"q3\",\n        \"ci0\",\n        \"ci1\",\n        \"stderr\",\n        \"stdev\",\n        \"stdevp\",\n        \"sum\",\n        \"valid\",\n        \"values\",\n        \"variance\",\n        \"variancep\",\n        \"exponential\",\n        \"exponentialb\"\n      ],\n      \"type\": \"string\"\n    },\n    \"NonLayerRepeatSpec\": {\n      \"additionalProperties\": false,\n      \"description\": \"Base interface for a repeat specification.\",\n      \"properties\": {\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LayoutAlign\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<LayoutAlign>\"\n            }\n          ],\n          \"description\": \"The alignment to apply to grid rows and columns. The supported string values are `\\\"all\\\"`, `\\\"each\\\"`, and `\\\"none\\\"`.\\n\\n- For `\\\"none\\\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\\n- For `\\\"each\\\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\\n- For `\\\"all\\\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\\n\\nAlternatively, an object value of the form `{\\\"row\\\": string, \\\"column\\\": string}` can be used to supply different alignments for rows and columns.\\n\\n__Default value:__ `\\\"all\\\"`.\"\n        },\n        \"bounds\": {\n          \"description\": \"The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\\n\\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\\n\\n__Default value:__ `\\\"full\\\"`\",\n          \"enum\": [\n            \"full\",\n            \"flush\"\n          ],\n          \"type\": \"string\"\n        },\n        \"center\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<boolean>\"\n            }\n          ],\n          \"description\": \"Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\\n\\nAn object value of the form `{\\\"row\\\": boolean, \\\"column\\\": boolean}` can be used to supply different centering values for rows and columns.\\n\\n__Default value:__ `false`\"\n        },\n        \"columns\": {\n          \"description\": \"The number of columns to include in the view composition layout.\\n\\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\\n\\n__Note__:\\n\\n1) This property is only for:\\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\\n\\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).\",\n          \"type\": \"number\"\n        },\n        \"data\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Data\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n        },\n        \"description\": {\n          \"description\": \"Description of this mark for commenting purpose.\",\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"description\": \"Name of the visualization for later reference.\",\n          \"type\": \"string\"\n        },\n        \"repeat\": {\n          \"anyOf\": [\n            {\n              \"items\": {\n                \"type\": \"string\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/RepeatMapping\"\n            }\n          ],\n          \"description\": \"Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If `\\\"repeat\\\"` is an array, the field can be referred to as `{\\\"repeat\\\": \\\"repeat\\\"}`. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps `\\\"row\\\"` and/or `\\\"column\\\"` to the listed fields to be repeated along the particular orientations. The objects `{\\\"repeat\\\": \\\"row\\\"}` and `{\\\"repeat\\\": \\\"column\\\"}` can be used to refer to the repeated field respectively.\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/Resolve\",\n          \"description\": \"Scale, axis, and legend resolutions for view composition specifications.\"\n        },\n        \"spacing\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<number>\"\n            }\n          ],\n          \"description\": \"The spacing in pixels between sub-views of the composition operator. An object of the form `{\\\"row\\\": number, \\\"column\\\": number}` can be used to set different spacing values for rows and columns.\\n\\n__Default value__: Depends on `\\\"spacing\\\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)\"\n        },\n        \"spec\": {\n          \"$ref\": \"#/definitions/NonNormalizedSpec\",\n          \"description\": \"A specification of the view that gets repeated.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/TitleParams\"\n            }\n          ],\n          \"description\": \"Title for the plot.\"\n        },\n        \"transform\": {\n          \"description\": \"An array of data transformations such as filter and new field calculation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Transform\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"repeat\",\n        \"spec\"\n      ],\n      \"type\": \"object\"\n    },\n    \"NonNormalizedSpec\": {\n      \"$ref\": \"#/definitions/Spec\"\n    },\n    \"NumberLocale\": {\n      \"additionalProperties\": false,\n      \"description\": \"Locale definition for formatting numbers.\",\n      \"properties\": {\n        \"currency\": {\n          \"$ref\": \"#/definitions/Vector2<string>\",\n          \"description\": \"The currency prefix and suffix (e.g., [\\\"$\\\", \\\"\\\"]).\"\n        },\n        \"decimal\": {\n          \"description\": \"The decimal point (e.g., \\\".\\\").\",\n          \"type\": \"string\"\n        },\n        \"grouping\": {\n          \"description\": \"The array of group sizes (e.g., [3]), cycled as needed.\",\n          \"items\": {\n            \"type\": \"number\"\n          },\n          \"type\": \"array\"\n        },\n        \"minus\": {\n          \"description\": \"The minus sign (defaults to hyphen-minus, \\\"-\\\").\",\n          \"type\": \"string\"\n        },\n        \"nan\": {\n          \"description\": \"The not-a-number value (defaults to \\\"NaN\\\").\",\n          \"type\": \"string\"\n        },\n        \"numerals\": {\n          \"$ref\": \"#/definitions/Vector10<string>\",\n          \"description\": \"An array of ten strings to replace the numerals 0-9.\"\n        },\n        \"percent\": {\n          \"description\": \"The percent sign (defaults to \\\"%\\\").\",\n          \"type\": \"string\"\n        },\n        \"thousands\": {\n          \"description\": \"The group separator (e.g., \\\",\\\").\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"decimal\",\n        \"thousands\",\n        \"grouping\",\n        \"currency\"\n      ],\n      \"type\": \"object\"\n    },\n    \"NumericArrayMarkPropDef\": {\n      \"$ref\": \"#/definitions/MarkPropDef<number[]>\"\n    },\n    \"NumericMarkPropDef\": {\n      \"$ref\": \"#/definitions/MarkPropDef<number>\"\n    },\n    \"OffsetDef\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleFieldDef\"\n        },\n        {\n          \"$ref\": \"#/definitions/ScaleDatumDef\"\n        },\n        {\n          \"$ref\": \"#/definitions/ValueDef<number>\"\n        }\n      ]\n    },\n    \"OrderFieldDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"const\": \"binned\",\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"sort\": {\n          \"$ref\": \"#/definitions/SortOrder\",\n          \"description\": \"The sort order. One of `\\\"ascending\\\"` (default) or `\\\"descending\\\"`.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"OrderOnlyDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"sort\": {\n          \"$ref\": \"#/definitions/SortOrder\",\n          \"description\": \"The sort order. One of `\\\"ascending\\\"` (default) or `\\\"descending\\\"`.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"OrderValueDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<number>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<number>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"required\": [\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Orient\": {\n      \"enum\": [\n        \"left\",\n        \"right\",\n        \"top\",\n        \"bottom\"\n      ],\n      \"type\": \"string\"\n    },\n    \"Orientation\": {\n      \"enum\": [\n        \"horizontal\",\n        \"vertical\"\n      ],\n      \"type\": \"string\"\n    },\n    \"OverlayMarkDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\\\"left\\\"`, `\\\"right\\\"`, `\\\"center\\\"`.\\n\\n__Note:__ Expression reference is *not* supported for range marks.\"\n        },\n        \"angle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The rotation angle of the text, in degrees.\",\n              \"maximum\": 360,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aria\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ariaRole\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ariaRoleDescription\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aspect\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Whether to keep aspect ratio of image marks.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"baseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"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.\\n\\nFor range marks, the vertical alignment of the marks. One of `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`.\\n\\n__Note:__ Expression reference is *not* supported for range marks.\"\n        },\n        \"blend\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Blend\",\n              \"description\": \"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.\\n\\n__Default value: `\\\"source-over\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"clip\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Whether a mark be clipped to the enclosing group’s width and height.\"\n        },\n        \"color\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default color.\\n\\n__Default value:__ <span style=\\\"color: #4682b4;\\\">&#9632;</span> `\\\"#4682b4\\\"`\\n\\n__Note:__\\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.\"\n        },\n        \"cornerRadius\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles or arcs' corners.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusBottomLeft\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' bottom left corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusBottomRight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' bottom right corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusTopLeft\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' top right corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusTopRight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' top left corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cursor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Cursor\",\n              \"description\": \"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.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"description\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dir\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextDirection\",\n              \"description\": \"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.\\n\\n__Default value:__ `\\\"ltr\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dx\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dy\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ellipsis\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The ellipsis string for text truncated in response to the limit parameter.\\n\\n__Default value:__ `\\\"…\\\"`\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"endAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fill\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\\n\\n__Default value:__ (None)\"\n        },\n        \"fillOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The fill opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"filled\": {\n          \"description\": \"Whether the mark's color should be used as fill color instead of stroke color.\\n\\n__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`.\\n\\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\",\n          \"type\": \"boolean\"\n        },\n        \"font\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The typeface to set the text in (e.g., `\\\"Helvetica Neue\\\"`).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font size, in pixels.\\n\\n__Default value:__ `11`\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"The font style (e.g., `\\\"italic\\\"`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"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`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"height\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Height of the marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"href\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/URI\",\n              \"description\": \"A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"innerRadius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"interpolate\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Interpolate\",\n              \"description\": \"The line interpolation method to use for line and area marks. One of the following:\\n- `\\\"linear\\\"`: piecewise linear segments, as in a polyline.\\n- `\\\"linear-closed\\\"`: close the linear segments to form a polygon.\\n- `\\\"step\\\"`: alternate between horizontal and vertical segments, as in a step function.\\n- `\\\"step-before\\\"`: alternate between vertical and horizontal segments, as in a step function.\\n- `\\\"step-after\\\"`: alternate between horizontal and vertical segments, as in a step function.\\n- `\\\"basis\\\"`: a B-spline, with control point duplication on the ends.\\n- `\\\"basis-open\\\"`: an open B-spline; may not intersect the start or end.\\n- `\\\"basis-closed\\\"`: a closed B-spline, as in a loop.\\n- `\\\"cardinal\\\"`: a Cardinal spline, with control point duplication on the ends.\\n- `\\\"cardinal-open\\\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\\n- `\\\"cardinal-closed\\\"`: a closed Cardinal spline, as in a loop.\\n- `\\\"bundle\\\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\\n- `\\\"monotone\\\"`: cubic interpolation that preserves monotonicity in y.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"invalid\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/MarkInvalidDataMode\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"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).\\n\\n- `\\\"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.\\n\\n- `\\\"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.\\n\\n- `\\\"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).\\n\\n- `\\\"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).\\n\\n- `\\\"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.\\n\\n__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.\"\n        },\n        \"limit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\\n\\n__Default value:__ `0` -- indicating no limit\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lineBreak\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"opacity\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The overall opacity (value between [0,1]).\\n\\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"order\": {\n          \"description\": \"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.\",\n          \"type\": [\n            \"null\",\n            \"boolean\"\n          ]\n        },\n        \"orient\": {\n          \"$ref\": \"#/definitions/Orientation\",\n          \"description\": \"The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.\\n- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.\\n- For area, this property determines the orient property of the Vega output.\\n- 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.\"\n        },\n        \"outerRadius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"padAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The angular padding applied to sides of the arc, in radians.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"radius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"For arc mark, the primary (outer) radius in pixels.\\n\\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\\n\\n__Default value:__ `min(plot_width, plot_height)/2`\",\n          \"minimum\": 0\n        },\n        \"radius2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The secondary (inner) radius in pixels of arc marks.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"radius2Offset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Offset for radius2.\"\n        },\n        \"radiusOffset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Offset for radius.\"\n        },\n        \"shape\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/SymbolShape\"\n                },\n                {\n                  \"type\": \"string\"\n                }\n              ],\n              \"description\": \"Shape of the point marks. Supported values include:\\n- plotting shapes: `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"cross\\\"`, `\\\"diamond\\\"`, `\\\"triangle-up\\\"`, `\\\"triangle-down\\\"`, `\\\"triangle-right\\\"`, or `\\\"triangle-left\\\"`.\\n- the line symbol `\\\"stroke\\\"`\\n- centered directional shapes `\\\"arrow\\\"`, `\\\"wedge\\\"`, or `\\\"triangle\\\"`\\n- 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.)\\n\\n__Default value:__ `\\\"circle\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"size\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default size for marks.\\n- 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.\\n- For `bar`, this represents the band size of the bar, in pixels.\\n- For `text`, this represents the font size, in pixels.\\n\\n__Default value:__\\n- `30` for point, circle, square marks; width/height's `step`\\n- `2` for bar marks with discrete dimensions;\\n- `5` for bar marks with continuous dimensions;\\n- `11` for text marks.\",\n          \"minimum\": 0\n        },\n        \"smooth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"startAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"stroke\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\\n\\n__Default value:__ (None)\"\n        },\n        \"strokeCap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeCap\",\n              \"description\": \"The stroke cap for line ending style. One of `\\\"butt\\\"`, `\\\"round\\\"`, or `\\\"square\\\"`.\\n\\n__Default value:__ `\\\"butt\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating stroke, space lengths for creating dashed or dotted lines.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The offset (in pixels) into which to begin drawing with the stroke dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeJoin\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeJoin\",\n              \"description\": \"The stroke line join method. One of `\\\"miter\\\"`, `\\\"round\\\"` or `\\\"bevel\\\"`.\\n\\n__Default value:__ `\\\"miter\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeMiterLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The miter limit at which to bevel a line join.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke width, in pixels.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"style\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"items\": {\n                \"type\": \"string\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"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.\\n\\n__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).\"\n        },\n        \"tension\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Depending on the interpolation type, sets the tension parameter (for line and area marks).\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"text\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\",\n              \"description\": \"Placeholder text if the `text` channel is not specified\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"theta\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"- 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.)\\n\\n- For text marks, polar coordinate angle in radians.\",\n          \"maximum\": 360,\n          \"minimum\": 0\n        },\n        \"theta2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise.\"\n        },\n        \"theta2Offset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Offset for theta2.\"\n        },\n        \"thetaOffset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Offset for theta.\"\n        },\n        \"time\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"timeUnitBandPosition\": {\n          \"description\": \"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.\",\n          \"type\": \"number\"\n        },\n        \"timeUnitBandSize\": {\n          \"description\": \"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.\",\n          \"type\": \"number\"\n        },\n        \"tooltip\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/TooltipContent\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\\n\\n- If `tooltip` is `true` or `{\\\"content\\\": \\\"encoding\\\"}`, then all fields from `encoding` will be used.\\n- If `tooltip` is `{\\\"content\\\": \\\"data\\\"}`, then all fields that appear in the highlighted data point will be used.\\n- If set to `null` or `false`, then no tooltip will be used.\\n\\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\\n\\n__Default value:__ `null`\"\n        },\n        \"url\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/URI\",\n              \"description\": \"The URL of the image file for image marks.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"width\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Width of the marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"x\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"X coordinates of the marks, or width of horizontal `\\\"bar\\\"` and `\\\"area\\\"` without specified `x2` or `width`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"x2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"X2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"x2Offset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Offset for x2-position.\"\n        },\n        \"xOffset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Offset for x-position.\"\n        },\n        \"y\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Y coordinates of the marks, or height of vertical `\\\"bar\\\"` and `\\\"area\\\"` without specified `y2` or `height`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        },\n        \"y2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Y2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        },\n        \"y2Offset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Offset for y2-position.\"\n        },\n        \"yOffset\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Offset for y-position.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"Padding\": {\n      \"anyOf\": [\n        {\n          \"type\": \"number\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"bottom\": {\n              \"type\": \"number\"\n            },\n            \"left\": {\n              \"type\": \"number\"\n            },\n            \"right\": {\n              \"type\": \"number\"\n            },\n            \"top\": {\n              \"type\": \"number\"\n            }\n          },\n          \"type\": \"object\"\n        }\n      ],\n      \"minimum\": 0\n    },\n    \"ParameterExtent\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"field\": {\n              \"$ref\": \"#/definitions/FieldName\",\n              \"description\": \"If a selection parameter is specified, the field name to extract selected values for when the selection is [projected](https://vega.github.io/vega-lite/docs/selection.html#project) over multiple fields or encodings.\"\n            },\n            \"param\": {\n              \"$ref\": \"#/definitions/ParameterName\",\n              \"description\": \"The name of a parameter.\"\n            }\n          },\n          \"required\": [\n            \"param\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"encoding\": {\n              \"$ref\": \"#/definitions/SingleDefUnitChannel\",\n              \"description\": \"If a selection parameter is specified, the encoding channel to extract selected values for when a selection is [projected](https://vega.github.io/vega-lite/docs/selection.html#project) over multiple fields or encodings.\"\n            },\n            \"param\": {\n              \"$ref\": \"#/definitions/ParameterName\",\n              \"description\": \"The name of a parameter.\"\n            }\n          },\n          \"required\": [\n            \"param\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"ParameterName\": {\n      \"type\": \"string\"\n    },\n    \"ParameterPredicate\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"empty\": {\n          \"description\": \"For selection parameters, the predicate of empty selections returns true by default. Override this behavior, by setting this property `empty: false`.\",\n          \"type\": \"boolean\"\n        },\n        \"param\": {\n          \"$ref\": \"#/definitions/ParameterName\",\n          \"description\": \"Filter using a parameter name.\"\n        }\n      },\n      \"required\": [\n        \"param\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Parse\": {\n      \"additionalProperties\": {\n        \"$ref\": \"#/definitions/ParseValue\"\n      },\n      \"type\": \"object\"\n    },\n    \"ParseValue\": {\n      \"type\": [\n        \"string\",\n        \"null\"\n      ]\n    },\n    \"PivotTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"groupby\": {\n          \"description\": \"The optional data fields to group by. If not specified, a single group containing all data objects will be used.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        },\n        \"limit\": {\n          \"description\": \"An optional parameter indicating the maximum number of pivoted fields to generate. The default (`0`) applies no limit. The pivoted `pivot` names are sorted in ascending order prior to enforcing the limit. __Default value:__ `0`\",\n          \"type\": \"number\"\n        },\n        \"op\": {\n          \"$ref\": \"#/definitions/AggregateOp\",\n          \"description\": \"The aggregation operation to apply to grouped `value` field values. __Default value:__ `sum`\"\n        },\n        \"pivot\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The data field to pivot on. The unique values of this field become new field names in the output stream.\"\n        },\n        \"value\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The data field to populate pivoted fields. The aggregate values of this field become the values of the new pivoted fields.\"\n        }\n      },\n      \"required\": [\n        \"pivot\",\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Point\": {\n      \"additionalProperties\": false,\n      \"description\": \"Point geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.2\",\n      \"properties\": {\n        \"bbox\": {\n          \"$ref\": \"#/definitions/BBox\",\n          \"description\": \"Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. The value of the bbox member is an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. https://tools.ietf.org/html/rfc7946#section-5\"\n        },\n        \"coordinates\": {\n          \"$ref\": \"#/definitions/Position\"\n        },\n        \"type\": {\n          \"const\": \"Point\",\n          \"description\": \"Specifies the type of GeoJSON object.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"coordinates\",\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"PointSelectionConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"clear\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Stream\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"boolean\"\n            }\n          ],\n          \"description\": \"Clears the selection, emptying it of all values. This property can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable clear.\\n\\n__Default value:__ `dblclick`.\\n\\n__See also:__ [`clear` examples ](https://vega.github.io/vega-lite/docs/selection.html#clear) in the documentation.\"\n        },\n        \"encodings\": {\n          \"description\": \"An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\\n\\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/SingleDefUnitChannel\"\n          },\n          \"type\": \"array\"\n        },\n        \"fields\": {\n          \"description\": \"An array of field names whose values must match for a data tuple to fall within the selection.\\n\\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        },\n        \"nearest\": {\n          \"description\": \"When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value _nearest_ the mouse cursor is added to the selection.\\n\\n__Default value:__ `false`, which means that data values must be interacted with directly (e.g., clicked on) to be added to the selection.\\n\\n__See also:__ [`nearest` examples](https://vega.github.io/vega-lite/docs/selection.html#nearest) documentation.\",\n          \"type\": \"boolean\"\n        },\n        \"on\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Stream\"\n            },\n            {\n              \"type\": \"string\"\n            }\n          ],\n          \"description\": \"A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters).\\n\\n__See also:__ [`on` examples](https://vega.github.io/vega-lite/docs/selection.html#on) in the documentation.\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/SelectionResolution\",\n          \"description\": \"With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\\n\\nOne of:\\n- `\\\"global\\\"` -- only one brush exists for the entire SPLOM. When the user begins to drag, any previous brushes are cleared, and a new one is constructed.\\n- `\\\"union\\\"` -- each cell contains its own brush, and points are highlighted if they lie within _any_ of these individual brushes.\\n- `\\\"intersect\\\"` -- each cell contains its own brush, and points are highlighted only if they fall within _all_ of these individual brushes.\\n\\n__Default value:__ `global`.\\n\\n__See also:__ [`resolve` examples](https://vega.github.io/vega-lite/docs/selection.html#resolve) in the documentation.\"\n        },\n        \"toggle\": {\n          \"description\": \"Controls whether data values should be toggled (inserted or removed from a point selection) or only ever inserted into point selections.\\n\\nOne of:\\n- `true` -- the default behavior, which corresponds to `\\\"event.shiftKey\\\"`.  As a result, data values are toggled when the user interacts with the shift-key pressed.\\n- `false` -- disables toggling behaviour; the selection will only ever contain a single data value corresponding to the most recent interaction.\\n- A [Vega expression](https://vega.github.io/vega/docs/expressions/) which is re-evaluated as the user interacts. If the expression evaluates to `true`, the data value is toggled into or out of the point selection. If the expression evaluates to `false`, the point selection is first cleared, and the data value is then inserted. For example, setting the value to the Vega expression `\\\"true\\\"` will toggle data values without the user pressing the shift-key.\\n\\n__Default value:__ `true`\\n\\n__See also:__ [`toggle` examples](https://vega.github.io/vega-lite/docs/selection.html#toggle) in the documentation.\",\n          \"type\": [\n            \"string\",\n            \"boolean\"\n          ]\n        },\n        \"type\": {\n          \"const\": \"point\",\n          \"description\": \"Determines the default event processing and data query for the selection. Vega-Lite currently supports two selection types:\\n\\n- `\\\"point\\\"` -- to select multiple discrete data values; the first value is selected on `click` and additional values toggled on shift-click.\\n- `\\\"interval\\\"` -- to select a continuous range of data values on `drag`.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"PointSelectionConfigWithoutType\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"clear\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Stream\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"boolean\"\n            }\n          ],\n          \"description\": \"Clears the selection, emptying it of all values. This property can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable clear.\\n\\n__Default value:__ `dblclick`.\\n\\n__See also:__ [`clear` examples ](https://vega.github.io/vega-lite/docs/selection.html#clear) in the documentation.\"\n        },\n        \"encodings\": {\n          \"description\": \"An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\\n\\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/SingleDefUnitChannel\"\n          },\n          \"type\": \"array\"\n        },\n        \"fields\": {\n          \"description\": \"An array of field names whose values must match for a data tuple to fall within the selection.\\n\\n__See also:__ The [projection with `encodings` and `fields` section](https://vega.github.io/vega-lite/docs/selection.html#project) in the documentation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        },\n        \"nearest\": {\n          \"description\": \"When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value _nearest_ the mouse cursor is added to the selection.\\n\\n__Default value:__ `false`, which means that data values must be interacted with directly (e.g., clicked on) to be added to the selection.\\n\\n__See also:__ [`nearest` examples](https://vega.github.io/vega-lite/docs/selection.html#nearest) documentation.\",\n          \"type\": \"boolean\"\n        },\n        \"on\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Stream\"\n            },\n            {\n              \"type\": \"string\"\n            }\n          ],\n          \"description\": \"A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters).\\n\\n__See also:__ [`on` examples](https://vega.github.io/vega-lite/docs/selection.html#on) in the documentation.\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/SelectionResolution\",\n          \"description\": \"With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\\n\\nOne of:\\n- `\\\"global\\\"` -- only one brush exists for the entire SPLOM. When the user begins to drag, any previous brushes are cleared, and a new one is constructed.\\n- `\\\"union\\\"` -- each cell contains its own brush, and points are highlighted if they lie within _any_ of these individual brushes.\\n- `\\\"intersect\\\"` -- each cell contains its own brush, and points are highlighted only if they fall within _all_ of these individual brushes.\\n\\n__Default value:__ `global`.\\n\\n__See also:__ [`resolve` examples](https://vega.github.io/vega-lite/docs/selection.html#resolve) in the documentation.\"\n        },\n        \"toggle\": {\n          \"description\": \"Controls whether data values should be toggled (inserted or removed from a point selection) or only ever inserted into point selections.\\n\\nOne of:\\n- `true` -- the default behavior, which corresponds to `\\\"event.shiftKey\\\"`.  As a result, data values are toggled when the user interacts with the shift-key pressed.\\n- `false` -- disables toggling behaviour; the selection will only ever contain a single data value corresponding to the most recent interaction.\\n- A [Vega expression](https://vega.github.io/vega/docs/expressions/) which is re-evaluated as the user interacts. If the expression evaluates to `true`, the data value is toggled into or out of the point selection. If the expression evaluates to `false`, the point selection is first cleared, and the data value is then inserted. For example, setting the value to the Vega expression `\\\"true\\\"` will toggle data values without the user pressing the shift-key.\\n\\n__Default value:__ `true`\\n\\n__See also:__ [`toggle` examples](https://vega.github.io/vega-lite/docs/selection.html#toggle) in the documentation.\",\n          \"type\": [\n            \"string\",\n            \"boolean\"\n          ]\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"PolarDef\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/PositionFieldDefBase\"\n        },\n        {\n          \"$ref\": \"#/definitions/PositionDatumDefBase\"\n        },\n        {\n          \"$ref\": \"#/definitions/PositionValueDef\"\n        }\n      ]\n    },\n    \"Polygon\": {\n      \"additionalProperties\": false,\n      \"description\": \"Polygon geometry object. https://tools.ietf.org/html/rfc7946#section-3.1.6\",\n      \"properties\": {\n        \"bbox\": {\n          \"$ref\": \"#/definitions/BBox\",\n          \"description\": \"Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. The value of the bbox member is an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. https://tools.ietf.org/html/rfc7946#section-5\"\n        },\n        \"coordinates\": {\n          \"items\": {\n            \"items\": {\n              \"$ref\": \"#/definitions/Position\"\n            },\n            \"type\": \"array\"\n          },\n          \"type\": \"array\"\n        },\n        \"type\": {\n          \"const\": \"Polygon\",\n          \"description\": \"Specifies the type of GeoJSON object.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"coordinates\",\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Position\": {\n      \"description\": \"A Position is an array of coordinates. https://tools.ietf.org/html/rfc7946#section-3.1.1 Array should contain between two and three elements. The previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values), but the current specification only allows X, Y, and (optionally) Z to be defined.\\n\\nNote: the type will not be narrowed down to `[number, number] | [number, number, number]` due to marginal benefits and the large impact of breaking change.\\n\\nSee previous discussions on the type narrowing:\\n-  {@link  https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21590 Nov 2017 } \\n-  {@link  https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/67773 Dec 2023 } \\n-  {@link  https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/71441 Dec 2024 } \\n\\nOne can use a  {@link  https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates user-defined type guard that returns a type predicate }  to determine if a position is a 2D or 3D position.\",\n      \"items\": {\n        \"type\": \"number\"\n      },\n      \"type\": \"array\"\n    },\n    \"Position2Def\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/SecondaryFieldDef\"\n        },\n        {\n          \"$ref\": \"#/definitions/DatumDef\"\n        },\n        {\n          \"$ref\": \"#/definitions/PositionValueDef\"\n        }\n      ]\n    },\n    \"PositionDatumDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"axis\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Axis\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\\n\\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"datum\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/PrimitiveValue\"\n            },\n            {\n              \"$ref\": \"#/definitions/DateTime\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/RepeatRef\"\n            }\n          ],\n          \"description\": \"A constant value in data domain.\"\n        },\n        \"impute\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ImputeParams\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as `key` of the `Impute` Operation. The field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\\n\\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation.\"\n        },\n        \"scale\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Scale\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n        },\n        \"stack\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StackOffset\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"type\": \"boolean\"\n            }\n          ],\n          \"description\": \"Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\\n\\n`stack` can be one of the following values:\\n- `\\\"zero\\\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\\n- `\\\"normalize\\\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie charts [with percentage tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)). <br/>\\n-`\\\"center\\\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\\n\\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\\n\\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/Type\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"PositionDatumDefBase\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"datum\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/PrimitiveValue\"\n            },\n            {\n              \"$ref\": \"#/definitions/DateTime\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/RepeatRef\"\n            }\n          ],\n          \"description\": \"A constant value in data domain.\"\n        },\n        \"scale\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Scale\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n        },\n        \"stack\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StackOffset\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"type\": \"boolean\"\n            }\n          ],\n          \"description\": \"Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\\n\\n`stack` can be one of the following values:\\n- `\\\"zero\\\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\\n- `\\\"normalize\\\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie charts [with percentage tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)). <br/>\\n-`\\\"center\\\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\\n\\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\\n\\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/Type\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"PositionDef\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/PositionFieldDef\"\n        },\n        {\n          \"$ref\": \"#/definitions/PositionDatumDef\"\n        },\n        {\n          \"$ref\": \"#/definitions/PositionValueDef\"\n        }\n      ]\n    },\n    \"PositionFieldDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"axis\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Axis\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\\n\\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"const\": \"binned\",\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"impute\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ImputeParams\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as `key` of the `Impute` Operation. The field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\\n\\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation.\"\n        },\n        \"scale\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Scale\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n        },\n        \"sort\": {\n          \"$ref\": \"#/definitions/Sort\",\n          \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n        },\n        \"stack\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StackOffset\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"type\": \"boolean\"\n            }\n          ],\n          \"description\": \"Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\\n\\n`stack` can be one of the following values:\\n- `\\\"zero\\\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\\n- `\\\"normalize\\\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie charts [with percentage tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)). <br/>\\n-`\\\"center\\\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\\n\\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\\n\\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"PositionFieldDefBase\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"const\": \"binned\",\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"scale\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Scale\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n        },\n        \"sort\": {\n          \"$ref\": \"#/definitions/Sort\",\n          \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n        },\n        \"stack\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StackOffset\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"type\": \"boolean\"\n            }\n          ],\n          \"description\": \"Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\\n\\n`stack` can be one of the following values:\\n- `\\\"zero\\\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\\n- `\\\"normalize\\\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie charts [with percentage tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)). <br/>\\n-`\\\"center\\\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\\n\\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\\n\\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"PositionValueDef\": {\n      \"$ref\": \"#/definitions/ValueDef<(number|\\\"width\\\"|\\\"height\\\"|ExprRef)>\"\n    },\n    \"Predicate\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/FieldEqualPredicate\"\n        },\n        {\n          \"$ref\": \"#/definitions/FieldRangePredicate\"\n        },\n        {\n          \"$ref\": \"#/definitions/FieldOneOfPredicate\"\n        },\n        {\n          \"$ref\": \"#/definitions/FieldLTPredicate\"\n        },\n        {\n          \"$ref\": \"#/definitions/FieldGTPredicate\"\n        },\n        {\n          \"$ref\": \"#/definitions/FieldLTEPredicate\"\n        },\n        {\n          \"$ref\": \"#/definitions/FieldGTEPredicate\"\n        },\n        {\n          \"$ref\": \"#/definitions/FieldValidPredicate\"\n        },\n        {\n          \"$ref\": \"#/definitions/ParameterPredicate\"\n        },\n        {\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"PrimitiveValue\": {\n      \"type\": [\n        \"number\",\n        \"string\",\n        \"boolean\",\n        \"null\"\n      ]\n    },\n    \"Projection\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"center\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Vector2<number>\",\n              \"description\": \"The projection's center, a two-element array of longitude and latitude in degrees.\\n\\n__Default value:__ `[0, 0]`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"clipAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The projection's clipping circle radius to the specified angle in degrees. If `null`, switches to [antimeridian](http://bl.ocks.org/mbostock/3788999) cutting rather than small-circle clipping.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"clipExtent\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Vector2<Vector2<number>>\",\n              \"description\": \"The projection's viewport clip extent to the specified bounds in pixels. The extent bounds are specified as an array `[[x0, y0], [x1, y1]]`, where `x0` is the left-side of the viewport, `y0` is the top, `x1` is the right and `y1` is the bottom. If `null`, no viewport clipping is performed.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"coefficient\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The coefficient parameter for the `hammer` projection.\\n\\n__Default value:__ `2`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"distance\": {\n          \"anyOf\": [\n            {\n              \"description\": \"For the `satellite` projection, the distance from the center of the sphere to the point of view, as a proportion of the sphere’s radius. The recommended maximum clip angle for a given `distance` is acos(1 / distance) converted to degrees. If tilt is also applied, then more conservative clipping may be necessary.\\n\\n__Default value:__ `2.0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"extent\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Vector2<Vector2<number>>\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Fit\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/Fit\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fraction\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The fraction parameter for the `bottomley` projection.\\n\\n__Default value:__ `0.5`, corresponding to a sin(ψ) where ψ = π/6.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lobes\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The number of lobes in projections that support multi-lobe views: `berghaus`, `gingery`, or `healpix`. The default value varies based on the projection type.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"parallel\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The parallel parameter for projections that support it: `armadillo`, `bonne`, `craig`, `cylindricalEqualArea`, `cylindricalStereographic`, `hammerRetroazimuthal`, `loximuthal`, or `rectangularPolyconic`. The default value varies based on the projection type.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"parallels\": {\n          \"anyOf\": [\n            {\n              \"description\": \"For conic projections, the [two standard parallels](https://en.wikipedia.org/wiki/Map_projection#Conic) that define the map layout. The default depends on the specific conic projection used.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"pointRadius\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The default radius (in pixels) to use when drawing GeoJSON `Point` and `MultiPoint` geometries. This parameter sets a constant default value. To modify the point radius in response to data, see the corresponding parameter of the GeoPath and GeoShape transforms.\\n\\n__Default value:__ `4.5`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"precision\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The threshold for the projection's [adaptive resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels. This value corresponds to the [Douglas–Peucker distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm). If precision is not specified, returns the projection's current resampling precision which defaults to `√0.5 ≅ 0.70710…`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"radius\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius parameter for the `airy` or `gingery` projection. The default value varies based on the projection type.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ratio\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The ratio parameter for the `hill`, `hufnagel`, or `wagner` projections. The default value varies based on the projection type.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"reflectX\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Sets whether or not the x-dimension is reflected (negated) in the output.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"reflectY\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Sets whether or not the y-dimension is reflected (negated) in the output.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"rotate\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Vector2<number>\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Vector3<number>\"\n                }\n              ],\n              \"description\": \"The projection's three-axis rotation to the specified angles, which must be a two- or three-element array of numbers [`lambda`, `phi`, `gamma`] specifying the rotation angles in degrees about each spherical axis. (These correspond to yaw, pitch and roll.)\\n\\n__Default value:__ `[0, 0, 0]`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"scale\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The projection’s scale (zoom) factor, overriding automatic fitting. The default scale is projection-specific. The scale factor corresponds linearly to the distance between projected points; however, scale factor values are not equivalent across projections.\"\n        },\n        \"size\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Vector2<number>\",\n              \"description\": \"Used in conjunction with fit, provides the width and height in pixels of the area to which the projection should be automatically fit.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"spacing\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The spacing parameter for the `lagrange` projection.\\n\\n__Default value:__ `0.5`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"tilt\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The tilt angle (in degrees) for the `satellite` projection.\\n\\n__Default value:__ `0`.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"translate\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Vector2<number>\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The projection’s translation offset as a two-element array `[tx, ty]`.\"\n        },\n        \"type\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ProjectionType\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The cartographic projection to use. This value is case-insensitive, for example `\\\"albers\\\"` and `\\\"Albers\\\"` indicate the same projection type. You can find all valid projection types [in the documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types).\\n\\n__Default value:__ `equalEarth`\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ProjectionConfig\": {\n      \"$ref\": \"#/definitions/Projection\",\n      \"description\": \"Any property of Projection can be in config\"\n    },\n    \"ProjectionType\": {\n      \"enum\": [\n        \"albers\",\n        \"albersUsa\",\n        \"azimuthalEqualArea\",\n        \"azimuthalEquidistant\",\n        \"conicConformal\",\n        \"conicEqualArea\",\n        \"conicEquidistant\",\n        \"equalEarth\",\n        \"equirectangular\",\n        \"gnomonic\",\n        \"identity\",\n        \"mercator\",\n        \"naturalEarth1\",\n        \"orthographic\",\n        \"stereographic\",\n        \"transverseMercator\"\n      ],\n      \"type\": \"string\"\n    },\n    \"QuantileTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"as\": {\n          \"description\": \"The output field names for the probability and quantile values.\\n\\n__Default value:__ `[\\\"prob\\\", \\\"value\\\"]`\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"maxItems\": 2,\n          \"minItems\": 2,\n          \"type\": \"array\"\n        },\n        \"groupby\": {\n          \"description\": \"The data fields to group by. If not specified, a single group containing all data objects will be used.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        },\n        \"probs\": {\n          \"description\": \"An array of probabilities in the range (0, 1) for which to compute quantile values. If not specified, the *step* parameter will be used.\",\n          \"items\": {\n            \"type\": \"number\"\n          },\n          \"type\": \"array\"\n        },\n        \"quantile\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The data field for which to perform quantile estimation.\"\n        },\n        \"step\": {\n          \"description\": \"A probability step size (default 0.01) for sampling quantile values. All values from one-half the step size up to 1 (exclusive) will be sampled. This parameter is only used if the *probs* parameter is not provided.\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"quantile\"\n      ],\n      \"type\": \"object\"\n    },\n    \"RadialGradient\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"gradient\": {\n          \"const\": \"radial\",\n          \"description\": \"The type of gradient. Use `\\\"radial\\\"` for a radial gradient.\",\n          \"type\": \"string\"\n        },\n        \"id\": {\n          \"type\": \"string\"\n        },\n        \"r1\": {\n          \"description\": \"The radius length, in normalized [0, 1] coordinates, of the inner circle for the gradient.\\n\\n__Default value:__ `0`\",\n          \"type\": \"number\"\n        },\n        \"r2\": {\n          \"description\": \"The radius length, in normalized [0, 1] coordinates, of the outer circle for the gradient.\\n\\n__Default value:__ `0.5`\",\n          \"type\": \"number\"\n        },\n        \"stops\": {\n          \"description\": \"An array of gradient stops defining the gradient color sequence.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/GradientStop\"\n          },\n          \"type\": \"array\"\n        },\n        \"x1\": {\n          \"description\": \"The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle for the gradient.\\n\\n__Default value:__ `0.5`\",\n          \"type\": \"number\"\n        },\n        \"x2\": {\n          \"description\": \"The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle for the gradient.\\n\\n__Default value:__ `0.5`\",\n          \"type\": \"number\"\n        },\n        \"y1\": {\n          \"description\": \"The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle for the gradient.\\n\\n__Default value:__ `0.5`\",\n          \"type\": \"number\"\n        },\n        \"y2\": {\n          \"description\": \"The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle for the gradient.\\n\\n__Default value:__ `0.5`\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"gradient\",\n        \"stops\"\n      ],\n      \"type\": \"object\"\n    },\n    \"RangeConfig\": {\n      \"additionalProperties\": {\n        \"anyOf\": [\n          {\n            \"$ref\": \"#/definitions/RangeScheme\"\n          },\n          {\n            \"type\": \"array\"\n          }\n        ]\n      },\n      \"properties\": {\n        \"category\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/RangeScheme\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/Color\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"Default [color scheme](https://vega.github.io/vega/docs/schemes/) for categorical data.\"\n        },\n        \"diverging\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/RangeScheme\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/Color\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"Default [color scheme](https://vega.github.io/vega/docs/schemes/) for diverging quantitative ramps.\"\n        },\n        \"heatmap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/RangeScheme\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/Color\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"Default [color scheme](https://vega.github.io/vega/docs/schemes/) for quantitative heatmaps.\"\n        },\n        \"ordinal\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/RangeScheme\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/Color\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"Default [color scheme](https://vega.github.io/vega/docs/schemes/) for rank-ordered data.\"\n        },\n        \"ramp\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/RangeScheme\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/Color\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"Default [color scheme](https://vega.github.io/vega/docs/schemes/) for sequential quantitative ramps.\"\n        },\n        \"symbol\": {\n          \"description\": \"Array of [symbol](https://vega.github.io/vega/docs/marks/symbol/) names or paths for the default shape palette.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/SymbolShape\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"RangeEnum\": {\n      \"enum\": [\n        \"width\",\n        \"height\",\n        \"symbol\",\n        \"category\",\n        \"ordinal\",\n        \"ramp\",\n        \"diverging\",\n        \"heatmap\"\n      ],\n      \"type\": \"string\"\n    },\n    \"RangeRaw\": {\n      \"items\": {\n        \"anyOf\": [\n          {\n            \"type\": \"null\"\n          },\n          {\n            \"type\": \"boolean\"\n          },\n          {\n            \"type\": \"string\"\n          },\n          {\n            \"type\": \"number\"\n          },\n          {\n            \"$ref\": \"#/definitions/RangeRawArray\"\n          }\n        ]\n      },\n      \"type\": \"array\"\n    },\n    \"RangeRawArray\": {\n      \"items\": {\n        \"type\": \"number\"\n      },\n      \"type\": \"array\"\n    },\n    \"RangeScheme\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/RangeEnum\"\n        },\n        {\n          \"$ref\": \"#/definitions/RangeRaw\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"count\": {\n              \"type\": \"number\"\n            },\n            \"extent\": {\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            \"scheme\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"items\": {\n                    \"type\": \"string\"\n                  },\n                  \"type\": \"array\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ColorScheme\"\n                }\n              ]\n            }\n          },\n          \"required\": [\n            \"scheme\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"RectConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\\\"left\\\"`, `\\\"right\\\"`, `\\\"center\\\"`.\\n\\n__Note:__ Expression reference is *not* supported for range marks.\"\n        },\n        \"angle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The rotation angle of the text, in degrees.\",\n              \"maximum\": 360,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aria\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ariaRole\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ariaRoleDescription\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aspect\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Whether to keep aspect ratio of image marks.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"baseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"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.\\n\\nFor range marks, the vertical alignment of the marks. One of `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`.\\n\\n__Note:__ Expression reference is *not* supported for range marks.\"\n        },\n        \"binSpacing\": {\n          \"description\": \"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).\\n\\n__Default value:__ `1`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"blend\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Blend\",\n              \"description\": \"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.\\n\\n__Default value: `\\\"source-over\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"color\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default color.\\n\\n__Default value:__ <span style=\\\"color: #4682b4;\\\">&#9632;</span> `\\\"#4682b4\\\"`\\n\\n__Note:__\\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.\"\n        },\n        \"continuousBandSize\": {\n          \"description\": \"The default size of the bars on continuous scales.\\n\\n__Default value:__ `5`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"cornerRadius\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles or arcs' corners.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusBottomLeft\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' bottom left corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusBottomRight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' bottom right corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusTopLeft\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' top right corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusTopRight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' top left corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cursor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Cursor\",\n              \"description\": \"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.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"description\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dir\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextDirection\",\n              \"description\": \"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.\\n\\n__Default value:__ `\\\"ltr\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"discreteBandSize\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/RelativeBandSize\"\n            }\n          ],\n          \"description\": \"The default size of the bars with discrete dimensions. If unspecified, the default size is  `step-2`, which provides 2 pixel offset between bars.\",\n          \"minimum\": 0\n        },\n        \"dx\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dy\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ellipsis\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The ellipsis string for text truncated in response to the limit parameter.\\n\\n__Default value:__ `\\\"…\\\"`\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"endAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fill\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\\n\\n__Default value:__ (None)\"\n        },\n        \"fillOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The fill opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"filled\": {\n          \"description\": \"Whether the mark's color should be used as fill color instead of stroke color.\\n\\n__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`.\\n\\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\",\n          \"type\": \"boolean\"\n        },\n        \"font\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The typeface to set the text in (e.g., `\\\"Helvetica Neue\\\"`).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font size, in pixels.\\n\\n__Default value:__ `11`\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"The font style (e.g., `\\\"italic\\\"`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"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`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"height\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Height of the marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"href\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/URI\",\n              \"description\": \"A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"innerRadius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"interpolate\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Interpolate\",\n              \"description\": \"The line interpolation method to use for line and area marks. One of the following:\\n- `\\\"linear\\\"`: piecewise linear segments, as in a polyline.\\n- `\\\"linear-closed\\\"`: close the linear segments to form a polygon.\\n- `\\\"step\\\"`: alternate between horizontal and vertical segments, as in a step function.\\n- `\\\"step-before\\\"`: alternate between vertical and horizontal segments, as in a step function.\\n- `\\\"step-after\\\"`: alternate between horizontal and vertical segments, as in a step function.\\n- `\\\"basis\\\"`: a B-spline, with control point duplication on the ends.\\n- `\\\"basis-open\\\"`: an open B-spline; may not intersect the start or end.\\n- `\\\"basis-closed\\\"`: a closed B-spline, as in a loop.\\n- `\\\"cardinal\\\"`: a Cardinal spline, with control point duplication on the ends.\\n- `\\\"cardinal-open\\\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\\n- `\\\"cardinal-closed\\\"`: a closed Cardinal spline, as in a loop.\\n- `\\\"bundle\\\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\\n- `\\\"monotone\\\"`: cubic interpolation that preserves monotonicity in y.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"invalid\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/MarkInvalidDataMode\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"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).\\n\\n- `\\\"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.\\n\\n- `\\\"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.\\n\\n- `\\\"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).\\n\\n- `\\\"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).\\n\\n- `\\\"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.\\n\\n__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.\"\n        },\n        \"limit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\\n\\n__Default value:__ `0` -- indicating no limit\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lineBreak\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"minBandSize\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The minimum band size for bar and rectangle marks. __Default value:__ `0.25`\"\n        },\n        \"opacity\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The overall opacity (value between [0,1]).\\n\\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"order\": {\n          \"description\": \"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.\",\n          \"type\": [\n            \"null\",\n            \"boolean\"\n          ]\n        },\n        \"orient\": {\n          \"$ref\": \"#/definitions/Orientation\",\n          \"description\": \"The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.\\n- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.\\n- For area, this property determines the orient property of the Vega output.\\n- 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.\"\n        },\n        \"outerRadius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"padAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The angular padding applied to sides of the arc, in radians.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"radius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"For arc mark, the primary (outer) radius in pixels.\\n\\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\\n\\n__Default value:__ `min(plot_width, plot_height)/2`\",\n          \"minimum\": 0\n        },\n        \"radius2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The secondary (inner) radius in pixels of arc marks.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"shape\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/SymbolShape\"\n                },\n                {\n                  \"type\": \"string\"\n                }\n              ],\n              \"description\": \"Shape of the point marks. Supported values include:\\n- plotting shapes: `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"cross\\\"`, `\\\"diamond\\\"`, `\\\"triangle-up\\\"`, `\\\"triangle-down\\\"`, `\\\"triangle-right\\\"`, or `\\\"triangle-left\\\"`.\\n- the line symbol `\\\"stroke\\\"`\\n- centered directional shapes `\\\"arrow\\\"`, `\\\"wedge\\\"`, or `\\\"triangle\\\"`\\n- 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.)\\n\\n__Default value:__ `\\\"circle\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"size\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default size for marks.\\n- 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.\\n- For `bar`, this represents the band size of the bar, in pixels.\\n- For `text`, this represents the font size, in pixels.\\n\\n__Default value:__\\n- `30` for point, circle, square marks; width/height's `step`\\n- `2` for bar marks with discrete dimensions;\\n- `5` for bar marks with continuous dimensions;\\n- `11` for text marks.\",\n          \"minimum\": 0\n        },\n        \"smooth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"startAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"stroke\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\\n\\n__Default value:__ (None)\"\n        },\n        \"strokeCap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeCap\",\n              \"description\": \"The stroke cap for line ending style. One of `\\\"butt\\\"`, `\\\"round\\\"`, or `\\\"square\\\"`.\\n\\n__Default value:__ `\\\"butt\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating stroke, space lengths for creating dashed or dotted lines.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The offset (in pixels) into which to begin drawing with the stroke dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeJoin\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeJoin\",\n              \"description\": \"The stroke line join method. One of `\\\"miter\\\"`, `\\\"round\\\"` or `\\\"bevel\\\"`.\\n\\n__Default value:__ `\\\"miter\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeMiterLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The miter limit at which to bevel a line join.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke width, in pixels.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"tension\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Depending on the interpolation type, sets the tension parameter (for line and area marks).\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"text\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\",\n              \"description\": \"Placeholder text if the `text` channel is not specified\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"theta\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"- 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.)\\n\\n- For text marks, polar coordinate angle in radians.\",\n          \"maximum\": 360,\n          \"minimum\": 0\n        },\n        \"theta2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise.\"\n        },\n        \"time\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"timeUnitBandPosition\": {\n          \"description\": \"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.\",\n          \"type\": \"number\"\n        },\n        \"timeUnitBandSize\": {\n          \"description\": \"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.\",\n          \"type\": \"number\"\n        },\n        \"tooltip\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/TooltipContent\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\\n\\n- If `tooltip` is `true` or `{\\\"content\\\": \\\"encoding\\\"}`, then all fields from `encoding` will be used.\\n- If `tooltip` is `{\\\"content\\\": \\\"data\\\"}`, then all fields that appear in the highlighted data point will be used.\\n- If set to `null` or `false`, then no tooltip will be used.\\n\\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\\n\\n__Default value:__ `null`\"\n        },\n        \"url\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/URI\",\n              \"description\": \"The URL of the image file for image marks.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"width\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Width of the marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"x\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"X coordinates of the marks, or width of horizontal `\\\"bar\\\"` and `\\\"area\\\"` without specified `x2` or `width`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"x2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"X2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"y\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Y coordinates of the marks, or height of vertical `\\\"bar\\\"` and `\\\"area\\\"` without specified `y2` or `height`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        },\n        \"y2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Y2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"RegressionTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"as\": {\n          \"description\": \"The output field names for the smoothed points generated by the regression transform.\\n\\n__Default value:__ The field names of the input x and y values.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"maxItems\": 2,\n          \"minItems\": 2,\n          \"type\": \"array\"\n        },\n        \"extent\": {\n          \"description\": \"A [min, max] domain over the independent (x) field for the starting and ending points of the generated trend line.\",\n          \"items\": {\n            \"type\": \"number\"\n          },\n          \"maxItems\": 2,\n          \"minItems\": 2,\n          \"type\": \"array\"\n        },\n        \"groupby\": {\n          \"description\": \"The data fields to group by. If not specified, a single group containing all data objects will be used.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        },\n        \"method\": {\n          \"description\": \"The functional form of the regression model. One of `\\\"linear\\\"`, `\\\"log\\\"`, `\\\"exp\\\"`, `\\\"pow\\\"`, `\\\"quad\\\"`, or `\\\"poly\\\"`.\\n\\n__Default value:__ `\\\"linear\\\"`\",\n          \"enum\": [\n            \"linear\",\n            \"log\",\n            \"exp\",\n            \"pow\",\n            \"quad\",\n            \"poly\"\n          ],\n          \"type\": \"string\"\n        },\n        \"on\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The data field of the independent variable to use a predictor.\"\n        },\n        \"order\": {\n          \"description\": \"The polynomial order (number of coefficients) for the 'poly' method.\\n\\n__Default value:__ `3`\",\n          \"type\": \"number\"\n        },\n        \"params\": {\n          \"description\": \"A boolean flag indicating if the transform should return the regression model parameters (one object per group), rather than trend line points. The resulting objects include a `coef` array of fitted coefficient values (starting with the intercept term and then including terms of increasing order) and an `rSquared` value (indicating the total variance explained by the model).\\n\\n__Default value:__ `false`\",\n          \"type\": \"boolean\"\n        },\n        \"regression\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The data field of the dependent variable to predict.\"\n        }\n      },\n      \"required\": [\n        \"regression\",\n        \"on\"\n      ],\n      \"type\": \"object\"\n    },\n    \"RelativeBandSize\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"band\": {\n          \"description\": \"The relative band size.  For example `0.5` means half of the band scale's band width.\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"band\"\n      ],\n      \"type\": \"object\"\n    },\n    \"RepeatMapping\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"column\": {\n          \"description\": \"An array of fields to be repeated horizontally.\",\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"type\": \"array\"\n        },\n        \"row\": {\n          \"description\": \"An array of fields to be repeated vertically.\",\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"RepeatRef\": {\n      \"additionalProperties\": false,\n      \"description\": \"Reference to a repeated value.\",\n      \"properties\": {\n        \"repeat\": {\n          \"enum\": [\n            \"row\",\n            \"column\",\n            \"repeat\",\n            \"layer\"\n          ],\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"repeat\"\n      ],\n      \"type\": \"object\"\n    },\n    \"RepeatSpec\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/NonLayerRepeatSpec\"\n        },\n        {\n          \"$ref\": \"#/definitions/LayerRepeatSpec\"\n        }\n      ]\n    },\n    \"Resolve\": {\n      \"additionalProperties\": false,\n      \"description\": \"Defines how scales, axes, and legends from different specs should be combined. Resolve is a mapping from `scale`, `axis`, and `legend` to a mapping from channels to resolutions. Scales and guides can be resolved to be `\\\"independent\\\"` or `\\\"shared\\\"`.\",\n      \"properties\": {\n        \"axis\": {\n          \"$ref\": \"#/definitions/AxisResolveMap\"\n        },\n        \"legend\": {\n          \"$ref\": \"#/definitions/LegendResolveMap\"\n        },\n        \"scale\": {\n          \"$ref\": \"#/definitions/ScaleResolveMap\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ResolveMode\": {\n      \"enum\": [\n        \"independent\",\n        \"shared\"\n      ],\n      \"type\": \"string\"\n    },\n    \"RowCol<LayoutAlign>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"column\": {\n          \"$ref\": \"#/definitions/LayoutAlign\"\n        },\n        \"row\": {\n          \"$ref\": \"#/definitions/LayoutAlign\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"RowCol<boolean>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"column\": {\n          \"type\": \"boolean\"\n        },\n        \"row\": {\n          \"type\": \"boolean\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"RowCol<number>\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"column\": {\n          \"type\": \"number\"\n        },\n        \"row\": {\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"RowColumnEncodingFieldDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"align\": {\n          \"$ref\": \"#/definitions/LayoutAlign\",\n          \"description\": \"The alignment to apply to row/column facet's subplot. The supported string values are `\\\"all\\\"`, `\\\"each\\\"`, and `\\\"none\\\"`.\\n\\n- For `\\\"none\\\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\\n- For `\\\"each\\\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\\n- For `\\\"all\\\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\\n\\n__Default value:__ `\\\"all\\\"`.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"center\": {\n          \"description\": \"Boolean flag indicating if facet's subviews should be centered relative to their respective rows or columns.\\n\\n__Default value:__ `false`\",\n          \"type\": \"boolean\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"header\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Header\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of a facet's header.\"\n        },\n        \"sort\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SortArray\"\n            },\n            {\n              \"$ref\": \"#/definitions/SortOrder\"\n            },\n            {\n              \"$ref\": \"#/definitions/EncodingSortField\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` is not supported for `row` and `column`.\"\n        },\n        \"spacing\": {\n          \"description\": \"The spacing in pixels between facet's sub-views.\\n\\n__Default value__: Depends on `\\\"spacing\\\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)\",\n          \"type\": \"number\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"SampleTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"sample\": {\n          \"description\": \"The maximum number of data objects to include in the sample.\\n\\n__Default value:__ `1000`\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"sample\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Scale\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The alignment of the steps within the scale range.\\n\\nThis value must lie in the range `[0,1]`. A value of `0.5` indicates that the steps should be centered within the range. A value of `0` or `1` may be used to shift the bands to one side, say to position them adjacent to an axis.\\n\\n__Default value:__ `0.5`\"\n        },\n        \"base\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The logarithm base of the `log` scale (default `10`).\"\n        },\n        \"bins\": {\n          \"$ref\": \"#/definitions/ScaleBins\",\n          \"description\": \"Bin boundaries can be provided to scales as either an explicit array of bin boundaries or as a bin specification object. The legal values are:\\n- An [array](../types/#Array) literal of bin boundary values. For example, `[0, 5, 10, 15, 20]`. The array must include both starting and ending boundaries. The previous example uses five values to indicate a total of four bin intervals: [0-5), [5-10), [10-15), [15-20]. Array literals may include signal references as elements.\\n- A [bin specification object](https://vega.github.io/vega-lite/docs/scale.html#bins) that indicates the bin _step_ size, and optionally the _start_ and _stop_ boundaries.\\n- An array of bin boundaries over the scale domain. If provided, axes and legends will use the bin boundaries to inform the choice of tick marks and text labels.\"\n        },\n        \"clamp\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"If `true`, values that exceed the data domain are clamped to either the minimum or maximum range value\\n\\n__Default value:__ derived from the [scale config](https://vega.github.io/vega-lite/docs/config.html#scale-config)'s `clamp` (`true` by default).\"\n        },\n        \"constant\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant determining the slope of the symlog function around zero. Only used for `symlog` scales.\\n\\n__Default value:__ `1`\"\n        },\n        \"domain\": {\n          \"anyOf\": [\n            {\n              \"items\": {\n                \"anyOf\": [\n                  {\n                    \"type\": \"null\"\n                  },\n                  {\n                    \"type\": \"string\"\n                  },\n                  {\n                    \"type\": \"number\"\n                  },\n                  {\n                    \"type\": \"boolean\"\n                  },\n                  {\n                    \"$ref\": \"#/definitions/DateTime\"\n                  },\n                  {\n                    \"$ref\": \"#/definitions/ExprRef\"\n                  }\n                ]\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"const\": \"unaggregated\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ParameterExtent\"\n            },\n            {\n              \"$ref\": \"#/definitions/DomainUnionWith\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Customized domain values in the form of constant values or dynamic values driven by a parameter.\\n\\n1) Constant `domain` for _quantitative_ fields can take one of the following forms:\\n\\n- A two-element array with minimum and maximum values. To create a diverging scale, this two-element array can be combined with the `domainMid` property.\\n- An array with more than two entries, for [Piecewise quantitative scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise).\\n- A string value `\\\"unaggregated\\\"`, if the input field is aggregated, to indicate that the domain should include the raw data values prior to the aggregation.\\n\\n2) Constant `domain` for _temporal_ fields can be a two-element array with minimum and maximum values, in the form of either timestamps or the [DateTime definition objects](https://vega.github.io/vega-lite/docs/types.html#datetime).\\n\\n3) Constant `domain` for _ordinal_ and _nominal_ fields can be an array that lists valid input values.\\n\\n4) To combine (union) specified constant domain with the field's values, `domain` can be an object with a `unionWith` property that specify constant domain to be combined. For example, `domain: {unionWith: [0, 100]}` for a quantitative scale means that the scale domain always includes `[0, 100]`, but will include other values in the fields beyond `[0, 100]`.\\n\\n5) Domain can also takes an object defining a field or encoding of a parameter that [interactively determines](https://vega.github.io/vega-lite/docs/selection.html#scale-domains) the scale domain.\"\n        },\n        \"domainMax\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/DateTime\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Sets the maximum value in the scale domain, overriding the `domain` property. This property is only intended for use with scales having continuous domains.\"\n        },\n        \"domainMid\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Inserts a single mid-point value into a two-element domain. The mid-point value must lie between the domain minimum and maximum values. This property can be useful for setting a midpoint for [diverging color scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise). The domainMid property is only intended for use with scales supporting continuous, piecewise domains.\"\n        },\n        \"domainMin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/DateTime\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.\"\n        },\n        \"domainRaw\": {\n          \"$ref\": \"#/definitions/ExprRef\",\n          \"description\": \"An expression for an array of raw values that, if non-null, directly overrides the _domain_ property. This is useful for supporting interactions such as panning or zooming a scale. The scale may be initially determined using a data-driven domain, then modified in response to user input by setting the rawDomain value.\"\n        },\n        \"exponent\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The exponent of the `pow` scale.\"\n        },\n        \"interpolate\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ScaleInterpolateEnum\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ScaleInterpolateParams\"\n            }\n          ],\n          \"description\": \"The interpolation method for range values. By default, a general interpolator for numbers, dates, strings and colors (in HCL space) is used. For color ranges, this property allows interpolation in alternative color spaces. Legal values include `rgb`, `hsl`, `hsl-long`, `lab`, `hcl`, `hcl-long`, `cubehelix` and `cubehelix-long` ('-long' variants use longer paths in polar coordinate spaces). If object-valued, this property accepts an object with a string-valued _type_ property and an optional numeric _gamma_ property applicable to rgb and cubehelix interpolators. For more, see the [d3-interpolate documentation](https://github.com/d3/d3-interpolate).\\n\\n* __Default value:__ `hcl`\"\n        },\n        \"nice\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeInterval\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeIntervalStep\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Extending the domain so that it starts and ends on nice round values. This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. Nicing is useful if the domain is computed from data and may be irregular. For example, for a domain of _[0.201479…, 0.996679…]_, a nice domain might be _[0.2, 1.0]_.\\n\\nFor quantitative scales such as linear, `nice` can be either a boolean flag or a number. If `nice` is a number, it will represent a desired tick count. This allows greater control over the step size used to extend the bounds, guaranteeing that the returned ticks will exactly cover the domain.\\n\\nFor temporal fields with time and utc scales, the `nice` value can be a string indicating the desired time interval. Legal values are `\\\"millisecond\\\"`, `\\\"second\\\"`, `\\\"minute\\\"`, `\\\"hour\\\"`, `\\\"day\\\"`, `\\\"week\\\"`, `\\\"month\\\"`, and `\\\"year\\\"`. Alternatively, `time` and `utc` scales can accept an object-valued interval specifier of the form `{\\\"interval\\\": \\\"month\\\", \\\"step\\\": 3}`, which includes a desired number of interval steps. Here, the domain would snap to quarter (Jan, Apr, Jul, Oct) boundaries.\\n\\n__Default value:__ `true` for unbinned _quantitative_ fields without explicit domain bounds; `false` otherwise.\"\n        },\n        \"padding\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"For _[continuous](https://vega.github.io/vega-lite/docs/scale.html#continuous)_ scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the `zero`, `nice`, `domainMin`, and `domainMax` properties.\\n\\nFor _[band](https://vega.github.io/vega-lite/docs/scale.html#band)_ scales, shortcut for setting `paddingInner` and `paddingOuter` to the same value.\\n\\nFor _[point](https://vega.github.io/vega-lite/docs/scale.html#point)_ scales, alias for `paddingOuter`.\\n\\n__Default value:__ For _continuous_ scales, derived from the [scale config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `continuousPadding`. For _band and point_ scales, see `paddingInner` and `paddingOuter`. By default, Vega-Lite sets padding such that _width/height = number of unique values * step_.\",\n          \"minimum\": 0\n        },\n        \"paddingInner\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1].\\n\\nFor point scale, this property is invalid as point scales do not have internal band widths (only step sizes between bands).\\n\\n__Default value:__ derived from the [scale config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `bandPaddingInner`.\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"paddingOuter\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The outer padding (spacing) at the ends of the range of band and point scales, as a fraction of the step size. This value must lie in the range [0,1].\\n\\n__Default value:__ derived from the [scale config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `bandPaddingOuter` for band scales and `pointPadding` for point scales. By default, Vega-Lite sets outer padding such that _width/height = number of unique values * step_.\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"range\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/RangeEnum\"\n            },\n            {\n              \"items\": {\n                \"anyOf\": [\n                  {\n                    \"type\": \"number\"\n                  },\n                  {\n                    \"type\": \"string\"\n                  },\n                  {\n                    \"items\": {\n                      \"type\": \"number\"\n                    },\n                    \"type\": \"array\"\n                  },\n                  {\n                    \"$ref\": \"#/definitions/ExprRef\"\n                  }\n                ]\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/FieldRange\"\n            }\n          ],\n          \"description\": \"The range of the scale. One of:\\n\\n- A string indicating a [pre-defined named scale range](https://vega.github.io/vega-lite/docs/scale.html#range-config) (e.g., example, `\\\"symbol\\\"`, or `\\\"diverging\\\"`).\\n\\n- For [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous), two-element array indicating  minimum and maximum values, or an array with more than two entries for specifying a [piecewise scale](https://vega.github.io/vega-lite/docs/scale.html#piecewise).\\n\\n- For [discrete](https://vega.github.io/vega-lite/docs/scale.html#discrete) and [discretizing](https://vega.github.io/vega-lite/docs/scale.html#discretizing) scales, an array of desired output values or an object with a `field` property representing the range values.  For example, if a field `color` contains CSS color names, we can set `range` to `{field: \\\"color\\\"}`.\\n\\n__Notes:__\\n\\n1) For color scales you can also specify a color [`scheme`](https://vega.github.io/vega-lite/docs/scale.html#scheme) instead of `range`.\\n\\n2) Any directly specified `range` for `x` and `y` channels will be ignored. Range can be customized via the view's corresponding [size](https://vega.github.io/vega-lite/docs/size.html) (`width` and `height`).\"\n        },\n        \"rangeMax\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Sets the maximum value in the scale range, overriding the `range` property or the default range. This property is only intended for use with scales having continuous ranges.\"\n        },\n        \"rangeMin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Sets the minimum value in the scale range, overriding the `range` property or the default range. This property is only intended for use with scales having continuous ranges.\"\n        },\n        \"reverse\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"If true, reverses the order of the scale range. __Default value:__ `false`.\"\n        },\n        \"round\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"If `true`, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid.\\n\\n__Default value:__ `false`.\"\n        },\n        \"scheme\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ColorScheme\"\n            },\n            {\n              \"$ref\": \"#/definitions/SchemeParams\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A string indicating a color [scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme) name (e.g., `\\\"category10\\\"` or `\\\"blues\\\"`) or a [scheme parameter object](https://vega.github.io/vega-lite/docs/scale.html#scheme-params).\\n\\nDiscrete color schemes may be used with [discrete](https://vega.github.io/vega-lite/docs/scale.html#discrete) or [discretizing](https://vega.github.io/vega-lite/docs/scale.html#discretizing) scales. Continuous color schemes are intended for use with color scales.\\n\\nTo set a custom scheme, instead set the list of values [as the scale range](https://vega.github.io/vega-lite/docs/scale.html#2-setting-the-range-property-to-an-array-of-valid-css-color-strings).\\n\\nFor the full list of supported schemes, please refer to the [Vega Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/ScaleType\",\n          \"description\": \"The type of scale. Vega-Lite supports the following categories of scale types:\\n\\n1) [**Continuous Scales**](https://vega.github.io/vega-lite/docs/scale.html#continuous) -- mapping continuous domains to continuous output ranges ([`\\\"linear\\\"`](https://vega.github.io/vega-lite/docs/scale.html#linear), [`\\\"pow\\\"`](https://vega.github.io/vega-lite/docs/scale.html#pow), [`\\\"sqrt\\\"`](https://vega.github.io/vega-lite/docs/scale.html#sqrt), [`\\\"symlog\\\"`](https://vega.github.io/vega-lite/docs/scale.html#symlog), [`\\\"log\\\"`](https://vega.github.io/vega-lite/docs/scale.html#log), [`\\\"time\\\"`](https://vega.github.io/vega-lite/docs/scale.html#time), [`\\\"utc\\\"`](https://vega.github.io/vega-lite/docs/scale.html#utc).\\n\\n2) [**Discrete Scales**](https://vega.github.io/vega-lite/docs/scale.html#discrete) -- mapping discrete domains to discrete ([`\\\"ordinal\\\"`](https://vega.github.io/vega-lite/docs/scale.html#ordinal)) or continuous ([`\\\"band\\\"`](https://vega.github.io/vega-lite/docs/scale.html#band) and [`\\\"point\\\"`](https://vega.github.io/vega-lite/docs/scale.html#point)) output ranges.\\n\\n3) [**Discretizing Scales**](https://vega.github.io/vega-lite/docs/scale.html#discretizing) -- mapping continuous domains to discrete output ranges [`\\\"bin-ordinal\\\"`](https://vega.github.io/vega-lite/docs/scale.html#bin-ordinal), [`\\\"quantile\\\"`](https://vega.github.io/vega-lite/docs/scale.html#quantile), [`\\\"quantize\\\"`](https://vega.github.io/vega-lite/docs/scale.html#quantize) and [`\\\"threshold\\\"`](https://vega.github.io/vega-lite/docs/scale.html#threshold).\\n\\n__Default value:__ please see the [scale type table](https://vega.github.io/vega-lite/docs/scale.html#type).\"\n        },\n        \"zero\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"If `true`, ensures that a zero baseline value is included in the scale domain.\\n\\n__Default value:__ `true` for x and y channels if the quantitative field is not binned and no custom `domain` is provided; `false` otherwise.\\n\\n__Note:__ Log, time, and utc scales do not support `zero`.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleBinParams\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"start\": {\n          \"description\": \"The starting (lowest-valued) bin boundary.\\n\\n__Default value:__ The lowest value of the scale domain will be used.\",\n          \"type\": \"number\"\n        },\n        \"step\": {\n          \"description\": \"The step size defining the bin interval width.\",\n          \"type\": \"number\"\n        },\n        \"stop\": {\n          \"description\": \"The stopping (highest-valued) bin boundary.\\n\\n__Default value:__ The highest value of the scale domain will be used.\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"step\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ScaleBins\": {\n      \"anyOf\": [\n        {\n          \"items\": {\n            \"type\": \"number\"\n          },\n          \"type\": \"array\"\n        },\n        {\n          \"$ref\": \"#/definitions/ScaleBinParams\"\n        }\n      ]\n    },\n    \"ScaleConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"animationDuration\": {\n          \"description\": \"Default animation duration (in seconds) for time encodings, except for [`band`](https://vega.github.io/vega-lite/docs/scale.html#band) scales.\\n\\n__Default value:__ `5`\",\n          \"type\": \"number\"\n        },\n        \"bandPaddingInner\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default inner padding for `x` and `y` band scales.\\n\\n__Default value:__\\n- `nestedOffsetPaddingInner` for x/y scales with nested x/y offset scales.\\n- `barBandPaddingInner` for bar marks (`0.1` by default)\\n- `rectBandPaddingInner` for rect and other marks (`0` by default)\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"bandPaddingOuter\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default outer padding for `x` and `y` band scales.\\n\\n__Default value:__ `paddingInner/2` (which makes _width/height = number of unique values * step_)\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"bandWithNestedOffsetPaddingInner\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default inner padding for `x` and `y` band scales with nested `xOffset` and `yOffset` encoding.\\n\\n__Default value:__ `0.2`\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"bandWithNestedOffsetPaddingOuter\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default outer padding for `x` and `y` band scales with nested `xOffset` and `yOffset` encoding.\\n\\n__Default value:__ `0.2`\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"barBandPaddingInner\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default inner padding for `x` and `y` band-ordinal scales of `\\\"bar\\\"` marks.\\n\\n__Default value:__ `0.1`\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"clamp\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"If true, values that exceed the data domain are clamped to either the minimum or maximum range value\"\n        },\n        \"continuousPadding\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default padding for continuous x/y scales.\\n\\n__Default:__ The bar width for continuous x-scale of a vertical bar and continuous y-scale of a horizontal bar.; `0` otherwise.\",\n          \"minimum\": 0\n        },\n        \"framesPerSecond\": {\n          \"description\": \"Default framerate (frames per second) for time [`band`](https://vega.github.io/vega-lite/docs/scale.html#band) scales.\\n\\n__Default value:__ `2`\",\n          \"type\": \"number\"\n        },\n        \"invalid\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataConfig\",\n          \"description\": \"An object that defines scale outputs per channel for invalid values (nulls and NaNs on a continuous scale).\\n- The keys in this object are the scale channels.\\n- The values is either `\\\"zero-or-min\\\"` (use zero if the scale includes zero or min value otherwise) or a value definition `{value: ...}`.\\n\\n_Example:_ Setting this `config.scale.invalid` property to `{color: {value: '#aaa'}}` will make the visualization color all invalid values with '#aaa'.\\n\\nSee [https://vega.github.io/vega-lite/docs/invalid-data.html](Invalid Data Docs) for more details.\"\n        },\n        \"maxBandSize\": {\n          \"description\": \"The default max value for mapping quantitative fields to bar's size/bandSize.\\n\\nIf undefined (default), we will use the axis's size (width or height) - 1.\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"maxFontSize\": {\n          \"description\": \"The default max value for mapping quantitative fields to text's size/fontSize scale.\\n\\n__Default value:__ `40`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"maxOpacity\": {\n          \"description\": \"Default max opacity for mapping a field to opacity.\\n\\n__Default value:__ `0.8`\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"maxSize\": {\n          \"description\": \"Default max value for point size scale.\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"maxStrokeWidth\": {\n          \"description\": \"Default max strokeWidth for the scale of strokeWidth for rule and line marks and of size for trail marks.\\n\\n__Default value:__ `4`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"minBandSize\": {\n          \"description\": \"The default min value for mapping quantitative fields to bar and tick's size/bandSize scale.\\n\\n__Default value:__ `2`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"minFontSize\": {\n          \"description\": \"The default min value for mapping quantitative fields to text's size/fontSize scale.\\n\\n__Default value:__ `8`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"minOpacity\": {\n          \"description\": \"Default minimum opacity for mapping a field to opacity.\\n\\n__Default value:__ `0.3`\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"minSize\": {\n          \"description\": \"Default minimum value for point size scale.\\n\\n__Default value:__ `9`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"minStrokeWidth\": {\n          \"description\": \"Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and of size for trail marks.\\n\\n__Default value:__ `1`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"offsetBandPaddingInner\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default padding inner for xOffset/yOffset's band scales.\\n\\n__Default Value:__ `0`\"\n        },\n        \"offsetBandPaddingOuter\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default padding outer for xOffset/yOffset's band scales.\\n\\n__Default Value:__ `0`\"\n        },\n        \"pointPadding\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default outer padding for `x` and `y` point-ordinal scales.\\n\\n__Default value:__ `0.5` (which makes _width/height = number of unique values * step_)\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"quantileCount\": {\n          \"description\": \"Default range cardinality for [`quantile`](https://vega.github.io/vega-lite/docs/scale.html#quantile) scale.\\n\\n__Default value:__ `4`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"quantizeCount\": {\n          \"description\": \"Default range cardinality for [`quantize`](https://vega.github.io/vega-lite/docs/scale.html#quantize) scale.\\n\\n__Default value:__ `4`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"rectBandPaddingInner\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default inner padding for `x` and `y` band-ordinal scales of `\\\"rect\\\"` marks.\\n\\n__Default value:__ `0`\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"round\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"If true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid. (Only available for `x`, `y`, and `size` scales.)\"\n        },\n        \"tickBandPaddingInner\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default inner padding for `x` and `y` band-ordinal scales of `\\\"tick\\\"` marks.\\n\\n__Default value:__ `0.25`\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"useUnaggregatedDomain\": {\n          \"description\": \"Use the source data range before aggregation as scale domain instead of aggregated data for aggregate axis.\\n\\nThis is equivalent to setting `domain` to `\\\"unaggregate\\\"` for aggregated _quantitative_ fields by default.\\n\\nThis property only works with aggregate functions that produce values within the raw data domain (`\\\"mean\\\"`, `\\\"average\\\"`, `\\\"median\\\"`, `\\\"q1\\\"`, `\\\"q3\\\"`, `\\\"min\\\"`, `\\\"max\\\"`). For other aggregations that produce values outside of the raw data domain (e.g. `\\\"count\\\"`, `\\\"sum\\\"`), this property is ignored.\\n\\n__Default value:__ `false`\",\n          \"type\": \"boolean\"\n        },\n        \"xReverse\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Reverse x-scale by default (useful for right-to-left charts).\"\n        },\n        \"zero\": {\n          \"description\": \"Default `scale.zero` for [`continuous`](https://vega.github.io/vega-lite/docs/scale.html#continuous) scales except for (1) x/y-scales of non-ranged bar or area charts and (2) size scales.\\n\\n__Default value:__ `true`\",\n          \"type\": \"boolean\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleDatumDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"datum\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/PrimitiveValue\"\n            },\n            {\n              \"$ref\": \"#/definitions/DateTime\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"$ref\": \"#/definitions/RepeatRef\"\n            }\n          ],\n          \"description\": \"A constant value in data domain.\"\n        },\n        \"scale\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Scale\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/Type\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleFieldDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"scale\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Scale\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n        },\n        \"sort\": {\n          \"$ref\": \"#/definitions/Sort\",\n          \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInterpolateEnum\": {\n      \"enum\": [\n        \"rgb\",\n        \"lab\",\n        \"hcl\",\n        \"hsl\",\n        \"hsl-long\",\n        \"hcl-long\",\n        \"cubehelix\",\n        \"cubehelix-long\"\n      ],\n      \"type\": \"string\"\n    },\n    \"ScaleInterpolateParams\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"gamma\": {\n          \"type\": \"number\"\n        },\n        \"type\": {\n          \"enum\": [\n            \"rgb\",\n            \"cubehelix\",\n            \"cubehelix-long\"\n          ],\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"type\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"angle\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"angle\\\">\"\n        },\n        \"color\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"color\\\">\"\n        },\n        \"fill\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"fill\\\">\"\n        },\n        \"fillOpacity\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"fillOpacity\\\">\"\n        },\n        \"opacity\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"opacity\\\">\"\n        },\n        \"radius\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"radius\\\">\"\n        },\n        \"shape\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"shape\\\">\"\n        },\n        \"size\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"size\\\">\"\n        },\n        \"stroke\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"stroke\\\">\"\n        },\n        \"strokeDash\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"strokeDash\\\">\"\n        },\n        \"strokeOpacity\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"strokeOpacity\\\">\"\n        },\n        \"strokeWidth\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"strokeWidth\\\">\"\n        },\n        \"theta\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"theta\\\">\"\n        },\n        \"time\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"time\\\">\"\n        },\n        \"x\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"x\\\">\"\n        },\n        \"xOffset\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"xOffset\\\">\"\n        },\n        \"y\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"y\\\">\"\n        },\n        \"yOffset\": {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAs<\\\"yOffset\\\">\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAs<\\\"angle\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"angle\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"color\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"color\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"fill\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"fill\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"fillOpacity\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"fillOpacity\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"opacity\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"opacity\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"radius\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"radius\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"shape\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"shape\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"size\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"size\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"stroke\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"stroke\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"strokeDash\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"strokeDash\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"strokeOpacity\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"strokeOpacity\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"strokeWidth\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"strokeWidth\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"theta\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"theta\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"time\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"time\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"x\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"x\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"xOffset\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"xOffset\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"y\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"y\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAs<\\\"yOffset\\\">\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/ScaleInvalidDataShowAsValue<\\\"yOffset\\\">\"\n        },\n        {\n          \"const\": \"zero-or-min\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"angle\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"description\": \"The rotation angle of the text, in degrees.\",\n          \"maximum\": 360,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"color\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            }\n          ],\n          \"description\": \"Default color.\\n\\n__Default value:__ <span style=\\\"color: #4682b4;\\\">&#9632;</span> `\\\"#4682b4\\\"`\\n\\n__Note:__\\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"fill\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\\n\\n__Default value:__ (None)\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"fillOpacity\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"description\": \"The fill opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"opacity\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"description\": \"The overall opacity (value between [0,1]).\\n\\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"radius\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"description\": \"For arc mark, the primary (outer) radius in pixels.\\n\\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\\n\\n__Default value:__ `min(plot_width, plot_height)/2`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"shape\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SymbolShape\"\n            },\n            {\n              \"type\": \"string\"\n            }\n          ],\n          \"description\": \"Shape of the point marks. Supported values include:\\n- plotting shapes: `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"cross\\\"`, `\\\"diamond\\\"`, `\\\"triangle-up\\\"`, `\\\"triangle-down\\\"`, `\\\"triangle-right\\\"`, or `\\\"triangle-left\\\"`.\\n- the line symbol `\\\"stroke\\\"`\\n- centered directional shapes `\\\"arrow\\\"`, `\\\"wedge\\\"`, or `\\\"triangle\\\"`\\n- 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.)\\n\\n__Default value:__ `\\\"circle\\\"`\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"size\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"description\": \"Default size for marks.\\n- 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.\\n- For `bar`, this represents the band size of the bar, in pixels.\\n- For `text`, this represents the font size, in pixels.\\n\\n__Default value:__\\n- `30` for point, circle, square marks; width/height's `step`\\n- `2` for bar marks with discrete dimensions;\\n- `5` for bar marks with continuous dimensions;\\n- `11` for text marks.\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"stroke\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\\n\\n__Default value:__ (None)\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"strokeDash\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"description\": \"An array of alternating stroke, space lengths for creating dashed or dotted lines.\",\n          \"items\": {\n            \"type\": \"number\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"strokeOpacity\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"description\": \"The stroke opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"strokeWidth\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"description\": \"The stroke width, in pixels.\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"theta\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"description\": \"- 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.)\\n\\n- For text marks, polar coordinate angle in radians.\",\n          \"maximum\": 360,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"time\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"x\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            }\n          ],\n          \"description\": \"X coordinates of the marks, or width of horizontal `\\\"bar\\\"` and `\\\"area\\\"` without specified `x2` or `width`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"xOffset\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"description\": \"Offset for x-position.\",\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"y\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            }\n          ],\n          \"description\": \"Y coordinates of the marks, or height of vertical `\\\"bar\\\"` and `\\\"area\\\"` without specified `y2` or `height`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleInvalidDataShowAsValue<\\\"yOffset\\\">\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"value\": {\n          \"description\": \"Offset for y-position.\",\n          \"type\": \"number\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleResolveMap\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"angle\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"color\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"fill\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"fillOpacity\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"opacity\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"radius\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"shape\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"size\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"stroke\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"strokeDash\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"strokeOpacity\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"strokeWidth\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"theta\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"time\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"x\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"xOffset\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"y\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        },\n        \"yOffset\": {\n          \"$ref\": \"#/definitions/ResolveMode\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ScaleType\": {\n      \"enum\": [\n        \"linear\",\n        \"log\",\n        \"pow\",\n        \"sqrt\",\n        \"symlog\",\n        \"identity\",\n        \"sequential\",\n        \"time\",\n        \"utc\",\n        \"quantile\",\n        \"quantize\",\n        \"threshold\",\n        \"bin-ordinal\",\n        \"ordinal\",\n        \"point\",\n        \"band\"\n      ],\n      \"type\": \"string\"\n    },\n    \"SchemeParams\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"count\": {\n          \"description\": \"The number of colors to use in the scheme. This can be useful for scale types such as `\\\"quantize\\\"`, which use the length of the scale range to determine the number of discrete bins for the scale domain.\",\n          \"type\": \"number\"\n        },\n        \"extent\": {\n          \"description\": \"The extent of the color range to use. For example `[0.2, 1]` will rescale the color scheme such that color values in the range _[0, 0.2)_ are excluded from the scheme.\",\n          \"items\": {\n            \"type\": \"number\"\n          },\n          \"type\": \"array\"\n        },\n        \"name\": {\n          \"$ref\": \"#/definitions/ColorScheme\",\n          \"description\": \"A color scheme name for ordinal scales (e.g., `\\\"category10\\\"` or `\\\"blues\\\"`).\\n\\nFor the full list of supported schemes, please refer to the [Vega Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference.\"\n        }\n      },\n      \"required\": [\n        \"name\"\n      ],\n      \"type\": \"object\"\n    },\n    \"SecondaryFieldDef\": {\n      \"additionalProperties\": false,\n      \"description\": \"A field definition of a secondary channel that shares a scale with another primary channel. For example, `x2`, `xError` and `xError2` share the same scale with `x`.\",\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\",\n          \"type\": \"null\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"SelectionConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"interval\": {\n          \"$ref\": \"#/definitions/IntervalSelectionConfigWithoutType\",\n          \"description\": \"The default definition for an [`interval`](https://vega.github.io/vega-lite/docs/parameter.html#select) selection. All properties and transformations for an interval selection definition (except `type`) may be specified here.\\n\\nFor instance, setting `interval` to `{\\\"translate\\\": false}` disables the ability to move interval selections by default.\"\n        },\n        \"point\": {\n          \"$ref\": \"#/definitions/PointSelectionConfigWithoutType\",\n          \"description\": \"The default definition for a [`point`](https://vega.github.io/vega-lite/docs/parameter.html#select) selection. All properties and transformations  for a point selection definition (except `type`) may be specified here.\\n\\nFor instance, setting `point` to `{\\\"on\\\": \\\"dblclick\\\"}` populates point selections on double-click by default.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"SelectionInit\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/PrimitiveValue\"\n        },\n        {\n          \"$ref\": \"#/definitions/DateTime\"\n        }\n      ]\n    },\n    \"SelectionInitInterval\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/Vector2<boolean>\"\n        },\n        {\n          \"$ref\": \"#/definitions/Vector2<number>\"\n        },\n        {\n          \"$ref\": \"#/definitions/Vector2<string>\"\n        },\n        {\n          \"$ref\": \"#/definitions/Vector2<DateTime>\"\n        }\n      ]\n    },\n    \"SelectionInitIntervalMapping\": {\n      \"$ref\": \"#/definitions/Dict<SelectionInitInterval>\"\n    },\n    \"SelectionInitMapping\": {\n      \"$ref\": \"#/definitions/Dict<SelectionInit>\"\n    },\n    \"SelectionParameter\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"bind\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Binding\"\n            },\n            {\n              \"additionalProperties\": {\n                \"$ref\": \"#/definitions/Binding\"\n              },\n              \"type\": \"object\"\n            },\n            {\n              \"$ref\": \"#/definitions/LegendBinding\"\n            },\n            {\n              \"const\": \"scales\",\n              \"type\": \"string\"\n            }\n          ],\n          \"description\": \"When set, a selection is populated by input elements (also known as dynamic query widgets) or by interacting with the corresponding legend. Direct manipulation interaction is disabled by default; to re-enable it, set the selection's [`on`](https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties) property.\\n\\nLegend bindings are restricted to selections that only specify a single field or encoding.\\n\\nQuery widget binding takes the form of Vega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind) or can be a mapping between projected field/encodings and binding definitions.\\n\\n__See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation.\"\n        },\n        \"name\": {\n          \"$ref\": \"#/definitions/ParameterName\",\n          \"description\": \"Required. A unique name for the selection parameter. Selection names should be valid JavaScript identifiers: they should contain only alphanumeric characters (or \\\"$\\\", or \\\"_\\\") and may not start with a digit. Reserved keywords that may not be used as parameter names are \\\"datum\\\", \\\"event\\\", \\\"item\\\", and \\\"parent\\\".\"\n        },\n        \"select\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SelectionType\"\n            },\n            {\n              \"$ref\": \"#/definitions/PointSelectionConfig\"\n            },\n            {\n              \"$ref\": \"#/definitions/IntervalSelectionConfig\"\n            }\n          ],\n          \"description\": \"Determines the default event processing and data query for the selection. Vega-Lite currently supports two selection types:\\n\\n- `\\\"point\\\"` -- to select multiple discrete data values; the first value is selected on `click` and additional values toggled on shift-click.\\n- `\\\"interval\\\"` -- to select a continuous range of data values on `drag`.\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SelectionInit\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/SelectionInitMapping\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/SelectionInitIntervalMapping\"\n            }\n          ],\n          \"description\": \"Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/selection.html#project) and initial values.\\n\\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/value.html) documentation.\"\n        }\n      },\n      \"required\": [\n        \"name\",\n        \"select\"\n      ],\n      \"type\": \"object\"\n    },\n    \"SelectionResolution\": {\n      \"enum\": [\n        \"global\",\n        \"union\",\n        \"intersect\"\n      ],\n      \"type\": \"string\"\n    },\n    \"SelectionType\": {\n      \"enum\": [\n        \"point\",\n        \"interval\"\n      ],\n      \"type\": \"string\"\n    },\n    \"SequenceGenerator\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"name\": {\n          \"description\": \"Provide a placeholder name and bind data at runtime.\",\n          \"type\": \"string\"\n        },\n        \"sequence\": {\n          \"$ref\": \"#/definitions/SequenceParams\",\n          \"description\": \"Generate a sequence of numbers.\"\n        }\n      },\n      \"required\": [\n        \"sequence\"\n      ],\n      \"type\": \"object\"\n    },\n    \"SequenceParams\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"as\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The name of the generated sequence field.\\n\\n__Default value:__ `\\\"data\\\"`\"\n        },\n        \"start\": {\n          \"description\": \"The starting value of the sequence (inclusive).\",\n          \"type\": \"number\"\n        },\n        \"step\": {\n          \"description\": \"The step value between sequence entries.\\n\\n__Default value:__ `1`\",\n          \"type\": \"number\"\n        },\n        \"stop\": {\n          \"description\": \"The ending value of the sequence (exclusive).\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"start\",\n        \"stop\"\n      ],\n      \"type\": \"object\"\n    },\n    \"SequentialMultiHue\": {\n      \"enum\": [\n        \"turbo\",\n        \"viridis\",\n        \"inferno\",\n        \"magma\",\n        \"plasma\",\n        \"cividis\",\n        \"bluegreen\",\n        \"bluegreen-3\",\n        \"bluegreen-4\",\n        \"bluegreen-5\",\n        \"bluegreen-6\",\n        \"bluegreen-7\",\n        \"bluegreen-8\",\n        \"bluegreen-9\",\n        \"bluepurple\",\n        \"bluepurple-3\",\n        \"bluepurple-4\",\n        \"bluepurple-5\",\n        \"bluepurple-6\",\n        \"bluepurple-7\",\n        \"bluepurple-8\",\n        \"bluepurple-9\",\n        \"goldgreen\",\n        \"goldgreen-3\",\n        \"goldgreen-4\",\n        \"goldgreen-5\",\n        \"goldgreen-6\",\n        \"goldgreen-7\",\n        \"goldgreen-8\",\n        \"goldgreen-9\",\n        \"goldorange\",\n        \"goldorange-3\",\n        \"goldorange-4\",\n        \"goldorange-5\",\n        \"goldorange-6\",\n        \"goldorange-7\",\n        \"goldorange-8\",\n        \"goldorange-9\",\n        \"goldred\",\n        \"goldred-3\",\n        \"goldred-4\",\n        \"goldred-5\",\n        \"goldred-6\",\n        \"goldred-7\",\n        \"goldred-8\",\n        \"goldred-9\",\n        \"greenblue\",\n        \"greenblue-3\",\n        \"greenblue-4\",\n        \"greenblue-5\",\n        \"greenblue-6\",\n        \"greenblue-7\",\n        \"greenblue-8\",\n        \"greenblue-9\",\n        \"orangered\",\n        \"orangered-3\",\n        \"orangered-4\",\n        \"orangered-5\",\n        \"orangered-6\",\n        \"orangered-7\",\n        \"orangered-8\",\n        \"orangered-9\",\n        \"purplebluegreen\",\n        \"purplebluegreen-3\",\n        \"purplebluegreen-4\",\n        \"purplebluegreen-5\",\n        \"purplebluegreen-6\",\n        \"purplebluegreen-7\",\n        \"purplebluegreen-8\",\n        \"purplebluegreen-9\",\n        \"purpleblue\",\n        \"purpleblue-3\",\n        \"purpleblue-4\",\n        \"purpleblue-5\",\n        \"purpleblue-6\",\n        \"purpleblue-7\",\n        \"purpleblue-8\",\n        \"purpleblue-9\",\n        \"purplered\",\n        \"purplered-3\",\n        \"purplered-4\",\n        \"purplered-5\",\n        \"purplered-6\",\n        \"purplered-7\",\n        \"purplered-8\",\n        \"purplered-9\",\n        \"redpurple\",\n        \"redpurple-3\",\n        \"redpurple-4\",\n        \"redpurple-5\",\n        \"redpurple-6\",\n        \"redpurple-7\",\n        \"redpurple-8\",\n        \"redpurple-9\",\n        \"yellowgreenblue\",\n        \"yellowgreenblue-3\",\n        \"yellowgreenblue-4\",\n        \"yellowgreenblue-5\",\n        \"yellowgreenblue-6\",\n        \"yellowgreenblue-7\",\n        \"yellowgreenblue-8\",\n        \"yellowgreenblue-9\",\n        \"yellowgreen\",\n        \"yellowgreen-3\",\n        \"yellowgreen-4\",\n        \"yellowgreen-5\",\n        \"yellowgreen-6\",\n        \"yellowgreen-7\",\n        \"yellowgreen-8\",\n        \"yellowgreen-9\",\n        \"yelloworangebrown\",\n        \"yelloworangebrown-3\",\n        \"yelloworangebrown-4\",\n        \"yelloworangebrown-5\",\n        \"yelloworangebrown-6\",\n        \"yelloworangebrown-7\",\n        \"yelloworangebrown-8\",\n        \"yelloworangebrown-9\",\n        \"yelloworangered\",\n        \"yelloworangered-3\",\n        \"yelloworangered-4\",\n        \"yelloworangered-5\",\n        \"yelloworangered-6\",\n        \"yelloworangered-7\",\n        \"yelloworangered-8\",\n        \"yelloworangered-9\",\n        \"darkblue\",\n        \"darkblue-3\",\n        \"darkblue-4\",\n        \"darkblue-5\",\n        \"darkblue-6\",\n        \"darkblue-7\",\n        \"darkblue-8\",\n        \"darkblue-9\",\n        \"darkgold\",\n        \"darkgold-3\",\n        \"darkgold-4\",\n        \"darkgold-5\",\n        \"darkgold-6\",\n        \"darkgold-7\",\n        \"darkgold-8\",\n        \"darkgold-9\",\n        \"darkgreen\",\n        \"darkgreen-3\",\n        \"darkgreen-4\",\n        \"darkgreen-5\",\n        \"darkgreen-6\",\n        \"darkgreen-7\",\n        \"darkgreen-8\",\n        \"darkgreen-9\",\n        \"darkmulti\",\n        \"darkmulti-3\",\n        \"darkmulti-4\",\n        \"darkmulti-5\",\n        \"darkmulti-6\",\n        \"darkmulti-7\",\n        \"darkmulti-8\",\n        \"darkmulti-9\",\n        \"darkred\",\n        \"darkred-3\",\n        \"darkred-4\",\n        \"darkred-5\",\n        \"darkred-6\",\n        \"darkred-7\",\n        \"darkred-8\",\n        \"darkred-9\",\n        \"lightgreyred\",\n        \"lightgreyred-3\",\n        \"lightgreyred-4\",\n        \"lightgreyred-5\",\n        \"lightgreyred-6\",\n        \"lightgreyred-7\",\n        \"lightgreyred-8\",\n        \"lightgreyred-9\",\n        \"lightgreyteal\",\n        \"lightgreyteal-3\",\n        \"lightgreyteal-4\",\n        \"lightgreyteal-5\",\n        \"lightgreyteal-6\",\n        \"lightgreyteal-7\",\n        \"lightgreyteal-8\",\n        \"lightgreyteal-9\",\n        \"lightmulti\",\n        \"lightmulti-3\",\n        \"lightmulti-4\",\n        \"lightmulti-5\",\n        \"lightmulti-6\",\n        \"lightmulti-7\",\n        \"lightmulti-8\",\n        \"lightmulti-9\",\n        \"lightorange\",\n        \"lightorange-3\",\n        \"lightorange-4\",\n        \"lightorange-5\",\n        \"lightorange-6\",\n        \"lightorange-7\",\n        \"lightorange-8\",\n        \"lightorange-9\",\n        \"lighttealblue\",\n        \"lighttealblue-3\",\n        \"lighttealblue-4\",\n        \"lighttealblue-5\",\n        \"lighttealblue-6\",\n        \"lighttealblue-7\",\n        \"lighttealblue-8\",\n        \"lighttealblue-9\"\n      ],\n      \"type\": \"string\"\n    },\n    \"SequentialSingleHue\": {\n      \"enum\": [\n        \"blues\",\n        \"tealblues\",\n        \"teals\",\n        \"greens\",\n        \"browns\",\n        \"greys\",\n        \"purples\",\n        \"warmgreys\",\n        \"reds\",\n        \"oranges\"\n      ],\n      \"type\": \"string\"\n    },\n    \"ShapeDef\": {\n      \"$ref\": \"#/definitions/MarkPropDef<(string|null),TypeForShape>\"\n    },\n    \"SharedEncoding\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"angle\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n                },\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n                    },\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n                }\n              ],\n              \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"color\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n                },\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n                    },\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n                }\n              ],\n              \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Gradient\"\n                },\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"description\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"const\": \"binned\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(string|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(string|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n                },\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n                    },\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n                }\n              ],\n              \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"format\": {\n              \"$ref\": \"#/definitions/Format\",\n              \"description\": \"The text format specifier for formatting number and date/time in labels of guides (axes, legends, headers) and text marks.\\n\\nIf the format type is `\\\"number\\\"` (e.g., for quantitative fields), this is a D3's [number format pattern string](https://github.com/d3/d3-format#locale_format).\\n\\nIf the format type is `\\\"time\\\"` (e.g., for temporal fields), this is either:   a) D3's [time format pattern](https://d3js.org/d3-time-format#locale_format) if you desire to set a static time format.\\n\\n  b) [dynamic time format specifier object](https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format) if you desire to set a dynamic time format that uses different formats depending on the granularity of the input date (e.g., if the date lies on a year, month, date, hour, etc. boundary).\\n\\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\\n\\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.\"\n            },\n            \"formatType\": {\n              \"description\": \"The format type for labels. One of `\\\"number\\\"`, `\\\"time\\\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\\n\\n__Default value:__\\n- `\\\"time\\\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\\n- `\\\"number\\\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.\",\n              \"type\": \"string\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/StandardType\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"detail\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FieldDefWithoutScale\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/FieldDefWithoutScale\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"Additional levels of detail for grouping data in aggregate views and in line, trail, and area marks without mapping data to a specific visual channel.\"\n        },\n        \"fill\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n                },\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n                    },\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n                }\n              ],\n              \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Gradient\"\n                },\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"fillOpacity\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n                },\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n                    },\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n                }\n              ],\n              \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"href\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"const\": \"binned\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(string|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(string|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n                },\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n                    },\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n                }\n              ],\n              \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"format\": {\n              \"$ref\": \"#/definitions/Format\",\n              \"description\": \"The text format specifier for formatting number and date/time in labels of guides (axes, legends, headers) and text marks.\\n\\nIf the format type is `\\\"number\\\"` (e.g., for quantitative fields), this is a D3's [number format pattern string](https://github.com/d3/d3-format#locale_format).\\n\\nIf the format type is `\\\"time\\\"` (e.g., for temporal fields), this is either:   a) D3's [time format pattern](https://d3js.org/d3-time-format#locale_format) if you desire to set a static time format.\\n\\n  b) [dynamic time format specifier object](https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format) if you desire to set a dynamic time format that uses different formats depending on the granularity of the input date (e.g., if the date lies on a year, month, date, hour, etc. boundary).\\n\\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\\n\\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.\"\n            },\n            \"formatType\": {\n              \"description\": \"The format type for labels. One of `\\\"number\\\"`, `\\\"time\\\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\\n\\n__Default value:__\\n- `\\\"time\\\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\\n- `\\\"number\\\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.\",\n              \"type\": \"string\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/StandardType\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"key\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"const\": \"binned\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/StandardType\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"latitude\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\",\n              \"type\": \"null\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"const\": \"quantitative\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"latitude2\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\",\n              \"type\": \"null\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/Type\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"const\": \"width\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"const\": \"height\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"longitude\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\",\n              \"type\": \"null\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"const\": \"quantitative\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"longitude2\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\",\n              \"type\": \"null\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/Type\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"const\": \"width\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"const\": \"height\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"opacity\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n                },\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n                    },\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n                }\n              ],\n              \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"order\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/OrderFieldDef\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/OrderFieldDef\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/OrderValueDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/OrderOnlyDef\"\n            }\n          ],\n          \"description\": \"Order of the marks.\\n- For stacked marks, this `order` channel encodes [stack order](https://vega.github.io/vega-lite/docs/stack.html#order).\\n- For line and trail marks, this `order` channel encodes order of data points in the lines. This can be useful for creating [a connected scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html). Setting `order` to `{\\\"value\\\": null}` makes the line marks use the original order in the data sources.\\n- Otherwise, this `order` channel encodes layer order of the marks.\\n\\n__Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating additional aggregation grouping.\"\n        },\n        \"radius\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"const\": \"binned\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"stack\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StackOffset\"\n                },\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"type\": \"boolean\"\n                }\n              ],\n              \"description\": \"Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\\n\\n`stack` can be one of the following values:\\n- `\\\"zero\\\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\\n- `\\\"normalize\\\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie charts [with percentage tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)). <br/>\\n-`\\\"center\\\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\\n\\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\\n\\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"const\": \"width\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"const\": \"height\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"radius2\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\",\n              \"type\": \"null\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/Type\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"const\": \"width\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"const\": \"height\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"shape\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n                },\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef<TypeForShape>\"\n                    },\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n                }\n              ],\n              \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TypeForShape\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"size\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n                },\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n                    },\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n                }\n              ],\n              \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"stroke\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n                },\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n                    },\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n                }\n              ],\n              \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Gradient\"\n                },\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"strokeDash\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(number[]|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(number[]|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n                },\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n                    },\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(number[]|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(number[]|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n                }\n              ],\n              \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"items\": {\n                    \"type\": \"number\"\n                  },\n                  \"type\": \"array\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"strokeOpacity\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n                },\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n                    },\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n                }\n              ],\n              \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"strokeWidth\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n                },\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n                    },\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n                }\n              ],\n              \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"legend\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Legend\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\\n\\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"text\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"const\": \"binned\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(Text|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(Text|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n                },\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalStringFieldDef\"\n                    },\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(Text|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(Text|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n                }\n              ],\n              \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"format\": {\n              \"$ref\": \"#/definitions/Format\",\n              \"description\": \"The text format specifier for formatting number and date/time in labels of guides (axes, legends, headers) and text marks.\\n\\nIf the format type is `\\\"number\\\"` (e.g., for quantitative fields), this is a D3's [number format pattern string](https://github.com/d3/d3-format#locale_format).\\n\\nIf the format type is `\\\"time\\\"` (e.g., for temporal fields), this is either:   a) D3's [time format pattern](https://d3js.org/d3-time-format#locale_format) if you desire to set a static time format.\\n\\n  b) [dynamic time format specifier object](https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format) if you desire to set a dynamic time format that uses different formats depending on the granularity of the input date (e.g., if the date lies on a year, month, date, hour, etc. boundary).\\n\\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\\n\\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.\"\n            },\n            \"formatType\": {\n              \"description\": \"The format type for labels. One of `\\\"number\\\"`, `\\\"time\\\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\\n\\n__Default value:__\\n- `\\\"time\\\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\\n- `\\\"number\\\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.\",\n              \"type\": \"string\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"theta\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"const\": \"binned\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"stack\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StackOffset\"\n                },\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"type\": \"boolean\"\n                }\n              ],\n              \"description\": \"Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\\n\\n`stack` can be one of the following values:\\n- `\\\"zero\\\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\\n- `\\\"normalize\\\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie charts [with percentage tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)). <br/>\\n-`\\\"center\\\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\\n\\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\\n\\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"const\": \"width\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"const\": \"height\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"theta2\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\",\n              \"type\": \"null\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/Type\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"const\": \"width\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"const\": \"height\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"time\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"rescale\": {\n              \"type\": \"boolean\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/StandardType\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"tooltip\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StringFieldDefWithCondition\"\n            },\n            {\n              \"$ref\": \"#/definitions/StringValueDefWithCondition\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/StringFieldDef\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"The tooltip text to show upon mouse hover. Specifying `tooltip` encoding overrides [the `tooltip` property in the mark definition](https://vega.github.io/vega-lite/docs/mark.html#mark-def).\\n\\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite.\"\n        },\n        \"url\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"const\": \"binned\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"condition\": {\n              \"anyOf\": [\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(string|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(string|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n                },\n                {\n                  \"anyOf\": [\n                    {\n                      \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n                    },\n                    {\n                      \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n                    },\n                    {\n                      \"items\": {\n                        \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n                      },\n                      \"type\": \"array\"\n                    }\n                  ],\n                  \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n                }\n              ],\n              \"description\": \"One or more value definition(s) with [a parameter or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\\n\\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"format\": {\n              \"$ref\": \"#/definitions/Format\",\n              \"description\": \"The text format specifier for formatting number and date/time in labels of guides (axes, legends, headers) and text marks.\\n\\nIf the format type is `\\\"number\\\"` (e.g., for quantitative fields), this is a D3's [number format pattern string](https://github.com/d3/d3-format#locale_format).\\n\\nIf the format type is `\\\"time\\\"` (e.g., for temporal fields), this is either:   a) D3's [time format pattern](https://d3js.org/d3-time-format#locale_format) if you desire to set a static time format.\\n\\n  b) [dynamic time format specifier object](https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format) if you desire to set a dynamic time format that uses different formats depending on the granularity of the input date (e.g., if the date lies on a year, month, date, hour, etc. boundary).\\n\\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\\n\\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.\"\n            },\n            \"formatType\": {\n              \"description\": \"The format type for labels. One of `\\\"number\\\"`, `\\\"time\\\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\\n\\n__Default value:__\\n- `\\\"time\\\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\\n- `\\\"number\\\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.\",\n              \"type\": \"string\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/StandardType\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"x\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"axis\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Axis\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\\n\\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"const\": \"binned\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"impute\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ImputeParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as `key` of the `Impute` Operation. The field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\\n\\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"stack\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StackOffset\"\n                },\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"type\": \"boolean\"\n                }\n              ],\n              \"description\": \"Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\\n\\n`stack` can be one of the following values:\\n- `\\\"zero\\\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\\n- `\\\"normalize\\\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie charts [with percentage tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)). <br/>\\n-`\\\"center\\\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\\n\\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\\n\\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"const\": \"width\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"const\": \"height\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"x2\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\",\n              \"type\": \"null\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/Type\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"const\": \"width\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"const\": \"height\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"xError\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\",\n              \"type\": \"null\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"value\": {\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\",\n              \"type\": \"number\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"xError2\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\",\n              \"type\": \"null\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"value\": {\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\",\n              \"type\": \"number\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"xOffset\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\",\n              \"type\": \"number\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"y\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"axis\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Axis\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis for the encoding channel will be removed.\\n\\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\\n\\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"const\": \"binned\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"impute\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ImputeParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as `key` of the `Impute` Operation. The field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\\n\\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"stack\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StackOffset\"\n                },\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"type\": \"boolean\"\n                }\n              ],\n              \"description\": \"Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\\n\\n`stack` can be one of the following values:\\n- `\\\"zero\\\"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart).\\n- `\\\"normalize\\\"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized) and pie charts [with percentage tooltip](https://vega.github.io/vega-lite/docs/arc.html#tooltip)). <br/>\\n-`\\\"center\\\"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)).\\n- `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\\n\\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\\n\\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"const\": \"width\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"const\": \"height\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"y2\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\",\n              \"type\": \"null\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"$ref\": \"#/definitions/Type\",\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"const\": \"width\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"const\": \"height\",\n                  \"type\": \"string\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"yError\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\",\n              \"type\": \"null\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"value\": {\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\",\n              \"type\": \"number\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"yError2\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\",\n              \"type\": \"null\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"value\": {\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\",\n              \"type\": \"number\"\n            }\n          },\n          \"type\": \"object\"\n        },\n        \"yOffset\": {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"aggregate\": {\n              \"$ref\": \"#/definitions/Aggregate\",\n              \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n            },\n            \"bandPosition\": {\n              \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            \"bin\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinParams\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n            },\n            \"datum\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/PrimitiveValue\"\n                },\n                {\n                  \"$ref\": \"#/definitions/DateTime\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatRef\"\n                }\n              ],\n              \"description\": \"A constant value in data domain.\"\n            },\n            \"field\": {\n              \"$ref\": \"#/definitions/Field\",\n              \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n            },\n            \"scale\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Scale\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n            },\n            \"sort\": {\n              \"$ref\": \"#/definitions/Sort\",\n              \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n            },\n            \"timeUnit\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/BinnedTimeUnit\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TimeUnitParams\"\n                }\n              ],\n              \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n            },\n            \"type\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/StandardType\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Type\",\n                  \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n                }\n              ],\n              \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n            },\n            \"value\": {\n              \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\",\n              \"type\": \"number\"\n            }\n          },\n          \"type\": \"object\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"SingleDefUnitChannel\": {\n      \"enum\": [\n        \"text\",\n        \"shape\",\n        \"x\",\n        \"y\",\n        \"xOffset\",\n        \"yOffset\",\n        \"x2\",\n        \"y2\",\n        \"longitude\",\n        \"latitude\",\n        \"longitude2\",\n        \"latitude2\",\n        \"theta\",\n        \"theta2\",\n        \"radius\",\n        \"radius2\",\n        \"time\",\n        \"color\",\n        \"fill\",\n        \"stroke\",\n        \"opacity\",\n        \"fillOpacity\",\n        \"strokeOpacity\",\n        \"strokeWidth\",\n        \"strokeDash\",\n        \"size\",\n        \"angle\",\n        \"key\",\n        \"href\",\n        \"url\",\n        \"description\"\n      ],\n      \"type\": \"string\"\n    },\n    \"SingleTimeUnit\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/LocalSingleTimeUnit\"\n        },\n        {\n          \"$ref\": \"#/definitions/UtcSingleTimeUnit\"\n        }\n      ]\n    },\n    \"Sort\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/SortArray\"\n        },\n        {\n          \"$ref\": \"#/definitions/AllSortString\"\n        },\n        {\n          \"$ref\": \"#/definitions/EncodingSortField\"\n        },\n        {\n          \"$ref\": \"#/definitions/SortByEncoding\"\n        },\n        {\n          \"type\": \"null\"\n        }\n      ]\n    },\n    \"SortArray\": {\n      \"anyOf\": [\n        {\n          \"items\": {\n            \"type\": \"number\"\n          },\n          \"type\": \"array\"\n        },\n        {\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"type\": \"array\"\n        },\n        {\n          \"items\": {\n            \"type\": \"boolean\"\n          },\n          \"type\": \"array\"\n        },\n        {\n          \"items\": {\n            \"$ref\": \"#/definitions/DateTime\"\n          },\n          \"type\": \"array\"\n        }\n      ]\n    },\n    \"SortByChannel\": {\n      \"enum\": [\n        \"x\",\n        \"y\",\n        \"color\",\n        \"fill\",\n        \"stroke\",\n        \"strokeWidth\",\n        \"size\",\n        \"shape\",\n        \"fillOpacity\",\n        \"strokeOpacity\",\n        \"opacity\",\n        \"text\"\n      ],\n      \"type\": \"string\"\n    },\n    \"SortByChannelDesc\": {\n      \"enum\": [\n        \"-x\",\n        \"-y\",\n        \"-color\",\n        \"-fill\",\n        \"-stroke\",\n        \"-strokeWidth\",\n        \"-size\",\n        \"-shape\",\n        \"-fillOpacity\",\n        \"-strokeOpacity\",\n        \"-opacity\",\n        \"-text\"\n      ],\n      \"type\": \"string\"\n    },\n    \"SortByEncoding\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"encoding\": {\n          \"$ref\": \"#/definitions/SortByChannel\",\n          \"description\": \"The [encoding channel](https://vega.github.io/vega-lite/docs/encoding.html#channels) to sort by (e.g., `\\\"x\\\"`, `\\\"y\\\"`)\"\n        },\n        \"order\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SortOrder\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"The sort order. One of `\\\"ascending\\\"` (default), `\\\"descending\\\"`, or `null` (do not sort).\"\n        }\n      },\n      \"required\": [\n        \"encoding\"\n      ],\n      \"type\": \"object\"\n    },\n    \"SortField\": {\n      \"additionalProperties\": false,\n      \"description\": \"A sort definition for transform\",\n      \"properties\": {\n        \"field\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The name of the field to sort.\"\n        },\n        \"order\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SortOrder\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"Whether to sort the field in ascending or descending order. One of `\\\"ascending\\\"` (default), `\\\"descending\\\"`, or `null` (do not sort).\"\n        }\n      },\n      \"required\": [\n        \"field\"\n      ],\n      \"type\": \"object\"\n    },\n    \"SortOrder\": {\n      \"enum\": [\n        \"ascending\",\n        \"descending\"\n      ],\n      \"type\": \"string\"\n    },\n    \"SphereGenerator\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"name\": {\n          \"description\": \"Provide a placeholder name and bind data at runtime.\",\n          \"type\": \"string\"\n        },\n        \"sphere\": {\n          \"anyOf\": [\n            {\n              \"const\": true,\n              \"type\": \"boolean\"\n            },\n            {\n              \"type\": \"object\"\n            }\n          ],\n          \"description\": \"Generate sphere GeoJSON data for the full globe.\"\n        }\n      },\n      \"required\": [\n        \"sphere\"\n      ],\n      \"type\": \"object\"\n    },\n    \"StackOffset\": {\n      \"enum\": [\n        \"zero\",\n        \"center\",\n        \"normalize\"\n      ],\n      \"type\": \"string\"\n    },\n    \"StackTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"as\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FieldName\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/FieldName\"\n              },\n              \"maxItems\": 2,\n              \"minItems\": 2,\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"Output field names. This can be either a string or an array of strings with two elements denoting the name for the fields for stack start and stack end respectively. If a single string(e.g., `\\\"val\\\"`) is provided, the end field will be `\\\"val_end\\\"`.\"\n        },\n        \"groupby\": {\n          \"description\": \"The data fields to group by.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        },\n        \"offset\": {\n          \"description\": \"Mode for stacking marks. One of `\\\"zero\\\"` (default), `\\\"center\\\"`, or `\\\"normalize\\\"`. The `\\\"zero\\\"` offset will stack starting at `0`. The `\\\"center\\\"` offset will center the stacks. The `\\\"normalize\\\"` offset will compute percentage values for each stack point, with output values in the range `[0,1]`.\\n\\n__Default value:__ `\\\"zero\\\"`\",\n          \"enum\": [\n            \"zero\",\n            \"center\",\n            \"normalize\"\n          ],\n          \"type\": \"string\"\n        },\n        \"sort\": {\n          \"description\": \"Field that determines the order of leaves in the stacked charts.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/SortField\"\n          },\n          \"type\": \"array\"\n        },\n        \"stack\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The field which is stacked.\"\n        }\n      },\n      \"required\": [\n        \"stack\",\n        \"groupby\",\n        \"as\"\n      ],\n      \"type\": \"object\"\n    },\n    \"StandardType\": {\n      \"enum\": [\n        \"quantitative\",\n        \"ordinal\",\n        \"temporal\",\n        \"nominal\"\n      ],\n      \"type\": \"string\"\n    },\n    \"Step\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"for\": {\n          \"$ref\": \"#/definitions/StepFor\",\n          \"description\": \"Whether to apply the step to position scale or offset scale when there are both `x` and `xOffset` or both `y` and `yOffset` encodings.\"\n        },\n        \"step\": {\n          \"description\": \"The size (width/height) per discrete step.\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"step\"\n      ],\n      \"type\": \"object\"\n    },\n    \"StepFor\": {\n      \"enum\": [\n        \"position\",\n        \"offset\"\n      ],\n      \"type\": \"string\"\n    },\n    \"Stream\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/EventStream\"\n        },\n        {\n          \"$ref\": \"#/definitions/DerivedStream\"\n        },\n        {\n          \"$ref\": \"#/definitions/MergedStream\"\n        }\n      ]\n    },\n    \"StringFieldDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"const\": \"binned\",\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"format\": {\n          \"$ref\": \"#/definitions/Format\",\n          \"description\": \"The text format specifier for formatting number and date/time in labels of guides (axes, legends, headers) and text marks.\\n\\nIf the format type is `\\\"number\\\"` (e.g., for quantitative fields), this is a D3's [number format pattern string](https://github.com/d3/d3-format#locale_format).\\n\\nIf the format type is `\\\"time\\\"` (e.g., for temporal fields), this is either:   a) D3's [time format pattern](https://d3js.org/d3-time-format#locale_format) if you desire to set a static time format.\\n\\n  b) [dynamic time format specifier object](https://vega.github.io/vega-lite/docs/format.html#dynamic-time-format) if you desire to set a dynamic time format that uses different formats depending on the granularity of the input date (e.g., if the date lies on a year, month, date, hour, etc. boundary).\\n\\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\\n\\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.\"\n        },\n        \"formatType\": {\n          \"description\": \"The format type for labels. One of `\\\"number\\\"`, `\\\"time\\\"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\\n\\n__Default value:__\\n- `\\\"time\\\"` for temporal fields and ordinal and nominal fields with `timeUnit`.\\n- `\\\"number\\\"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.\",\n          \"type\": \"string\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"StringFieldDefWithCondition\": {\n      \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<StringFieldDef,string>\"\n    },\n    \"StringValueDefWithCondition\": {\n      \"$ref\": \"#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,(string|null)>\"\n    },\n    \"StrokeCap\": {\n      \"enum\": [\n        \"butt\",\n        \"round\",\n        \"square\"\n      ],\n      \"type\": \"string\"\n    },\n    \"StrokeJoin\": {\n      \"enum\": [\n        \"miter\",\n        \"round\",\n        \"bevel\"\n      ],\n      \"type\": \"string\"\n    },\n    \"StyleConfigIndex\": {\n      \"additionalProperties\": {\n        \"anyOf\": [\n          {\n            \"$ref\": \"#/definitions/AnyMarkConfig\"\n          },\n          {\n            \"$ref\": \"#/definitions/Axis\"\n          }\n        ]\n      },\n      \"properties\": {\n        \"arc\": {\n          \"$ref\": \"#/definitions/RectConfig\",\n          \"description\": \"Arc-specific Config\"\n        },\n        \"area\": {\n          \"$ref\": \"#/definitions/AreaConfig\",\n          \"description\": \"Area-Specific Config\"\n        },\n        \"bar\": {\n          \"$ref\": \"#/definitions/BarConfig\",\n          \"description\": \"Bar-Specific Config\"\n        },\n        \"circle\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Circle-Specific Config\"\n        },\n        \"geoshape\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Geoshape-Specific Config\"\n        },\n        \"group-subtitle\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Default style for chart subtitles\"\n        },\n        \"group-title\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Default style for chart titles\"\n        },\n        \"guide-label\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Default style for axis, legend, and header labels.\"\n        },\n        \"guide-title\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Default style for axis, legend, and header titles.\"\n        },\n        \"image\": {\n          \"$ref\": \"#/definitions/RectConfig\",\n          \"description\": \"Image-specific Config\"\n        },\n        \"line\": {\n          \"$ref\": \"#/definitions/LineConfig\",\n          \"description\": \"Line-Specific Config\"\n        },\n        \"mark\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Mark Config\"\n        },\n        \"point\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Point-Specific Config\"\n        },\n        \"rect\": {\n          \"$ref\": \"#/definitions/RectConfig\",\n          \"description\": \"Rect-Specific Config\"\n        },\n        \"rule\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Rule-Specific Config\"\n        },\n        \"square\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Square-Specific Config\"\n        },\n        \"text\": {\n          \"$ref\": \"#/definitions/MarkConfig\",\n          \"description\": \"Text-Specific Config\"\n        },\n        \"tick\": {\n          \"$ref\": \"#/definitions/TickConfig\",\n          \"description\": \"Tick-Specific Config\"\n        },\n        \"trail\": {\n          \"$ref\": \"#/definitions/LineConfig\",\n          \"description\": \"Trail-Specific Config\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"SymbolShape\": {\n      \"type\": \"string\"\n    },\n    \"Text\": {\n      \"anyOf\": [\n        {\n          \"type\": \"string\"\n        },\n        {\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"type\": \"array\"\n        }\n      ]\n    },\n    \"TextBaseline\": {\n      \"anyOf\": [\n        {\n          \"const\": \"alphabetic\",\n          \"type\": \"string\"\n        },\n        {\n          \"$ref\": \"#/definitions/Baseline\"\n        },\n        {\n          \"const\": \"line-top\",\n          \"type\": \"string\"\n        },\n        {\n          \"const\": \"line-bottom\",\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"TextDef\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<StringFieldDef,Text>\"\n        },\n        {\n          \"$ref\": \"#/definitions/FieldOrDatumDefWithCondition<StringDatumDef,Text>\"\n        },\n        {\n          \"$ref\": \"#/definitions/ValueDefWithCondition<StringFieldDef,Text>\"\n        }\n      ]\n    },\n    \"TextDirection\": {\n      \"enum\": [\n        \"ltr\",\n        \"rtl\"\n      ],\n      \"type\": \"string\"\n    },\n    \"TickConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Align\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `\\\"left\\\"`, `\\\"right\\\"`, `\\\"center\\\"`.\\n\\n__Note:__ Expression reference is *not* supported for range marks.\"\n        },\n        \"angle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The rotation angle of the text, in degrees.\",\n              \"maximum\": 360,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aria\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ariaRole\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ariaRoleDescription\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aspect\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Whether to keep aspect ratio of image marks.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"bandSize\": {\n          \"description\": \"The width of the ticks.\\n\\n__Default value:__  3/4 of step (width step for horizontal ticks and height step for vertical ticks).\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"baseline\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextBaseline\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"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.\\n\\nFor range marks, the vertical alignment of the marks. One of `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`.\\n\\n__Note:__ Expression reference is *not* supported for range marks.\"\n        },\n        \"binSpacing\": {\n          \"description\": \"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).\\n\\n__Default value:__ `1`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"blend\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Blend\",\n              \"description\": \"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.\\n\\n__Default value: `\\\"source-over\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"color\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default color.\\n\\n__Default value:__ <span style=\\\"color: #4682b4;\\\">&#9632;</span> `\\\"#4682b4\\\"`\\n\\n__Note:__\\n- This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\\n- The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.\"\n        },\n        \"continuousBandSize\": {\n          \"description\": \"The default size of the bars on continuous scales.\\n\\n__Default value:__ `5`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"cornerRadius\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles or arcs' corners.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusBottomLeft\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' bottom left corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusBottomRight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' bottom right corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusTopLeft\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' top right corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cornerRadiusTopRight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles' top left corner.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cursor\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Cursor\",\n              \"description\": \"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.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"description\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dir\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TextDirection\",\n              \"description\": \"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.\\n\\n__Default value:__ `\\\"ltr\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"discreteBandSize\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/RelativeBandSize\"\n            }\n          ],\n          \"description\": \"The default size of the bars with discrete dimensions. If unspecified, the default size is  `step-2`, which provides 2 pixel offset between bars.\",\n          \"minimum\": 0\n        },\n        \"dx\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dy\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"ellipsis\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The ellipsis string for text truncated in response to the limit parameter.\\n\\n__Default value:__ `\\\"…\\\"`\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"endAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fill\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\\n\\n__Default value:__ (None)\"\n        },\n        \"fillOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The fill opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"filled\": {\n          \"description\": \"Whether the mark's color should be used as fill color instead of stroke color.\\n\\n__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`.\\n\\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).\",\n          \"type\": \"boolean\"\n        },\n        \"font\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The typeface to set the text in (e.g., `\\\"Helvetica Neue\\\"`).\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The font size, in pixels.\\n\\n__Default value:__ `11`\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"The font style (e.g., `\\\"italic\\\"`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"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`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"height\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Height of the marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"href\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/URI\",\n              \"description\": \"A URL to load upon mouse click. If defined, the mark acts as a hyperlink.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"innerRadius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"interpolate\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Interpolate\",\n              \"description\": \"The line interpolation method to use for line and area marks. One of the following:\\n- `\\\"linear\\\"`: piecewise linear segments, as in a polyline.\\n- `\\\"linear-closed\\\"`: close the linear segments to form a polygon.\\n- `\\\"step\\\"`: alternate between horizontal and vertical segments, as in a step function.\\n- `\\\"step-before\\\"`: alternate between vertical and horizontal segments, as in a step function.\\n- `\\\"step-after\\\"`: alternate between horizontal and vertical segments, as in a step function.\\n- `\\\"basis\\\"`: a B-spline, with control point duplication on the ends.\\n- `\\\"basis-open\\\"`: an open B-spline; may not intersect the start or end.\\n- `\\\"basis-closed\\\"`: a closed B-spline, as in a loop.\\n- `\\\"cardinal\\\"`: a Cardinal spline, with control point duplication on the ends.\\n- `\\\"cardinal-open\\\"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points.\\n- `\\\"cardinal-closed\\\"`: a closed Cardinal spline, as in a loop.\\n- `\\\"bundle\\\"`: equivalent to basis, except the tension parameter is used to straighten the spline.\\n- `\\\"monotone\\\"`: cubic interpolation that preserves monotonicity in y.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"invalid\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/MarkInvalidDataMode\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"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).\\n\\n- `\\\"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.\\n\\n- `\\\"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.\\n\\n- `\\\"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).\\n\\n- `\\\"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).\\n\\n- `\\\"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.\\n\\n__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.\"\n        },\n        \"limit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\\n\\n__Default value:__ `0` -- indicating no limit\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lineBreak\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"minBandSize\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The minimum band size for bar and rectangle marks. __Default value:__ `0.25`\"\n        },\n        \"opacity\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The overall opacity (value between [0,1]).\\n\\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"order\": {\n          \"description\": \"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.\",\n          \"type\": [\n            \"null\",\n            \"boolean\"\n          ]\n        },\n        \"orient\": {\n          \"$ref\": \"#/definitions/Orientation\",\n          \"description\": \"The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical.\\n- For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension.\\n- For area, this property determines the orient property of the Vega output.\\n- 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.\"\n        },\n        \"outerRadius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"padAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The angular padding applied to sides of the arc, in radians.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"radius\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"For arc mark, the primary (outer) radius in pixels.\\n\\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.\\n\\n__Default value:__ `min(plot_width, plot_height)/2`\",\n          \"minimum\": 0\n        },\n        \"radius2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The secondary (inner) radius in pixels of arc marks.\\n\\n__Default value:__ `0`\",\n          \"minimum\": 0\n        },\n        \"shape\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/SymbolShape\"\n                },\n                {\n                  \"type\": \"string\"\n                }\n              ],\n              \"description\": \"Shape of the point marks. Supported values include:\\n- plotting shapes: `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"cross\\\"`, `\\\"diamond\\\"`, `\\\"triangle-up\\\"`, `\\\"triangle-down\\\"`, `\\\"triangle-right\\\"`, or `\\\"triangle-left\\\"`.\\n- the line symbol `\\\"stroke\\\"`\\n- centered directional shapes `\\\"arrow\\\"`, `\\\"wedge\\\"`, or `\\\"triangle\\\"`\\n- 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.)\\n\\n__Default value:__ `\\\"circle\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"size\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default size for marks.\\n- 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.\\n- For `bar`, this represents the band size of the bar, in pixels.\\n- For `text`, this represents the font size, in pixels.\\n\\n__Default value:__\\n- `30` for point, circle, square marks; width/height's `step`\\n- `2` for bar marks with discrete dimensions;\\n- `5` for bar marks with continuous dimensions;\\n- `11` for text marks.\",\n          \"minimum\": 0\n        },\n        \"smooth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"startAngle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"stroke\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\\n\\n__Default value:__ (None)\"\n        },\n        \"strokeCap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeCap\",\n              \"description\": \"The stroke cap for line ending style. One of `\\\"butt\\\"`, `\\\"round\\\"`, or `\\\"square\\\"`.\\n\\n__Default value:__ `\\\"butt\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating stroke, space lengths for creating dashed or dotted lines.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The offset (in pixels) into which to begin drawing with the stroke dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeJoin\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeJoin\",\n              \"description\": \"The stroke line join method. One of `\\\"miter\\\"`, `\\\"round\\\"` or `\\\"bevel\\\"`.\\n\\n__Default value:__ `\\\"miter\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeMiterLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The miter limit at which to bevel a line join.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke width, in pixels.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"tension\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Depending on the interpolation type, sets the tension parameter (for line and area marks).\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"text\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\",\n              \"description\": \"Placeholder text if the `text` channel is not specified\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"theta\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"- 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.)\\n\\n- For text marks, polar coordinate angle in radians.\",\n          \"maximum\": 360,\n          \"minimum\": 0\n        },\n        \"theta2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise.\"\n        },\n        \"thickness\": {\n          \"description\": \"Thickness of the tick mark.\\n\\n__Default value:__  `1`\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"time\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"timeUnitBandPosition\": {\n          \"description\": \"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.\",\n          \"type\": \"number\"\n        },\n        \"timeUnitBandSize\": {\n          \"description\": \"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.\",\n          \"type\": \"number\"\n        },\n        \"tooltip\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/TooltipContent\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\\n\\n- If `tooltip` is `true` or `{\\\"content\\\": \\\"encoding\\\"}`, then all fields from `encoding` will be used.\\n- If `tooltip` is `{\\\"content\\\": \\\"data\\\"}`, then all fields that appear in the highlighted data point will be used.\\n- If set to `null` or `false`, then no tooltip will be used.\\n\\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\\n\\n__Default value:__ `null`\"\n        },\n        \"url\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/URI\",\n              \"description\": \"The URL of the image file for image marks.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"width\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Width of the marks.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"x\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"X coordinates of the marks, or width of horizontal `\\\"bar\\\"` and `\\\"area\\\"` without specified `x2` or `width`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"x2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"X2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"width\\\"` for the width of the plot.\"\n        },\n        \"y\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Y coordinates of the marks, or height of vertical `\\\"bar\\\"` and `\\\"area\\\"` without specified `y2` or `height`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        },\n        \"y2\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"Y2 coordinates for ranged `\\\"area\\\"`, `\\\"bar\\\"`, `\\\"rect\\\"`, and  `\\\"rule\\\"`.\\n\\nThe `value` of this channel can be a number or a string `\\\"height\\\"` for the height of the plot.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"TickCount\": {\n      \"anyOf\": [\n        {\n          \"type\": \"number\"\n        },\n        {\n          \"$ref\": \"#/definitions/TimeInterval\"\n        },\n        {\n          \"$ref\": \"#/definitions/TimeIntervalStep\"\n        }\n      ]\n    },\n    \"TimeDef\": {\n      \"$ref\": \"#/definitions/TimeFieldDef\"\n    },\n    \"TimeFieldDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"rescale\": {\n          \"type\": \"boolean\"\n        },\n        \"scale\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Scale\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.\\n\\nIf `null`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).\\n\\n__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.\\n\\n__See also:__ [`scale`](https://vega.github.io/vega-lite/docs/scale.html) documentation.\"\n        },\n        \"sort\": {\n          \"$ref\": \"#/definitions/Sort\",\n          \"description\": \"Sort order for the encoded field.\\n\\nFor continuous fields (quantitative or temporal), `sort` can be either `\\\"ascending\\\"` or `\\\"descending\\\"`.\\n\\nFor discrete fields, `sort` can be one of the following:\\n- `\\\"ascending\\\"` or `\\\"descending\\\"` -- for sorting by the values' natural order in JavaScript.\\n- [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `\\\"x\\\"` or `\\\"y\\\"`) with an optional minus prefix for descending sort (e.g., `\\\"-x\\\"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `\\\"sort\\\": \\\"-x\\\"` is equivalent to `\\\"sort\\\": {\\\"encoding\\\": \\\"x\\\", \\\"order\\\": \\\"descending\\\"}`.\\n- [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field.\\n- [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `\\\"month\\\"` and `\\\"day\\\"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `\\\"Mon\\\"`, `\\\"Tue\\\"`).\\n- `null` indicating no sort.\\n\\n__Default value:__ `\\\"ascending\\\"`\\n\\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\\n\\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"TimeFormatSpecifier\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"date\": {\n          \"type\": \"string\"\n        },\n        \"day\": {\n          \"type\": \"string\"\n        },\n        \"hours\": {\n          \"type\": \"string\"\n        },\n        \"milliseconds\": {\n          \"type\": \"string\"\n        },\n        \"minutes\": {\n          \"type\": \"string\"\n        },\n        \"month\": {\n          \"type\": \"string\"\n        },\n        \"quarter\": {\n          \"type\": \"string\"\n        },\n        \"seconds\": {\n          \"type\": \"string\"\n        },\n        \"week\": {\n          \"type\": \"string\"\n        },\n        \"year\": {\n          \"type\": \"string\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"TimeInterval\": {\n      \"enum\": [\n        \"millisecond\",\n        \"second\",\n        \"minute\",\n        \"hour\",\n        \"day\",\n        \"week\",\n        \"month\",\n        \"year\"\n      ],\n      \"type\": \"string\"\n    },\n    \"TimeIntervalStep\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"interval\": {\n          \"$ref\": \"#/definitions/TimeInterval\"\n        },\n        \"step\": {\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"interval\",\n        \"step\"\n      ],\n      \"type\": \"object\"\n    },\n    \"TimeLocale\": {\n      \"additionalProperties\": false,\n      \"description\": \"Locale definition for formatting dates and times.\",\n      \"properties\": {\n        \"date\": {\n          \"description\": \"The date (%x) format specifier (e.g., \\\"%m/%d/%Y\\\").\",\n          \"type\": \"string\"\n        },\n        \"dateTime\": {\n          \"description\": \"The date and time (%c) format specifier (e.g., \\\"%a %b %e %X %Y\\\").\",\n          \"type\": \"string\"\n        },\n        \"days\": {\n          \"$ref\": \"#/definitions/Vector7<string>\",\n          \"description\": \"The full names of the weekdays, starting with Sunday.\"\n        },\n        \"months\": {\n          \"$ref\": \"#/definitions/Vector12<string>\",\n          \"description\": \"The full names of the months (starting with January).\"\n        },\n        \"periods\": {\n          \"$ref\": \"#/definitions/Vector2<string>\",\n          \"description\": \"The A.M. and P.M. equivalents (e.g., [\\\"AM\\\", \\\"PM\\\"]).\"\n        },\n        \"shortDays\": {\n          \"$ref\": \"#/definitions/Vector7<string>\",\n          \"description\": \"The abbreviated names of the weekdays, starting with Sunday.\"\n        },\n        \"shortMonths\": {\n          \"$ref\": \"#/definitions/Vector12<string>\",\n          \"description\": \"The abbreviated names of the months (starting with January).\"\n        },\n        \"time\": {\n          \"description\": \"The time (%X) format specifier (e.g., \\\"%H:%M:%S\\\").\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"dateTime\",\n        \"date\",\n        \"time\",\n        \"periods\",\n        \"days\",\n        \"shortDays\",\n        \"months\",\n        \"shortMonths\"\n      ],\n      \"type\": \"object\"\n    },\n    \"TimeUnit\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/SingleTimeUnit\"\n        },\n        {\n          \"$ref\": \"#/definitions/MultiTimeUnit\"\n        }\n      ]\n    },\n    \"TimeUnitParams\": {\n      \"additionalProperties\": false,\n      \"description\": \"Time Unit Params for encoding predicate, which can specified if the data is  already \\\"binned\\\".\",\n      \"properties\": {\n        \"binned\": {\n          \"description\": \"Whether the data has already been binned to this time unit. If true, Vega-Lite will only format the data, marks, and guides, without applying the timeUnit transform to re-bin the data again.\",\n          \"type\": \"boolean\"\n        },\n        \"maxbins\": {\n          \"description\": \"If no `unit` is specified, maxbins is used to infer time units.\",\n          \"type\": \"number\"\n        },\n        \"step\": {\n          \"description\": \"The number of steps between bins, in terms of the least significant unit provided.\",\n          \"type\": \"number\"\n        },\n        \"unit\": {\n          \"$ref\": \"#/definitions/TimeUnit\",\n          \"description\": \"Defines how date-time values should be binned.\"\n        },\n        \"utc\": {\n          \"description\": \"True to use UTC timezone. Equivalent to using a `utc` prefixed `TimeUnit`.\",\n          \"type\": \"boolean\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"TimeUnitTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"as\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The output field to write the timeUnit value.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The data field to apply time unit.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitTransformParams\"\n            }\n          ],\n          \"description\": \"The timeUnit.\"\n        }\n      },\n      \"required\": [\n        \"timeUnit\",\n        \"field\",\n        \"as\"\n      ],\n      \"type\": \"object\"\n    },\n    \"TimeUnitTransformParams\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"maxbins\": {\n          \"description\": \"If no `unit` is specified, maxbins is used to infer time units.\",\n          \"type\": \"number\"\n        },\n        \"step\": {\n          \"description\": \"The number of steps between bins, in terms of the least significant unit provided.\",\n          \"type\": \"number\"\n        },\n        \"unit\": {\n          \"$ref\": \"#/definitions/TimeUnit\",\n          \"description\": \"Defines how date-time values should be binned.\"\n        },\n        \"utc\": {\n          \"description\": \"True to use UTC timezone. Equivalent to using a `utc` prefixed `TimeUnit`.\",\n          \"type\": \"boolean\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"TitleAnchor\": {\n      \"enum\": [\n        null,\n        \"start\",\n        \"middle\",\n        \"end\"\n      ],\n      \"type\": [\n        \"null\",\n        \"string\"\n      ]\n    },\n    \"TitleConfig\": {\n      \"$ref\": \"#/definitions/BaseTitleNoValueRefs\"\n    },\n    \"TitleFrame\": {\n      \"enum\": [\n        \"bounds\",\n        \"group\"\n      ],\n      \"type\": \"string\"\n    },\n    \"TitleOrient\": {\n      \"enum\": [\n        \"none\",\n        \"left\",\n        \"right\",\n        \"top\",\n        \"bottom\"\n      ],\n      \"type\": \"string\"\n    },\n    \"TitleParams\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"align\": {\n          \"$ref\": \"#/definitions/Align\",\n          \"description\": \"Horizontal text alignment for title text. One of `\\\"left\\\"`, `\\\"center\\\"`, or `\\\"right\\\"`.\"\n        },\n        \"anchor\": {\n          \"$ref\": \"#/definitions/TitleAnchor\",\n          \"description\": \"The anchor position for placing the title. One of `\\\"start\\\"`, `\\\"middle\\\"`, or `\\\"end\\\"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.\\n\\n__Default value:__ `\\\"middle\\\"` for [single](https://vega.github.io/vega-lite/docs/spec.html) and [layered](https://vega.github.io/vega-lite/docs/layer.html) views. `\\\"start\\\"` for other composite views.\\n\\n__Note:__ [For now](https://github.com/vega/vega-lite/issues/2875), `anchor` is only customizable only for [single](https://vega.github.io/vega-lite/docs/spec.html) and [layered](https://vega.github.io/vega-lite/docs/layer.html) views. For other composite views, `anchor` is always `\\\"start\\\"`.\"\n        },\n        \"angle\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Angle in degrees of title and subtitle text.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"aria\": {\n          \"anyOf\": [\n            {\n              \"description\": \"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 group, removing the title from the ARIA accessibility tree.\\n\\n__Default value:__ `true`\",\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"baseline\": {\n          \"$ref\": \"#/definitions/TextBaseline\",\n          \"description\": \"Vertical text baseline for title and subtitle text. One of `\\\"alphabetic\\\"` (default), `\\\"top\\\"`, `\\\"middle\\\"`, `\\\"bottom\\\"`, `\\\"line-top\\\"`, or `\\\"line-bottom\\\"`. The `\\\"line-top\\\"` and `\\\"line-bottom\\\"` values operate similarly to `\\\"top\\\"` and `\\\"bottom\\\"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.\"\n        },\n        \"color\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Text color for title text.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dx\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Delta offset for title and subtitle text x-coordinate.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"dy\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Delta offset for title and subtitle text y-coordinate.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"font\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Font name for title text.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Font size in pixels for title text.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"Font style for title text.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"fontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"Font weight for title text. This can be either a string (e.g `\\\"bold\\\"`, `\\\"normal\\\"`) or a number (`100`, `200`, `300`, ..., `900` where `\\\"normal\\\"` = `400` and `\\\"bold\\\"` = `700`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"frame\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/TitleFrame\"\n                },\n                {\n                  \"type\": \"string\"\n                }\n              ],\n              \"description\": \"The reference frame for the anchor position, one of `\\\"bounds\\\"` (to anchor relative to the full bounding box) or `\\\"group\\\"` (to anchor relative to the group width or height).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"limit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The maximum allowed length in pixels of title and subtitle text.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"lineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Line height in pixels for multi-line title text or title text with `\\\"line-top\\\"` or `\\\"line-bottom\\\"` baseline.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"offset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The orthogonal offset in pixels by which to displace the title group from its position along the edge of the chart.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"orient\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TitleOrient\",\n              \"description\": \"Default title orientation (`\\\"top\\\"`, `\\\"bottom\\\"`, `\\\"left\\\"`, or `\\\"right\\\"`)\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"style\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"items\": {\n                \"type\": \"string\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"A [mark style property](https://vega.github.io/vega-lite/docs/config.html#style) to apply to the title text mark.\\n\\n__Default value:__ `\\\"group-title\\\"`.\"\n        },\n        \"subtitle\": {\n          \"$ref\": \"#/definitions/Text\",\n          \"description\": \"The subtitle Text.\"\n        },\n        \"subtitleColor\": {\n          \"anyOf\": [\n            {\n              \"anyOf\": [\n                {\n                  \"type\": \"null\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                }\n              ],\n              \"description\": \"Text color for subtitle text.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"subtitleFont\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Font name for subtitle text.\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"subtitleFontSize\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Font size in pixels for subtitle text.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"subtitleFontStyle\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontStyle\",\n              \"description\": \"Font style for subtitle text.\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"subtitleFontWeight\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FontWeight\",\n              \"description\": \"Font weight for subtitle text. This can be either a string (e.g `\\\"bold\\\"`, `\\\"normal\\\"`) or a number (`100`, `200`, `300`, ..., `900` where `\\\"normal\\\"` = `400` and `\\\"bold\\\"` = `700`).\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"subtitleLineHeight\": {\n          \"anyOf\": [\n            {\n              \"description\": \"Line height in pixels for multi-line subtitle text.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"subtitlePadding\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The padding in pixels between title and subtitle text.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"text\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The title text.\"\n        },\n        \"zindex\": {\n          \"description\": \"The integer z-index indicating the layering of the title group relative to other axis, mark and legend groups.\\n\\n__Default value:__ `0`.\",\n          \"minimum\": 0,\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"text\"\n      ],\n      \"type\": \"object\"\n    },\n    \"TooltipContent\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"content\": {\n          \"enum\": [\n            \"encoding\",\n            \"data\"\n          ],\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"content\"\n      ],\n      \"type\": \"object\"\n    },\n    \"TopLevelConcatSpec\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"$schema\": {\n          \"description\": \"URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v6.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.\",\n          \"format\": \"uri\",\n          \"type\": \"string\"\n        },\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LayoutAlign\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<LayoutAlign>\"\n            }\n          ],\n          \"description\": \"The alignment to apply to grid rows and columns. The supported string values are `\\\"all\\\"`, `\\\"each\\\"`, and `\\\"none\\\"`.\\n\\n- For `\\\"none\\\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\\n- For `\\\"each\\\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\\n- For `\\\"all\\\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\\n\\nAlternatively, an object value of the form `{\\\"row\\\": string, \\\"column\\\": string}` can be used to supply different alignments for rows and columns.\\n\\n__Default value:__ `\\\"all\\\"`.\"\n        },\n        \"autosize\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/AutosizeType\"\n            },\n            {\n              \"$ref\": \"#/definitions/AutoSizeParams\"\n            }\n          ],\n          \"description\": \"How the visualization size should be determined. If a string, should be one of `\\\"pad\\\"`, `\\\"fit\\\"` or `\\\"none\\\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\\n\\n__Default value__: `pad`\"\n        },\n        \"background\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"CSS color property to use as the background of the entire view.\\n\\n__Default value:__ `\\\"white\\\"`\"\n        },\n        \"bounds\": {\n          \"description\": \"The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\\n\\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\\n\\n__Default value:__ `\\\"full\\\"`\",\n          \"enum\": [\n            \"full\",\n            \"flush\"\n          ],\n          \"type\": \"string\"\n        },\n        \"center\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<boolean>\"\n            }\n          ],\n          \"description\": \"Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\\n\\nAn object value of the form `{\\\"row\\\": boolean, \\\"column\\\": boolean}` can be used to supply different centering values for rows and columns.\\n\\n__Default value:__ `false`\"\n        },\n        \"columns\": {\n          \"description\": \"The number of columns to include in the view composition layout.\\n\\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\\n\\n__Note__:\\n\\n1) This property is only for:\\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\\n\\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).\",\n          \"type\": \"number\"\n        },\n        \"concat\": {\n          \"description\": \"A list of views to be concatenated.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/NonNormalizedSpec\"\n          },\n          \"type\": \"array\"\n        },\n        \"config\": {\n          \"$ref\": \"#/definitions/Config\",\n          \"description\": \"Vega-Lite configuration object. This property can only be defined at the top-level of a specification.\"\n        },\n        \"data\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Data\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n        },\n        \"datasets\": {\n          \"$ref\": \"#/definitions/Datasets\",\n          \"description\": \"A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property.\"\n        },\n        \"description\": {\n          \"description\": \"Description of this mark for commenting purpose.\",\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"description\": \"Name of the visualization for later reference.\",\n          \"type\": \"string\"\n        },\n        \"padding\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Padding\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\\\"left\\\": 5, \\\"top\\\": 5, \\\"right\\\": 5, \\\"bottom\\\": 5}` to specify padding for each side of the visualization.\\n\\n__Default value__: `5`\"\n        },\n        \"params\": {\n          \"description\": \"Dynamic variables or selections that parameterize a visualization.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/TopLevelParameter\"\n          },\n          \"type\": \"array\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/Resolve\",\n          \"description\": \"Scale, axis, and legend resolutions for view composition specifications.\"\n        },\n        \"spacing\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<number>\"\n            }\n          ],\n          \"description\": \"The spacing in pixels between sub-views of the composition operator. An object of the form `{\\\"row\\\": number, \\\"column\\\": number}` can be used to set different spacing values for rows and columns.\\n\\n__Default value__: Depends on `\\\"spacing\\\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/TitleParams\"\n            }\n          ],\n          \"description\": \"Title for the plot.\"\n        },\n        \"transform\": {\n          \"description\": \"An array of data transformations such as filter and new field calculation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Transform\"\n          },\n          \"type\": \"array\"\n        },\n        \"usermeta\": {\n          \"$ref\": \"#/definitions/Dict\",\n          \"description\": \"Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.\"\n        }\n      },\n      \"required\": [\n        \"concat\"\n      ],\n      \"type\": \"object\"\n    },\n    \"TopLevelHConcatSpec\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"$schema\": {\n          \"description\": \"URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v6.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.\",\n          \"format\": \"uri\",\n          \"type\": \"string\"\n        },\n        \"autosize\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/AutosizeType\"\n            },\n            {\n              \"$ref\": \"#/definitions/AutoSizeParams\"\n            }\n          ],\n          \"description\": \"How the visualization size should be determined. If a string, should be one of `\\\"pad\\\"`, `\\\"fit\\\"` or `\\\"none\\\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\\n\\n__Default value__: `pad`\"\n        },\n        \"background\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"CSS color property to use as the background of the entire view.\\n\\n__Default value:__ `\\\"white\\\"`\"\n        },\n        \"bounds\": {\n          \"description\": \"The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\\n\\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\\n\\n__Default value:__ `\\\"full\\\"`\",\n          \"enum\": [\n            \"full\",\n            \"flush\"\n          ],\n          \"type\": \"string\"\n        },\n        \"center\": {\n          \"description\": \"Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\\n\\n__Default value:__ `false`\",\n          \"type\": \"boolean\"\n        },\n        \"config\": {\n          \"$ref\": \"#/definitions/Config\",\n          \"description\": \"Vega-Lite configuration object. This property can only be defined at the top-level of a specification.\"\n        },\n        \"data\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Data\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n        },\n        \"datasets\": {\n          \"$ref\": \"#/definitions/Datasets\",\n          \"description\": \"A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property.\"\n        },\n        \"description\": {\n          \"description\": \"Description of this mark for commenting purpose.\",\n          \"type\": \"string\"\n        },\n        \"hconcat\": {\n          \"description\": \"A list of views to be concatenated and put into a row.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/NonNormalizedSpec\"\n          },\n          \"type\": \"array\"\n        },\n        \"name\": {\n          \"description\": \"Name of the visualization for later reference.\",\n          \"type\": \"string\"\n        },\n        \"padding\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Padding\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\\\"left\\\": 5, \\\"top\\\": 5, \\\"right\\\": 5, \\\"bottom\\\": 5}` to specify padding for each side of the visualization.\\n\\n__Default value__: `5`\"\n        },\n        \"params\": {\n          \"description\": \"Dynamic variables or selections that parameterize a visualization.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/TopLevelParameter\"\n          },\n          \"type\": \"array\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/Resolve\",\n          \"description\": \"Scale, axis, and legend resolutions for view composition specifications.\"\n        },\n        \"spacing\": {\n          \"description\": \"The spacing in pixels between sub-views of the concat operator.\\n\\n__Default value__: `10`\",\n          \"type\": \"number\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/TitleParams\"\n            }\n          ],\n          \"description\": \"Title for the plot.\"\n        },\n        \"transform\": {\n          \"description\": \"An array of data transformations such as filter and new field calculation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Transform\"\n          },\n          \"type\": \"array\"\n        },\n        \"usermeta\": {\n          \"$ref\": \"#/definitions/Dict\",\n          \"description\": \"Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.\"\n        }\n      },\n      \"required\": [\n        \"hconcat\"\n      ],\n      \"type\": \"object\"\n    },\n    \"TopLevelVConcatSpec\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"$schema\": {\n          \"description\": \"URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v6.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.\",\n          \"format\": \"uri\",\n          \"type\": \"string\"\n        },\n        \"autosize\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/AutosizeType\"\n            },\n            {\n              \"$ref\": \"#/definitions/AutoSizeParams\"\n            }\n          ],\n          \"description\": \"How the visualization size should be determined. If a string, should be one of `\\\"pad\\\"`, `\\\"fit\\\"` or `\\\"none\\\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\\n\\n__Default value__: `pad`\"\n        },\n        \"background\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"CSS color property to use as the background of the entire view.\\n\\n__Default value:__ `\\\"white\\\"`\"\n        },\n        \"bounds\": {\n          \"description\": \"The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\\n\\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\\n\\n__Default value:__ `\\\"full\\\"`\",\n          \"enum\": [\n            \"full\",\n            \"flush\"\n          ],\n          \"type\": \"string\"\n        },\n        \"center\": {\n          \"description\": \"Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\\n\\n__Default value:__ `false`\",\n          \"type\": \"boolean\"\n        },\n        \"config\": {\n          \"$ref\": \"#/definitions/Config\",\n          \"description\": \"Vega-Lite configuration object. This property can only be defined at the top-level of a specification.\"\n        },\n        \"data\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Data\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n        },\n        \"datasets\": {\n          \"$ref\": \"#/definitions/Datasets\",\n          \"description\": \"A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property.\"\n        },\n        \"description\": {\n          \"description\": \"Description of this mark for commenting purpose.\",\n          \"type\": \"string\"\n        },\n        \"name\": {\n          \"description\": \"Name of the visualization for later reference.\",\n          \"type\": \"string\"\n        },\n        \"padding\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Padding\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\\\"left\\\": 5, \\\"top\\\": 5, \\\"right\\\": 5, \\\"bottom\\\": 5}` to specify padding for each side of the visualization.\\n\\n__Default value__: `5`\"\n        },\n        \"params\": {\n          \"description\": \"Dynamic variables or selections that parameterize a visualization.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/TopLevelParameter\"\n          },\n          \"type\": \"array\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/Resolve\",\n          \"description\": \"Scale, axis, and legend resolutions for view composition specifications.\"\n        },\n        \"spacing\": {\n          \"description\": \"The spacing in pixels between sub-views of the concat operator.\\n\\n__Default value__: `10`\",\n          \"type\": \"number\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/TitleParams\"\n            }\n          ],\n          \"description\": \"Title for the plot.\"\n        },\n        \"transform\": {\n          \"description\": \"An array of data transformations such as filter and new field calculation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Transform\"\n          },\n          \"type\": \"array\"\n        },\n        \"usermeta\": {\n          \"$ref\": \"#/definitions/Dict\",\n          \"description\": \"Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.\"\n        },\n        \"vconcat\": {\n          \"description\": \"A list of views to be concatenated and put into a column.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/NonNormalizedSpec\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"vconcat\"\n      ],\n      \"type\": \"object\"\n    },\n    \"TopLevelLayerSpec\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"$schema\": {\n          \"description\": \"URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v6.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.\",\n          \"format\": \"uri\",\n          \"type\": \"string\"\n        },\n        \"autosize\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/AutosizeType\"\n            },\n            {\n              \"$ref\": \"#/definitions/AutoSizeParams\"\n            }\n          ],\n          \"description\": \"How the visualization size should be determined. If a string, should be one of `\\\"pad\\\"`, `\\\"fit\\\"` or `\\\"none\\\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\\n\\n__Default value__: `pad`\"\n        },\n        \"background\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"CSS color property to use as the background of the entire view.\\n\\n__Default value:__ `\\\"white\\\"`\"\n        },\n        \"config\": {\n          \"$ref\": \"#/definitions/Config\",\n          \"description\": \"Vega-Lite configuration object. This property can only be defined at the top-level of a specification.\"\n        },\n        \"data\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Data\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n        },\n        \"datasets\": {\n          \"$ref\": \"#/definitions/Datasets\",\n          \"description\": \"A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property.\"\n        },\n        \"description\": {\n          \"description\": \"Description of this mark for commenting purpose.\",\n          \"type\": \"string\"\n        },\n        \"encoding\": {\n          \"$ref\": \"#/definitions/SharedEncoding\",\n          \"description\": \"A shared key-value mapping between encoding channels and definition of fields in the underlying layers.\"\n        },\n        \"height\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"container\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/Step\"\n            }\n          ],\n          \"description\": \"The height of a visualization.\\n\\n- For a plot with a continuous y-field, height should be a number.\\n- For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.)\\n- To enable responsive sizing on height, it should be set to `\\\"container\\\"`.\\n\\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\\n\\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `\\\"container\\\"` option cannot be used.\\n\\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation.\"\n        },\n        \"layer\": {\n          \"description\": \"Layer or single view specifications to be layered.\\n\\n__Note__: Specifications inside `layer` cannot use `row` and `column` channels as layering facet specifications is not allowed. Instead, use the [facet operator](https://vega.github.io/vega-lite/docs/facet.html) and place a layer inside a facet.\",\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/definitions/LayerSpec\"\n              },\n              {\n                \"$ref\": \"#/definitions/UnitSpec\"\n              }\n            ]\n          },\n          \"type\": \"array\"\n        },\n        \"name\": {\n          \"description\": \"Name of the visualization for later reference.\",\n          \"type\": \"string\"\n        },\n        \"padding\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Padding\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\\\"left\\\": 5, \\\"top\\\": 5, \\\"right\\\": 5, \\\"bottom\\\": 5}` to specify padding for each side of the visualization.\\n\\n__Default value__: `5`\"\n        },\n        \"params\": {\n          \"description\": \"Dynamic variables or selections that parameterize a visualization.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/TopLevelParameter\"\n          },\n          \"type\": \"array\"\n        },\n        \"projection\": {\n          \"$ref\": \"#/definitions/Projection\",\n          \"description\": \"An object defining properties of the geographic projection shared by underlying layers.\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/Resolve\",\n          \"description\": \"Scale, axis, and legend resolutions for view composition specifications.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/TitleParams\"\n            }\n          ],\n          \"description\": \"Title for the plot.\"\n        },\n        \"transform\": {\n          \"description\": \"An array of data transformations such as filter and new field calculation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Transform\"\n          },\n          \"type\": \"array\"\n        },\n        \"usermeta\": {\n          \"$ref\": \"#/definitions/Dict\",\n          \"description\": \"Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.\"\n        },\n        \"view\": {\n          \"$ref\": \"#/definitions/ViewBackground\",\n          \"description\": \"An object defining the view background's fill and stroke.\\n\\n__Default value:__ none (transparent)\"\n        },\n        \"width\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"container\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/Step\"\n            }\n          ],\n          \"description\": \"The width of a visualization.\\n\\n- For a plot with a continuous x-field, width should be a number.\\n- For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.)\\n- To enable responsive sizing on width, it should be set to `\\\"container\\\"`.\\n\\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\\n\\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `\\\"container\\\"` option cannot be used.\\n\\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation.\"\n        }\n      },\n      \"required\": [\n        \"layer\"\n      ],\n      \"type\": \"object\"\n    },\n    \"TopLevelRepeatSpec\": {\n      \"anyOf\": [\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"$schema\": {\n              \"description\": \"URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v6.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.\",\n              \"format\": \"uri\",\n              \"type\": \"string\"\n            },\n            \"align\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/LayoutAlign\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RowCol<LayoutAlign>\"\n                }\n              ],\n              \"description\": \"The alignment to apply to grid rows and columns. The supported string values are `\\\"all\\\"`, `\\\"each\\\"`, and `\\\"none\\\"`.\\n\\n- For `\\\"none\\\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\\n- For `\\\"each\\\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\\n- For `\\\"all\\\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\\n\\nAlternatively, an object value of the form `{\\\"row\\\": string, \\\"column\\\": string}` can be used to supply different alignments for rows and columns.\\n\\n__Default value:__ `\\\"all\\\"`.\"\n            },\n            \"autosize\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/AutosizeType\"\n                },\n                {\n                  \"$ref\": \"#/definitions/AutoSizeParams\"\n                }\n              ],\n              \"description\": \"How the visualization size should be determined. If a string, should be one of `\\\"pad\\\"`, `\\\"fit\\\"` or `\\\"none\\\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\\n\\n__Default value__: `pad`\"\n            },\n            \"background\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"CSS color property to use as the background of the entire view.\\n\\n__Default value:__ `\\\"white\\\"`\"\n            },\n            \"bounds\": {\n              \"description\": \"The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\\n\\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\\n\\n__Default value:__ `\\\"full\\\"`\",\n              \"enum\": [\n                \"full\",\n                \"flush\"\n              ],\n              \"type\": \"string\"\n            },\n            \"center\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RowCol<boolean>\"\n                }\n              ],\n              \"description\": \"Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\\n\\nAn object value of the form `{\\\"row\\\": boolean, \\\"column\\\": boolean}` can be used to supply different centering values for rows and columns.\\n\\n__Default value:__ `false`\"\n            },\n            \"columns\": {\n              \"description\": \"The number of columns to include in the view composition layout.\\n\\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\\n\\n__Note__:\\n\\n1) This property is only for:\\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\\n\\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).\",\n              \"type\": \"number\"\n            },\n            \"config\": {\n              \"$ref\": \"#/definitions/Config\",\n              \"description\": \"Vega-Lite configuration object. This property can only be defined at the top-level of a specification.\"\n            },\n            \"data\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Data\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n            },\n            \"datasets\": {\n              \"$ref\": \"#/definitions/Datasets\",\n              \"description\": \"A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property.\"\n            },\n            \"description\": {\n              \"description\": \"Description of this mark for commenting purpose.\",\n              \"type\": \"string\"\n            },\n            \"name\": {\n              \"description\": \"Name of the visualization for later reference.\",\n              \"type\": \"string\"\n            },\n            \"padding\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Padding\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\\\"left\\\": 5, \\\"top\\\": 5, \\\"right\\\": 5, \\\"bottom\\\": 5}` to specify padding for each side of the visualization.\\n\\n__Default value__: `5`\"\n            },\n            \"params\": {\n              \"description\": \"Dynamic variables or selections that parameterize a visualization.\",\n              \"items\": {\n                \"$ref\": \"#/definitions/TopLevelParameter\"\n              },\n              \"type\": \"array\"\n            },\n            \"repeat\": {\n              \"anyOf\": [\n                {\n                  \"items\": {\n                    \"type\": \"string\"\n                  },\n                  \"type\": \"array\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RepeatMapping\"\n                }\n              ],\n              \"description\": \"Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If `\\\"repeat\\\"` is an array, the field can be referred to as `{\\\"repeat\\\": \\\"repeat\\\"}`. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps `\\\"row\\\"` and/or `\\\"column\\\"` to the listed fields to be repeated along the particular orientations. The objects `{\\\"repeat\\\": \\\"row\\\"}` and `{\\\"repeat\\\": \\\"column\\\"}` can be used to refer to the repeated field respectively.\"\n            },\n            \"resolve\": {\n              \"$ref\": \"#/definitions/Resolve\",\n              \"description\": \"Scale, axis, and legend resolutions for view composition specifications.\"\n            },\n            \"spacing\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RowCol<number>\"\n                }\n              ],\n              \"description\": \"The spacing in pixels between sub-views of the composition operator. An object of the form `{\\\"row\\\": number, \\\"column\\\": number}` can be used to set different spacing values for rows and columns.\\n\\n__Default value__: Depends on `\\\"spacing\\\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)\"\n            },\n            \"spec\": {\n              \"$ref\": \"#/definitions/NonNormalizedSpec\",\n              \"description\": \"A specification of the view that gets repeated.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TitleParams\"\n                }\n              ],\n              \"description\": \"Title for the plot.\"\n            },\n            \"transform\": {\n              \"description\": \"An array of data transformations such as filter and new field calculation.\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Transform\"\n              },\n              \"type\": \"array\"\n            },\n            \"usermeta\": {\n              \"$ref\": \"#/definitions/Dict\",\n              \"description\": \"Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.\"\n            }\n          },\n          \"required\": [\n            \"repeat\",\n            \"spec\"\n          ],\n          \"type\": \"object\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"$schema\": {\n              \"description\": \"URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v6.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.\",\n              \"format\": \"uri\",\n              \"type\": \"string\"\n            },\n            \"align\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/LayoutAlign\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RowCol<LayoutAlign>\"\n                }\n              ],\n              \"description\": \"The alignment to apply to grid rows and columns. The supported string values are `\\\"all\\\"`, `\\\"each\\\"`, and `\\\"none\\\"`.\\n\\n- For `\\\"none\\\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\\n- For `\\\"each\\\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\\n- For `\\\"all\\\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\\n\\nAlternatively, an object value of the form `{\\\"row\\\": string, \\\"column\\\": string}` can be used to supply different alignments for rows and columns.\\n\\n__Default value:__ `\\\"all\\\"`.\"\n            },\n            \"autosize\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/AutosizeType\"\n                },\n                {\n                  \"$ref\": \"#/definitions/AutoSizeParams\"\n                }\n              ],\n              \"description\": \"How the visualization size should be determined. If a string, should be one of `\\\"pad\\\"`, `\\\"fit\\\"` or `\\\"none\\\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\\n\\n__Default value__: `pad`\"\n            },\n            \"background\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Color\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"CSS color property to use as the background of the entire view.\\n\\n__Default value:__ `\\\"white\\\"`\"\n            },\n            \"bounds\": {\n              \"description\": \"The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\\n\\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\\n\\n__Default value:__ `\\\"full\\\"`\",\n              \"enum\": [\n                \"full\",\n                \"flush\"\n              ],\n              \"type\": \"string\"\n            },\n            \"center\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"boolean\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RowCol<boolean>\"\n                }\n              ],\n              \"description\": \"Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\\n\\nAn object value of the form `{\\\"row\\\": boolean, \\\"column\\\": boolean}` can be used to supply different centering values for rows and columns.\\n\\n__Default value:__ `false`\"\n            },\n            \"columns\": {\n              \"description\": \"The number of columns to include in the view composition layout.\\n\\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\\n\\n__Note__:\\n\\n1) This property is only for:\\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\\n\\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).\",\n              \"type\": \"number\"\n            },\n            \"config\": {\n              \"$ref\": \"#/definitions/Config\",\n              \"description\": \"Vega-Lite configuration object. This property can only be defined at the top-level of a specification.\"\n            },\n            \"data\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Data\"\n                },\n                {\n                  \"type\": \"null\"\n                }\n              ],\n              \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n            },\n            \"datasets\": {\n              \"$ref\": \"#/definitions/Datasets\",\n              \"description\": \"A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property.\"\n            },\n            \"description\": {\n              \"description\": \"Description of this mark for commenting purpose.\",\n              \"type\": \"string\"\n            },\n            \"name\": {\n              \"description\": \"Name of the visualization for later reference.\",\n              \"type\": \"string\"\n            },\n            \"padding\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Padding\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ExprRef\"\n                }\n              ],\n              \"description\": \"The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\\\"left\\\": 5, \\\"top\\\": 5, \\\"right\\\": 5, \\\"bottom\\\": 5}` to specify padding for each side of the visualization.\\n\\n__Default value__: `5`\"\n            },\n            \"params\": {\n              \"description\": \"Dynamic variables or selections that parameterize a visualization.\",\n              \"items\": {\n                \"$ref\": \"#/definitions/TopLevelParameter\"\n              },\n              \"type\": \"array\"\n            },\n            \"repeat\": {\n              \"$ref\": \"#/definitions/LayerRepeatMapping\",\n              \"description\": \"Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If `\\\"repeat\\\"` is an array, the field can be referred to as `{\\\"repeat\\\": \\\"repeat\\\"}`. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps `\\\"row\\\"` and/or `\\\"column\\\"` to the listed fields to be repeated along the particular orientations. The objects `{\\\"repeat\\\": \\\"row\\\"}` and `{\\\"repeat\\\": \\\"column\\\"}` can be used to refer to the repeated field respectively.\"\n            },\n            \"resolve\": {\n              \"$ref\": \"#/definitions/Resolve\",\n              \"description\": \"Scale, axis, and legend resolutions for view composition specifications.\"\n            },\n            \"spacing\": {\n              \"anyOf\": [\n                {\n                  \"type\": \"number\"\n                },\n                {\n                  \"$ref\": \"#/definitions/RowCol<number>\"\n                }\n              ],\n              \"description\": \"The spacing in pixels between sub-views of the composition operator. An object of the form `{\\\"row\\\": number, \\\"column\\\": number}` can be used to set different spacing values for rows and columns.\\n\\n__Default value__: Depends on `\\\"spacing\\\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)\"\n            },\n            \"spec\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/LayerSpec\"\n                },\n                {\n                  \"$ref\": \"#/definitions/UnitSpecWithFrame\"\n                }\n              ],\n              \"description\": \"A specification of the view that gets repeated.\"\n            },\n            \"title\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Text\"\n                },\n                {\n                  \"$ref\": \"#/definitions/TitleParams\"\n                }\n              ],\n              \"description\": \"Title for the plot.\"\n            },\n            \"transform\": {\n              \"description\": \"An array of data transformations such as filter and new field calculation.\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Transform\"\n              },\n              \"type\": \"array\"\n            },\n            \"usermeta\": {\n              \"$ref\": \"#/definitions/Dict\",\n              \"description\": \"Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.\"\n            }\n          },\n          \"required\": [\n            \"repeat\",\n            \"spec\"\n          ],\n          \"type\": \"object\"\n        }\n      ]\n    },\n    \"TopLevelFacetSpec\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"$schema\": {\n          \"description\": \"URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v6.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.\",\n          \"format\": \"uri\",\n          \"type\": \"string\"\n        },\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LayoutAlign\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<LayoutAlign>\"\n            }\n          ],\n          \"description\": \"The alignment to apply to grid rows and columns. The supported string values are `\\\"all\\\"`, `\\\"each\\\"`, and `\\\"none\\\"`.\\n\\n- For `\\\"none\\\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\\n- For `\\\"each\\\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\\n- For `\\\"all\\\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\\n\\nAlternatively, an object value of the form `{\\\"row\\\": string, \\\"column\\\": string}` can be used to supply different alignments for rows and columns.\\n\\n__Default value:__ `\\\"all\\\"`.\"\n        },\n        \"autosize\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/AutosizeType\"\n            },\n            {\n              \"$ref\": \"#/definitions/AutoSizeParams\"\n            }\n          ],\n          \"description\": \"How the visualization size should be determined. If a string, should be one of `\\\"pad\\\"`, `\\\"fit\\\"` or `\\\"none\\\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\\n\\n__Default value__: `pad`\"\n        },\n        \"background\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"CSS color property to use as the background of the entire view.\\n\\n__Default value:__ `\\\"white\\\"`\"\n        },\n        \"bounds\": {\n          \"description\": \"The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\\n\\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\\n\\n__Default value:__ `\\\"full\\\"`\",\n          \"enum\": [\n            \"full\",\n            \"flush\"\n          ],\n          \"type\": \"string\"\n        },\n        \"center\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<boolean>\"\n            }\n          ],\n          \"description\": \"Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\\n\\nAn object value of the form `{\\\"row\\\": boolean, \\\"column\\\": boolean}` can be used to supply different centering values for rows and columns.\\n\\n__Default value:__ `false`\"\n        },\n        \"columns\": {\n          \"description\": \"The number of columns to include in the view composition layout.\\n\\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\\n\\n__Note__:\\n\\n1) This property is only for:\\n- the general (wrappable) `concat` operator (not `hconcat`/`vconcat`)\\n- the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\\n\\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).\",\n          \"type\": \"number\"\n        },\n        \"config\": {\n          \"$ref\": \"#/definitions/Config\",\n          \"description\": \"Vega-Lite configuration object. This property can only be defined at the top-level of a specification.\"\n        },\n        \"data\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Data\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n        },\n        \"datasets\": {\n          \"$ref\": \"#/definitions/Datasets\",\n          \"description\": \"A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property.\"\n        },\n        \"description\": {\n          \"description\": \"Description of this mark for commenting purpose.\",\n          \"type\": \"string\"\n        },\n        \"facet\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/FacetFieldDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/FacetMapping\"\n            }\n          ],\n          \"description\": \"Definition for how to facet the data. One of: 1) [a field definition for faceting the plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def) 2) [An object that maps `row` and `column` channels to their field definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)\"\n        },\n        \"name\": {\n          \"description\": \"Name of the visualization for later reference.\",\n          \"type\": \"string\"\n        },\n        \"padding\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Padding\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\\\"left\\\": 5, \\\"top\\\": 5, \\\"right\\\": 5, \\\"bottom\\\": 5}` to specify padding for each side of the visualization.\\n\\n__Default value__: `5`\"\n        },\n        \"params\": {\n          \"description\": \"Dynamic variables or selections that parameterize a visualization.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/TopLevelParameter\"\n          },\n          \"type\": \"array\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/Resolve\",\n          \"description\": \"Scale, axis, and legend resolutions for view composition specifications.\"\n        },\n        \"spacing\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<number>\"\n            }\n          ],\n          \"description\": \"The spacing in pixels between sub-views of the composition operator. An object of the form `{\\\"row\\\": number, \\\"column\\\": number}` can be used to set different spacing values for rows and columns.\\n\\n__Default value__: Depends on `\\\"spacing\\\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)\"\n        },\n        \"spec\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LayerSpec\"\n            },\n            {\n              \"$ref\": \"#/definitions/UnitSpecWithFrame\"\n            }\n          ],\n          \"description\": \"A specification of the view that gets faceted.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/TitleParams\"\n            }\n          ],\n          \"description\": \"Title for the plot.\"\n        },\n        \"transform\": {\n          \"description\": \"An array of data transformations such as filter and new field calculation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Transform\"\n          },\n          \"type\": \"array\"\n        },\n        \"usermeta\": {\n          \"$ref\": \"#/definitions/Dict\",\n          \"description\": \"Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.\"\n        }\n      },\n      \"required\": [\n        \"data\",\n        \"facet\",\n        \"spec\"\n      ],\n      \"type\": \"object\"\n    },\n    \"TopLevelParameter\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/VariableParameter\"\n        },\n        {\n          \"$ref\": \"#/definitions/TopLevelSelectionParameter\"\n        }\n      ]\n    },\n    \"TopLevelSelectionParameter\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"bind\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Binding\"\n            },\n            {\n              \"additionalProperties\": {\n                \"$ref\": \"#/definitions/Binding\"\n              },\n              \"type\": \"object\"\n            },\n            {\n              \"$ref\": \"#/definitions/LegendBinding\"\n            },\n            {\n              \"const\": \"scales\",\n              \"type\": \"string\"\n            }\n          ],\n          \"description\": \"When set, a selection is populated by input elements (also known as dynamic query widgets) or by interacting with the corresponding legend. Direct manipulation interaction is disabled by default; to re-enable it, set the selection's [`on`](https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties) property.\\n\\nLegend bindings are restricted to selections that only specify a single field or encoding.\\n\\nQuery widget binding takes the form of Vega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind) or can be a mapping between projected field/encodings and binding definitions.\\n\\n__See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation.\"\n        },\n        \"name\": {\n          \"$ref\": \"#/definitions/ParameterName\",\n          \"description\": \"Required. A unique name for the selection parameter. Selection names should be valid JavaScript identifiers: they should contain only alphanumeric characters (or \\\"$\\\", or \\\"_\\\") and may not start with a digit. Reserved keywords that may not be used as parameter names are \\\"datum\\\", \\\"event\\\", \\\"item\\\", and \\\"parent\\\".\"\n        },\n        \"select\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SelectionType\"\n            },\n            {\n              \"$ref\": \"#/definitions/PointSelectionConfig\"\n            },\n            {\n              \"$ref\": \"#/definitions/IntervalSelectionConfig\"\n            }\n          ],\n          \"description\": \"Determines the default event processing and data query for the selection. Vega-Lite currently supports two selection types:\\n\\n- `\\\"point\\\"` -- to select multiple discrete data values; the first value is selected on `click` and additional values toggled on shift-click.\\n- `\\\"interval\\\"` -- to select a continuous range of data values on `drag`.\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/SelectionInit\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/SelectionInitMapping\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/SelectionInitIntervalMapping\"\n            }\n          ],\n          \"description\": \"Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/selection.html#project) and initial values.\\n\\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/value.html) documentation.\"\n        },\n        \"views\": {\n          \"description\": \"By default, top-level selections are applied to every view in the visualization. If this property is specified, selections will only be applied to views with the given names.\",\n          \"items\": {\n            \"type\": \"string\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"name\",\n        \"select\"\n      ],\n      \"type\": \"object\"\n    },\n    \"TopLevelSpec\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/TopLevelUnitSpec\"\n        },\n        {\n          \"$ref\": \"#/definitions/TopLevelFacetSpec\"\n        },\n        {\n          \"$ref\": \"#/definitions/TopLevelLayerSpec\"\n        },\n        {\n          \"$ref\": \"#/definitions/TopLevelRepeatSpec\"\n        },\n        {\n          \"$ref\": \"#/definitions/TopLevelConcatSpec\"\n        },\n        {\n          \"$ref\": \"#/definitions/TopLevelVConcatSpec\"\n        },\n        {\n          \"$ref\": \"#/definitions/TopLevelHConcatSpec\"\n        }\n      ],\n      \"description\": \"A Vega-Lite top-level specification. This is the root class for all Vega-Lite specifications. (The json schema is generated from this type.)\"\n    },\n    \"TopLevelUnitSpec\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"$schema\": {\n          \"description\": \"URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v6.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.\",\n          \"format\": \"uri\",\n          \"type\": \"string\"\n        },\n        \"align\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/LayoutAlign\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<LayoutAlign>\"\n            }\n          ],\n          \"description\": \"The alignment to apply to grid rows and columns. The supported string values are `\\\"all\\\"`, `\\\"each\\\"`, and `\\\"none\\\"`.\\n\\n- For `\\\"none\\\"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other.\\n- For `\\\"each\\\"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size.\\n- For `\\\"all\\\"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\\n\\nAlternatively, an object value of the form `{\\\"row\\\": string, \\\"column\\\": string}` can be used to supply different alignments for rows and columns.\\n\\n__Default value:__ `\\\"all\\\"`.\"\n        },\n        \"autosize\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/AutosizeType\"\n            },\n            {\n              \"$ref\": \"#/definitions/AutoSizeParams\"\n            }\n          ],\n          \"description\": \"How the visualization size should be determined. If a string, should be one of `\\\"pad\\\"`, `\\\"fit\\\"` or `\\\"none\\\"`. Object values can additionally specify parameters for content sizing and automatic resizing.\\n\\n__Default value__: `pad`\"\n        },\n        \"background\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"CSS color property to use as the background of the entire view.\\n\\n__Default value:__ `\\\"white\\\"`\"\n        },\n        \"bounds\": {\n          \"description\": \"The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\\n\\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used.\\n- If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\\n\\n__Default value:__ `\\\"full\\\"`\",\n          \"enum\": [\n            \"full\",\n            \"flush\"\n          ],\n          \"type\": \"string\"\n        },\n        \"center\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<boolean>\"\n            }\n          ],\n          \"description\": \"Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\\n\\nAn object value of the form `{\\\"row\\\": boolean, \\\"column\\\": boolean}` can be used to supply different centering values for rows and columns.\\n\\n__Default value:__ `false`\"\n        },\n        \"config\": {\n          \"$ref\": \"#/definitions/Config\",\n          \"description\": \"Vega-Lite configuration object. This property can only be defined at the top-level of a specification.\"\n        },\n        \"data\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Data\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n        },\n        \"datasets\": {\n          \"$ref\": \"#/definitions/Datasets\",\n          \"description\": \"A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property.\"\n        },\n        \"description\": {\n          \"description\": \"Description of this mark for commenting purpose.\",\n          \"type\": \"string\"\n        },\n        \"encoding\": {\n          \"$ref\": \"#/definitions/FacetedEncoding\",\n          \"description\": \"A key-value mapping between encoding channels and definition of fields.\"\n        },\n        \"height\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"container\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/Step\"\n            }\n          ],\n          \"description\": \"The height of a visualization.\\n\\n- For a plot with a continuous y-field, height should be a number.\\n- For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.)\\n- To enable responsive sizing on height, it should be set to `\\\"container\\\"`.\\n\\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\\n\\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `\\\"container\\\"` option cannot be used.\\n\\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation.\"\n        },\n        \"mark\": {\n          \"$ref\": \"#/definitions/AnyMark\",\n          \"description\": \"A string describing the mark type (one of `\\\"bar\\\"`, `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"tick\\\"`, `\\\"line\\\"`, `\\\"area\\\"`, `\\\"point\\\"`, `\\\"rule\\\"`, `\\\"geoshape\\\"`, and `\\\"text\\\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def).\"\n        },\n        \"name\": {\n          \"description\": \"Name of the visualization for later reference.\",\n          \"type\": \"string\"\n        },\n        \"padding\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Padding\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{\\\"left\\\": 5, \\\"top\\\": 5, \\\"right\\\": 5, \\\"bottom\\\": 5}` to specify padding for each side of the visualization.\\n\\n__Default value__: `5`\"\n        },\n        \"params\": {\n          \"description\": \"An array of parameters that may either be simple variables, or more complex selections that map user input to data queries.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/TopLevelParameter\"\n          },\n          \"type\": \"array\"\n        },\n        \"projection\": {\n          \"$ref\": \"#/definitions/Projection\",\n          \"description\": \"An object defining properties of geographic projection, which will be applied to `shape` path for `\\\"geoshape\\\"` marks and to `latitude` and `\\\"longitude\\\"` channels for other marks.\"\n        },\n        \"resolve\": {\n          \"$ref\": \"#/definitions/Resolve\",\n          \"description\": \"Scale, axis, and legend resolutions for view composition specifications.\"\n        },\n        \"spacing\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/RowCol<number>\"\n            }\n          ],\n          \"description\": \"The spacing in pixels between sub-views of the composition operator. An object of the form `{\\\"row\\\": number, \\\"column\\\": number}` can be used to set different spacing values for rows and columns.\\n\\n__Default value__: Depends on `\\\"spacing\\\"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/TitleParams\"\n            }\n          ],\n          \"description\": \"Title for the plot.\"\n        },\n        \"transform\": {\n          \"description\": \"An array of data transformations such as filter and new field calculation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Transform\"\n          },\n          \"type\": \"array\"\n        },\n        \"usermeta\": {\n          \"$ref\": \"#/definitions/Dict\",\n          \"description\": \"Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.\"\n        },\n        \"view\": {\n          \"$ref\": \"#/definitions/ViewBackground\",\n          \"description\": \"An object defining the view background's fill and stroke.\\n\\n__Default value:__ none (transparent)\"\n        },\n        \"width\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"container\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/Step\"\n            }\n          ],\n          \"description\": \"The width of a visualization.\\n\\n- For a plot with a continuous x-field, width should be a number.\\n- For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.)\\n- To enable responsive sizing on width, it should be set to `\\\"container\\\"`.\\n\\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\\n\\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `\\\"container\\\"` option cannot be used.\\n\\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation.\"\n        }\n      },\n      \"required\": [\n        \"data\",\n        \"mark\"\n      ],\n      \"type\": \"object\"\n    },\n    \"TopoDataFormat\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"feature\": {\n          \"description\": \"The name of the TopoJSON object set to convert to a GeoJSON feature collection. For example, in a map of the world, there may be an object set named `\\\"countries\\\"`. Using the feature property, we can extract this set and generate a GeoJSON feature object for each country.\",\n          \"type\": \"string\"\n        },\n        \"mesh\": {\n          \"description\": \"The name of the TopoJSON object set to convert to mesh. Similar to the `feature` option, `mesh` extracts a named TopoJSON object set.  Unlike the `feature` option, the corresponding geo data is returned as a single, unified mesh instance, not as individual GeoJSON features. Extracting a mesh is useful for more efficiently drawing borders or other geographic elements that you do not need to associate with specific regions such as individual countries, states or counties.\",\n          \"type\": \"string\"\n        },\n        \"parse\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Parse\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"If set to `null`, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\\\"number\\\"`, `\\\"boolean\\\"`, `\\\"date\\\"`, or null (do not parse the field)). For example, `\\\"parse\\\": {\\\"modified_on\\\": \\\"date\\\"}` parses the `modified_on` field in each input record a Date value.\\n\\nFor `\\\"date\\\"`, we parse data based using JavaScript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). For Specific date formats can be provided (e.g., `{foo: \\\"date:'%m%d%Y'\\\"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: \\\"utc:'%m%d%Y'\\\"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)\"\n        },\n        \"type\": {\n          \"const\": \"topojson\",\n          \"description\": \"Type of input data: `\\\"json\\\"`, `\\\"csv\\\"`, `\\\"tsv\\\"`, `\\\"dsv\\\"`.\\n\\n__Default value:__  The default format type is determined by the extension of the file URL. If no extension is detected, `\\\"json\\\"` will be used by default.\",\n          \"type\": \"string\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"Transform\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/AggregateTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/BinTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/CalculateTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/DensityTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/ExtentTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/FilterTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/FlattenTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/FoldTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/ImputeTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/JoinAggregateTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/LoessTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/LookupTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/QuantileTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/RegressionTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/TimeUnitTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/SampleTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/StackTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/WindowTransform\"\n        },\n        {\n          \"$ref\": \"#/definitions/PivotTransform\"\n        }\n      ]\n    },\n    \"Type\": {\n      \"description\": \"Data type based on level of measurement\",\n      \"enum\": [\n        \"quantitative\",\n        \"ordinal\",\n        \"temporal\",\n        \"nominal\",\n        \"geojson\"\n      ],\n      \"type\": \"string\"\n    },\n    \"TypeForShape\": {\n      \"enum\": [\n        \"nominal\",\n        \"ordinal\",\n        \"geojson\"\n      ],\n      \"type\": \"string\"\n    },\n    \"TypedFieldDef\": {\n      \"additionalProperties\": false,\n      \"description\": \"Definition object for a data field, its type and transformation of an encoding channel.\",\n      \"properties\": {\n        \"aggregate\": {\n          \"$ref\": \"#/definitions/Aggregate\",\n          \"description\": \"Aggregation function for the field (e.g., `\\\"mean\\\"`, `\\\"sum\\\"`, `\\\"median\\\"`, `\\\"min\\\"`, `\\\"max\\\"`, `\\\"count\\\"`).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.\"\n        },\n        \"bandPosition\": {\n          \"description\": \"Relative position on a band of a stacked, binned, time unit, or band scale. For example, the marks will be positioned at the beginning of the band if set to `0`, and at the middle of the band if set to `0.5`.\",\n          \"maximum\": 1,\n          \"minimum\": 0,\n          \"type\": \"number\"\n        },\n        \"bin\": {\n          \"anyOf\": [\n            {\n              \"type\": \"boolean\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinParams\"\n            },\n            {\n              \"const\": \"binned\",\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`\\\"binned\\\"`).\\n\\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html#bin-parameters) will be applied.\\n\\n- If `\\\"binned\\\"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis's [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\\n\\n__Default value:__ `false`\\n\\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/Field\",\n          \"description\": \"__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\\n\\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\\n\\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `\\\"field\\\": \\\"foo.bar\\\"` and `\\\"field\\\": \\\"foo['bar']\\\"`). If field names contain dots or brackets but are not nested, you can use `\\\\\\\\` to escape dots and brackets (e.g., `\\\"a\\\\\\\\.b\\\"` and `\\\"a\\\\\\\\[0\\\\\\\\]\\\"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.\"\n        },\n        \"timeUnit\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/TimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/BinnedTimeUnit\"\n            },\n            {\n              \"$ref\": \"#/definitions/TimeUnitParams\"\n            }\n          ],\n          \"description\": \"Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\\n\\n__Default value:__ `undefined` (None)\\n\\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"A title for the field. If `null`, the title will be removed.\\n\\n__Default value:__  derived from the field's name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `\\\"Sum of Profit\\\"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `\\\"Profit (binned)\\\"`, `\\\"Transaction Date (year-month)\\\"`). Otherwise, the title is simply the field name.\\n\\n__Notes__:\\n\\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function's options](https://vega.github.io/vega-lite/usage/compile.html#field-title).\\n\\n2) If both field definition's `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.\"\n        },\n        \"type\": {\n          \"$ref\": \"#/definitions/StandardType\",\n          \"description\": \"The type of measurement (`\\\"quantitative\\\"`, `\\\"temporal\\\"`, `\\\"ordinal\\\"`, or `\\\"nominal\\\"`) for the encoded field or constant value (`datum`). It can also be a `\\\"geojson\\\"` type for encoding ['geoshape'](https://vega.github.io/vega-lite/docs/geoshape.html).\\n\\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\\n\\n__Default value:__\\n\\n1) For a data `field`, `\\\"nominal\\\"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria:\\n- `\\\"quantitative\\\"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `\\\"argmin\\\"` and `\\\"argmax\\\"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type).\\n- `\\\"temporal\\\"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale\\n- `\\\"ordinal\\\"` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\\n\\n2) For a constant value in data domain (`datum`):\\n- `\\\"quantitative\\\"` if the datum is a number\\n- `\\\"nominal\\\"` if the datum is a string\\n- `\\\"temporal\\\"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\\n\\n__Note:__\\n- Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data.\\n- Data values for a temporal field can be either a date-time string (e.g., `\\\"2015-03-07 12:32:17\\\"`, `\\\"17:01\\\"`, `\\\"2015-03-16\\\"`. `\\\"2015\\\"`) or a timestamp number (e.g., `1552199579097`).\\n- When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `\\\"quantitative\\\"` (for using a linear bin scale) or [`\\\"ordinal\\\"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `\\\"temporal\\\"` (default, for using a temporal scale) or [`\\\"ordinal\\\"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin).\\n- When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `\\\"cat\\\"` using `{\\\"aggregate\\\": \\\"distinct\\\", \\\"field\\\": \\\"cat\\\"}`. The `\\\"type\\\"` of the aggregate output is `\\\"quantitative\\\"`.\\n- Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\\n\\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"URI\": {\n      \"format\": \"uri-reference\",\n      \"type\": \"string\"\n    },\n    \"UnitSpec\": {\n      \"$ref\": \"#/definitions/GenericUnitSpec<Encoding,AnyMark>\",\n      \"description\": \"A unit specification, which can contain either [primitive marks or composite marks](https://vega.github.io/vega-lite/docs/mark.html#types).\"\n    },\n    \"UnitSpecWithFrame\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"data\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Data\"\n            },\n            {\n              \"type\": \"null\"\n            }\n          ],\n          \"description\": \"An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent.\"\n        },\n        \"description\": {\n          \"description\": \"Description of this mark for commenting purpose.\",\n          \"type\": \"string\"\n        },\n        \"encoding\": {\n          \"$ref\": \"#/definitions/Encoding\",\n          \"description\": \"A key-value mapping between encoding channels and definition of fields.\"\n        },\n        \"height\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"container\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/Step\"\n            }\n          ],\n          \"description\": \"The height of a visualization.\\n\\n- For a plot with a continuous y-field, height should be a number.\\n- For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.)\\n- To enable responsive sizing on height, it should be set to `\\\"container\\\"`.\\n\\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\\n\\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `\\\"container\\\"` option cannot be used.\\n\\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation.\"\n        },\n        \"mark\": {\n          \"$ref\": \"#/definitions/AnyMark\",\n          \"description\": \"A string describing the mark type (one of `\\\"bar\\\"`, `\\\"circle\\\"`, `\\\"square\\\"`, `\\\"tick\\\"`, `\\\"line\\\"`, `\\\"area\\\"`, `\\\"point\\\"`, `\\\"rule\\\"`, `\\\"geoshape\\\"`, and `\\\"text\\\"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def).\"\n        },\n        \"name\": {\n          \"description\": \"Name of the visualization for later reference.\",\n          \"type\": \"string\"\n        },\n        \"params\": {\n          \"description\": \"An array of parameters that may either be simple variables, or more complex selections that map user input to data queries.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/SelectionParameter\"\n          },\n          \"type\": \"array\"\n        },\n        \"projection\": {\n          \"$ref\": \"#/definitions/Projection\",\n          \"description\": \"An object defining properties of geographic projection, which will be applied to `shape` path for `\\\"geoshape\\\"` marks and to `latitude` and `\\\"longitude\\\"` channels for other marks.\"\n        },\n        \"title\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/TitleParams\"\n            }\n          ],\n          \"description\": \"Title for the plot.\"\n        },\n        \"transform\": {\n          \"description\": \"An array of data transformations such as filter and new field calculation.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Transform\"\n          },\n          \"type\": \"array\"\n        },\n        \"view\": {\n          \"$ref\": \"#/definitions/ViewBackground\",\n          \"description\": \"An object defining the view background's fill and stroke.\\n\\n__Default value:__ none (transparent)\"\n        },\n        \"width\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"container\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/Step\"\n            }\n          ],\n          \"description\": \"The width of a visualization.\\n\\n- For a plot with a continuous x-field, width should be a number.\\n- For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.)\\n- To enable responsive sizing on width, it should be set to `\\\"container\\\"`.\\n\\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\\n\\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `\\\"container\\\"` option cannot be used.\\n\\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation.\"\n        }\n      },\n      \"required\": [\n        \"mark\"\n      ],\n      \"type\": \"object\"\n    },\n    \"UrlData\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"format\": {\n          \"$ref\": \"#/definitions/DataFormat\",\n          \"description\": \"An object that specifies the format for parsing the data.\"\n        },\n        \"name\": {\n          \"description\": \"Provide a placeholder name and bind data at runtime.\",\n          \"type\": \"string\"\n        },\n        \"url\": {\n          \"description\": \"An URL from which to load the data set. Use the `format.type` property to ensure the loaded data is correctly parsed.\",\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"url\"\n      ],\n      \"type\": \"object\"\n    },\n    \"UtcMultiTimeUnit\": {\n      \"enum\": [\n        \"utcyearquarter\",\n        \"utcyearquartermonth\",\n        \"utcyearmonth\",\n        \"utcyearmonthdate\",\n        \"utcyearmonthdatehours\",\n        \"utcyearmonthdatehoursminutes\",\n        \"utcyearmonthdatehoursminutesseconds\",\n        \"utcyearweek\",\n        \"utcyearweekday\",\n        \"utcyearweekdayhours\",\n        \"utcyearweekdayhoursminutes\",\n        \"utcyearweekdayhoursminutesseconds\",\n        \"utcyeardayofyear\",\n        \"utcquartermonth\",\n        \"utcmonthdate\",\n        \"utcmonthdatehours\",\n        \"utcmonthdatehoursminutes\",\n        \"utcmonthdatehoursminutesseconds\",\n        \"utcweekday\",\n        \"utcweekdayhours\",\n        \"utcweekdayhoursminutes\",\n        \"utcweekdayhoursminutesseconds\",\n        \"utcdayhours\",\n        \"utcdayhoursminutes\",\n        \"utcdayhoursminutesseconds\",\n        \"utchoursminutes\",\n        \"utchoursminutesseconds\",\n        \"utcminutesseconds\",\n        \"utcsecondsmilliseconds\"\n      ],\n      \"type\": \"string\"\n    },\n    \"UtcSingleTimeUnit\": {\n      \"enum\": [\n        \"utcyear\",\n        \"utcquarter\",\n        \"utcmonth\",\n        \"utcweek\",\n        \"utcday\",\n        \"utcdayofyear\",\n        \"utcdate\",\n        \"utchours\",\n        \"utcminutes\",\n        \"utcseconds\",\n        \"utcmilliseconds\"\n      ],\n      \"type\": \"string\"\n    },\n    \"ValueDef<(number|\\\"width\\\"|\\\"height\\\"|ExprRef)>\": {\n      \"additionalProperties\": false,\n      \"description\": \"Definition object for a constant value (primitive value or gradient definition) of an encoding channel.\",\n      \"properties\": {\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"const\": \"width\",\n              \"type\": \"string\"\n            },\n            {\n              \"const\": \"height\",\n              \"type\": \"string\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"required\": [\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ValueDef<number>\": {\n      \"additionalProperties\": false,\n      \"description\": \"Definition object for a constant value (primitive value or gradient definition) of an encoding channel.\",\n      \"properties\": {\n        \"value\": {\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"value\"\n      ],\n      \"type\": \"object\"\n    },\n    \"ValueDefWithCondition<MarkPropFieldOrDatumDef,(Gradient|string|null)>\": {\n      \"additionalProperties\": false,\n      \"minProperties\": 1,\n      \"properties\": {\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Gradient\"\n            },\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ValueDefWithCondition<MarkPropFieldOrDatumDef,(string|null)>\": {\n      \"additionalProperties\": false,\n      \"minProperties\": 1,\n      \"properties\": {\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ValueDefWithCondition<MarkPropFieldOrDatumDef,number>\": {\n      \"additionalProperties\": false,\n      \"minProperties\": 1,\n      \"properties\": {\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(number|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ValueDefWithCondition<MarkPropFieldOrDatumDef,number[]>\": {\n      \"additionalProperties\": false,\n      \"minProperties\": 1,\n      \"properties\": {\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(number[]|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(number[]|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ValueDefWithCondition<MarkPropFieldOrDatumDef<TypeForShape>,(string|null)>\": {\n      \"additionalProperties\": false,\n      \"minProperties\": 1,\n      \"properties\": {\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalMarkPropFieldOrDatumDef<TypeForShape>\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(string|null|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ValueDefWithCondition<StringFieldDef,Text>\": {\n      \"additionalProperties\": false,\n      \"minProperties\": 1,\n      \"properties\": {\n        \"condition\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ConditionalStringFieldDef\"\n            },\n            {\n              \"$ref\": \"#/definitions/ConditionalValueDef<(Text|ExprRef)>\"\n            },\n            {\n              \"items\": {\n                \"$ref\": \"#/definitions/ConditionalValueDef<(Text|ExprRef)>\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"A field definition or one or more value definition(s) with a parameter predicate.\"\n        },\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Text\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"A constant value in visual domain (e.g., `\\\"red\\\"` / `\\\"#0099ff\\\"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"VariableParameter\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"bind\": {\n          \"$ref\": \"#/definitions/Binding\",\n          \"description\": \"Binds the parameter to an external input element such as a slider, selection list or radio button group.\"\n        },\n        \"expr\": {\n          \"$ref\": \"#/definitions/Expr\",\n          \"description\": \"An expression for the value of the parameter. This expression may include other parameters, in which case the parameter will automatically update in response to upstream parameter changes.\"\n        },\n        \"name\": {\n          \"$ref\": \"#/definitions/ParameterName\",\n          \"description\": \"A unique name for the variable parameter. Parameter names should be valid JavaScript identifiers: they should contain only alphanumeric characters (or \\\"$\\\", or \\\"_\\\") and may not start with a digit. Reserved keywords that may not be used as parameter names are \\\"datum\\\", \\\"event\\\", \\\"item\\\", and \\\"parent\\\".\"\n        },\n        \"react\": {\n          \"description\": \"A boolean flag (default `true`) indicating if the update expression should be automatically re-evaluated when any upstream signal dependencies update. If `false`, the update expression will not register any dependencies on other signals, even for initialization.\\n\\n __Default value:__ `true`\",\n          \"type\": \"boolean\"\n        },\n        \"value\": {\n          \"description\": \"The [initial value](http://vega.github.io/vega-lite/docs/value.html) of the parameter.\\n\\n__Default value:__ `undefined`\"\n        }\n      },\n      \"required\": [\n        \"name\"\n      ],\n      \"type\": \"object\"\n    },\n    \"Vector10<string>\": {\n      \"items\": {\n        \"type\": \"string\"\n      },\n      \"maxItems\": 10,\n      \"minItems\": 10,\n      \"type\": \"array\"\n    },\n    \"Vector12<string>\": {\n      \"items\": {\n        \"type\": \"string\"\n      },\n      \"maxItems\": 12,\n      \"minItems\": 12,\n      \"type\": \"array\"\n    },\n    \"Vector2<DateTime>\": {\n      \"items\": {\n        \"$ref\": \"#/definitions/DateTime\"\n      },\n      \"maxItems\": 2,\n      \"minItems\": 2,\n      \"type\": \"array\"\n    },\n    \"Vector2<Vector2<number>>\": {\n      \"items\": {\n        \"$ref\": \"#/definitions/Vector2<number>\"\n      },\n      \"maxItems\": 2,\n      \"minItems\": 2,\n      \"type\": \"array\"\n    },\n    \"Vector2<boolean>\": {\n      \"items\": {\n        \"type\": \"boolean\"\n      },\n      \"maxItems\": 2,\n      \"minItems\": 2,\n      \"type\": \"array\"\n    },\n    \"Vector2<number>\": {\n      \"items\": {\n        \"type\": \"number\"\n      },\n      \"maxItems\": 2,\n      \"minItems\": 2,\n      \"type\": \"array\"\n    },\n    \"Vector2<string>\": {\n      \"items\": {\n        \"type\": \"string\"\n      },\n      \"maxItems\": 2,\n      \"minItems\": 2,\n      \"type\": \"array\"\n    },\n    \"Vector3<number>\": {\n      \"items\": {\n        \"type\": \"number\"\n      },\n      \"maxItems\": 3,\n      \"minItems\": 3,\n      \"type\": \"array\"\n    },\n    \"Vector7<string>\": {\n      \"items\": {\n        \"type\": \"string\"\n      },\n      \"maxItems\": 7,\n      \"minItems\": 7,\n      \"type\": \"array\"\n    },\n    \"ViewBackground\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"cornerRadius\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles or arcs' corners.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cursor\": {\n          \"$ref\": \"#/definitions/Cursor\",\n          \"description\": \"The mouse cursor used over the view. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used.\"\n        },\n        \"fill\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The fill color.\\n\\n__Default value:__ `undefined`\"\n        },\n        \"fillOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The fill opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"opacity\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The overall opacity (value between [0,1]).\\n\\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"stroke\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The stroke color.\\n\\n__Default value:__ `\\\"#ddd\\\"`\"\n        },\n        \"strokeCap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeCap\",\n              \"description\": \"The stroke cap for line ending style. One of `\\\"butt\\\"`, `\\\"round\\\"`, or `\\\"square\\\"`.\\n\\n__Default value:__ `\\\"butt\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating stroke, space lengths for creating dashed or dotted lines.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The offset (in pixels) into which to begin drawing with the stroke dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeJoin\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeJoin\",\n              \"description\": \"The stroke line join method. One of `\\\"miter\\\"`, `\\\"round\\\"` or `\\\"bevel\\\"`.\\n\\n__Default value:__ `\\\"miter\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeMiterLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The miter limit at which to bevel a line join.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke width, in pixels.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"style\": {\n          \"anyOf\": [\n            {\n              \"type\": \"string\"\n            },\n            {\n              \"items\": {\n                \"type\": \"string\"\n              },\n              \"type\": \"array\"\n            }\n          ],\n          \"description\": \"A string or array of strings indicating the name of custom styles to apply to the view background. 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.\\n\\n__Default value:__ `\\\"cell\\\"` __Note:__ Any specified view background properties will augment the default style.\"\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"ViewConfig\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"clip\": {\n          \"description\": \"Whether the view should be clipped.\",\n          \"type\": \"boolean\"\n        },\n        \"continuousHeight\": {\n          \"description\": \"The default height when the plot has a continuous y-field for x or latitude, or has arc marks.\\n\\n__Default value:__ `300`\",\n          \"type\": \"number\"\n        },\n        \"continuousWidth\": {\n          \"description\": \"The default width when the plot has a continuous field for x or longitude, or has arc marks.\\n\\n__Default value:__ `300`\",\n          \"type\": \"number\"\n        },\n        \"cornerRadius\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The radius in pixels of rounded rectangles or arcs' corners.\\n\\n__Default value:__ `0`\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"cursor\": {\n          \"$ref\": \"#/definitions/Cursor\",\n          \"description\": \"The mouse cursor used over the view. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used.\"\n        },\n        \"discreteHeight\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"additionalProperties\": false,\n              \"properties\": {\n                \"step\": {\n                  \"type\": \"number\"\n                }\n              },\n              \"required\": [\n                \"step\"\n              ],\n              \"type\": \"object\"\n            }\n          ],\n          \"description\": \"The default height when the plot has non arc marks and either a discrete y-field or no y-field. The height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step.\\n\\n__Default value:__ a step size based on `config.view.step`.\"\n        },\n        \"discreteWidth\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"additionalProperties\": false,\n              \"properties\": {\n                \"step\": {\n                  \"type\": \"number\"\n                }\n              },\n              \"required\": [\n                \"step\"\n              ],\n              \"type\": \"object\"\n            }\n          ],\n          \"description\": \"The default width when the plot has non-arc marks and either a discrete x-field or no x-field. The width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step.\\n\\n__Default value:__ a step size based on `config.view.step`.\"\n        },\n        \"fill\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The fill color.\\n\\n__Default value:__ `undefined`\"\n        },\n        \"fillOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The fill opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"opacity\": {\n          \"anyOf\": [\n            {\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The overall opacity (value between [0,1]).\\n\\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.\",\n          \"maximum\": 1,\n          \"minimum\": 0\n        },\n        \"step\": {\n          \"description\": \"Default step size for x-/y- discrete fields.\",\n          \"type\": \"number\"\n        },\n        \"stroke\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Color\"\n            },\n            {\n              \"type\": \"null\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ],\n          \"description\": \"The stroke color.\\n\\n__Default value:__ `\\\"#ddd\\\"`\"\n        },\n        \"strokeCap\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeCap\",\n              \"description\": \"The stroke cap for line ending style. One of `\\\"butt\\\"`, `\\\"round\\\"`, or `\\\"square\\\"`.\\n\\n__Default value:__ `\\\"butt\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDash\": {\n          \"anyOf\": [\n            {\n              \"description\": \"An array of alternating stroke, space lengths for creating dashed or dotted lines.\",\n              \"items\": {\n                \"type\": \"number\"\n              },\n              \"type\": \"array\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeDashOffset\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The offset (in pixels) into which to begin drawing with the stroke dash array.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeJoin\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/StrokeJoin\",\n              \"description\": \"The stroke line join method. One of `\\\"miter\\\"`, `\\\"round\\\"` or `\\\"bevel\\\"`.\\n\\n__Default value:__ `\\\"miter\\\"`\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeMiterLimit\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The miter limit at which to bevel a line join.\",\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeOpacity\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke opacity (value between [0,1]).\\n\\n__Default value:__ `1`\",\n              \"maximum\": 1,\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        },\n        \"strokeWidth\": {\n          \"anyOf\": [\n            {\n              \"description\": \"The stroke width, in pixels.\",\n              \"minimum\": 0,\n              \"type\": \"number\"\n            },\n            {\n              \"$ref\": \"#/definitions/ExprRef\"\n            }\n          ]\n        }\n      },\n      \"type\": \"object\"\n    },\n    \"WindowEventType\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/EventType\"\n        },\n        {\n          \"type\": \"string\"\n        }\n      ]\n    },\n    \"WindowFieldDef\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"as\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The output name for the window operation.\"\n        },\n        \"field\": {\n          \"$ref\": \"#/definitions/FieldName\",\n          \"description\": \"The data field for which to compute the aggregate or window function. This can be omitted for window functions that do not operate over a field such as `\\\"count\\\"`, `\\\"rank\\\"`, `\\\"dense_rank\\\"`.\"\n        },\n        \"op\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/AggregateOp\"\n            },\n            {\n              \"$ref\": \"#/definitions/WindowOnlyOp\"\n            }\n          ],\n          \"description\": \"The window or aggregation operation to apply within a window (e.g., `\\\"rank\\\"`, `\\\"lead\\\"`, `\\\"sum\\\"`, `\\\"average\\\"` or `\\\"count\\\"`). See the list of all supported operations [here](https://vega.github.io/vega-lite/docs/window.html#ops).\"\n        },\n        \"param\": {\n          \"description\": \"Parameter values for the window functions. Parameter values can be omitted for operations that do not accept a parameter.\\n\\nSee the list of all supported operations and their parameters [here](https://vega.github.io/vega-lite/docs/transforms/window.html).\",\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"op\",\n        \"as\"\n      ],\n      \"type\": \"object\"\n    },\n    \"WindowOnlyOp\": {\n      \"enum\": [\n        \"row_number\",\n        \"rank\",\n        \"dense_rank\",\n        \"percent_rank\",\n        \"cume_dist\",\n        \"ntile\",\n        \"lag\",\n        \"lead\",\n        \"first_value\",\n        \"last_value\",\n        \"nth_value\"\n      ],\n      \"type\": \"string\"\n    },\n    \"WindowTransform\": {\n      \"additionalProperties\": false,\n      \"properties\": {\n        \"frame\": {\n          \"description\": \"A frame specification as a two-element array indicating how the sliding window should proceed. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. The default value is `[null, 0]`, indicating that the sliding window includes the current object and all preceding objects. The value `[-5, 5]` indicates that the window should include five objects preceding and five objects following the current object. Finally, `[null, null]` indicates that the window frame should always include all data objects. If you this frame and want to assign the same value to add objects, you can use the simpler [join aggregate transform](https://vega.github.io/vega-lite/docs/joinaggregate.html). The only operators affected are the aggregation operations and the `first_value`, `last_value`, and `nth_value` window operations. The other window operations are not affected by this.\\n\\n__Default value:__:  `[null, 0]` (includes the current object and all preceding objects)\",\n          \"items\": {\n            \"type\": [\n              \"null\",\n              \"number\"\n            ]\n          },\n          \"type\": \"array\"\n        },\n        \"groupby\": {\n          \"description\": \"The data fields for partitioning the data objects into separate windows. If unspecified, all data points will be in a single window.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FieldName\"\n          },\n          \"type\": \"array\"\n        },\n        \"ignorePeers\": {\n          \"description\": \"Indicates if the sliding window frame should ignore peer values (data that are considered identical by the sort criteria). The default is false, causing the window frame to expand to include all peer values. If set to true, the window frame will be defined by offset values only. This setting only affects those operations that depend on the window frame, namely aggregation operations and the first_value, last_value, and nth_value window operations.\\n\\n__Default value:__ `false`\",\n          \"type\": \"boolean\"\n        },\n        \"sort\": {\n          \"description\": \"A sort field definition for sorting data objects within a window. If two data objects are considered equal by the comparator, they are considered \\\"peer\\\" values of equal rank. If sort is not specified, the order is undefined: data objects are processed in the order they are observed and none are considered peers (the ignorePeers parameter is ignored and treated as if set to `true`).\",\n          \"items\": {\n            \"$ref\": \"#/definitions/SortField\"\n          },\n          \"type\": \"array\"\n        },\n        \"window\": {\n          \"description\": \"The definition of the fields in the window, and what calculations to use.\",\n          \"items\": {\n            \"$ref\": \"#/definitions/WindowFieldDef\"\n          },\n          \"type\": \"array\"\n        }\n      },\n      \"required\": [\n        \"window\"\n      ],\n      \"type\": \"object\"\n    }\n  }\n}\n"
  },
  {
    "path": "altair/vegalite/v6/schema/vega-themes.json",
    "content": "{\n  \"carbong10\": {\n    \"config\": {\n      \"arc\": {\n        \"fill\": \"#6929c4\"\n      },\n      \"area\": {\n        \"fill\": \"#6929c4\"\n      },\n      \"axis\": {\n        \"grid\": true,\n        \"gridColor\": \"#e0e0e0\",\n        \"labelAngle\": 0,\n        \"labelColor\": \"#525252\",\n        \"labelFont\": \"IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, \\\".SFNSText-Regular\\\", sans-serif\",\n        \"labelFontSize\": 12,\n        \"labelFontWeight\": 400,\n        \"titleColor\": \"#161616\",\n        \"titleFontSize\": 12,\n        \"titleFontWeight\": 600\n      },\n      \"axisX\": {\n        \"titlePadding\": 10\n      },\n      \"axisY\": {\n        \"titlePadding\": 2.5\n      },\n      \"background\": \"#f4f4f4\",\n      \"circle\": {\n        \"fill\": \"#6929c4\"\n      },\n      \"range\": {\n        \"category\": [\n          \"#6929c4\",\n          \"#1192e8\",\n          \"#005d5d\",\n          \"#9f1853\",\n          \"#fa4d56\",\n          \"#570408\",\n          \"#198038\",\n          \"#002d9c\",\n          \"#ee538b\",\n          \"#b28600\",\n          \"#009d9a\",\n          \"#012749\",\n          \"#8a3800\",\n          \"#a56eff\"\n        ],\n        \"diverging\": [\n          \"#750e13\",\n          \"#a2191f\",\n          \"#da1e28\",\n          \"#fa4d56\",\n          \"#ff8389\",\n          \"#ffb3b8\",\n          \"#ffd7d9\",\n          \"#fff1f1\",\n          \"#e5f6ff\",\n          \"#bae6ff\",\n          \"#82cfff\",\n          \"#33b1ff\",\n          \"#1192e8\",\n          \"#0072c3\",\n          \"#00539a\",\n          \"#003a6d\"\n        ],\n        \"heatmap\": [\n          \"#f6f2ff\",\n          \"#e8daff\",\n          \"#d4bbff\",\n          \"#be95ff\",\n          \"#a56eff\",\n          \"#8a3ffc\",\n          \"#6929c4\",\n          \"#491d8b\",\n          \"#31135e\",\n          \"#1c0f30\"\n        ]\n      },\n      \"rect\": {\n        \"fill\": \"#6929c4\"\n      },\n      \"style\": {\n        \"guide-label\": {\n          \"fill\": \"#525252\",\n          \"font\": \"IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\\".sfnstext-regular\\\",sans-serif\",\n          \"fontWeight\": 400\n        },\n        \"guide-title\": {\n          \"fill\": \"#525252\",\n          \"font\": \"IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\\".sfnstext-regular\\\",sans-serif\",\n          \"fontWeight\": 400\n        }\n      },\n      \"title\": {\n        \"anchor\": \"start\",\n        \"color\": \"#161616\",\n        \"dy\": -15,\n        \"font\": \"IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\\".sfnstext-regular\\\",sans-serif\",\n        \"fontSize\": 16,\n        \"fontWeight\": 600\n      },\n      \"view\": {\n        \"fill\": \"#ffffff\",\n        \"stroke\": \"#ffffff\"\n      }\n    }\n  },\n  \"carbong100\": {\n    \"config\": {\n      \"arc\": {\n        \"fill\": \"#d4bbff\"\n      },\n      \"area\": {\n        \"fill\": \"#d4bbff\"\n      },\n      \"axis\": {\n        \"grid\": true,\n        \"gridColor\": \"#393939\",\n        \"labelAngle\": 0,\n        \"labelColor\": \"#c6c6c6\",\n        \"labelFont\": \"IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, \\\".SFNSText-Regular\\\", sans-serif\",\n        \"labelFontSize\": 12,\n        \"labelFontWeight\": 400,\n        \"titleColor\": \"#f4f4f4\",\n        \"titleFontSize\": 12,\n        \"titleFontWeight\": 600\n      },\n      \"axisX\": {\n        \"titlePadding\": 10\n      },\n      \"axisY\": {\n        \"titlePadding\": 2.5\n      },\n      \"background\": \"#161616\",\n      \"circle\": {\n        \"fill\": \"#d4bbff\"\n      },\n      \"range\": {\n        \"category\": [\n          \"#8a3ffc\",\n          \"#33b1ff\",\n          \"#007d79\",\n          \"#ff7eb6\",\n          \"#fa4d56\",\n          \"#fff1f1\",\n          \"#6fdc8c\",\n          \"#4589ff\",\n          \"#d12771\",\n          \"#d2a106\",\n          \"#08bdba\",\n          \"#bae6ff\",\n          \"#ba4e00\",\n          \"#d4bbff\"\n        ],\n        \"diverging\": [\n          \"#750e13\",\n          \"#a2191f\",\n          \"#da1e28\",\n          \"#fa4d56\",\n          \"#ff8389\",\n          \"#ffb3b8\",\n          \"#ffd7d9\",\n          \"#fff1f1\",\n          \"#e5f6ff\",\n          \"#bae6ff\",\n          \"#82cfff\",\n          \"#33b1ff\",\n          \"#1192e8\",\n          \"#0072c3\",\n          \"#00539a\",\n          \"#003a6d\"\n        ],\n        \"heatmap\": [\n          \"#f6f2ff\",\n          \"#e8daff\",\n          \"#d4bbff\",\n          \"#be95ff\",\n          \"#a56eff\",\n          \"#8a3ffc\",\n          \"#6929c4\",\n          \"#491d8b\",\n          \"#31135e\",\n          \"#1c0f30\"\n        ]\n      },\n      \"rect\": {\n        \"fill\": \"#d4bbff\"\n      },\n      \"style\": {\n        \"guide-label\": {\n          \"fill\": \"#c6c6c6\",\n          \"font\": \"IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\\".sfnstext-regular\\\",sans-serif\",\n          \"fontWeight\": 400\n        },\n        \"guide-title\": {\n          \"fill\": \"#c6c6c6\",\n          \"font\": \"IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\\".sfnstext-regular\\\",sans-serif\",\n          \"fontWeight\": 400\n        }\n      },\n      \"title\": {\n        \"anchor\": \"start\",\n        \"color\": \"#f4f4f4\",\n        \"dy\": -15,\n        \"font\": \"IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\\".sfnstext-regular\\\",sans-serif\",\n        \"fontSize\": 16,\n        \"fontWeight\": 600\n      },\n      \"view\": {\n        \"fill\": \"#161616\",\n        \"stroke\": \"#161616\"\n      }\n    }\n  },\n  \"carbong90\": {\n    \"config\": {\n      \"arc\": {\n        \"fill\": \"#d4bbff\"\n      },\n      \"area\": {\n        \"fill\": \"#d4bbff\"\n      },\n      \"axis\": {\n        \"grid\": true,\n        \"gridColor\": \"#525252\",\n        \"labelAngle\": 0,\n        \"labelColor\": \"#c6c6c6\",\n        \"labelFont\": \"IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, \\\".SFNSText-Regular\\\", sans-serif\",\n        \"labelFontSize\": 12,\n        \"labelFontWeight\": 400,\n        \"titleColor\": \"#f4f4f4\",\n        \"titleFontSize\": 12,\n        \"titleFontWeight\": 600\n      },\n      \"axisX\": {\n        \"titlePadding\": 10\n      },\n      \"axisY\": {\n        \"titlePadding\": 2.5\n      },\n      \"background\": \"#262626\",\n      \"circle\": {\n        \"fill\": \"#d4bbff\"\n      },\n      \"range\": {\n        \"category\": [\n          \"#8a3ffc\",\n          \"#33b1ff\",\n          \"#007d79\",\n          \"#ff7eb6\",\n          \"#fa4d56\",\n          \"#fff1f1\",\n          \"#6fdc8c\",\n          \"#4589ff\",\n          \"#d12771\",\n          \"#d2a106\",\n          \"#08bdba\",\n          \"#bae6ff\",\n          \"#ba4e00\",\n          \"#d4bbff\"\n        ],\n        \"diverging\": [\n          \"#750e13\",\n          \"#a2191f\",\n          \"#da1e28\",\n          \"#fa4d56\",\n          \"#ff8389\",\n          \"#ffb3b8\",\n          \"#ffd7d9\",\n          \"#fff1f1\",\n          \"#e5f6ff\",\n          \"#bae6ff\",\n          \"#82cfff\",\n          \"#33b1ff\",\n          \"#1192e8\",\n          \"#0072c3\",\n          \"#00539a\",\n          \"#003a6d\"\n        ],\n        \"heatmap\": [\n          \"#f6f2ff\",\n          \"#e8daff\",\n          \"#d4bbff\",\n          \"#be95ff\",\n          \"#a56eff\",\n          \"#8a3ffc\",\n          \"#6929c4\",\n          \"#491d8b\",\n          \"#31135e\",\n          \"#1c0f30\"\n        ]\n      },\n      \"rect\": {\n        \"fill\": \"#d4bbff\"\n      },\n      \"style\": {\n        \"guide-label\": {\n          \"fill\": \"#c6c6c6\",\n          \"font\": \"IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\\".sfnstext-regular\\\",sans-serif\",\n          \"fontWeight\": 400\n        },\n        \"guide-title\": {\n          \"fill\": \"#c6c6c6\",\n          \"font\": \"IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\\".sfnstext-regular\\\",sans-serif\",\n          \"fontWeight\": 400\n        }\n      },\n      \"title\": {\n        \"anchor\": \"start\",\n        \"color\": \"#f4f4f4\",\n        \"dy\": -15,\n        \"font\": \"IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\\".sfnstext-regular\\\",sans-serif\",\n        \"fontSize\": 16,\n        \"fontWeight\": 600\n      },\n      \"view\": {\n        \"fill\": \"#161616\",\n        \"stroke\": \"#161616\"\n      }\n    }\n  },\n  \"carbonwhite\": {\n    \"config\": {\n      \"arc\": {\n        \"fill\": \"#6929c4\"\n      },\n      \"area\": {\n        \"fill\": \"#6929c4\"\n      },\n      \"axis\": {\n        \"grid\": true,\n        \"gridColor\": \"#e0e0e0\",\n        \"labelAngle\": 0,\n        \"labelColor\": \"#525252\",\n        \"labelFont\": \"IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, \\\".SFNSText-Regular\\\", sans-serif\",\n        \"labelFontSize\": 12,\n        \"labelFontWeight\": 400,\n        \"titleColor\": \"#161616\",\n        \"titleFontSize\": 12,\n        \"titleFontWeight\": 600\n      },\n      \"axisX\": {\n        \"titlePadding\": 10\n      },\n      \"axisY\": {\n        \"titlePadding\": 2.5\n      },\n      \"background\": \"#ffffff\",\n      \"circle\": {\n        \"fill\": \"#6929c4\"\n      },\n      \"range\": {\n        \"category\": [\n          \"#6929c4\",\n          \"#1192e8\",\n          \"#005d5d\",\n          \"#9f1853\",\n          \"#fa4d56\",\n          \"#570408\",\n          \"#198038\",\n          \"#002d9c\",\n          \"#ee538b\",\n          \"#b28600\",\n          \"#009d9a\",\n          \"#012749\",\n          \"#8a3800\",\n          \"#a56eff\"\n        ],\n        \"diverging\": [\n          \"#750e13\",\n          \"#a2191f\",\n          \"#da1e28\",\n          \"#fa4d56\",\n          \"#ff8389\",\n          \"#ffb3b8\",\n          \"#ffd7d9\",\n          \"#fff1f1\",\n          \"#e5f6ff\",\n          \"#bae6ff\",\n          \"#82cfff\",\n          \"#33b1ff\",\n          \"#1192e8\",\n          \"#0072c3\",\n          \"#00539a\",\n          \"#003a6d\"\n        ],\n        \"heatmap\": [\n          \"#f6f2ff\",\n          \"#e8daff\",\n          \"#d4bbff\",\n          \"#be95ff\",\n          \"#a56eff\",\n          \"#8a3ffc\",\n          \"#6929c4\",\n          \"#491d8b\",\n          \"#31135e\",\n          \"#1c0f30\"\n        ]\n      },\n      \"rect\": {\n        \"fill\": \"#6929c4\"\n      },\n      \"style\": {\n        \"guide-label\": {\n          \"fill\": \"#525252\",\n          \"font\": \"IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\\".sfnstext-regular\\\",sans-serif\",\n          \"fontWeight\": 400\n        },\n        \"guide-title\": {\n          \"fill\": \"#525252\",\n          \"font\": \"IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\\".sfnstext-regular\\\",sans-serif\",\n          \"fontWeight\": 400\n        }\n      },\n      \"title\": {\n        \"anchor\": \"start\",\n        \"color\": \"#161616\",\n        \"dy\": -15,\n        \"font\": \"IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\\".sfnstext-regular\\\",sans-serif\",\n        \"fontSize\": 16,\n        \"fontWeight\": 600\n      },\n      \"view\": {\n        \"fill\": \"#ffffff\",\n        \"stroke\": \"#ffffff\"\n      }\n    }\n  },\n  \"dark\": {\n    \"config\": {\n      \"axis\": {\n        \"domainColor\": \"#fff\",\n        \"gridColor\": \"#888\",\n        \"tickColor\": \"#fff\"\n      },\n      \"background\": \"#333\",\n      \"style\": {\n        \"guide-label\": {\n          \"fill\": \"#fff\"\n        },\n        \"guide-title\": {\n          \"fill\": \"#fff\"\n        }\n      },\n      \"title\": {\n        \"color\": \"#fff\",\n        \"subtitleColor\": \"#fff\"\n      },\n      \"view\": {\n        \"stroke\": \"#888\"\n      }\n    }\n  },\n  \"excel\": {\n    \"config\": {\n      \"arc\": {\n        \"fill\": \"#4572a7\"\n      },\n      \"area\": {\n        \"fill\": \"#4572a7\"\n      },\n      \"axis\": {\n        \"bandPosition\": 0.5,\n        \"grid\": true,\n        \"gridColor\": \"#000000\",\n        \"gridOpacity\": 1,\n        \"gridWidth\": 0.5,\n        \"labelPadding\": 10,\n        \"tickSize\": 5,\n        \"tickWidth\": 0.5\n      },\n      \"axisBand\": {\n        \"grid\": false,\n        \"tickExtra\": true\n      },\n      \"background\": \"#fff\",\n      \"legend\": {\n        \"labelBaseline\": \"middle\",\n        \"labelFontSize\": 11,\n        \"symbolSize\": 50,\n        \"symbolType\": \"square\"\n      },\n      \"line\": {\n        \"stroke\": \"#4572a7\",\n        \"strokeWidth\": 2\n      },\n      \"range\": {\n        \"category\": [\n          \"#4572a7\",\n          \"#aa4643\",\n          \"#8aa453\",\n          \"#71598e\",\n          \"#4598ae\",\n          \"#d98445\",\n          \"#94aace\",\n          \"#d09393\",\n          \"#b9cc98\",\n          \"#a99cbc\"\n        ]\n      },\n      \"rect\": {\n        \"fill\": \"#4572a7\"\n      }\n    }\n  },\n  \"fivethirtyeight\": {\n    \"config\": {\n      \"arc\": {\n        \"fill\": \"#30a2da\"\n      },\n      \"area\": {\n        \"fill\": \"#30a2da\"\n      },\n      \"axis\": {\n        \"domainColor\": \"#cbcbcb\",\n        \"grid\": true,\n        \"gridColor\": \"#cbcbcb\",\n        \"gridWidth\": 1,\n        \"labelColor\": \"#999\",\n        \"labelFontSize\": 10,\n        \"labelPadding\": 4,\n        \"tickColor\": \"#cbcbcb\",\n        \"tickSize\": 10,\n        \"titleColor\": \"#333\",\n        \"titleFontSize\": 14,\n        \"titlePadding\": 10\n      },\n      \"axisBand\": {\n        \"grid\": false\n      },\n      \"background\": \"#f0f0f0\",\n      \"bar\": {\n        \"binSpacing\": 2,\n        \"fill\": \"#30a2da\",\n        \"stroke\": null\n      },\n      \"legend\": {\n        \"labelColor\": \"#333\",\n        \"labelFontSize\": 11,\n        \"padding\": 1,\n        \"symbolSize\": 30,\n        \"symbolType\": \"square\",\n        \"titleColor\": \"#333\",\n        \"titleFontSize\": 14,\n        \"titlePadding\": 10\n      },\n      \"line\": {\n        \"stroke\": \"#30a2da\",\n        \"strokeWidth\": 2\n      },\n      \"point\": {\n        \"filled\": true,\n        \"shape\": \"circle\"\n      },\n      \"range\": {\n        \"category\": [\n          \"#30a2da\",\n          \"#fc4f30\",\n          \"#e5ae38\",\n          \"#6d904f\",\n          \"#8b8b8b\",\n          \"#b96db8\",\n          \"#ff9e27\",\n          \"#56cc60\",\n          \"#52d2ca\",\n          \"#52689e\",\n          \"#545454\",\n          \"#9fe4f8\"\n        ],\n        \"diverging\": [\n          \"#cc0020\",\n          \"#e77866\",\n          \"#f6e7e1\",\n          \"#d6e8ed\",\n          \"#91bfd9\",\n          \"#1d78b5\"\n        ],\n        \"heatmap\": [\n          \"#d6e8ed\",\n          \"#cee0e5\",\n          \"#91bfd9\",\n          \"#549cc6\",\n          \"#1d78b5\"\n        ]\n      },\n      \"rect\": {\n        \"fill\": \"#30a2da\"\n      },\n      \"title\": {\n        \"anchor\": \"start\",\n        \"fontSize\": 24,\n        \"fontWeight\": 600,\n        \"offset\": 20\n      }\n    }\n  },\n  \"ggplot2\": {\n    \"config\": {\n      \"arc\": {\n        \"fill\": \"#000\"\n      },\n      \"area\": {\n        \"fill\": \"#000\"\n      },\n      \"axis\": {\n        \"domain\": false,\n        \"grid\": true,\n        \"gridColor\": \"#FFFFFF\",\n        \"gridOpacity\": 1,\n        \"labelColor\": \"#7F7F7F\",\n        \"labelPadding\": 4,\n        \"tickColor\": \"#7F7F7F\",\n        \"tickSize\": 5.67,\n        \"titleFontSize\": 16,\n        \"titleFontWeight\": \"normal\"\n      },\n      \"legend\": {\n        \"labelBaseline\": \"middle\",\n        \"labelFontSize\": 11,\n        \"symbolSize\": 40\n      },\n      \"line\": {\n        \"stroke\": \"#000\"\n      },\n      \"range\": {\n        \"category\": [\n          \"#000000\",\n          \"#7F7F7F\",\n          \"#1A1A1A\",\n          \"#999999\",\n          \"#333333\",\n          \"#B0B0B0\",\n          \"#4D4D4D\",\n          \"#C9C9C9\",\n          \"#666666\",\n          \"#DCDCDC\"\n        ]\n      },\n      \"rect\": {\n        \"fill\": \"#000\"\n      }\n    }\n  },\n  \"googlecharts\": {\n    \"config\": {\n      \"arc\": {\n        \"fill\": \"#3366CC\"\n      },\n      \"area\": {\n        \"fill\": \"#3366CC\"\n      },\n      \"axis\": {\n        \"domain\": false,\n        \"grid\": true,\n        \"gridColor\": \"#ccc\",\n        \"tickColor\": \"#ccc\"\n      },\n      \"background\": \"#fff\",\n      \"circle\": {\n        \"fill\": \"#3366CC\"\n      },\n      \"padding\": {\n        \"bottom\": 10,\n        \"left\": 10,\n        \"right\": 10,\n        \"top\": 10\n      },\n      \"range\": {\n        \"category\": [\n          \"#4285F4\",\n          \"#DB4437\",\n          \"#F4B400\",\n          \"#0F9D58\",\n          \"#AB47BC\",\n          \"#00ACC1\",\n          \"#FF7043\",\n          \"#9E9D24\",\n          \"#5C6BC0\",\n          \"#F06292\",\n          \"#00796B\",\n          \"#C2185B\"\n        ],\n        \"heatmap\": [\n          \"#c6dafc\",\n          \"#5e97f6\",\n          \"#2a56c6\"\n        ]\n      },\n      \"rect\": {\n        \"fill\": \"#3366CC\"\n      },\n      \"style\": {\n        \"group-title\": {\n          \"font\": \"Arial, sans-serif\",\n          \"fontSize\": 12\n        },\n        \"guide-label\": {\n          \"font\": \"Arial, sans-serif\",\n          \"fontSize\": 12\n        },\n        \"guide-title\": {\n          \"font\": \"Arial, sans-serif\",\n          \"fontSize\": 12\n        }\n      },\n      \"title\": {\n        \"anchor\": \"start\",\n        \"dy\": -3,\n        \"font\": \"Arial, sans-serif\",\n        \"fontSize\": 14,\n        \"fontWeight\": \"bold\"\n      }\n    }\n  },\n  \"latimes\": {\n    \"config\": {\n      \"arc\": {\n        \"fill\": \"#82c6df\"\n      },\n      \"area\": {\n        \"fill\": \"#82c6df\"\n      },\n      \"axis\": {\n        \"labelFont\": \"Benton Gothic, sans-serif\",\n        \"labelFontSize\": 11.5,\n        \"labelFontWeight\": \"normal\",\n        \"titleFont\": \"Benton Gothic Bold, sans-serif\",\n        \"titleFontSize\": 13,\n        \"titleFontWeight\": \"normal\"\n      },\n      \"axisX\": {\n        \"labelAngle\": 0,\n        \"labelPadding\": 4,\n        \"tickSize\": 3\n      },\n      \"axisY\": {\n        \"labelBaseline\": \"middle\",\n        \"maxExtent\": 45,\n        \"minExtent\": 45,\n        \"tickSize\": 2,\n        \"titleAlign\": \"left\",\n        \"titleAngle\": 0,\n        \"titleX\": -45,\n        \"titleY\": -11\n      },\n      \"background\": \"#ffffff\",\n      \"legend\": {\n        \"labelFont\": \"Benton Gothic, sans-serif\",\n        \"labelFontSize\": 11.5,\n        \"symbolType\": \"square\",\n        \"titleFont\": \"Benton Gothic Bold, sans-serif\",\n        \"titleFontSize\": 13,\n        \"titleFontWeight\": \"normal\"\n      },\n      \"line\": {\n        \"stroke\": \"#82c6df\",\n        \"strokeWidth\": 2\n      },\n      \"range\": {\n        \"category\": [\n          \"#ec8431\",\n          \"#829eb1\",\n          \"#c89d29\",\n          \"#3580b1\",\n          \"#adc839\",\n          \"#ab7fb4\"\n        ],\n        \"diverging\": [\n          \"#e68a4f\",\n          \"#f4bb6a\",\n          \"#f9e39c\",\n          \"#dadfe2\",\n          \"#a6b7c6\",\n          \"#849eae\"\n        ],\n        \"heatmap\": [\n          \"#fbf2c7\",\n          \"#f9e39c\",\n          \"#f8d36e\",\n          \"#f4bb6a\",\n          \"#e68a4f\",\n          \"#d15a40\",\n          \"#ab4232\"\n        ],\n        \"ordinal\": [\n          \"#fbf2c7\",\n          \"#f9e39c\",\n          \"#f8d36e\",\n          \"#f4bb6a\",\n          \"#e68a4f\",\n          \"#d15a40\",\n          \"#ab4232\"\n        ],\n        \"ramp\": [\n          \"#fbf2c7\",\n          \"#f9e39c\",\n          \"#f8d36e\",\n          \"#f4bb6a\",\n          \"#e68a4f\",\n          \"#d15a40\",\n          \"#ab4232\"\n        ]\n      },\n      \"rect\": {\n        \"fill\": \"#82c6df\"\n      },\n      \"title\": {\n        \"anchor\": \"start\",\n        \"color\": \"#000000\",\n        \"font\": \"Benton Gothic Bold, sans-serif\",\n        \"fontSize\": 22,\n        \"fontWeight\": \"normal\"\n      }\n    }\n  },\n  \"powerbi\": {\n    \"config\": {\n      \"arc\": {\n        \"fill\": \"#118DFF\"\n      },\n      \"area\": {\n        \"fill\": \"#118DFF\",\n        \"line\": true,\n        \"opacity\": 0.6\n      },\n      \"axis\": {\n        \"domain\": false,\n        \"grid\": false,\n        \"labelColor\": \"#605E5C\",\n        \"labelFontSize\": 12,\n        \"ticks\": false,\n        \"titleColor\": \"#252423\",\n        \"titleFont\": \"wf_standard-font, helvetica, arial, sans-serif\",\n        \"titleFontSize\": 16,\n        \"titleFontWeight\": \"normal\"\n      },\n      \"axisBand\": {\n        \"tickExtra\": true\n      },\n      \"axisQuantitative\": {\n        \"grid\": true,\n        \"gridColor\": \"#C8C6C4\",\n        \"gridDash\": [\n          1,\n          5\n        ],\n        \"labelFlush\": false,\n        \"tickCount\": 3\n      },\n      \"axisX\": {\n        \"labelPadding\": 5\n      },\n      \"axisY\": {\n        \"labelPadding\": 10\n      },\n      \"background\": \"transparent\",\n      \"bar\": {\n        \"fill\": \"#118DFF\"\n      },\n      \"font\": \"Segoe UI\",\n      \"header\": {\n        \"labelColor\": \"#605E5C\",\n        \"labelFont\": \"Segoe UI\",\n        \"labelFontSize\": 13.333333333333332,\n        \"titleColor\": \"#252423\",\n        \"titleFont\": \"wf_standard-font, helvetica, arial, sans-serif\",\n        \"titleFontSize\": 16\n      },\n      \"legend\": {\n        \"labelColor\": \"#605E5C\",\n        \"labelFont\": \"Segoe UI\",\n        \"labelFontSize\": 13.333333333333332,\n        \"symbolSize\": 75,\n        \"symbolType\": \"circle\",\n        \"titleColor\": \"#605E5C\",\n        \"titleFont\": \"Segoe UI\",\n        \"titleFontWeight\": \"bold\"\n      },\n      \"line\": {\n        \"stroke\": \"#118DFF\",\n        \"strokeCap\": \"round\",\n        \"strokeJoin\": \"round\",\n        \"strokeWidth\": 3\n      },\n      \"point\": {\n        \"fill\": \"#118DFF\",\n        \"filled\": true,\n        \"size\": 75\n      },\n      \"range\": {\n        \"category\": [\n          \"#118DFF\",\n          \"#12239E\",\n          \"#E66C37\",\n          \"#6B007B\",\n          \"#E044A7\",\n          \"#744EC2\",\n          \"#D9B300\",\n          \"#D64550\"\n        ],\n        \"diverging\": [\n          \"#DEEFFF\",\n          \"#118DFF\"\n        ],\n        \"heatmap\": [\n          \"#DEEFFF\",\n          \"#118DFF\"\n        ],\n        \"ordinal\": [\n          \"#DEEFFF\",\n          \"#c7e4ff\",\n          \"#b0d9ff\",\n          \"#9aceff\",\n          \"#83c3ff\",\n          \"#6cb9ff\",\n          \"#55aeff\",\n          \"#3fa3ff\",\n          \"#2898ff\",\n          \"#118DFF\"\n        ]\n      },\n      \"rect\": {\n        \"fill\": \"#118DFF\"\n      },\n      \"text\": {\n        \"fill\": \"#605E5C\",\n        \"font\": \"Segoe UI\",\n        \"fontSize\": 12\n      },\n      \"view\": {\n        \"stroke\": \"transparent\"\n      }\n    }\n  },\n  \"quartz\": {\n    \"config\": {\n      \"arc\": {\n        \"fill\": \"#ab5787\"\n      },\n      \"area\": {\n        \"fill\": \"#ab5787\"\n      },\n      \"axis\": {\n        \"domainColor\": \"#979797\",\n        \"domainWidth\": 0.5,\n        \"gridWidth\": 0.2,\n        \"labelColor\": \"#979797\",\n        \"tickColor\": \"#979797\",\n        \"tickWidth\": 0.2,\n        \"titleColor\": \"#979797\"\n      },\n      \"axisBand\": {\n        \"grid\": false\n      },\n      \"axisX\": {\n        \"grid\": true,\n        \"tickSize\": 10\n      },\n      \"axisY\": {\n        \"domain\": false,\n        \"grid\": true,\n        \"tickSize\": 0\n      },\n      \"background\": \"#f9f9f9\",\n      \"legend\": {\n        \"labelFontSize\": 11,\n        \"padding\": 1,\n        \"symbolSize\": 30,\n        \"symbolType\": \"square\"\n      },\n      \"line\": {\n        \"stroke\": \"#ab5787\"\n      },\n      \"range\": {\n        \"category\": [\n          \"#ab5787\",\n          \"#51b2e5\",\n          \"#703c5c\",\n          \"#168dd9\",\n          \"#d190b6\",\n          \"#00609f\",\n          \"#d365ba\",\n          \"#154866\",\n          \"#666666\",\n          \"#c4c4c4\"\n        ]\n      },\n      \"rect\": {\n        \"fill\": \"#ab5787\"\n      }\n    }\n  },\n  \"urbaninstitute\": {\n    \"config\": {\n      \"arc\": {\n        \"fill\": \"#1696d2\"\n      },\n      \"area\": {\n        \"fill\": \"#1696d2\"\n      },\n      \"axisX\": {\n        \"domain\": true,\n        \"domainColor\": \"#000000\",\n        \"domainWidth\": 1,\n        \"grid\": false,\n        \"labelAngle\": 0,\n        \"labelFont\": \"Lato\",\n        \"labelFontSize\": 12,\n        \"tickColor\": \"#000000\",\n        \"tickSize\": 5,\n        \"titleFont\": \"Lato\",\n        \"titleFontSize\": 12,\n        \"titlePadding\": 10\n      },\n      \"axisY\": {\n        \"domain\": false,\n        \"domainWidth\": 1,\n        \"grid\": true,\n        \"gridColor\": \"#DEDDDD\",\n        \"gridWidth\": 1,\n        \"labelFont\": \"Lato\",\n        \"labelFontSize\": 12,\n        \"labelPadding\": 8,\n        \"ticks\": false,\n        \"titleAngle\": 0,\n        \"titleFont\": \"Lato\",\n        \"titleFontSize\": 12,\n        \"titlePadding\": 10,\n        \"titleX\": 18,\n        \"titleY\": -10\n      },\n      \"background\": \"#FFFFFF\",\n      \"legend\": {\n        \"labelFont\": \"Lato\",\n        \"labelFontSize\": 12,\n        \"offset\": 10,\n        \"orient\": \"right\",\n        \"symbolSize\": 100,\n        \"titleFont\": \"Lato\",\n        \"titleFontSize\": 12,\n        \"titlePadding\": 10\n      },\n      \"line\": {\n        \"color\": \"#1696d2\",\n        \"stroke\": \"#1696d2\",\n        \"strokeWidth\": 5\n      },\n      \"point\": {\n        \"filled\": true\n      },\n      \"range\": {\n        \"category\": [\n          \"#1696d2\",\n          \"#ec008b\",\n          \"#fdbf11\",\n          \"#000000\",\n          \"#d2d2d2\",\n          \"#55b748\"\n        ],\n        \"diverging\": [\n          \"#ca5800\",\n          \"#fdbf11\",\n          \"#fdd870\",\n          \"#fff2cf\",\n          \"#cfe8f3\",\n          \"#73bfe2\",\n          \"#1696d2\",\n          \"#0a4c6a\"\n        ],\n        \"heatmap\": [\n          \"#ca5800\",\n          \"#fdbf11\",\n          \"#fdd870\",\n          \"#fff2cf\",\n          \"#cfe8f3\",\n          \"#73bfe2\",\n          \"#1696d2\",\n          \"#0a4c6a\"\n        ],\n        \"ordinal\": [\n          \"#cfe8f3\",\n          \"#a2d4ec\",\n          \"#73bfe2\",\n          \"#46abdb\",\n          \"#1696d2\",\n          \"#12719e\"\n        ],\n        \"ramp\": [\n          \"#CFE8F3\",\n          \"#A2D4EC\",\n          \"#73BFE2\",\n          \"#46ABDB\",\n          \"#1696D2\",\n          \"#12719E\",\n          \"#0A4C6A\",\n          \"#062635\"\n        ]\n      },\n      \"rect\": {\n        \"fill\": \"#1696d2\"\n      },\n      \"style\": {\n        \"bar\": {\n          \"fill\": \"#1696d2\",\n          \"stroke\": null\n        }\n      },\n      \"text\": {\n        \"align\": \"center\",\n        \"color\": \"#1696d2\",\n        \"font\": \"Lato\",\n        \"fontSize\": 11,\n        \"fontWeight\": 400,\n        \"size\": 11\n      },\n      \"title\": {\n        \"anchor\": \"start\",\n        \"font\": \"Lato\",\n        \"fontSize\": 18\n      },\n      \"trail\": {\n        \"color\": \"#1696d2\",\n        \"size\": 1,\n        \"stroke\": \"#1696d2\",\n        \"strokeWidth\": 0\n      },\n      \"view\": {\n        \"stroke\": \"transparent\"\n      }\n    }\n  },\n  \"vox\": {\n    \"config\": {\n      \"arc\": {\n        \"fill\": \"#3e5c69\"\n      },\n      \"area\": {\n        \"fill\": \"#3e5c69\"\n      },\n      \"axis\": {\n        \"domainWidth\": 0.5,\n        \"grid\": true,\n        \"labelPadding\": 2,\n        \"tickSize\": 5,\n        \"tickWidth\": 0.5,\n        \"titleFontWeight\": \"normal\"\n      },\n      \"axisBand\": {\n        \"grid\": false\n      },\n      \"axisX\": {\n        \"gridWidth\": 0.2\n      },\n      \"axisY\": {\n        \"gridDash\": [\n          3\n        ],\n        \"gridWidth\": 0.4\n      },\n      \"background\": \"#fff\",\n      \"legend\": {\n        \"labelFontSize\": 11,\n        \"padding\": 1,\n        \"symbolType\": \"square\"\n      },\n      \"line\": {\n        \"stroke\": \"#3e5c69\"\n      },\n      \"range\": {\n        \"category\": [\n          \"#3e5c69\",\n          \"#6793a6\",\n          \"#182429\",\n          \"#0570b0\",\n          \"#3690c0\",\n          \"#74a9cf\",\n          \"#a6bddb\",\n          \"#e2ddf2\"\n        ]\n      },\n      \"rect\": {\n        \"fill\": \"#3e5c69\"\n      }\n    }\n  }\n}"
  },
  {
    "path": "altair/vegalite/v6/theme.py",
    "content": "\"\"\"Tools for enabling and registering chart themes.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any, Final, Literal, get_args\n\nfrom altair.utils.deprecation import deprecated_static_only\nfrom altair.utils.plugin_registry import Plugin, PluginRegistry\nfrom altair.vegalite.v6.schema._config import ThemeConfig\nfrom altair.vegalite.v6.schema._typing import VegaThemes\n\nif TYPE_CHECKING:\n    import sys\n    from functools import partial\n    from typing import TypeAlias\n\n    if sys.version_info >= (3, 11):\n        from typing import LiteralString\n    else:\n        from typing_extensions import LiteralString\n\n    from altair.utils.plugin_registry import PluginEnabler\n\n\nAltairThemes: TypeAlias = Literal[\"default\", \"opaque\"]\nVEGA_THEMES: list[LiteralString] = list(get_args(VegaThemes))\n\n\n# HACK: See for `LiteralString` requirement in `name`\n# https://github.com/vega/altair/pull/3526#discussion_r1743350127\nclass ThemeRegistry(PluginRegistry[Plugin[ThemeConfig], ThemeConfig]):\n    def enable(\n        self,\n        name: LiteralString | AltairThemes | VegaThemes | None = None,\n        **options: Any,\n    ) -> PluginEnabler[Plugin[ThemeConfig], ThemeConfig]:\n        \"\"\"\n        Enable a theme by name.\n\n        This can be either called directly, or used as a context manager.\n\n        Parameters\n        ----------\n        name : string (optional)\n            The name of the theme to enable. If not specified, then use the\n            current active name.\n        **options :\n            Any additional parameters will be passed to the theme as keyword\n            arguments\n\n        Returns\n        -------\n        PluginEnabler:\n            An object that allows enable() to be used as a context manager\n\n        Notes\n        -----\n        Default `vega` themes can be previewed at https://vega.github.io/vega-themes/\n        \"\"\"\n        return super().enable(name, **options)\n\n    def get(self) -> partial[ThemeConfig] | Plugin[ThemeConfig] | None:\n        \"\"\"Return the currently active theme.\"\"\"\n        return super().get()\n\n    def names(self) -> list[str]:\n        \"\"\"Return the names of the registered and entry points themes.\"\"\"\n        return super().names()\n\n    @deprecated_static_only(\n        \"Deprecated since `altair=5.5.0`. Use @altair.theme.register instead.\",\n        category=None,\n    )\n    def register(\n        self, name: str, value: Plugin[ThemeConfig] | None\n    ) -> Plugin[ThemeConfig] | None:\n        return super().register(name, value)\n\n\nclass VegaTheme:\n    \"\"\"Implementation of a builtin vega theme.\"\"\"\n\n    def __init__(self, theme: str) -> None:\n        self.theme = theme\n\n    def __call__(self) -> ThemeConfig:\n        return {\n            \"usermeta\": {\"embedOptions\": {\"theme\": self.theme}},\n            \"config\": {\"view\": {\"continuousWidth\": 300, \"continuousHeight\": 300}},\n        }\n\n    def __repr__(self) -> str:\n        return f\"VegaTheme({self.theme!r})\"\n\n\n# The entry point group that can be used by other packages to declare other\n# themes that will be auto-detected. Explicit registration is also\n# allowed by the PluginRegistry API.\nENTRY_POINT_GROUP: Final = \"altair.vegalite.v6.theme\"\n\n# NOTE: `themes` def has an entry point group\nthemes = ThemeRegistry(entry_point_group=ENTRY_POINT_GROUP)\n\nthemes.register(\n    \"default\",\n    lambda: {\"config\": {\"view\": {\"continuousWidth\": 300, \"continuousHeight\": 300}}},\n)\nthemes.register(\n    \"opaque\",\n    lambda: {\n        \"config\": {\n            \"background\": \"white\",\n            \"view\": {\"continuousWidth\": 300, \"continuousHeight\": 300},\n        }\n    },\n)\nthemes.register(\"none\", ThemeConfig)\n\nfor theme in VEGA_THEMES:\n    themes.register(theme, VegaTheme(theme))\n\nthemes.enable(\"default\")\n"
  },
  {
    "path": "doc/.gitignore",
    "content": "_build\n\n# gallery is auto-generated; don't version-control it\ngallery\n_images\n\n# generated class documentation\nuser_guide/generated\n"
  },
  {
    "path": "doc/_static/altair-gallery.css",
    "content": ".figure {\n    float: left;\n    margin: 10px;\n    width: auto;\n    height: 220px;\n}\n\n.figure.minigallery {\n    height: auto;\n}\n\n.figure img {\n    display: inline;\n    padding:1px;\n    border:1px solid #DDDDDD;\n    opacity:1.0;\n    filter:alpha(opacity=100); /* For IE8 and earlier */\n}\n\n.figure img:hover {\n    border:1px solid #EEEEEE;\n    opacity: 0.8;\n    filter:alpha(opacity=80); /* For IE8 and earlier */\n}\n\n.figure .caption {\n    width: 200px;\n    text-align: center !important;\n}\n\n.figure p {\n    margin-top: 0;\n}\n\ndiv.section h2 {\n   padding-top: 30px;\n   border-bottom: 1px solid #cccccc;\n}\n\ndiv.bottomnav {\n    clear: left;\n}\n\n/* Front-page Example Showcase */\n#showcase {\n  width: 100%;\n  height: 300px;\n  overflow: hidden;\n  margin: 0;\n  padding: 0;\n  position: absolute;\n  left: 0;\n  right: 0;\n  margin-bottom: 10px;\n}\n#showcase:after,\n#showcase:before {\n  content: \"\";\n  display: block;\n  width: 100%;\n  position: absolute;\n  background: white;\n  height: 16px;\n  z-index: 2;\n}\n#showcase:before {\n  bottom: -16px;\n  box-shadow: 0px -8px 16px rgba(0,0,0,0.3);\n}\n#showcase:after {\n  top: -16px;\n  box-shadow: 0px 8px 16px rgba(0,0,0,0.3);\n}\n#showcase .examples {\n  margin: 0 auto;\n  height: 300px;\n  line-height: 0;\n  /* Width and padding settings give the example showcase the same width\n  as the page header on a big screen. On smaller screens, they both will\n  have the same width anyway as the title header is responsive and gets narrower\n  and the example showcase gets clipped by the overflow: hidden setting. */\n  width: 88rem;\n  padding-left: 1rem;\n  padding-right: 1rem;\n}\n#showcase .preview {\n  /* Value is chosen through trial and error so that the examples fill out the \n  whole width which is defined in #showcase .examples */\n  width: 172px;\n  height: 100px;\n  padding: 0;\n  outline: 1px solid #ddd;\n  background-position: left top;\n  background-size: cover;\n  overflow: hidden;\n  position: relative;\n  z-index: 0;\n  transition: background-position 2s;\n  display: block;\n  float: left\n}\n#showcase .preview:hover {\n  background-position: right bottom;\n  outline: 2px solid #4682B4;\n  z-index: 1;\n}\n\n/* Example Gallery */\n\n.gallery {\n  display: flex;\n  flex-wrap: wrap;\n  margin: 0 -12px;\n}\n.gallery .imagegroup {\n  display: inline-block;\n  position: relative;\n  /* Show 4 images per row, each image has 18px horizontal margin */\n  width: calc(25% - 36px);\n  margin: 12px 18px;\n  /* For small screens */\n  min-width: 140px;\n}\n\n.gallery .imagegroup:hover {\n  text-decoration: none;\n}\n.gallery .image {\n  background-size: cover;\n  display: block;\n  width: 100%;\n  /* hack to make height depend on width, golden ratio*/\n  padding-bottom: 75%;\n  background-repeat: no-repeat;\n  margin-bottom: 5px;\n  overflow: hidden;\n  transition: background-position 2s;\n}\n.gallery .image:hover {\n  background-position: right bottom;\n}\n\n.gallery .image-title {\n  font-size: .95em;\n  display: block;\n  line-height: 22px;\n}\n"
  },
  {
    "path": "doc/_static/altair-plot.css",
    "content": ".vega-actions a {\n    margin-right: 12px;\n    color: #757575;\n    font-weight: normal;\n    font-size: 13px;\n}\n\n.vega-embed {\n    margin-bottom: 20px;\n    margin-top: 20px;\n}\n\n"
  },
  {
    "path": "doc/_static/chart.html",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n  <script src=\"https://cdn.jsdelivr.net/npm/vega@6\"></script>\n  <script src=\"https://cdn.jsdelivr.net/npm/vega-lite@6\"></script>\n  <script src=\"https://cdn.jsdelivr.net/npm/vega-embed@7\"></script>\n</head>\n<body>\n  <div id=\"vis\"></div>\n  <script type=\"text/javascript\">\n    var spec = {\n      \"$schema\": \"https://vega.github.io/schema/vega-lite/v6.json\",\n      \"config\": {\n        \"view\": {\n          \"continuousHeight\": 300,\n          \"continuousWidth\": 300\n        }\n      },\n      \"data\": {\n        \"url\": \"https://vega.github.io/vega-datasets/data/cars.json\"\n      },\n      \"encoding\": {\n        \"color\": {\n          \"field\": \"Origin\",\n          \"type\": \"nominal\"\n        },\n        \"x\": {\n          \"field\": \"Horsepower\",\n          \"type\": \"quantitative\"\n        },\n        \"y\": {\n          \"field\": \"Miles_per_Gallon\",\n          \"type\": \"quantitative\"\n        }\n      },\n      \"mark\": \"point\"\n    };\n    var opt = {\"renderer\": \"canvas\", \"actions\": false};\n    vegaEmbed(\"#vis\", spec, opt);\n  </script>\n</body>\n</html>\n"
  },
  {
    "path": "doc/_static/custom.css",
    "content": "html[data-theme=\"light\"] {\n  --pst-color-primary: rgb(93, 154, 181);\n  --pst-color-secondary: rgb(93, 154, 181);\n  --pst-color-secondary-bg: rgb(223, 235, 240);\n}\n\nhtml[data-theme=\"dark\"] {\n  --pst-color-primary: rgb(93, 155, 182);\n  --pst-color-secondary: rgb(93, 155, 182);\n  --pst-color-secondary-bg: rgb(33, 45, 51);\n}\n\n.wy-nav-side p.caption {\n  color: #F5F5F5;\n}\n\ndiv.wy-side-nav-search {\n  background: #757575;\n}\n\ndiv.wy-side-nay {\n  background: #212121;\n}\n\ntable.field-list td li {\n  line-height: 18px;\n}\n\ntable.docutils td p {\n  font-size: 14px !important;\n  margin-bottom: 6px;\n\n}\n\ntable.docutils td li {\n  line-height: 18px;\n\n}\n\ntable td.vl-type-def {\n  max-width: 170px;\n  overflow-x: clip;\n}\n\n/* Hide this empty container as it leads to a vertical scrollbar in \nthe primary sidebar even if there is no need for such a scrollbar as all content\nwould fit onto the screen */\n#rtd-footer-container {\n  display: none;\n}\n\n/* Default for the pydata theme is 25% */\n.bd-sidebar-primary {\n  max-width: 20%\n}\n\n/* By providing max-width above for .bd-sidebar-primary, we also overwrite\nthe setting from the template for small screens, e.g. mobile phones. The values below\nare copied out of pydata-sphinx-theme.css so that the sidebar is again\nproperly displayed on mobile devices and not restricted to 20% */\n@media (max-width: 959.98px) {\n  .bd-sidebar-primary {\n      max-width: 350px;\n  }\n}\n\n.properties-example .vega-bind-name {\n  display: inline-block;\n  min-width: 150px;\n}\n\n.properties-example .vega-bindings {\n  padding-left: 20px;\n  padding-bottom: 10px;\n}\n\n.properties-example .vega-bindings select {\n  max-width: 180px;\n}\n\n.properties-example .vega-bindings input {\n  vertical-align: text-bottom;\n  margin-right: 3px;\n}\n\n.full-width-plot {\n  width: 100%;\n}\n\n/* This hides the Ctrl + K from the search box on the start page\n * to make it less distracting on the home page.\n * The shortcut still shows up when clicking the search box */\n.search-button-field > .search-button__kbd-shortcut {\n    display: none;\n}\n\n/* Configurations for the start page\n------------------------------------ */\n.lead {\n  font-size: 1.3em;\n  font-weight: 300;\n  margin-top: 22px;\n  margin-bottom: 22px;\n  /* This pushes down the lead so that it is not rendered on top of\n  the gallery (showcase) which has an absolute position. The value is calculated\n  as height (showcase) + margin-bottom (showcase) + margin-top (lead) */\n  padding-top: 332px;\n}\n\n.lead strong {\n  /* Default is bolder which is less */\n  font-weight: bold;\n}\n/* ---------------------------------- */\n"
  },
  {
    "path": "doc/_static/theme_overrides.css",
    "content": "/* override table width restrictions */\n@media screen and (min-width: 767px) {\n\n    .wy-table-responsive table td {\n        /* !important prevents the common CSS stylesheets from overriding\n           this as on RTD they are loaded after this stylesheet */\n        white-space: normal !important;\n    }\n    .wy-table-responsive {\n        overflow: visible !important;\n    }\n}\n\n.rst-content dl:not(.docutils) dt em {\n    font-style: normal !important;\n    line-height: 1.4em !important;\n}\n\n.rst-content div[class^='highlight'] {\n    background: #fff !important;\n}\n\nimg.logo {\n    width: 120px !important;\n}\n\n/* Increase max-width of the content area slightly to accommodate larger screens */\n.bd-main .bd-content .bd-article-container {\n    max-width: 1000px;\n}\n"
  },
  {
    "path": "doc/_templates/class.rst",
    "content": ":mod:`{{module}}`.{{objname}}\n{{ underline }}==============\n\n.. currentmodule:: {{ module }}\n\n.. autoclass:: {{ objname }}\n\n   {% block methods %}\n   .. automethod:: __init__\n   {% endblock %}\n\n.. raw:: html\n\n    <div class=\"clearer\"></div>\n"
  },
  {
    "path": "doc/_templates/navbar-project.html",
    "content": "<a class=\"navbar-brand\" href=\"{{ pathto(master_doc) }}\">\n<p class=\"title\">{{ project }}</p>\n</a>\n\n"
  },
  {
    "path": "doc/_templates/sidebar-logo.html",
    "content": "<div class=\"navbar-brand-box\">\n    <a class=\"navbar-brand text-wrap\" href=\"{{ pathto('index') }}\">\n      {% if logo %}\n        <!-- `logo` is deprecated in Sphinx 4.0, so remove this when we stop supporting 3 -->\n        {% set logo_url=logo %}\n      {% endif %}\n      {% if logo_url %}\n      <img src=\"{{ pathto('_static/' + logo, 1) }}\" class=\"logo\" alt=\"logo\">\n      <br>\n      <p class=\"site-version\" id=\"site-version\">{{ version }}</p>\n      {% endif %}\n    </a>\n</div>\n"
  },
  {
    "path": "doc/about/citing.rst",
    "content": "Citing\n===============\n\nVega-Altair\n-----------\nIf you use Vega-Altair in academic work, please consider citing\n`Altair: Interactive Statistical Visualizations for Python <https://joss.theoj.org/papers/10.21105/joss.01057>`_ as\n\n.. code-block::\n\n  @article{VanderPlas2018,\n    doi = {10.21105/joss.01057},\n    url = {https://doi.org/10.21105/joss.01057},\n    year = {2018},\n    publisher = {The Open Journal},\n    volume = {3},\n    number = {32},\n    pages = {1057},\n    author = {Jacob VanderPlas and Brian Granger and Jeffrey Heer and Dominik Moritz and Kanit Wongsuphasawat and Arvind Satyanarayan and Eitan Lees and Ilia Timofeev and Ben Welsh and Scott Sievert},\n    title = {Altair: Interactive Statistical Visualizations for Python},\n    journal = {Journal of Open Source Software}\n  }\n\nVega-Lite\n---------\nPlease additionally consider citing the\n`Vega-Lite <https://vega.github.io/vega-lite/>`_ project, which Vega-Altair is based on:\n`Vega-Lite: A Grammar of Interactive Graphics <https://dl.acm.org/doi/10.1109/TVCG.2016.2599030>`_\n\n.. code-block::\n\n  @article{Satyanarayan2017,\n    author={Satyanarayan, Arvind and Moritz, Dominik and Wongsuphasawat, Kanit and Heer, Jeffrey},\n    title={Vega-Lite: A Grammar of Interactive Graphics},\n    journal={IEEE transactions on visualization and computer graphics},\n    year={2017},\n    volume={23},\n    number={1},\n    pages={341-350},\n    publisher={IEEE}\n  }"
  },
  {
    "path": "doc/about/code_of_conduct.rst",
    "content": "Code of Conduct\n===============\n\nAs a project of the Vega Organization, we use the `Vega Code of Conduct <https://github.com/vega/.github/blob/main/CODE_OF_CONDUCT.md>`_.\n"
  },
  {
    "path": "doc/about/governance.rst",
    "content": "Governance\n==========\nVega-Altair's governance structure is based on GitHub's\n`Minimum Viable Governance <https://github.com/github/MVG>`_ (MVG) template.\n\nOrganizational Governance\n-------------------------\nThe Altair-Viz organization is governed by the documents that reside in the\n`Vega Organizational GitHub repository <https://github.com/vega/.github/>`_.\n\nProject Governance\n------------------\nThe Vega-Altair library is governed by the documents that reside in the\n`project-docs <https://github.com/vega/.github/blob/main/project-docs/>`_ directory of\nthe Vega Organizational GitHub repository."
  },
  {
    "path": "doc/about/roadmap.rst",
    "content": "Roadmap\n=======\n\nThe roadmap for Vega-Altair and related projects can be found in\n`this project board <https://github.com/orgs/vega/projects/9/views/3?pane=info>`_.\n\n.. toctree::\n   :maxdepth: 1\n   :caption: About\n   :hidden:\n\n   self\n   code_of_conduct\n   governance\n   citing\n   versioning\n"
  },
  {
    "path": "doc/about/versioning.rst",
    "content": "Versioning\n==========\nVega-Altair has historically released major versions that coincide with those of Vega-Lite_.\n\nAs the projects have matured, and major versions become less frequent, there has been a growing need to introduce breaking changes between these major versions.\nSuch changes would allow Vega-Altair to address technical debt and improve upon API ergonomics.\n\nTo ensure future releases clearly communicate changes, Vega-Altair will be working towards adopting SemVer_.\n\nPublic API\n----------\nFunctionality documented in :ref:`api` defines the Vega-Altair public API.\n\nVersion numbers\n---------------\n\nA Vega-Altair release number is composed of ``MAJOR.MINOR.PATCH``.\n\n* Backward incompatible API changes increment **MAJOR** version (``4.2.2`` - ``5.0.0``)\n* New backward compatible functionality increment **MINOR** version (``5.2.0`` - ``5.3.0``)\n* Backward compatible bug fixes increment **PATCH** version (``5.1.1`` - ``5.1.2``)\n\n**MAJOR** versions will *likely* continue to increase with a **MAJOR** increment to Vega-Lite_.\n\nDeprecation\n-----------\nDeprecation warnings may be introduced in **MAJOR** and **MINOR** versions, \nbut the removal of deprecated functionality will not occur until *at least* the next **MAJOR** version.\n\nFor upstream breaking changes that trigger a **MAJOR** version, \nwe *may* provide a deprecation warning if we consider the change especially disruptive.\n\nStarting in version ``5.4.0``, all deprecation warnings *must* specify:\n\n* the version number they were introduced\n\nWhere possible, deprecation warnings *may* specify:\n\n* an alternative function/method/parameter/class to use instead\n* an explanation for why this change had to be made\n\nDeprecated functionality *may* be removed from the Vega-Altair documentation, if there is a \nsuitable replacement and we believe inclusion of both could confuse new users.\n\n.. _Vega-Lite: https://github.com/vega/vega-lite\n.. _SemVer: https://semver.org/"
  },
  {
    "path": "doc/case_studies/exploring-weather.rst",
    "content": ".. _exploring-weather:\n\nExploring Seattle Weather\n-------------------------\n\n(This tutorial is adapted from `Vega-Lite's documentation\n<http://vega.github.io/vega-lite/tutorials/explore.html>`_)\n\nIn this tutorial, you’ll learn a few more techniques for creating\nvisualizations in Altair. If you are not familiar with Altair,\nplease read :ref:`starting` first.\n\nFor this tutorial, we will create visualizations to explore\nweather data for Seattle, taken from NOAA.\nThe dataset is a CSV file with columns for the temperature\n(in Celsius), precipitation (in millimeters),\nwind speed (in meter/second), and weather type.\nWe have one row for each day from January 1st, 2012 to December 31st, 2015.\n\nAltair is designed to work with data in the form of pandas_\ndataframes, and contains a loader for this and other built-in datasets:\n\n.. altair-plot::\n    :output: repr\n\n    from altair.datasets import data\n\n    df = data.seattle_weather()\n    df.head()\n\nThe data is loaded from the web and stored in a pandas DataFrame, and from\nhere we can explore it with Altair.\n\nLet’s start by looking at the precipitation, using tick marks to see the\ndistribution of precipitation values:\n\n.. altair-plot::\n\n    import altair as alt\n\n    alt.Chart(df).mark_tick().encode(\n        x='precipitation',\n    )\n\nIt looks as though precipitation is skewed towards lower values;\nthat is, when it rains in Seattle, it usually doesn’t rain very much.\nIt is difficult to see patterns across continuous variables, and so to\nbetter see this, we can create a histogram of the precipitation data.\nFor this we first discretize the precipitation values by adding a binning\nto ``x``.\nAdditionally, we set our encoding channel ``y`` with ``count``.\nThe result is a histogram of precipitation values:\n\n.. altair-plot::\n\n    alt.Chart(df).mark_bar().encode(\n        alt.X('precipitation').bin(),\n        y='count()'\n    )\n\nNext, let’s look at how precipitation in Seattle changes throughout the year.\nAltair natively supports dates and discretization of dates when we set the\ntype to ``temporal`` (shorthand ``T``).\nFor example, in the following plot, we compute the total precipitation for each month.\nTo discretize the data into months, we can use a ``month`` binning (see\n:ref:`user-guide-timeunit-transform` for more information about this and\nother ``timeUnit`` binnings):\n\n.. altair-plot::\n\n    alt.Chart(df).mark_line().encode(\n        x='month(date):T',\n        y='average(precipitation)'\n    )\n\nThis chart shows that in Seattle the precipitation in the winter is, on average,\nmuch higher than summer (an unsurprising observation to those who live there!).\nBy changing the mapping of encoding channels to data features, you can begin\nto explore the relationships within the data.\n\nWhen looking at precipitation and temperature, we might want to aggregate by\nyear *and* month (``yearmonth``) rather than just month.\nThis allows us to see seasonal trends, with daily variation smoothed out.\nWe might also wish to see the maximum and minimum temperature in each month:\n\n.. altair-plot::\n\n    alt.Chart(df).mark_line().encode(\n        x='yearmonth(date):T',\n        y='max(temp_max)',\n    )\n\nIn this chart, it looks as though the maximum temperature is increasing from\nyear to year over the course of this relatively short baseline.\nTo look closer into this, let’s instead look at the mean of the\nmaximum daily temperatures for each year:\n\n.. altair-plot::\n\n    alt.Chart(df).mark_line().encode(\n        x='year(date):T',\n        y='mean(temp_max)',\n    )\n\nThis can be a little clearer if we use a bar plot and mark the year as an\n\"ordinal\" (ordered category) type.\nFor aesthetic reasons, let's make the bar chart horizontal by assigning the\nordinal value to the y-axis:\n\n.. altair-plot::\n\n    alt.Chart(df).mark_bar().encode(\n        x='mean(temp_max)',\n        y='year(date):O'\n    )\n\nThe chart indicates that the annual average of the daily\nhigh temperatures increased over the course of these four years, a fact that\nyou can confirm for minimum daily temperatures as well.\n\nYou might also wonder how the daily temperature range changes\nthroughout the year. For this, we have to add a computation to derive a new\nfield, which can be done by adding a ``calculate`` transform:\n\n.. altair-plot::\n\n    alt.Chart(df).mark_bar().encode(\n        x='mean(temp_range):Q',\n        y='year(date):O'\n    ).transform_calculate(\n        temp_range=\"datum.temp_max - datum.temp_min\"\n    )\n\nNote that this calculation doesn't actually do any data manipulation in Python,\nbut rather encodes and stores the operations within the plot specification,\nwhere they will be calculated by the renderer.\n\nOf course, the same calculation could be done by using pandas manipulations to\nexplicitly add a column to the dataframe; the disadvantage there is that the\nderived values would have to be stored in the plot specification\nrather than computed on-demand in the browser.\n\nNext we will explore the ``weather`` field, which encodes a categorical\nvariable describing the weather on a given day.\nWe might wish to know how different kinds of weather (e.g. sunny days or rainy days)\nare distributed throughout the year.\nTo answer this, we can discretize the date by month and then count the number\nof records on the y-Axis.\nWe then break down the bars by the weather type by mapping this column to\na color channel.\nWhen a bar chart has a field mapped to color, Altair will automatically\nstack the bars atop each other:\n\n.. altair-plot::\n\n    alt.Chart(df).mark_bar().encode(\n        x='month(date):N',\n        y='count()',\n        color='weather',\n    )\n\nThe default color palette’s semantics might not match our expectation.\nFor example, we probably do not expect “sun” (sunny) to be purple.\nWe can tune the chart by providing a color scale range that maps the values\nfrom the weather field to meaningful colors, using standard hex color codes:\n\n.. altair-plot::\n   :output: none\n\n   scale = alt.Scale(domain=['sun', 'fog', 'drizzle', 'rain', 'snow'],\n                     range=['#e7ba52', '#c7c7c7', '#aec7e8', '#1f77b4', '#9467bd'])\n\nThis scale can be passed to the color encoding to be applied to the plot style.\nIn addition, we can customize the titles for the axis and legend to make the\nmeaning of the plot more clear:\n\n.. altair-plot::\n\n    alt.Chart(df).mark_bar().encode(\n        x=alt.X('month(date):N').title('Month of the year'),\n        y='count()',\n        color=alt.Color('weather', legend=alt.Legend(title='Weather type'), scale=scale),\n    )\n\nCombining the above ideas lets us create any number of flexible visualizations\nof this dataset. For example, here is a plot that uses the customizations we\nhave developed above to explore the relationship between weather, precipitation,\nmaximum temperature, and temperature range, configured to use a larger canvas\nand to allow interactive panning and zooming with the mouse:\n\n.. altair-plot::\n\n    alt.Chart(df).mark_point().encode(\n        alt.X('temp_max').title('Maximum Daily Temperature (C)'),\n        alt.Y('temp_range:Q').title('Daily Temperature Range (C)'),\n        alt.Color('weather').scale(scale),\n        alt.Size('precipitation').scale(range=[1, 200])\n    ).transform_calculate(\n        \"temp_range\", \"datum.temp_max - datum.temp_min\"\n    ).properties(\n        width=600,\n        height=400\n    ).interactive()\n\nThis gives us even more insight into the weather patterns in Seattle: rainy and\nfoggy days tend to be cooler with a narrower range of temperatures, while warmer\ndays tend to be dry and sunny, with a wider spread between low and high temperature.\n\nYou can take this even further using Altair's building blocks for multi-panel\ncharts and interactions. For example, we might construct a histogram of days\nby weather type:\n\n.. altair-plot::\n\n    alt.Chart(df).mark_bar().encode(\n        x='count()',\n        y='weather:N',\n        color=alt.Color('weather:N').scale(scale),\n    )\n\nAnd now we can vertically concatenate this histogram to the points plot above,\nand add a brush selection tool such that the histogram reflects the content\nof the selection (for more information on selections, see\n:ref:`user-guide-interactions`):\n\n.. altair-plot::\n\n    brush = alt.selection_interval()\n    color = alt.Color(\"weather:N\").scale(scale)\n    temp_range = alt.datum[\"temp_max\"] - alt.datum[\"temp_min\"]\n\n    points = alt.Chart(width=600, height=400).mark_point().encode(\n        alt.X(\"temp_max:Q\").title(\"Maximum Daily Temperature (C)\"),\n        alt.Y(\"temp_range:Q\").title(\"Daily Temperature Range (C)\"),\n        color=alt.when(brush).then(color).otherwise(alt.value(\"lightgray\")),\n        size=alt.Size(\"precipitation:Q\").scale(range=[1, 200]),\n    ).transform_calculate(\n        temp_range=temp_range\n    ).add_params(\n        brush\n    )\n\n    bars = alt.Chart(width=600).mark_bar().encode(\n        x=\"count()\",\n        y=\"weather:N\",\n        color=color\n    ).transform_calculate(\n        temp_range=temp_range\n    ).transform_filter(\n        brush\n    )\n\n    alt.vconcat(points, bars, data=df)\n\nThis chart, containing concatenations, data transformations, selections, and\ncustomized axes labels and data scales, shows the power of the grammar behind\nAltair: you can create a complex chart from a small number of building blocks.\n\nThis is the end of this tutorial where you have seen various ways to bin\nand aggregate data, derive new fields, and customize your charts.\nYou can find more visualizations in the :ref:`example-gallery`.\nIf you want to further customize your charts, you can refer to Altair's\n:ref:`api`.\n\n.. _pandas: http://pandas.pydata.org/\n"
  },
  {
    "path": "doc/case_studies/index.rst",
    "content": "Tutorials\n---------\n\nThese tutorials explore more advanced use cases than the gallery.\n\n.. toctree::\n   :hidden:\n\n   exploring-weather\n   numpy-tooltip-images\n"
  },
  {
    "path": "doc/case_studies/numpy-tooltip-images.rst",
    "content": ".. _numpy-tooltip-imgs:\n\nDisplaying Numpy Images in Tooltips\n-----------------------------------\n\nIn this tutorial,\nyou’ll learn how to display images stored as Numpy arrays\nin tooltips with any Altair chart.\n\nFirst,\nwe create some example image arrays with blobs (objects)\nof different sizes and shapes (circular and square).\nWe measure the area of the blobs\nin order to have a quantitative measurement\nto compare them with in our charts.\n\n.. altair-plot::\n    :output: repr\n\n    import numpy as np\n    import pandas as pd\n    from scipy import ndimage as ndi\n\n    rng = np.random.default_rng([ord(c) for c in 'altair'])\n    n_rows = 200\n\n    def create_blobs(blob_shape, img_width=96, n_dim=2, sizes=[0.05, 0.1, 0.15]):\n        \"\"\"Helper function to create blobs in the images\"\"\"\n        shape = tuple([img_width] * n_dim)\n        mask = np.zeros(shape)\n        points = (img_width * rng.random(n_dim)).astype(int)\n        mask[tuple(indices for indices in points)] = 1\n        if blob_shape == 'circle':\n            im = ndi.gaussian_filter(mask, sigma=rng.choice(sizes) * img_width)\n        elif blob_shape == 'square':\n            im = ndi.uniform_filter(mask, size=rng.choice(sizes) * img_width, mode='constant') * rng.normal(4, size=(img_width, img_width))\n        return im / im.max()\n\n    df = pd.DataFrame({\n        'image1': [create_blobs('circle') for _ in range(n_rows)],\n        'image2': [create_blobs('square', sizes=[0.3, 0.4, 0.5]) for _ in range(n_rows)],\n        'group': rng.choice(['a', 'b', 'c'], size=n_rows)\n    })\n    # Compute the area as the proportion of pixels above a threshold\n    df[['image1_area', 'image2_area']] = df[['image1', 'image2']].map(lambda x: (x > 0.4).mean())\n    df\n\nNext, we define the function\nthat will convert the Numpy arrays to base64-encoded_ strings.\nThis is a necessary step\nfor the tooltip to recognize that the data\nis in the form of an image and render it appropriately.\n\n\n.. altair-plot::\n    :output: repr\n\n    from io import BytesIO\n    from PIL import Image, ImageDraw\n    import base64\n\n\n    def create_tooltip_image(df_row):\n        \"\"\"Concatenate, rescale, and convert images to base64 strings.\"\"\"\n        # Concatenate images to show together in the tooltip\n        # This can be skipped if only one image is to be displayed\n        img_gap = np.ones([df_row['image1'].shape[0], 10])  # 10 px white gap between imgs\n        img_arr = np.concatenate(\n            [\n                df_row['image1'],\n                img_gap,\n                df_row['image2']\n            ],\n            axis=1\n        )\n\n        # Create a PIL image from the array.\n        # Multiplying by 255 and recasting as uint8 for the images to occupy the entire supported instensity space from 0-255\n        img = Image.fromarray((255 * img_arr).astype('uint8'))\n\n        # Optional: Burn in labels as pixels in the images. Can be helpful to keep track of which image is which\n        ImageDraw.Draw(img).text((3, 0), 'im1', fill=255)\n        ImageDraw.Draw(img).text((3 + df_row['image1'].shape[1] + img_gap.shape[1], 0), 'im2', fill=255)\n\n        # Convert to base64 encoded image string that can be displayed in the tooltip\n        buffered = BytesIO()\n        img.save(buffered, format=\"PNG\")\n        img_str = base64.b64encode(buffered.getvalue()).decode()\n        return f\"data:image/png;base64,{img_str}\"\n\n    # The column with the base64 image string must be called \"image\" in order for it to trigger the image rendering in the tooltip\n    df['image'] = df[['image1', 'image2']].apply(create_tooltip_image, axis=1)\n\n    # Dropping the image arrays since they are large and no longer needed\n    df_plot = df.drop(columns=['image1', 'image2'])\n    df_plot\n\nNow we are ready to create the charts that show the images as tooltips\nwhen the dots are hovered with the mouse.\nWe can see that the large white blobs\ncorrespond to the higher area measurements\nas expected.\n\n.. altair-plot::\n    import altair as alt\n\n    # The random() function is used to jitter points in the x-direction\n    alt.Chart(df_plot, width=alt.Step(40)).mark_circle(xOffset=alt.expr('random() * 16 - 8')).encode(\n        x='group',\n        y=alt.Y(alt.repeat(), type='quantitative'),\n        tooltip=['image'],\n        color='group',\n    ).repeat(\n        ['image1_area', 'image2_area']\n    ).resolve_scale(\n        y='shared'\n    ).properties(\n        title='Comparison of blob areas'\n    )\n\nNote that when including images as part of the chart data,\nthe chart size often increases several-fold.\nThe size of the chart above would have been 19 Kb without the images,\nbut with the images added it is 760 Kb.\nWhile this is a 20x size increase,\nthe base64 encoding is still quite storage efficient;\nif we would have included the images in their original Numpy array format\nthe chart size would have been 35Mb!\n\nIf we want to have even more fun and get a bit more sophisticated,\nwe could show one chart at a time\nand update what is shown on the y-axis\nas well as what is shown in the image tooltip\nbased on a dropdown selector.\nWe start by defining a tooltip that only contains a single image\ninstead of both the images concatenated together.\n\n.. altair-plot::\n    :output: repr\n\n    def create_tooltip_image(img_arr):\n        \"\"\"Rescale and convert an image to a base64 string.\"\"\"\n        # print(img_arr)\n        # Create a PIL image from the array.\n        # Multiplying by 255 and recasting as uint8 for the images to occupy the entire supported instensity space from 0-255\n        img = Image.fromarray((255 * img_arr).astype('uint8'))\n\n        # Convert to base64 encoded image string that can be displayed in the tooltip\n        buffered = BytesIO()\n        img.save(buffered, format=\"PNG\")\n        img_str = base64.b64encode(buffered.getvalue()).decode()\n        return f\"data:image/png;base64,{img_str}\"\n\n    # The column with the base64 image string must be called \"image\" in order for it to trigger the image rendering in the tooltip\n    df[['image1_base64', 'image2_base64']] = df[['image1', 'image2']].map(create_tooltip_image)\n    # Dropping the image arrays since they are large and no longer needed\n    # Also drop the previous tooltip image for clarity\n    df_plot = df.drop(columns=['image1', 'image2', 'image'])\n    df_plot\n\nIn our chart,\nwe need to use a transform to update\nboth the y-axis column as well as the tooltip column\ndynamically based on the selection in the dropdown.\nThe comments in the code explain more in detail what each line\nin this chart specification does.\n\n.. altair-plot::\n    metric_dropdown = alt.binding_select(\n        options=['image1_area', 'image2_area'],\n        name='Image metric '\n    )\n    metric_param = alt.param(\n        value='image1_area',\n        bind=metric_dropdown\n    )\n    alt.hconcat(\n        # This first chart is the axis title and is only needed because\n        # Vega-Lite does not yet support passing an expression directly to the axis title\n        alt.Chart().mark_text(angle=270, dx=-150, fontWeight='bold').encode(\n            alt.TextValue(alt.expr(f'{metric_param.name}'))\n        ),\n        alt.Chart(df_plot, width=alt.Step(40)).mark_circle(xOffset=alt.expr('random() * 16 - 8')).encode(\n            x='group',\n            y=alt.Y('image_area:Q').title(''),\n            tooltip=['image:N'],\n            color='group',\n        ).properties(\n            title='Area of blobs'\n        ).transform_calculate(\n            # This first line updates the image_area which is used for the y axis\n            # to correspond to the selected string in the dropdown\n            image_area=f'datum[{metric_param.name}]',\n            # Since altair needs the tooltip field to be called `image`, we need to dynamically\n            # change what's in the `image` field depending on the selection in the dropdown\n            # This is further complicated by the fact that the string in the dropdown is not\n            # an exact match for the column holding the image data so we need\n            # to replace part of the name to match to match the corresponding base 64 image field\n            image=f'datum[replace({metric_param.name}, \"_area\", \"_base64\")]',\n        )\n    ).add_params(\n        metric_param\n    )\n\n\n.. _base64-encoded: https://en.wikipedia.org/wiki/Binary-to-text_encoding\n"
  },
  {
    "path": "doc/conf.py",
    "content": "# !/usr/bin/env python3\n#\n# altair documentation build configuration file, created by\n# sphinx-quickstart on Wed Sep  7 12:52:48 2016.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport os\nimport sys\nfrom datetime import datetime\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\nsys.path.insert(0, os.path.abspath(\"..\"))  # noqa: PTH100\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.autosummary\",\n    \"sphinx.ext.doctest\",\n    \"sphinx.ext.coverage\",\n    \"sphinx.ext.githubpages\",\n    \"numpydoc.numpydoc\",\n    \"sphinxext_altair.altairplot\",\n    \"sphinxext.altairgallery\",\n    \"sphinxext.schematable\",\n    \"sphinxext.code_ref\",\n    \"sphinx_copybutton\",\n    \"sphinx_design\",\n]\n\naltair_plot_links = {\"editor\": True, \"source\": False, \"export\": False}\n\nautodoc_default_flags = [\"members\", \"inherited-members\"]\n\nautodoc_member_order = \"groupwise\"\n\nautodoc_typehints = \"none\"\n\n# generate autosummary even if no references\nautosummary_generate = True\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n# source_suffix = ['.rst', '.md']\nsource_suffix = {\".rst\": \"restructuredtext\"}\n\n# The encoding of source files.\n# source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = \"index\"\n\n# General information about the project.\nproject = \"Vega-Altair\"\ncopyright = f\"2015-{datetime.now().year}, Vega-Altair Developers\"\nauthor = \"Vega-Altair Developers\"\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nversion = \"6.1.0dev\"\n# The full version, including alpha/beta/rc tags.\nrelease = f\"{version}\"\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = \"en\"\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n# today = ''\n# Else, today_fmt is used as the format for a strftime call.\n# today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This patterns also effect to html_static_path and html_extra_path\nexclude_patterns = [\"_build\", \"Thumbs.db\", \".DS_Store\"]\n\n# The reST default role (used for this markup: `text`) to use for all\n# documents.\n# default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n# add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n# add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n# show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\n# pygments_style = 'colorful'\n\n# A list of ignored prefixes for module index sorting.\n# modindex_common_prefix = []\n\n# If true, keep warnings as \"system message\" paragraphs in the built documents.\n# keep_warnings = False\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\n\n# -- Options for HTML output ----------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\nhtml_theme = \"pydata_sphinx_theme\"\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\nhtml_theme_options = {\n    \"navbar_start\": [\"navbar-logo\", \"navbar-project\"],\n    \"navbar_center\": [\"navbar-nav\"],\n    \"navbar_end\": [\"theme-switcher\", \"navbar-icon-links\"],\n    \"primary_sidebar_end\": [],\n    \"icon_links\": [\n        {\n            \"name\": \"GitHub\",\n            \"url\": \"https://github.com/vega/altair\",\n            \"icon\": \"fab fa-github fa-lg\",\n            \"type\": \"fontawesome\",\n        },\n        {\n            \"name\": \"StackOverflow\",\n            \"url\": \"https://stackoverflow.com/tags/altair\",\n            \"icon\": \"fab fa-stack-overflow fa-xl\",\n            \"type\": \"fontawesome\",\n        },\n    ],\n    \"header_links_before_dropdown\": 4,\n    \"analytics\": {\n        \"plausible_analytics_domain\": \"altair-viz.github.io\",\n        \"plausible_analytics_url\": (\"https://views.scientific-python.org/js/script.js\"),\n    },\n}\n\nhtml_context = {\"default_mode\": \"light\"}\n\n# Add any paths that contain custom themes here, relative to this directory.\n# html_theme_path = []\n\n# The name for this set of Sphinx documents.\n# \"<project> v<release> documentation\" by default.\n# html_title = 'altair v1.0.0'\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\nhtml_short_title = \"Altair\"\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\nhtml_logo = \"_static/altair-logo-light.png\"\n\n# The name of an image file (relative to this directory) to use as a favicon of\n# the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\nhtml_favicon = \"_static/favicon.ico\"\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = [\"_static\", \"_images\"]\n\n\n# adapted from: http://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html\n# and\n# https://github.com/rtfd/sphinx_rtd_theme/issues/117\ndef setup(app):\n    app.add_css_file(\"theme_overrides.css\")\n    app.add_css_file(\"custom.css\")\n\n\n# Add any extra paths that contain custom files (such as robots.txt or\n# .htaccess) here, relative to this directory. These files are copied\n# directly to the root of the documentation.\n# html_extra_path = []\n\n# If not None, a 'Last updated on:' timestamp is inserted at every page\n# bottom, using the given strftime format.\n# The empty string is equivalent to '%b %d, %Y'.\n# html_last_updated_fmt = None\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n# html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\nhtml_sidebars = {\n    \"index\": [],\n    \"**\": [\"sidebar-nav-bs\"],\n}\n\n# Redirection of old page locations via the rediraffe sphinx-extension\n# It seems like only pages can be redirected, not headings within pages\n# rediraffe_redirects = {\n#     'case_studies/exploring-weather.rst': 'user_guide/case_studies/exploring-weather.rst'\n# }\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n# html_additional_pages = {}\n\n# If false, no module index is generated.\n# html_domain_indices = True\n\n# If false, no index is generated.\n# html_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n# html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\nhtml_show_sourcelink = False\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n# html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n# html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n# html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n# html_file_suffix = None\n\n# Language to be used for generating the HTML full-text search index.\n# Sphinx supports the following languages:\n#   'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'\n#   'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'\n# html_search_language = 'en'\n\n# A dictionary with options for the search language support, empty by default.\n# 'ja' uses this config value.\n# 'zh' user can custom change `jieba` dictionary path.\n# html_search_options = {'type': 'default'}\n\n# The name of a javascript file (relative to the configuration directory) that\n# implements a search results scorer. If empty, the default will be used.\n# html_search_scorer = 'scorer.js'\n\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = \"altairdoc\"\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n    # The paper size ('letterpaper' or 'a4paper').\n    # 'papersize': 'letterpaper',\n    # The font size ('10pt', '11pt' or '12pt').\n    # 'pointsize': '10pt',\n    # Additional stuff for the LaTeX preamble.\n    # 'preamble': '',\n    # Latex figure (float) alignment\n    # 'figure_align': 'htbp',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n    (\n        master_doc,\n        \"altair.tex\",\n        \"altair Documentation\",\n        \"Altair Developers\",\n        \"manual\",\n    ),\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n# latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n# latex_use_parts = False\n\n# If true, show page references after internal links.\n# latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n# latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n# latex_appendices = []\n\n# If false, no module index is generated.\n# latex_domain_indices = True\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [(master_doc, \"altair\", \"altair Documentation\", [author], 1)]\n\n# If true, show URL addresses after external links.\n# man_show_urls = False\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n    (\n        master_doc,\n        \"altair\",\n        \"altair Documentation\",\n        author,\n        \"altair\",\n        \"One line description of project.\",\n        \"Miscellaneous\",\n    ),\n]\n\n# Documents to append as an appendix to all manuals.\n# texinfo_appendices = []\n\n# If false, no module index is generated.\n# texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n# texinfo_show_urls = 'footnote'\n\n# If true, do not generate a @detailmenu in the \"Top\" node's menu.\n# texinfo_no_detailmenu = False\n\n# Hide extra class members\nnumpydoc_show_class_members = False\n\n# For the altairplot extension\naltairplot_links = {\"editor\": True, \"source\": True, \"export\": True}\n\n# Defaults for below are drawn from Altair; override here.\n# altairplot_vega_js_url = \"https://cdn.jsdelivr.net/npm/vega@5\"\n# altairplot_vegalite_js_url = \"https://cdn.jsdelivr.net/npm/vega-lite@4\"\n# altairplot_vegaembed_js_url = \"https://cdn.jsdelivr.net/npm/vega-embed@7\"\n"
  },
  {
    "path": "doc/getting_started/getting_help.rst",
    "content": "Getting Help\n============\n\nAltair is BSD-licensed and the source is available on `GitHub`_,\nwhere you can also report `bugs and feature requests`_.\nFor general questions, please ask on `StackOverflow`_\nusing the `altair` tag.\n\nYou can browse this documentation\nvia the links in the top navigation panel\nor by viewing the full site :ref:`genindex`.\nIn addition to reading this documentation page,\nit can be helpful to also browse the `Vega-Lite documentation <https://vega.github.io/vega-lite/docs/>`_.\n\n.. _GitHub: http://github.com/vega/altair\n.. _Git Issues: http://github.com/vega/altair/issues\n.. _Vega: http://vega.github.io/vega\n.. _Vega-Lite: http://vega.github.io/vega-lite\n.. _bugs and feature requests: https://github.com/vega/altair/issues/new/choose\n.. _StackOverflow: https://stackoverflow.com/tags/altair\n"
  },
  {
    "path": "doc/getting_started/installation.rst",
    "content": ".. currentmodule:: altair\n\n.. _installation:\n\nInstallation\n============\n\nAltair can be installed, along with all its optional dependencies, using:\n\n.. code-block:: bash\n\n    pip install \"altair[all]\"\n\nIf you are using the conda_ package manager, the equivalent is:\n\n.. code-block:: bash\n\n    conda install -c conda-forge altair-all\n\nAt this point, you should be able to open any IDE compatible with Jupyter Notebooks,\nand execute any of the code from the :ref:`example-gallery`.\nFor more information on how to display charts in various notebook environments\nand non-notebook IDEs, see :ref:`displaying-charts`.\nIf you wish to install Altair with only the required dependencies,\nyou can omit the ``[all]``/``-all`` suffix.\n\nAltair can also be installed with just the dependencies necessary for saving charts to offline HTML files or PNG/SVG/PDF formats, using:\n\n.. code-block:: bash\n\n    pip install \"altair[save]\"\n\nInstalling Altair in WASM / Pyodide environments\n-----------------------------------------------\n\nAltair is included in the official Pyodide distribution. The version of Altair\navailable in Pyodide can be found in the Pyodide package list:\nhttps://pyodide.org/en/stable/usage/packages-in-pyodide.html\n\nAltair can also be installed in browser-based Python environments such as\nPyodide, PyScript, or other WebAssembly (WASM) runtimes using ``micropip``.\n\nFor example, in a Pyodide-based environment:\n\n.. code-block:: python\n\n    import micropip\n    await micropip.install(\"altair\")\n\nTo install a specific version of Altair, specify the version explicitly:\n\n.. code-block:: python\n\n    await micropip.install(\"altair==6.0.0\")\n\nDevelopment Installation\n========================\n\nPlease see `CONTRIBUTING.md <https://github.com/vega/altair/blob/main/CONTRIBUTING.md>`_\nfor details on how to contribute to the Altair project.\n\n.. _conda: https://docs.conda.io/\n.. _Vega-Lite: http://vega.github.io/vega-lite\n.. _JupyterLab: http://jupyterlab.readthedocs.io/\n.. _Jupyter Notebook: https://jupyter-notebook.readthedocs.io/\n"
  },
  {
    "path": "doc/getting_started/overview.rst",
    "content": ".. _overview:\n\nOverview\n========\n\nVega-Altair is a declarative statistical visualization library for Python, based on\nVega_ and Vega-Lite_.\n\nIt offers a powerful and concise grammar that enables you to quickly build\na wide range of statistical visualizations. Here is an example of using the\nAPI to visualize a dataset with\nan interactive scatter plot:\n\n.. altair-plot::\n\n    # import altair with an abbreviated alias\n    import altair as alt\n\n    # load a sample dataset as a pandas DataFrame\n    from altair.datasets import data\n    cars = data.cars()\n\n    # make the chart \n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower',\n        y='Miles_per_Gallon',\n        color='Origin',\n    ).interactive()\n\nThe key idea is that you are declaring links between *data columns* and *visual encoding\nchannels*, such as the x-axis, y-axis and color. The rest of the plot details are\nhandled automatically. Building on this declarative system, a surprising range\nof plots, from simple to sophisticated, can be created using a\nconcise grammar.\n\nThe project is named after the `brightest star <https://en.wikipedia.org/wiki/Altair>`_ \nin the constellation Aquila. From Earth's sky Altair appears close to Vega, the star from which our parent project drew its name.\n\nThis documentation serves as the main reference for learning about Altair. Additional learning material and tutorials can be found in the :ref:`learning-resources` section. It can also be helpful to browse the `Vega-Lite documentation <https://vega.github.io/vega-lite/docs/>`_.\n\n.. _Vega: http://vega.github.io/vega\n.. _Vega-Lite: http://vega.github.io/vega-lite\n\n\n.. toctree::\n   :maxdepth: 1\n   :caption: Getting Started\n   :hidden:\n\n   self\n   installation\n   starting\n   getting_help\n   resources\n   project_philosophy\n"
  },
  {
    "path": "doc/getting_started/project_philosophy.rst",
    "content": "Project Philosophy\n==================\n\nMany excellent plotting libraries exist in Python, including:\n\n* `Matplotlib <https://matplotlib.org/>`_\n* `Bokeh <https://bokeh.pydata.org/en/latest/>`_\n* `Seaborn <https://seaborn.pydata.org/>`_\n* `Lightning <https://github.com/lightning-viz>`_\n* `Plotly <https://plot.ly/>`_\n* `pandas built-in plotting <https://pandas.pydata.org/pandas-docs/stable/visualization.html>`_\n* `HoloViews <https://holoviews.org>`_\n* `VisPy <https://vispy.org/>`_\n* `pygg <https://www.github.com/sirrice/pygg>`_\n\nEach library does a particular set of things well.\n\nUser Challenges\n---------------\n\nHowever, such a proliferation of options creates great difficulty for users\nas they have to wade through all of these APIs to find which of them is the\nbest for the task at hand. None of these libraries are optimized for\nhigh-level statistical visualization, so users have to assemble their own\nusing a mishmash of APIs. For individuals just learning to work with data, this\nforces them to focus on learning APIs rather than exploring their data.\n\nAnother challenge is current plotting APIs require the user to write code,\neven for incidental details of a visualization. This results in an unfortunate\nand unnecessary cognitive burden as the visualization type (histogram,\nscatterplot, etc.) can often be inferred using basic information such as the\ncolumns of interest and the data types of those columns.\n\nFor example, if you are interested in the visualization of two numerical\ncolumns, a scatterplot is almost certainly a good starting point. If you add\na categorical column to that, you probably want to encode that column using\ncolors or facets. If inferring the visualization proves difficult at times, a\nsimple user interface can construct a visualization without any coding.\n`Tableau <https://www.tableau.com/>`_ and the `Interactive Data\nLab's <https://idl.cs.washington.edu/>`_\n`Polestar <https://github.com/vega/polestar>`_ and\n`Voyager <https://github.com/vega/voyager>`_ are excellent examples of such UIs.\n\nDesign Approach and Solution\n----------------------------\n\nWe believe that these challenges can be addressed without the creation of yet\nanother visualization library that has a programmatic API and built-in\nrendering. Vega-Altair's approach to building visualizations uses a layered design\nthat leverages the full capabilities of existing visualization libraries:\n\n1. Create a constrained, simple Python API (Vega-Altair) that is purely declarative\n2. Use the API (Vega-Altair) to emit JSON output that follows the Vega-Lite spec\n3. Render that spec using existing visualization libraries\n\nThis approach enables users to perform exploratory visualizations with a much\nsimpler API initially, pick an appropriate renderer for their usage case, and\nthen leverage the full capabilities of that renderer for more advanced plot\ncustomization.\n\nWe realize that a declarative API will necessarily be limited compared to the\nfull programmatic APIs of Matplotlib, Bokeh, etc. That is a deliberate design\nchoice we feel is needed to simplify the user experience of exploratory\nvisualization.\n\nYou can find a more detailed comparison between Plotly and Altair in\n`this StackOverflow answer <https://stackoverflow.com/a/66040502>`_.\n"
  },
  {
    "path": "doc/getting_started/resources.rst",
    "content": ".. _resources:\n\nResources\n=========\n\nWe hope to make it easier to find learning resources and projects related to Altair by listing them here. If you know of a project that should be added, please let us know by opening an `Issue on GitHub <https://github.com/vega/altair/issues>`_.\n\n.. _learning-resources:\n\nLearning Material\n-----------------\n\nThis is a list of learning material that complements the official documentation and can help you learn more about how to use Altair.\n\n`Visualization Curriculum`_\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nA data visualization curriculum from the UW data group that developed Vega-Lite.\n\n.. List of links.\n.. _`Visualization Curriculum`: https://uwdata.github.io/visualization-curriculum\n\n`Jupyter Notebook Tutorials`_\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nJupyter Notebook tutorials and examples from the Altair authors.\n\n.. List of links.\n.. _`Jupyter Notebook Tutorials`: https://github.com/altair-viz/altair_notebooks\n\n`Pycon Tutorial`_\n~~~~~~~~~~~~~~~~~\n\nAltair tutorial given at PyCon 2018 by the Altair author Jake VanderPlas.\n\n.. List of links.\n.. _`Pycon tutorial`: https://altair-viz.github.io/altair-tutorial\n\n`Data Visualization Course`_\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis course covers how to create common statistical visualizations, tell stories with data, create geographical visualizations, and bring plots to life by adding interactive elements. Created at the University of British Columbia and can either be audited or taken as part of the `Key Capabilities for Data Science`_ certificate program.\n\n.. List of links.\n.. _`Data Visualization Course`: https://viz-learn.mds.ubc.ca\n.. _`Key Capabilities for Data Science`: https://extendedlearning.ubc.ca/programs/key-capabilities-data-science\n\n`Brief Introduction Videos`_\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nCalmcode provides a few videos that give a brief overview of the Altair library.\n\n.. List of links.\n.. _`Brief Introduction Videos`: https://calmcode.io/altair/introduction.html\n\n\n.. _altair-ecosystem:\n\nRelated Projects\n----------------\n\nThis is a list of projects which are directly related to Altair. There are many other packages that can be used in tandem with Altair, e.g. `dashboard packages which you can read more about in the answers to this StackOverflow question`_.\n\n.. List of links.\n.. _`dashboard packages which you can read more about in the answers to this StackOverflow question`: https://stackoverflow.com/questions/49833866/making-dashboards-using-altair\n\nVega-Lite_\n~~~~~~~~~~\n\nThe higher-level visualization grammar that Altair implements in Python.\n\n.. List of links.\n.. _Vega-Lite: https://vega.github.io/vega-lite\n\nvl-convert_\n~~~~~~~~~~~\n\nPython library for converting Altair/Vega-Lite chart specifications into static images (SVG or PNG) or Vega chart specifications without any external dependencies.\n\n.. List of links.\n.. _vl-convert: https://github.com/vega/vl-convert\n\nVegaFusion_\n~~~~~~~~~~~\n\nVegaFusion provides server-side scaling for Altair charts, which can accelerate interactive charts, extract transformed data, and perform data-intensive aggregations on the server and prune unused columns from the source dataset yielding smaller size visualizations.\n\n.. List of links.\n.. _VegaFusion: https://vegafusion.io/\n\naltair_data_server_\n~~~~~~~~~~~~~~~~~~~\n\nData transformer plugin that transparently serves data for charts.\n\n.. List of links.\n.. _altair_data_server: https://github.com/altair-viz/altair_data_server\n\naltair_pandas_\n~~~~~~~~~~~~~~\n\nAltair backend for the pandas plotting API.\n\n.. List of links.\n.. _altair_pandas: https://github.com/altair-viz/altair_pandas\n\naltair_recipes_\n~~~~~~~~~~~~~~~\n\naltair_recipes provides a collection of ready-made statistical graphics for Altair. See the `docs <https://altair-recipes.readthedocs.io/en/latest/>`__.\n\n.. List of links.\n.. _altair_recipes: https://github.com/piccolbo/altair_recipes\n\nnx_altair_\n~~~~~~~~~~\n\nnx_altair is a library for drawing NetworkX_ graphs using Altair. It offers a similar draw API as NetworkX but returns Altair Charts instead. This allows users to apply Altair's rich interactive API to networks graphs. See the `docs <https://github.com/Zsailer/nx_altair/blob/master/examples/nx_altair-tutorial.ipynb>`__.\n\n.. List of links.\n.. _nx_altair: https://github.com/Zsailer/nx_altair\n.. _NetworkX: https://networkx.github.io/\n\n`Altair Ally`_\n~~~~~~~~~~~~~~\n\nAltair Ally is a companion package to Altair, which provides a few shortcuts to create common plots for exploratory data analysis, particularly those involving visualization of an entire dataframe.\n\n.. List of links.\n.. _`Altair Ally`: https://github.com/vega/altair_ally\n\ngif_\n~~~~\n\ngif is the extension for Altair and matplotlib animations. The library provides a simple, high-level decorator interface to create frames in a regular for-loop that can be stitched together on save. See the `docs <https://github.com/maxhumber/gif>`__.\n\n.. List of links.\n.. _gif: https://github.com/maxhumber/gif\n\n`Altair in R`_\n~~~~~~~~~~~~~~\n\nAltair in R provides an R interface to the Altair Python package. See the `docs <https://vegawidget.github.io/altair/>`__.\n\n.. List of links.\n.. _`Altair in R`: https://github.com/vegawidget/altair\n\nAltair-upset_\n~~~~~~~~~~~~~\n\nCreate beautiful and interactive UpSet plots using Altair. UpSet plots are a powerful alternative to Venn diagrams for visualizing set intersections, especially when dealing with many sets. The library supports both Pandas and Polars DataFrames, making it flexible for different data processing workflows.\n\n.. List of links.\n.. _altair-upset: https://altair-upset.readthedocs.io/en/latest/\n.. _UpSet Plots: https://upset.app\n"
  },
  {
    "path": "doc/getting_started/starting.rst",
    "content": ".. _starting:\n\nBasic Statistical Visualization\n===================================\n\n(This tutorial is adapted from `Vega-Lite's documentation\n<http://vega.github.io/vega-lite/tutorials/getting_started.html>`_)\n\n.. currentmodule:: altair\n\nThis tutorial will guide you through the basic process of creating\nvisualizations in Altair. First, you will need to make sure you have the Altair\npackage and its dependencies installed (see :ref:`installation`).\nThis tutorial will assume you are working within a Jupyter notebook user\ninterface (such as JupyterLab, Colab or VS Code), so that plots are automatically rendered. \nIf you are using another interface, you may want to read about how Altair \nplots are displayed before proceeding (see :ref:`displaying-charts`).\n\nHere is the outline of this basic tutorial:\n\n- :ref:`basic-tutorial-data`\n- :ref:`basic-tutorial-encodings-and-marks`\n- :ref:`basic-tutorial-aggregation`\n- :ref:`basic-tutorial-customization`\n- :ref:`basic-tutorial-publishing`\n\n.. _basic-tutorial-data:\n\nThe Data\n--------\n\nData in Altair is built around the pandas Dataframe. One of the defining\ncharacteristics of statistical visualization is that it begins with\n`tidy <http://vita.had.co.nz/papers/tidy-data.html>`_\nDataframes. For the purposes of this tutorial, we'll start by importing pandas\nand creating a simple DataFrame to visualize, with a categorical variable in\ncolumn a and a numerical variable in column b:\n\n.. altair-plot::\n   :output: none\n\n   import pandas as pd\n   data = pd.DataFrame({'a': list('CCCDDDEEE'),\n                        'b': [2, 7, 4, 1, 2, 6, 8, 4, 7]})\n\n\nWhen using Altair, datasets are most commonly provided as a Dataframe.\nAs we will see, the labeled columns of the dataframe are an essential\npiece of plotting with Altair.\n\n.. _basic-tutorial-chart-object:\n\nThe Chart Object\n----------------\n\nThe fundamental object in Altair is the :class:`Chart`, which takes a\ndataframe as a single argument:\n\n.. altair-plot::\n    :output: none\n\n    import altair as alt\n    chart = alt.Chart(data)\n\nSo far, we have defined the Chart object, but we have not yet told the chart\nto *do* anything with the data. That will come next.\n\n.. _basic-tutorial-encodings-and-marks:\n\nEncodings and Marks\n-------------------\n\nWith this chart object in hand, we can now specify how we would like the\ndata to be visualized. This is done via the ``mark`` attribute of the chart\nobject, which is most conveniently accessed via the ``Chart.mark_*`` methods.\nFor example, we can show the data as a point using :meth:`~Chart.mark_point`:\n\n\n.. altair-plot::\n\n    alt.Chart(data).mark_point()\n\nHere the rendering consists of one point per row in the dataset, all plotted\non top of each other, since we have not yet specified positions for these\npoints.\n\nTo visually separate the points, we can map various *encoding channels*, or\n*channels* for short, to columns in the dataset.\nFor example, we could *encode* the variable ``a`` of the data with the\n``x`` channel, which represents the x-axis position of the points.\nThis can be done straightforwardly via the :meth:`Chart.encode` method:\n\n.. altair-plot::\n\n    alt.Chart(data).mark_point().encode(\n        x='a',\n    )\n\nThe ``encode()`` method builds a key-value mapping between encoding channels\n(such as ``x``, ``y``, ``color``, ``shape``, ``size``, etc.) to columns in\nthe dataset, accessed by column name.\n\nFor pandas dataframes, Altair automatically determines the appropriate data\ntype for the mapped column, which in this case is a *nominal* value, or an\nunordered categorical.\n\nThough we've now separated the data by one attribute, we still have multiple\npoints overlapping within each category. Let's further separate these by\nadding a ``y`` encoding channel, mapped to the ``\"b\"`` column:\n\n.. altair-plot::\n\n    alt.Chart(data).mark_point().encode(\n        x='a',\n        y='b'\n    )\n\nThe type of the data in the ``\"b\"`` column is again automatically-inferred\nby Altair, and this time is treated as a *quantitative* type (i.e. real-valued).\nAdditionally, we see that grid lines and appropriate axis titles are\nautomatically added as well.\n\n.. _basic-tutorial-aggregation:\n\nData Transformation: Aggregation\n--------------------------------\n\nTo allow for more flexibility in how data are visualized, Altair has a built-in\nsyntax for *aggregation* of data.\nFor example, we can compute the average of all values by specifying this\naggregate within the column identifier:\n\n.. altair-plot::\n\n    alt.Chart(data).mark_point().encode(\n        x='a',\n        y='average(b)'\n    )\n\nNow within each x-axis category, we see a single point reflecting the\naverage of the values within that category.\n\nTypically, aggregated values are not represented by point markings,\nbut by bar markings. We can do this by replacing :meth:`~Chart.mark_point`\nwith :meth:`~Chart.mark_bar`:\n\n.. altair-plot::\n\n    alt.Chart(data).mark_bar().encode(\n        x='a',\n        y='average(b)'\n    )\n\nBecause the categorical feature is mapped to the ``x``-axis, the result is\na vertical bar chart. To get a horizontal bar chart, all we need is to\nswap the ``x`` and ``y`` keywords:\n\n.. altair-plot::\n\n    alt.Chart(data).mark_bar().encode(\n        y='a',\n        x='average(b)'\n    )\n\nAside: Examining the JSON Output\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nRecall that Altair's main purpose is to convert plot specifications to a JSON\nstring that conforms to the Vega-Lite schema.\nIt is instructive here to use the :meth:`~Chart.to_json` method to inspect the\nJSON specification that Altair is exporting and sending as JSON to Vega-Lite:\n\n.. altair-plot::\n    :output: stdout\n\n    chart = alt.Chart(data).mark_bar().encode(\n        x='a',\n        y='average(b)',\n    )\n    print(chart.to_json())\n\nNotice here that ``encode(x='a')`` has been expanded to a JSON structure with\na ``field`` name, and a ``type`` for the data.\nThe ``encode(y='b')`` has been expanded similarly and includes an ``aggregate``\nfield.\n\nAltair's full shorthand syntax includes a way to specify the type of the\ncolumn as well:\n\n.. altair-plot::\n    :output: stdout\n\n    y = alt.Y('average(b):Q')\n    print(y.to_json())\n\nThis short-hand is equivalent to spelling-out the parameters by name:\n\n.. altair-plot::\n    :output: repr\n\n    y = alt.Y(field='b', type='quantitative', aggregate='average')\n    print(y.to_json())\n\nThis more verbose means of specifying channels can be used directly in\nAltair chart specifications, a fact that becomes useful when using some\nof the more advanced field configurations:\n\n.. altair-plot::\n\n    alt.Chart(data).mark_bar().encode(\n        alt.Y('a', type='nominal'),\n        alt.X('b', type='quantitative', aggregate='average')\n    )\n\n\n.. _basic-tutorial-customization:\n\nCustomizing your Visualization\n------------------------------\n\nBy default, Altair via Vega-Lite makes some choices about default properties\nof the visualization.\nAltair also provides an API to customize the look of the visualization.\nFor example, we can specify the axis titles using the :meth:`title` method\nof channel classes, and we can specify the color of the mark by setting\nthe ``color`` keyword of the ``Chart.mark_*`` method to any valid HTML\ncolor string:\n\n.. altair-plot::\n\n    alt.Chart(data).mark_bar(color='firebrick').encode(\n        alt.Y('a').title('category'),\n        alt.X('average(b)').title('avg(b) by category')\n    )\n\n\n.. _basic-tutorial-publishing:\n\nPublishing your Visualization\n-----------------------------\n\nOnce you have visualized your data, perhaps you would like to publish it\nsomewhere on the web. This can be done straightforwardly using the\nVega-Embed_ Javascript package.\nA simple example of a stand-alone HTML document can be generated for any\nchart using the :meth:`Chart.save` method:\n\n.. code-block:: python\n\n    chart = alt.Chart(data).mark_bar().encode(\n        x='a',\n        y='average(b)',\n    )\n    chart.save('chart.html')\n\nThe basic HTML template produces output that looks like this, where the JSON\nspecification for your plot produced by :meth:`Chart.to_json` should be stored\nin the ``spec`` Javascript variable:\n\n.. code-block:: html\n\n  <!DOCTYPE html>\n  <html>\n    <head>\n      <script src=\"https://cdn.jsdelivr.net/npm/vega@3\"></script>\n      <script src=\"https://cdn.jsdelivr.net/npm/vega-lite@2\"></script>\n      <script src=\"https://cdn.jsdelivr.net/npm/vega-embed@3\"></script>\n    </head>\n    <body>\n      <div id=\"vis\"></div>\n      <script type=\"text/javascript\">\n        var spec = {};  /* JSON dump of your chart's spec */\n        var opt = {\"renderer\": \"canvas\", \"actions\": false};  /* Options for the embedding */\n        vegaEmbed(\"#vis\", spec, opt);\n      </script>\n    </body>\n  </html>\n\nThe :meth:`~Chart.save` method provides a convenient way to save such HTML\noutput to file.\nFor more information on embedding Altair/Vega-Lite, see the documentation of the Vega-Embed_ project.\n\n\n\n.. _Vega-Embed: https://github.com/vega/vega-embed\n"
  },
  {
    "path": "doc/index.rst",
    "content": ":html_theme.sidebar_secondary.remove:\n\nVega-Altair: Declarative Visualization in Python\n================================================\n.. role:: raw-html(raw)\n   :format: html\n\n.. altair-minigallery::\n   :names: one_dot_per_zipcode, horizon_graph, world_projections, candlestick_chart, falkensee, errorbars_with_ci, scatter_linked_brush, line_with_ci, natural_disasters, bar_rounded, streamgraph, multiline_tooltip, choropleth, select_detail, interactive_cross_highlight, seattle_weather_interactive, london_tube, ridgeline_plot, violin_plot, strip_plot, table_bubble_plot_github, radial_chart, boxplot, mosaic_with_labels\n   :size: 24\n\n\n.. rst-class:: lead\n\n   **Vega-Altair** is a declarative visualization library for Python. Its simple, friendly and consistent API, built on top of the powerful Vega-Lite_ grammar, empowers you to spend less time writing code and more time exploring your data.\n\n\n.. grid:: 1 1 2 2\n   :padding: 0 2 3 5\n   :gutter: 2 2 3 3\n   :class-container: startpage-grid\n\n   .. grid-item-card:: Getting Started\n      :link: overview\n      :link-type: ref\n      :link-alt: Getting started\n\n      In the Getting Started section you can find installation instructions and a high-level overview of the main concepts.\n\n   .. grid-item-card:: User Guide\n      :link: user-guide-data\n      :link-type: ref\n      :link-alt: User guide\n\n      Check out the User Guides for in-depth information on the key concepts of Vega-Altair.\n\n   .. grid-item-card:: Examples\n      :link: example-gallery\n      :link-type: ref\n      :link-alt: Examples\n\n      The Examples gallery contains a selection of different visualizations which you can create with Vega-Altair.\n\n   .. grid-item-card:: API\n      :link: api\n      :link-type: ref\n      :link-alt: api\n\n      The API reference guide contains detailed information on all of Vega-Altair's methods and classes.\n\n\n*The Vega-Altair open-source project is not affiliated with Altair Engineering, Inc.*\n\n.. toctree::\n   :maxdepth: 1\n   :hidden:\n\n   Getting Started <getting_started/overview>\n   User Guide <user_guide/data>\n   Examples <gallery/index>\n   API <user_guide/api>\n   Release Notes <https://github.com/vega/altair/releases>\n   About <about/roadmap>\n\n.. _GitHub: http://github.com/vega/altair\n.. _Git Issues: http://github.com/vega/altair/issues\n.. _Vega-Lite: http://vega.github.io/vega-lite\n.. _bugs and feature requests: https://github.com/vega/altair/issues/new/choose\n.. _StackOverflow: https://stackoverflow.com/tags/altair\n"
  },
  {
    "path": "doc/releases/changes.rst",
    "content": ":orphan:\n\nRelease Notes\n=============\n\nWe have moved the release notes to GitHub. You can now find them `here <https://github.com/vega/altair/releases>`_.\n"
  },
  {
    "path": "doc/user_guide/api.rst",
    "content": ".. _api:\n\nAPI Reference\n=============\n\nThis is the class and function reference of Altair, and the following content\nis generated automatically from the code documentation strings.\nPlease refer to the `full user guide <http://altair-viz.github.io>`_ for\nfurther details, as this low-level documentation may not be enough to give\nfull guidelines on their use.\n\n.. _api-toplevel:\n\nTop-Level Objects\n-----------------\n.. currentmodule:: altair\n\n.. autosummary::\n   :toctree: generated/toplevel/\n   :nosignatures:\n\n   Chart\n   ConcatChart\n   FacetChart\n   HConcatChart\n   LayerChart\n   RepeatChart\n   TopLevelMixin\n   VConcatChart\n\n.. _api-channels:\n\nEncoding Channels\n-----------------\n.. currentmodule:: altair\n\n.. autosummary::\n   :toctree: generated/channels/\n   :nosignatures:\n\n   Angle\n   AngleDatum\n   AngleValue\n   Color\n   ColorDatum\n   ColorValue\n   Column\n   Description\n   DescriptionValue\n   Detail\n   Facet\n   Fill\n   FillDatum\n   FillOpacity\n   FillOpacityDatum\n   FillOpacityValue\n   FillValue\n   Href\n   HrefValue\n   Key\n   Latitude\n   Latitude2\n   Latitude2Datum\n   Latitude2Value\n   LatitudeDatum\n   Longitude\n   Longitude2\n   Longitude2Datum\n   Longitude2Value\n   LongitudeDatum\n   Opacity\n   OpacityDatum\n   OpacityValue\n   Order\n   OrderValue\n   Radius\n   Radius2\n   Radius2Datum\n   Radius2Value\n   RadiusDatum\n   RadiusValue\n   Row\n   Shape\n   ShapeDatum\n   ShapeValue\n   Size\n   SizeDatum\n   SizeValue\n   Stroke\n   StrokeDash\n   StrokeDashDatum\n   StrokeDashValue\n   StrokeDatum\n   StrokeOpacity\n   StrokeOpacityDatum\n   StrokeOpacityValue\n   StrokeValue\n   StrokeWidth\n   StrokeWidthDatum\n   StrokeWidthValue\n   Text\n   TextDatum\n   TextValue\n   Theta\n   Theta2\n   Theta2Datum\n   Theta2Value\n   ThetaDatum\n   ThetaValue\n   Time\n   Tooltip\n   TooltipValue\n   Url\n   UrlValue\n   X\n   X2\n   X2Datum\n   X2Value\n   XDatum\n   XError\n   XError2\n   XError2Value\n   XErrorValue\n   XOffset\n   XOffsetDatum\n   XOffsetValue\n   XValue\n   Y\n   Y2\n   Y2Datum\n   Y2Value\n   YDatum\n   YError\n   YError2\n   YError2Value\n   YErrorValue\n   YOffset\n   YOffsetDatum\n   YOffsetValue\n   YValue\n\n.. _api-functions:\n\nAPI Functions\n-------------\n.. currentmodule:: altair\n\n.. autosummary::\n   :toctree: generated/api/\n   :nosignatures:\n\n   binding\n   binding_checkbox\n   binding_radio\n   binding_range\n   binding_select\n   check_fields_and_encodings\n   concat\n   condition\n   graticule\n   hconcat\n   layer\n   param\n   repeat\n   selection_interval\n   selection_point\n   sequence\n   sphere\n   topo_feature\n   value\n   vconcat\n   when\n\n.. _api-theme:\n\nTheme\n-----\n.. currentmodule:: altair.theme\n\n.. autosummary::\n   :toctree: generated/theme/\n   :nosignatures:\n\n   active\n   enable\n   get\n   names\n   options\n   register\n   unregister\n   ThemeConfig\n   AreaConfigKwds\n   AutoSizeParamsKwds\n   AxisConfigKwds\n   AxisResolveMapKwds\n   BarConfigKwds\n   BindCheckboxKwds\n   BindDirectKwds\n   BindInputKwds\n   BindRadioSelectKwds\n   BindRangeKwds\n   BoxPlotConfigKwds\n   BrushConfigKwds\n   CompositionConfigKwds\n   ConfigKwds\n   DateTimeKwds\n   DerivedStreamKwds\n   ErrorBandConfigKwds\n   ErrorBarConfigKwds\n   FeatureGeometryGeoJsonPropertiesKwds\n   FormatConfigKwds\n   GeoJsonFeatureCollectionKwds\n   GeoJsonFeatureKwds\n   GeometryCollectionKwds\n   GradientStopKwds\n   HeaderConfigKwds\n   IntervalSelectionConfigKwds\n   IntervalSelectionConfigWithoutTypeKwds\n   LegendConfigKwds\n   LegendResolveMapKwds\n   LegendStreamBindingKwds\n   LineConfigKwds\n   LineStringKwds\n   LinearGradientKwds\n   LocaleKwds\n   MarkConfigKwds\n   MergedStreamKwds\n   MultiLineStringKwds\n   MultiPointKwds\n   MultiPolygonKwds\n   NumberLocaleKwds\n   OverlayMarkDefKwds\n   PaddingKwds\n   PointKwds\n   PointSelectionConfigKwds\n   PointSelectionConfigWithoutTypeKwds\n   PolygonKwds\n   ProjectionConfigKwds\n   ProjectionKwds\n   RadialGradientKwds\n   RangeConfigKwds\n   RectConfigKwds\n   ResolveKwds\n   RowColKwds\n   ScaleConfigKwds\n   ScaleInvalidDataConfigKwds\n   ScaleResolveMapKwds\n   SelectionConfigKwds\n   StepKwds\n   StyleConfigIndexKwds\n   TickConfigKwds\n   TimeIntervalStepKwds\n   TimeLocaleKwds\n   TitleConfigKwds\n   TitleParamsKwds\n   TooltipContentKwds\n   TopLevelSelectionParameterKwds\n   VariableParameterKwds\n   ViewBackgroundKwds\n   ViewConfigKwds\n\n.. _api-core:\n\nLow-Level Schema Wrappers\n-------------------------\n.. currentmodule:: altair\n\n.. autosummary::\n   :toctree: generated/core/\n   :nosignatures:\n\n   Aggregate\n   AggregateOp\n   AggregateTransform\n   AggregatedFieldDef\n   Align\n   AllSortString\n   AnyMark\n   AnyMarkConfig\n   AreaConfig\n   ArgmaxDef\n   ArgminDef\n   AutoSizeParams\n   AutosizeType\n   Axis\n   AxisConfig\n   AxisOrient\n   AxisResolveMap\n   BBox\n   BarConfig\n   BaseTitleNoValueRefs\n   Baseline\n   BinExtent\n   BinParams\n   BinTransform\n   BindCheckbox\n   BindDirect\n   BindInput\n   BindRadioSelect\n   BindRange\n   Binding\n   BinnedTimeUnit\n   Blend\n   BoxPlot\n   BoxPlotConfig\n   BoxPlotDef\n   BrushConfig\n   CalculateTransform\n   Categorical\n   ColorDef\n   ColorName\n   ColorScheme\n   CompositeMark\n   CompositeMarkDef\n   CompositionConfig\n   ConcatSpecGenericSpec\n   ConditionalAxisColor\n   ConditionalAxisLabelAlign\n   ConditionalAxisLabelBaseline\n   ConditionalAxisLabelFontStyle\n   ConditionalAxisLabelFontWeight\n   ConditionalAxisNumber\n   ConditionalAxisNumberArray\n   ConditionalAxisPropertyAlignnull\n   ConditionalAxisPropertyColornull\n   ConditionalAxisPropertyFontStylenull\n   ConditionalAxisPropertyFontWeightnull\n   ConditionalAxisPropertyTextBaselinenull\n   ConditionalAxisPropertynumberArraynull\n   ConditionalAxisPropertynumbernull\n   ConditionalAxisPropertystringnull\n   ConditionalAxisString\n   ConditionalMarkPropFieldOrDatumDef\n   ConditionalMarkPropFieldOrDatumDefTypeForShape\n   ConditionalParameterMarkPropFieldOrDatumDef\n   ConditionalParameterMarkPropFieldOrDatumDefTypeForShape\n   ConditionalParameterStringFieldDef\n   ConditionalParameterValueDefGradientstringnullExprRef\n   ConditionalParameterValueDefTextExprRef\n   ConditionalParameterValueDefnumber\n   ConditionalParameterValueDefnumberArrayExprRef\n   ConditionalParameterValueDefnumberExprRef\n   ConditionalParameterValueDefstringExprRef\n   ConditionalParameterValueDefstringnullExprRef\n   ConditionalPredicateMarkPropFieldOrDatumDef\n   ConditionalPredicateMarkPropFieldOrDatumDefTypeForShape\n   ConditionalPredicateStringFieldDef\n   ConditionalPredicateValueDefAlignnullExprRef\n   ConditionalPredicateValueDefColornullExprRef\n   ConditionalPredicateValueDefFontStylenullExprRef\n   ConditionalPredicateValueDefFontWeightnullExprRef\n   ConditionalPredicateValueDefGradientstringnullExprRef\n   ConditionalPredicateValueDefTextBaselinenullExprRef\n   ConditionalPredicateValueDefTextExprRef\n   ConditionalPredicateValueDefnumber\n   ConditionalPredicateValueDefnumberArrayExprRef\n   ConditionalPredicateValueDefnumberArraynullExprRef\n   ConditionalPredicateValueDefnumberExprRef\n   ConditionalPredicateValueDefnumbernullExprRef\n   ConditionalPredicateValueDefstringExprRef\n   ConditionalPredicateValueDefstringnullExprRef\n   ConditionalStringFieldDef\n   ConditionalValueDefGradientstringnullExprRef\n   ConditionalValueDefTextExprRef\n   ConditionalValueDefnumber\n   ConditionalValueDefnumberArrayExprRef\n   ConditionalValueDefnumberExprRef\n   ConditionalValueDefstringExprRef\n   ConditionalValueDefstringnullExprRef\n   Config\n   CsvDataFormat\n   Cursor\n   Cyclical\n   Data\n   DataFormat\n   DataSource\n   Datasets\n   DateTime\n   DatumDef\n   Day\n   DensityTransform\n   DerivedStream\n   Dict\n   DictInlineDataset\n   DictSelectionInit\n   DictSelectionInitInterval\n   Diverging\n   DomainUnionWith\n   DsvDataFormat\n   Element\n   Encoding\n   EncodingSortField\n   ErrorBand\n   ErrorBandConfig\n   ErrorBandDef\n   ErrorBar\n   ErrorBarConfig\n   ErrorBarDef\n   ErrorBarExtent\n   EventStream\n   EventType\n   Expr\n   ExprRef\n   ExtentTransform\n   FacetEncodingFieldDef\n   FacetFieldDef\n   FacetMapping\n   FacetSpec\n   FacetedEncoding\n   FacetedUnitSpec\n   Feature\n   FeatureCollection\n   FeatureGeometryGeoJsonProperties\n   Field\n   FieldDefWithoutScale\n   FieldEqualPredicate\n   FieldGTEPredicate\n   FieldGTPredicate\n   FieldLTEPredicate\n   FieldLTPredicate\n   FieldName\n   FieldOneOfPredicate\n   FieldOrDatumDefWithConditionDatumDefGradientstringnull\n   FieldOrDatumDefWithConditionDatumDefnumber\n   FieldOrDatumDefWithConditionDatumDefnumberArray\n   FieldOrDatumDefWithConditionDatumDefstringnull\n   FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull\n   FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull\n   FieldOrDatumDefWithConditionMarkPropFieldDefnumber\n   FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray\n   FieldOrDatumDefWithConditionStringDatumDefText\n   FieldOrDatumDefWithConditionStringFieldDefText\n   FieldOrDatumDefWithConditionStringFieldDefstring\n   FieldRange\n   FieldRangePredicate\n   FieldValidPredicate\n   FilterTransform\n   Fit\n   FlattenTransform\n   FoldTransform\n   FontStyle\n   FontWeight\n   Format\n   FormatConfig\n   Generator\n   GenericUnitSpecEncodingAnyMark\n   GeoJsonFeature\n   GeoJsonFeatureCollection\n   GeoJsonProperties\n   Geometry\n   GeometryCollection\n   Gradient\n   GradientStop\n   GraticuleGenerator\n   GraticuleParams\n   HConcatSpecGenericSpec\n   Header\n   HeaderConfig\n   HexColor\n   ImputeMethod\n   ImputeParams\n   ImputeSequence\n   ImputeTransform\n   InlineData\n   InlineDataset\n   Interpolate\n   IntervalSelectionConfig\n   IntervalSelectionConfigWithoutType\n   JoinAggregateFieldDef\n   JoinAggregateTransform\n   JsonDataFormat\n   LabelOverlap\n   LatLongDef\n   LatLongFieldDef\n   LayerRepeatMapping\n   LayerRepeatSpec\n   LayerSpec\n   LayoutAlign\n   Legend\n   LegendBinding\n   LegendConfig\n   LegendOrient\n   LegendResolveMap\n   LegendStreamBinding\n   LineConfig\n   LineString\n   LinearGradient\n   LocalMultiTimeUnit\n   LocalSingleTimeUnit\n   Locale\n   LoessTransform\n   LogicalAndPredicate\n   LogicalNotPredicate\n   LogicalOrPredicate\n   LookupData\n   LookupSelection\n   LookupTransform\n   Mark\n   MarkConfig\n   MarkDef\n   MarkInvalidDataMode\n   MarkPropDefGradientstringnull\n   MarkPropDefnumber\n   MarkPropDefnumberArray\n   MarkPropDefstringnullTypeForShape\n   MarkType\n   MergedStream\n   Month\n   MultiLineString\n   MultiPoint\n   MultiPolygon\n   MultiTimeUnit\n   NamedData\n   NonArgAggregateOp\n   NonLayerRepeatSpec\n   NonNormalizedSpec\n   NumberLocale\n   NumericArrayMarkPropDef\n   NumericMarkPropDef\n   OffsetDef\n   OrderFieldDef\n   OrderOnlyDef\n   OrderValueDef\n   Orient\n   Orientation\n   OverlayMarkDef\n   Padding\n   ParameterExtent\n   ParameterName\n   ParameterPredicate\n   Parse\n   ParseValue\n   PivotTransform\n   Point\n   PointSelectionConfig\n   PointSelectionConfigWithoutType\n   PolarDef\n   Polygon\n   Position\n   Position2Def\n   PositionDatumDef\n   PositionDatumDefBase\n   PositionDef\n   PositionFieldDef\n   PositionFieldDefBase\n   PositionValueDef\n   Predicate\n   PredicateComposition\n   PrimitiveValue\n   Projection\n   ProjectionConfig\n   ProjectionType\n   QuantileTransform\n   RadialGradient\n   RangeConfig\n   RangeEnum\n   RangeRaw\n   RangeRawArray\n   RangeScheme\n   RectConfig\n   RegressionTransform\n   RelativeBandSize\n   RepeatMapping\n   RepeatRef\n   RepeatSpec\n   Resolve\n   ResolveMode\n   Root\n   RowColLayoutAlign\n   RowColboolean\n   RowColnumber\n   RowColumnEncodingFieldDef\n   SampleTransform\n   Scale\n   ScaleBinParams\n   ScaleBins\n   ScaleConfig\n   ScaleDatumDef\n   ScaleFieldDef\n   ScaleInterpolateEnum\n   ScaleInterpolateParams\n   ScaleInvalidDataConfig\n   ScaleInvalidDataShowAsValueangle\n   ScaleInvalidDataShowAsValuecolor\n   ScaleInvalidDataShowAsValuefill\n   ScaleInvalidDataShowAsValuefillOpacity\n   ScaleInvalidDataShowAsValueopacity\n   ScaleInvalidDataShowAsValueradius\n   ScaleInvalidDataShowAsValueshape\n   ScaleInvalidDataShowAsValuesize\n   ScaleInvalidDataShowAsValuestroke\n   ScaleInvalidDataShowAsValuestrokeDash\n   ScaleInvalidDataShowAsValuestrokeOpacity\n   ScaleInvalidDataShowAsValuestrokeWidth\n   ScaleInvalidDataShowAsValuetheta\n   ScaleInvalidDataShowAsValuetime\n   ScaleInvalidDataShowAsValuex\n   ScaleInvalidDataShowAsValuexOffset\n   ScaleInvalidDataShowAsValuey\n   ScaleInvalidDataShowAsValueyOffset\n   ScaleInvalidDataShowAsangle\n   ScaleInvalidDataShowAscolor\n   ScaleInvalidDataShowAsfill\n   ScaleInvalidDataShowAsfillOpacity\n   ScaleInvalidDataShowAsopacity\n   ScaleInvalidDataShowAsradius\n   ScaleInvalidDataShowAsshape\n   ScaleInvalidDataShowAssize\n   ScaleInvalidDataShowAsstroke\n   ScaleInvalidDataShowAsstrokeDash\n   ScaleInvalidDataShowAsstrokeOpacity\n   ScaleInvalidDataShowAsstrokeWidth\n   ScaleInvalidDataShowAstheta\n   ScaleInvalidDataShowAstime\n   ScaleInvalidDataShowAsx\n   ScaleInvalidDataShowAsxOffset\n   ScaleInvalidDataShowAsy\n   ScaleInvalidDataShowAsyOffset\n   ScaleResolveMap\n   ScaleType\n   SchemaBase\n   SchemeParams\n   SecondaryFieldDef\n   SelectionConfig\n   SelectionInit\n   SelectionInitInterval\n   SelectionInitIntervalMapping\n   SelectionInitMapping\n   SelectionParameter\n   SelectionResolution\n   SelectionType\n   SequenceGenerator\n   SequenceParams\n   SequentialMultiHue\n   SequentialSingleHue\n   ShapeDef\n   SharedEncoding\n   SingleDefUnitChannel\n   SingleTimeUnit\n   Sort\n   SortArray\n   SortByChannel\n   SortByChannelDesc\n   SortByEncoding\n   SortField\n   SortOrder\n   Spec\n   SphereGenerator\n   StackOffset\n   StackTransform\n   StandardType\n   Step\n   StepFor\n   Stream\n   StringFieldDef\n   StringFieldDefWithCondition\n   StringValueDefWithCondition\n   StrokeCap\n   StrokeJoin\n   StyleConfigIndex\n   SymbolShape\n   TextBaseline\n   TextDef\n   TextDirection\n   TickConfig\n   TickCount\n   TimeDef\n   TimeFieldDef\n   TimeFormatSpecifier\n   TimeInterval\n   TimeIntervalStep\n   TimeLocale\n   TimeUnit\n   TimeUnitParams\n   TimeUnitTransform\n   TimeUnitTransformParams\n   TitleAnchor\n   TitleConfig\n   TitleFrame\n   TitleOrient\n   TitleParams\n   TooltipContent\n   TopLevelConcatSpec\n   TopLevelFacetSpec\n   TopLevelHConcatSpec\n   TopLevelLayerSpec\n   TopLevelParameter\n   TopLevelRepeatSpec\n   TopLevelSelectionParameter\n   TopLevelSpec\n   TopLevelUnitSpec\n   TopLevelVConcatSpec\n   TopoDataFormat\n   Transform\n   Type\n   TypeForShape\n   TypedFieldDef\n   URI\n   UnitSpec\n   UnitSpecWithFrame\n   UrlData\n   UtcMultiTimeUnit\n   UtcSingleTimeUnit\n   VConcatSpecGenericSpec\n   ValueDefWithConditionMarkPropFieldOrDatumDefGradientstringnull\n   ValueDefWithConditionMarkPropFieldOrDatumDefTypeForShapestringnull\n   ValueDefWithConditionMarkPropFieldOrDatumDefnumber\n   ValueDefWithConditionMarkPropFieldOrDatumDefnumberArray\n   ValueDefWithConditionMarkPropFieldOrDatumDefstringnull\n   ValueDefWithConditionStringFieldDefText\n   ValueDefnumber\n   ValueDefnumberwidthheightExprRef\n   VariableParameter\n   Vector10string\n   Vector12string\n   Vector2DateTime\n   Vector2Vector2number\n   Vector2boolean\n   Vector2number\n   Vector2string\n   Vector3number\n   Vector7string\n   VegaLiteSchema\n   ViewBackground\n   ViewConfig\n   WindowEventType\n   WindowFieldDef\n   WindowOnlyOp\n   WindowTransform\n\n.. _api-cls:\n\nAPI Utility Classes\n-------------------\n.. currentmodule:: altair\n\n.. autosummary::\n   :toctree: generated/api-cls/\n   :nosignatures:\n\n   expr\n   When\n   Then\n   ChainedWhen\n\n.. _api-typing:\n\nTyping\n------\n.. currentmodule:: altair.typing\n\n.. autosummary::\n   :toctree: generated/typing/\n   :nosignatures:\n\n   ChannelAngle\n   ChannelColor\n   ChannelColumn\n   ChannelDescription\n   ChannelDetail\n   ChannelFacet\n   ChannelFill\n   ChannelFillOpacity\n   ChannelHref\n   ChannelKey\n   ChannelLatitude\n   ChannelLatitude2\n   ChannelLongitude\n   ChannelLongitude2\n   ChannelOpacity\n   ChannelOrder\n   ChannelRadius\n   ChannelRadius2\n   ChannelRow\n   ChannelShape\n   ChannelSize\n   ChannelStroke\n   ChannelStrokeDash\n   ChannelStrokeOpacity\n   ChannelStrokeWidth\n   ChannelText\n   ChannelTheta\n   ChannelTheta2\n   ChannelTooltip\n   ChannelUrl\n   ChannelX\n   ChannelX2\n   ChannelXError\n   ChannelXError2\n   ChannelXOffset\n   ChannelY\n   ChannelY2\n   ChannelYError\n   ChannelYError2\n   ChannelYOffset\n   ChartType\n   EncodeKwds\n   Optional\n   is_chart_type\n\n.. _api-datasets:\n\nDatasets\n--------\n.. currentmodule:: altair.datasets\n\n.. autosummary::\n   :toctree: generated/datasets/\n   :nosignatures:\n\n   Loader\n   data\n   load\n   url\n\n.. _Generic:\n    https://typing.readthedocs.io/en/latest/spec/generics.html#generics\n.. _vega-datasets:\n    https://github.com/vega/vega-datasets\n"
  },
  {
    "path": "doc/user_guide/compound_charts.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-compound:\n\nLayered & Multi-View Charts\n---------------------------\nAlong with the basic :class:`Chart` object, Altair provides a number of\ncompound plot types that can be used to create stacked, layered, faceted,\nand repeated charts. They are summarized in the following tables:\n\n======================  ===============================  ===================  ======================\nclass                   functional form                  operator form        reference\n======================  ===============================  ===================  ======================\n:class:`LayerChart`     ``alt.layer(chart1, chart2)``    ``chart1 + chart2``  :ref:`layer-chart`\n:class:`HConcatChart`   ``alt.hconcat(chart1, chart2)``  ``chart1 | chart2``  :ref:`hconcat-chart`\n:class:`VConcatChart`   ``alt.vconcat(chart1, chart2)``  ``chart1 & chart2``  :ref:`vconcat-chart`\n======================  ===============================  ===================  ======================\n\n======================  ====================================  ======================\nclass                   method form                           reference\n======================  ====================================  ======================\n:class:`RepeatChart`    ``chart.repeat(row, column)``         :ref:`repeat-chart`\n:class:`FacetChart`     ``chart.facet(facet, row, column)``   :ref:`facet-chart`\n======================  ====================================  ======================\n\n.. _layer-chart:\n\nLayered Charts\n~~~~~~~~~~~~~~\nLayered charts allow you to overlay two different charts on the same set of axes.\nThey can be useful, for example, when you wish to draw multiple marks for the\nsame data; for example:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    stocks = data.stocks.url\n\n    base = alt.Chart(stocks).encode(\n        x='date:T',\n        y='price:Q',\n        color='symbol:N'\n    ).transform_filter(\n        alt.datum.symbol == 'GOOG'\n    )\n\n    base.mark_line() + base.mark_point()\n\nHere we have used the ``+`` operator to create a layered chart; alternatively\nwe could use the ``alt.layer`` function, which accepts as its arguments any\nnumber of charts:\n\n.. altair-plot::\n\n    alt.layer(\n      base.mark_line(),\n      base.mark_point(),\n      base.mark_rule()\n    ).interactive()\n\nNormally, the output of both of these patterns is a :class:`LayerChart` object,\nwhich has properties and methods similar to the :class:`Chart` object. If all\ncharts share identical ``row``, ``column``, or ``facet`` encoding channels, those\nencodings are hoisted automatically and a :class:`FacetChart` is returned instead\n(see :ref:`layer-shared-facet`).\n\nOrder of Layers\n^^^^^^^^^^^^^^^\nIn a layered chart, the order of layers is determined from the order in which\nthey are specified. For example, when creating a chart using ``layer1 + layer2``\nor ``alt.layer(layer1, layer2)``, ``layer1`` will appear below ``layer2``,\nand ``layer2`` may obscure the marks of ``layer1``.\n\nFor example, consider the following chart where we plot points on top of a\nheat-map:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.movies.url\n\n    heatmap = alt.Chart(source).mark_rect().encode(\n        alt.X('IMDB Rating:Q').bin(),\n        alt.Y('Rotten Tomatoes Rating:Q').bin(),\n        alt.Color('count()').scale(scheme='greenblue')\n    )\n\n    points = alt.Chart(source).mark_circle(\n        color='black',\n        size=5,\n    ).encode(\n        x='IMDB Rating:Q',\n        y='Rotten Tomatoes Rating:Q',\n    )\n\n    heatmap + points\n\nIf we put the two layers in the opposite order, the points will be drawn first\nand will be obscured by the heatmap marks:\n\n.. altair-plot::\n\n    points + heatmap\n\nIf you do not see the expected output when creating a layered chart, make certain\nthat you are ordering the layers appropriately.\n\n\n.. _hconcat-chart:\n\nHorizontal Concatenation\n~~~~~~~~~~~~~~~~~~~~~~~~\nDisplaying two plots side-by-side is most generally accomplished with the\n:class:`HConcatChart` object, which can be created using the :class:`hconcat`\nfunction or the ``|`` operator.\n\nFor example, here is a scatter-plot concatenated with a histogram showing the\ndistribution of its points:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    penguins = data.penguins.url\n\n    chart1 = alt.Chart(penguins).mark_point().encode(\n        x=alt.X('Flipper Length (mm):Q', scale=alt.Scale(zero=False)),\n        y=alt.Y('Body Mass (g):Q', scale=alt.Scale(zero=False)),\n        color='Species:N'\n    ).properties(\n        height=300,\n        width=300\n    )\n\n    chart2 = alt.Chart(penguins).mark_bar().encode(\n        x='count()',\n        y=alt.Y('Body Mass (g):Q', bin=alt.Bin(maxbins=30)),\n        color='Species:N'\n    ).properties(\n        height=300,\n        width=100\n    )\n\n    chart1 | chart2\n\nThis example uses the ``|`` operator, but could similarly have been created\nwith the :func:`hconcat` function:\n\n.. altair-plot::\n\n   alt.hconcat(chart1, chart2)\n\nThe output of both of these is an :class:`HConcatChart` object, which has\nmany of the same top-level methods and attributes as the :class:`Chart`\nobject.\n\nFinally, keep in mind that for certain types of horizontally-concatenated\ncharts, where each panel modifies just one aspect of the visualization,\nrepeated and faceted charts are more convenient (see :ref:`repeat-chart`\nand :ref:`facet-chart` for more explanation).\n\n.. _vconcat-chart:\n\nVertical Concatenation\n~~~~~~~~~~~~~~~~~~~~~~\nSimilarly to :ref:`hconcat-chart` above, Altair offers vertical concatenation\nvia the :func:`vconcat` function or the ``&`` operator.\n\nFor example, here we vertically-concatenate two views of the same data,\nwith a ``brush`` selection to add interaction:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.sp500.url\n\n    brush = alt.selection_interval(encodings=['x'])\n\n    base = alt.Chart(source).mark_area().encode(\n        x = 'date:T',\n        y = 'price:Q'\n    ).properties(\n        width=600,\n        height=200\n    )\n\n    upper = base.encode(alt.X('date:T').scale(domain=brush))\n\n    lower = base.properties(\n        height=60\n    ).add_params(brush)\n\n    alt.vconcat(upper, lower)\n\nNote that we could just as well have used ``upper & lower`` rather than the\nmore verbose ``alt.vconcat(upper, lower)``.\n\nAs with horizontally-concatenated charts, keep in mind that for concatenations\nwhere only one data grouping or encoding is changing in each panel, using\n:ref:`repeat-chart` or :ref:`facet-chart` can be more efficient.\n\n.. _repeat-chart:\n\nRepeated Charts\n~~~~~~~~~~~~~~~\nThe :class:`RepeatChart` object provides a convenient interface for a particular\ntype of horizontal or vertical concatenation, in which the only difference between\nthe concatenated panels is modification of *one or more encodings*.\n\nFor example, suppose you would like to create a multi-panel scatter-plot to show\ndifferent projections of a multi-dimensional dataset.\nLet's first create such a chart manually using ``hconcat`` and ``vconcat``, before\nshowing how ``repeat`` can be used to build the chart more efficiently:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    penguins = data.penguins.url\n\n    base = alt.Chart().mark_point().encode(\n        color='Species:N'\n    ).properties(\n        width=200,\n        height=200\n    ).interactive()\n\n    chart = alt.vconcat(data=penguins)\n    for y_encoding in ['Flipper Length (mm):Q', 'Body Mass (g):Q']:\n        row = alt.hconcat()\n        for x_encoding in ['Beak Length (mm):Q', 'Beak Depth (mm):Q']:\n            row |= base.encode(\n                       x=alt.X(x_encoding, scale=alt.Scale(zero=False)),\n                       y=alt.Y(y_encoding, scale=alt.Scale(zero=False)),\n                   )\n        chart &= row\n    chart\n\nIn this example, we explicitly loop over different x and y encodings\nto create a 2 x 2 grid of charts showing different views of the data.\nThe code is straightforward, if a bit verbose.\n\nThe :class:`RepeatChart` pattern, accessible via the :meth:`Chart.repeat`\nmethod, makes this type of chart a bit easier to produce:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n    penguins = data.penguins.url\n\n    alt.Chart(penguins).mark_point().encode(\n        alt.X(alt.repeat(\"column\"), type='quantitative', scale=alt.Scale(zero=False)),\n        alt.Y(alt.repeat(\"row\"), type='quantitative', scale=alt.Scale(zero=False)),\n        color='Species:N'\n    ).properties(\n        width=200,\n        height=200\n    ).repeat(\n        row=['Flipper Length (mm)', 'Body Mass (g)'],\n        column=['Beak Length (mm)', 'Beak Depth (mm)']\n    ).interactive()\n\nThe :meth:`Chart.repeat` method is the key here: it lets you specify a set of\nencodings for the row and/or column which can be referred to in the chart's\nencoding specification using ``alt.repeat('row')`` or ``alt.repeat('column')``.\n\nAnother option to use the ``repeat`` method is for layering. Here below the\ncolumns ``US Gross`` and ``Worldwide Gross`` are layered on the ``y``-axis\nusing ``alt.repeat('layer')``:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.movies()\n\n    alt.Chart(source).mark_line().encode(\n        x=alt.X(\"IMDB Rating\").bin(),\n        y=alt.Y(alt.repeat('layer')).aggregate('mean').title(\"Mean of US and Worldwide Gross\"),\n        color=alt.ColorDatum(alt.repeat('layer'))\n    ).repeat(layer=[\"US Gross\", \"Worldwide Gross\"])\n\nCurrently ``repeat`` can only be encodings (not, e.g., data transforms)\nbut there is discussion within the Vega-Lite community about making this pattern\nmore general in the future.\n\n.. _facet-chart:\n\nFaceted Charts\n~~~~~~~~~~~~~~\nLike repeated charts, Faceted charts provide multiple views of a dataset.\nBut instead of having different panels for different encodings,\nwe have different panels for different subsets of data. For example,\none panel for each of the three species of penguin in the penguins dataset.\n\nThis is also called a `small multiple <https://en.wikipedia.org/wiki/Small_multiple>`_\nchart, trellis chart, lattice chart, grid chart, or panel chart.\n\nWe could do this manually using a filter transform along with a horizontal\nconcatenation:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n    penguins = data.penguins.url\n\n    base = alt.Chart(penguins).mark_point().encode(\n        x=alt.X('Flipper Length (mm):Q').scale(zero=False),\n        y=alt.Y('Body Mass (g):Q').scale(zero=False),\n        color='Species:N'\n    ).properties(\n        width=160,\n        height=160\n    )\n\n    chart = alt.hconcat()\n    for species in ['Adelie', 'Chinstrap', 'Gentoo']:\n        chart |= base.transform_filter(alt.datum.Species == species)\n    chart\n\nAs with the manual approach to :ref:`repeat-chart`, this is straightforward,\nif a bit verbose.\n\nUsing ``.facet`` it becomes a bit cleaner:\n\n.. altair-plot::\n\n    alt.Chart(penguins).mark_point().encode(\n        x=alt.X('Flipper Length (mm):Q').scale(zero=False),\n        y=alt.Y('Body Mass (g):Q').scale(zero=False),\n        color='Species:N'\n    ).properties(\n        width=180,\n        height=180\n    ).facet(\n        column='Species:N'\n    )\n\nFor simple charts like this, there is also a ``column`` encoding channel that\ncan give the same results:\n\n.. altair-plot::\n\n    alt.Chart(penguins).mark_point().encode(\n        x=alt.X('Flipper Length (mm):Q').scale(zero=False),\n        y=alt.Y('Body Mass (g):Q').scale(zero=False),\n        color='Species:N',\n        column='Species:N'\n    ).properties(\n        width=180,\n        height=180\n    )\n\nThe advantage of using ``.facet`` is that it can create faceted views of\nmore complicated compound charts. For example, here is a faceted view of a\nlayered chart with a hover selection:\n\n.. altair-plot::\n\n    hover = alt.selection_point(on='pointerover', nearest=True, empty=False)\n    when_hover = alt.when(hover)\n\n    base = alt.Chart(penguins).encode(\n        x=alt.X('Flipper Length (mm):Q').scale(zero=False),\n        y=alt.Y('Body Mass (g):Q').scale(zero=False),\n        color=alt.condition(hover, 'Species:N', alt.value('lightgray'))\n    ).properties(\n        width=180,\n        height=180,\n    )\n\n    points = base.mark_point().add_params(hover)\n\n    text = base.mark_text(dy=-5).encode(\n        text = 'Species:N',\n        opacity = alt.condition(hover, alt.value(1), alt.value(0))\n    )\n\n    alt.layer(points, text).facet(\n        'Species:N',\n    )\n\nThough each of the above examples have faceted the data across columns,\nfaceting across rows (or across rows *and* columns) is supported as\nwell.\n\n.. _layer-shared-facet:\n\nLayering charts that share a facet encoding\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nWhen every chart passed to :func:`layer` (or combined with ``+``) carries\nidentical ``row``, ``column``, or ``facet`` encoding channels, those encodings\nare hoisted automatically and a :class:`FacetChart` is returned. The two forms\nbelow produce the same Vega-Lite specification:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n    penguins = data.penguins.url\n\n    base = alt.Chart(penguins).encode(\n        x=alt.X('Flipper Length (mm):Q').scale(zero=False),\n        y=alt.Y('Body Mass (g):Q').scale(zero=False),\n        row='Species:N',\n    )\n\n    # facet encoding shared on each layer — hoisted automatically\n    alt.layer(\n        base.mark_point(),\n        base.mark_line(),\n    )\n\nThe equivalent explicit form is:\n\n.. code-block:: python\n\n    base = alt.Chart(penguins).encode(\n        x=alt.X('Flipper Length (mm):Q').scale(zero=False),\n        y=alt.Y('Body Mass (g):Q').scale(zero=False),\n    )\n\n    alt.layer(\n        base.mark_point(),\n        base.mark_line(),\n    ).facet(row='Species:N')\n\nIf the facet encodings differ across layers, or only some layers carry them,\na ``TypeError`` is raised as before.\n"
  },
  {
    "path": "doc/user_guide/configuration.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-configuration:\n\nTop-Level Chart Configuration\n=============================\nMany aspects of a chart's appearance can be configured at the top level using\nthe ``configure_*()`` methods.\nThese methods and the properties that they set are only valid at the top level\nof a chart, and can be thought of as a way of setting a chart theme: that is,\nthey set the default styles for the entire chart, and these defaults can be\noverridden by specific style settings associated with chart elements.\n\nThese methods and their arguments will be outlined below:\n\n- :ref:`config-chart` :meth:`Chart.configure`\n- :ref:`config-axis` :meth:`Chart.configure_axis`\n- :ref:`config-header` :meth:`Chart.configure_header`\n- :ref:`config-legend` :meth:`Chart.configure_legend`\n- :ref:`config-mark` :meth:`Chart.configure_mark`\n- :ref:`config-scale` :meth:`Chart.configure_scale`\n- :ref:`config-range` :meth:`Chart.configure_range`\n- :ref:`config-projection` :meth:`Chart.configure_projection`\n- :ref:`config-composition` :meth:`Chart.configure_concat`, :meth:`Chart.configure_facet`\n- :ref:`config-selection` :meth:`Chart.configure_selection`\n- :ref:`config-title` :meth:`Chart.configure_title`\n- :ref:`config-view` :meth:`Chart.configure_view`\n\nFor more discussion of approaches to chart customization, see\n:ref:`user-guide-customization`.\n\n\n.. _config-chart:\n\nChart Configuration\n-------------------\nThe :meth:`Chart.configure` method adds a :class:`Config` instance to the chart,\nand accepts the following parameters:\n\n.. altair-object-table:: altair.Config\n\n\n.. _config-axis:\n\nAxis Configuration\n------------------\nAxis configuration defines default settings for axes and can be set using\nthe :meth:`Chart.configure_axis` method.\nProperties defined here are applied to all axes in the figure.\n\nAdditional property blocks can target more specific axis types based on the\norientation (\"axisX\", \"axisY\", \"axisLeft\", \"axisTop\", etc.) or band scale\ntype (\"axisBand\").\nFor example, properties defined under the \"axisBand\"\nproperty will only apply to axes visualizing \"band\" scales.\nIf multiple axis config blocks apply to a single axis, type-based options\ntake precedence over orientation-based options, which in turn take precedence\nover general options.\n\nThe methods are the following:\n\n- :meth:`Chart.configure_axis`\n- :meth:`Chart.configure_axisBand`\n- :meth:`Chart.configure_axisBottom`\n- :meth:`Chart.configure_axisLeft`\n- :meth:`Chart.configure_axisRight`\n- :meth:`Chart.configure_axisTop`\n- :meth:`Chart.configure_axisX`\n- :meth:`Chart.configure_axisY`\n- :meth:`Chart.configure_axisDiscrete`\n- :meth:`Chart.configure_axisPoint`\n- :meth:`Chart.configure_axisQuantitative`\n- :meth:`Chart.configure_axisTemporal`\n- :meth:`Chart.configure_axisXBand`\n- :meth:`Chart.configure_axisXDiscrete`\n- :meth:`Chart.configure_axisXPoint`\n- :meth:`Chart.configure_axisXQuantitative`\n- :meth:`Chart.configure_axisXTemporal`\n- :meth:`Chart.configure_axisYBand`\n- :meth:`Chart.configure_axisYDiscrete`\n- :meth:`Chart.configure_axisYPoint`\n- :meth:`Chart.configure_axisYQuantitative`\n- :meth:`Chart.configure_axisYTemporal`\n\nThey have the following properties:\n\n.. altair-object-table:: altair.AxisConfig\n\n\n.. _config-header:\n\nHeader Configuration\n--------------------\nHeader configuration defines default settings for headers including the font, color,\nsize, and position of the title and labels and can be set using \nthe :meth:`Chart.configure_header` method. Here is an example:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars.url\n\n    chart = alt.Chart(source).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N',\n        column='Origin:N'\n    ).properties(\n        width=180,\n        height=180\n    )\n\n    chart.configure_header(\n        titleColor='green',\n        titleFontSize=14,\n        labelColor='red',\n        labelFontSize=14\n    )\n\nAdditional property blocks can target more specific header types. The methods are the following:\n\n- :meth:`Chart.configure_header`\n- :meth:`Chart.configure_headerColumn`\n- :meth:`Chart.configure_headerFacet`\n- :meth:`Chart.configure_headerRow`\n\nThey have the following properties:\n\n.. altair-object-table:: altair.HeaderConfig\n\n\n.. _config-legend:\n\nLegend Configuration\n--------------------\nThe :meth:`Chart.configure_legend` allows you to customize the appearance of chart\nlegends, including location, fonts, bounding boxes, colors, and more.\nHere is an example:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars.url\n\n    chart = alt.Chart(source).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N'\n    )\n\n    chart.configure_legend(\n        strokeColor='gray',\n        fillColor='#EEEEEE',\n        padding=10,\n        cornerRadius=10,\n        orient='top-right'\n    )\n\nAdditional properties are  summarized in the following table:\n\n.. altair-object-table:: altair.LegendConfig\n\n\n.. _config-mark:\n\nMark and Mark Style Configuration\n---------------------------------\nThe mark configuration can be set using the :meth:`Chart.configure_mark`\nmethod, which sets the default properties for all marks in the chart.\nIn addition, the config object also provides mark-specific configuration\nusing the mark type (e.g. :meth:`Chart.configure_area`) for\ndefining default properties for each mark.\n\nFor general configuration of all mark types, use:\n\n- :meth:`Chart.configure_mark`\n\nFor configurations specific to particular mark types, use:\n\n- :meth:`Chart.configure_arc`\n- :meth:`Chart.configure_area`\n- :meth:`Chart.configure_bar`\n- :meth:`Chart.configure_boxplot`\n- :meth:`Chart.configure_circle`\n- :meth:`Chart.configure_errorband`\n- :meth:`Chart.configure_errorbar`\n- :meth:`Chart.configure_geoshape`\n- :meth:`Chart.configure_image`\n- :meth:`Chart.configure_line`\n- :meth:`Chart.configure_point`\n- :meth:`Chart.configure_rect`\n- :meth:`Chart.configure_rule`\n- :meth:`Chart.configure_square`\n- :meth:`Chart.configure_text`\n- :meth:`Chart.configure_tick`\n- :meth:`Chart.configure_trail`\n\nEach of the above methods accepts the following properties:\n\n.. altair-object-table:: altair.MarkConfig\n\nIn addition to the default mark properties above, default values can be\nfurther customized using named styles defined as keyword arguments to\nthe :meth:`Chart.configure_style` method.\nStyles can then be invoked by including a style property within a mark\ndefinition object.\n\n\n.. _config-scale:\n\nScale Configuration\n-------------------\nScales can be configured using :meth:`Chart.configure_scale`, which has\nthe following properties:\n\n.. altair-object-table:: altair.ScaleConfig\n\n\n.. _config-range:\n\nScale Range Configuration\n-------------------------\nScale ranges can be configured using :meth:`Chart.configure_range`, which has\nthe following properties:\n\n.. altair-object-table:: altair.RangeConfig\n\n\n.. _config-projection:\n\nProjection Configuration\n------------------------\nProjections can be configured using :meth:`Chart.configure_projection`,\nwhich has the following properties:\n\n.. altair-object-table:: altair.ProjectionConfig\n\n\n.. _config-composition:\n\nConcat and Facet Configuration\n------------------------------\nVarious aspects of concat and facet charts can be configured using :meth:`Chart.configure_concat`\nand :meth:`Chart.configure_facet`, which have the following properties:\n\n.. altair-object-table:: altair.CompositionConfig\n\n.. _config-selection:\n\nSelection Configuration\n-----------------------\nSelections can be configured using :meth:`Chart.configure_selection`, \nwhich has the following properties:\n\n.. altair-object-table:: altair.SelectionConfig\n\n\n.. _config-title:\n\nTitle Configuration\n-------------------\nThe :meth:`Chart.configure_title` method allows configuration of the chart\ntitle, including the font, color, placement, and orientation.\nHere is an example:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars.url\n\n    chart = alt.Chart(source).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n    ).properties(\n        title='Cars Data'\n    )\n\n    chart.configure_title(\n        fontSize=20,\n        font='Courier',\n        anchor='start',\n        color='gray'\n    )\n\nAdditional title configuration options are listed in the following table:\n\n.. altair-object-table:: altair.TitleConfig\n\n\n.. _config-view:\n\nView Configuration\n------------------\nThe :meth:`Chart.configure_view` method allows you to configure aspects of the\nchart's *view*, i.e. the area of the screen in which the data and scales are\ndrawn. Here is an example to demonstrate some of the visual features that can\nbe controlled:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars.url\n\n    chart = alt.Chart(source).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n    )\n\n    chart.configure_view(\n        continuousHeight=200,\n        continuousWidth=200,\n        strokeWidth=4,\n        fill='#FFEEDD',\n        stroke='red',\n    )\n\nAdditional properties are summarized in the following table:\n\n.. altair-object-table:: altair.ViewConfig\n\n"
  },
  {
    "path": "doc/user_guide/custom_renderers.rst",
    "content": "\n.. _customizing-renderers:\n\nCustomizing Renderers\n=====================\nA renderer, as introduced in :ref:`renderers`, is a function that accepts a Vega-Lite or Vega\nvisualization specification as a Python ``dict``, and returns a Python ``dict``\nin Jupyter's `MIME Bundle format\n<https://jupyter-client.readthedocs.io/en/stable/messaging.html#display-data>`_. \nThis dictionary will be returned by a charts ``_repr_mimebundle_`` method.\n\nThe keys of the MIME bundle should be MIME types (such as ``image/png``) and the\nvalues should be the data for that MIME type (text, base64 encoded binary or\nJSON). Altair's default ``html`` renderer returns a cross-platform HTML representation using\nthe ``\"text/html\"`` mimetype; schematically it looks like this::\n\n    def default_renderer(spec):\n        bundle = {'text/html': generate_html(spec)}\n        metadata = {}\n        return bundle, metadata\n\n\nIf a renderer needs to do custom display logic that doesn't use the frontend's display\nsystem, it can also return an empty MIME bundle dict::\n\n    def empty_bundle_renderer(spec):\n        # Custom display logic that uses the spec\n        ...\n        # Return empty MIME bundle\n        return {}\n\nAs a simple example of a custom renderer, imagine we would like to add a ``plaintext`` renderer that\nrenders a chart description in plain text. We could do it this way::\n\n    def plaintext_mimetype(spec):\n        return {'text/plain': \"description: \" + spec.get('description', 'none')}\n\n    alt.renderers.register('plaintext', plaintext_mimetype)\n\nThe ``alt.renderers`` registry allows the user to define and enable new renderers. \nNow you can enable this mimetype and then when your chart is displayed you\nwill see this description::\n\n    alt.renderers.enable('plaintext')\n\n    alt.Chart('data.txt').mark_point().encode(\n        x='x:Q',\n        y='y:Q'\n    ).properties(\n        description='This is a simple chart'\n    )\n\n.. code-block:: none\n\n    description: This is a simple chart\n\nThis is a simple example, but it shows you the flexibility of this approach.\nIf you have a frontend that recognizes ``_repr_mimebundle_`` as a means of\nobtaining a MIME type representation of a Python object, then you can define\na function that will process the chart content in any way before returning\nany mimetype.\n"
  },
  {
    "path": "doc/user_guide/customization.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-customization:\n\nCustomizing Visualizations\n==========================\n\nAltair's goal is to automatically choose useful plot settings and configurations\nso that the user is free to think about the data rather than the mechanics\nof plotting. That said, once you have a useful visualization, you will often\nwant to adjust certain aspects of it. This section of the documentation\noutlines some of the ways to make these adjustments.\n\nGlobal Config vs. Local Config vs. Encoding\n-------------------------------------------\nThere are often two or three different ways to specify the look of your plots\ndepending on the situation.\nFor example, suppose we are creating a scatter plot of the ``cars`` dataset:\n\n.. altair-plot::\n\n   import altair as alt\n   from altair.datasets import data\n   cars = data.cars.url\n\n   alt.Chart(cars).mark_point().encode( \n       x='Acceleration:Q',\n       y='Horsepower:Q'\n   )\n\nSuppose you wish to change the color of the points to red, and the opacity\nof the points to 20%. There are three possible approaches to these:\n\n1. “Global Config” acts on an entire chart object\n2. “Local Config” acts on one mark of the chart\n3. “Encoding” channels can also be used to set some chart properties\n\nGlobal Config\n~~~~~~~~~~~~~\n\nFirst, every chart type has a ``\"config\"`` property at the top level that acts\nas a sort of theme for the whole chart and all of its sub-charts.\nHere you can specify things like axes properties, mark properties, selection\nproperties, and more.\n\nAltair allows you to access these through the ``configure_*`` methods of the\nchart. Here we will use the :meth:`~Chart.configure_mark` property:\n\n.. altair-plot::\n\n    alt.Chart(cars).mark_point().encode(\n        x='Acceleration:Q',\n        y='Horsepower:Q'\n    ).configure_mark(\n        opacity=0.2,\n        color='red'\n    )\n\nThere are a couple things to be aware of when using this kind of global configuration:\n\n1. By design configurations will affect *every mark* used within the chart\n\n2. The global configuration is only permissible at the top-level; so, for example,\n   if you tried to layer the above chart with another, it would result in an error.\n\nFor a full discussion of global configuration options, see :ref:`user-guide-configuration`.\n\nLocal Config\n~~~~~~~~~~~~\nIf you would like to configure the look of the mark locally, such that the setting\nonly affects the particular chart property you reference, this can be done via a\nlocal configuration setting.\n\nIn the case of mark properties, the best approach is to set the property as an\nargument to the ``mark_*`` method. Here we will use :meth:`~Chart.mark_point`:\n\n.. altair-plot::\n\n    alt.Chart(cars).mark_point(opacity=0.2, color='red').encode(\n        x='Acceleration:Q',\n        y='Horsepower:Q'\n    )\n\nUnlike when using the global configuration, here it is possible to use the resulting\nchart as a layer or facet in a compound chart.\n\nLocal config settings like this one will always override global settings.\n\nEncoding\n~~~~~~~~\nFinally, it is possible to set chart properties via the encoding channel\n(see :ref:`user-guide-encoding`). Rather than mapping a property to a data column,\nyou can map a property directly to a value using the :func:`value` function:\n\n.. altair-plot::\n\n    alt.Chart(cars).mark_point().encode(\n        x='Acceleration:Q',\n        y='Horsepower:Q',\n        opacity=alt.value(0.2),\n        color=alt.value('red')\n    )\n\nNote that only a limited set of mark properties can be bound to encodings, so\nfor some (e.g. ``fillOpacity``, ``strokeOpacity``, etc.) the encoding approach\nis not available.\n\nEncoding settings will always override local or global configuration settings.\n\nWhich to Use?\n~~~~~~~~~~~~~\nThe precedence order for the three approaches is (from lowest to highest)\n*global config*, *local config*, *encoding*. That is, if a chart property is\nset both globally and locally, the local setting will win-out. If a property\nis set both via a configuration and an encoding, the encoding will win-out.\n\nIn most usage, we recommend always using the highest-precedence means of\nsetting properties; i.e. an encoding, or a local configuration for properties\nthat are not tied to an encoding.\nGlobal configurations should be reserved for creating themes that are applied\njust before the chart is rendered.\n\n\nAdjusting the Title\n-------------------\nBy default an Altair chart does not have a title, as seen in this example.\n\n.. altair-plot::\n\n   import altair as alt\n   from altair.datasets import data\n   \n   iowa = data.iowa_electricity.url\n   \n   alt.Chart(iowa).mark_area().encode(\n       x=\"year:T\",\n       y=alt.Y(\"net_generation:Q\").stack(\"normalize\"),\n       color=\"source:N\"\n   )\n\nYou can add a simple title by passing the ``title`` keyword argument with the data.\n\n.. altair-plot::\n\n   alt.Chart(iowa, title=\"Iowa's green energy boom\").mark_area().encode(\n       x=\"year:T\",\n       y=alt.Y(\"net_generation:Q\").stack(\"normalize\"),\n       color=\"source:N\"\n   )\n\nIt is also possible to add a subtitle by passing in an ``alt.Title`` object.\n\n.. altair-plot::\n\n   alt.Chart(\n      iowa,\n      title=alt.Title(\n          \"Iowa's green energy boom\",\n          subtitle=\"A growing share of the state's energy has come from renewable sources\"\n      )\n   ).mark_area().encode(\n       x=\"year:T\",\n       y=alt.Y(\"net_generation:Q\").stack(\"normalize\"),\n       color=\"source:N\"\n   )\n\nThe subtitle can run to two lines by passing a list where each list item is a line (if you don't want to create this list manually as in the example below, you can use the ``wrap`` function from the `textwrap library <https://docs.python.org/3/library/textwrap.html>`_ to split a string into a list of substrings of a certain length).\n\n.. altair-plot::\n\n   alt.Chart(\n      iowa,\n      title=alt.Title(\n          \"Iowa's green energy boom\",\n          subtitle=[\"A growing share of the state's energy\", \"has come from renewable sources\"]\n      )\n   ).mark_area().encode(\n       x=\"year:T\",\n       y=alt.Y(\"net_generation:Q\").stack(\"normalize\"),\n       color=\"source:N\"\n   )\n\nThe ``Title`` object can also configure a number of other attributes,\ne.g., to ``anchor`` it to the ``'start'`` (left) of the chart,\nand to ``orient`` it at the ``'bottom'`` of the chart (see :ref:`user-guide-configuration` for more options).\n\n.. altair-plot::\n\n   alt.Chart(\n      iowa,\n      title=alt.Title(\n          \"Iowa's green energy boom\",\n          subtitle=\"A growing share of the state's energy has come from renewable sources\",\n          anchor='start',\n          orient='bottom',\n          offset=20\n      )\n   ).mark_area().encode(\n       x=\"year:T\",\n       y=alt.Y(\"net_generation:Q\").stack(\"normalize\"),\n       color=\"source:N\"\n   )\n\nIn the chart above,\nyou can see that the title is positioned all the way to the left,\nso that it lines up with the label on the y-axis.\nYou can align the title to the axis line instead\nby setting the reference ``frame`` for the anchor position\nto be relative to the ``'group'`` (i.e. the data portion of the chart, excluding labels and titles).\n\n\n.. altair-plot::\n\n   alt.Chart(\n      iowa,\n      title=alt.Title(\n          \"Iowa's green energy boom\",\n          subtitle=[\"A growing share of the state's energy has come from\", \"renewable sources\"],\n          anchor='start',\n          frame='group',\n          orient='bottom',\n          offset=20\n      )\n   ).mark_area().encode(\n       x=\"year:T\",\n       y=alt.Y(\"net_generation:Q\").stack(\"normalize\"),\n       color=\"source:N\"\n   )\n\nAdjusting Axis Limits\n---------------------\nThe default axis limit used by Altair is dependent on the type of the data.\nTo fine-tune the axis limits beyond these defaults, you can use the\n:meth:`scale` method of the axis encodings. For example, consider the\nfollowing plot:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    cars = data.cars.url\n\n    alt.Chart(cars).mark_point().encode(\n        x='Acceleration:Q',\n        y='Horsepower:Q'\n    )\n\nAltair inherits from Vega-Lite the convention of always including the zero-point\nin quantitative axes; if you would like to turn this off, you can add the\n:meth:`scale` method to the :class:`X` encoding that specifies ``zero=False``:\n\n.. altair-plot::\n\n    alt.Chart(cars).mark_point().encode(\n        alt.X('Acceleration:Q').scale(zero=False),\n        y='Horsepower:Q'\n    )\n\nTo specify exact axis limits, you can use the ``domain`` property of the scale:\n\n.. altair-plot::\n\n    alt.Chart(cars).mark_point().encode(\n        alt.X('Acceleration:Q').scale(domain=(5, 20)),\n        y='Horsepower:Q'\n    )\n\nThe problem is that the data still exists beyond the scale, and we need to tell\nAltair what to do with this data. One option is to \"clip\" the data by setting\nthe ``\"clip\"`` property of the mark to True:\n\n.. altair-plot::\n\n    alt.Chart(cars).mark_point(clip=True).encode(\n        alt.X('Acceleration:Q').scale(domain=(5, 20)),\n        y='Horsepower:Q'\n    )\n\nAnother option is to \"clamp\" the data; that is, to move points beyond the\nlimit to the edge of the domain:\n\n.. altair-plot::\n\n    alt.Chart(cars).mark_point().encode(\n        alt.X('Acceleration:Q').scale(domain=(5, 20), clamp=True),\n        y='Horsepower:Q'\n    ).interactive()\n\nFor interactive charts like the one above, the clamping happens dynamically,\nwhich can be useful for keeping in mind outliers as you pan and zoom on the\nchart.\n\n\nAdjusting Axis Labels\n---------------------\nAltair also gives you tools to easily configure the appearance of axis labels.\nFor example consider this plot:\n\n.. altair-plot::\n\n   import pandas as pd\n   df = pd.DataFrame(\n       {'x': [0.03, 0.04, 0.05, 0.12, 0.07, 0.15],\n       'y': [10, 35, 39, 50, 24, 35]\n   })\n\n   alt.Chart(df).mark_circle().encode(\n       x='x',\n       y='y'\n   )\n\nTo fine-tune the formatting of the tick labels and to add a custom title to\neach axis, we can pass to the :class:`X` and :class:`Y` encoding a custom\naxis definition within the :meth:`axis` method.\nHere is an example of formatting the x labels as a percentage, and\nthe y labels as a dollar value:\n\n.. altair-plot::\n\n   alt.Chart(df).mark_circle().encode(\n       alt.X('x').axis(format='%').title('percentage'),\n       alt.Y('y').axis(format='$').title('dollar amount')\n   )\n\nAxis labels can be easily removed:\n\n.. altair-plot::\n\n   alt.Chart(df).mark_circle().encode(\n       alt.X('x').axis(labels=False),\n       alt.Y('y').axis(labels=False)\n   )\n\nAxis title can also be rotated:\n\n.. altair-plot::\n\n    alt.Chart(df).mark_circle().encode(\n        alt.X('x').axis(title=\"x\"),\n        alt.Y('y').axis(\n            title=\"Y Axis Title\",\n            titleAngle=0,\n            titleAlign=\"left\",\n            titleY=-2,\n            titleX=0,\n        )\n    )\n\nAdditional formatting codes are available; for a listing of these see the\n`d3 Format Code Documentation <https://github.com/d3/d3-format/blob/master/README.md#format>`_.\n\n\nAdjusting the Legend\n--------------------\n\nA legend is added to the chart automatically when the ``color``, ``shape`` or ``size`` arguments are passed to the :func:`encode` function. In this example we'll use ``color``.\n\n.. altair-plot::\n\n  import altair as alt\n  from altair.datasets import data\n\n  cars = data.cars()\n\n  alt.Chart(cars).mark_point().encode(\n      x='Horsepower:Q',\n      y='Miles_per_Gallon:Q',\n      color='Origin:N'\n  )\n\nIn this case, the legend can be customized by introducing the :class:`Color` class and taking advantage of its :meth:`legend` method. The ``shape`` and ``size`` arguments have their own corresponding classes.\n\nThe legend option on all of them expects a :class:`Legend` object as its input, which accepts arguments to customize many aspects of its appearance. One example is to move the legend to another position with the ``orient`` argument.\n\n.. altair-plot::\n\n  import altair as alt\n  from altair.datasets import data\n\n  cars = data.cars()\n\n  alt.Chart(cars).mark_point().encode(\n      x='Horsepower:Q',\n      y='Miles_per_Gallon:Q',\n      color=alt.Color('Origin:N').legend(orient=\"left\")\n  )\n\nAnother thing you can do is set a ``title``; in this case we can use the :meth:`title` method directly as a shortcut or specify the ``title`` parameter inside the :meth:`legend` method:.\n\n.. altair-plot::\n\n  import altair as alt\n  from altair.datasets import data\n\n  cars = data.cars()\n\n  alt.Chart(cars).mark_point().encode(\n      x='Horsepower:Q',\n      y='Miles_per_Gallon:Q',\n      color=alt.Color('Origin:N').title(\"Origin\")\n  )\n\n\nYou can remove the legend entirely by submitting a null value.\n\n.. altair-plot::\n\n  import altair as alt\n  from altair.datasets import data\n\n  cars = data.cars()\n\n  alt.Chart(cars).mark_point().encode(\n      x='Horsepower:Q',\n      y='Miles_per_Gallon:Q',\n      color=alt.Color('Origin:N').legend(None),\n  )\n\nRemoving the Chart Border\n-------------------------\nBasic Altair charts are drawn with both a grid and an outside border.\nTo create a chart with no border, you will need to remove them both.\n\nAs an example, let's start with a simple scatter plot.\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    cars = data.cars()\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N'\n    )\n\nFirst remove the grid using the :meth:`configure_axis` method.\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    cars = data.cars()\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N'\n    ).configure_axis(\n        grid=False\n    )\n\nYou'll note that while the inside rules are gone, the outside border remains.\nHide it by setting ``stroke=None`` inside :meth:`configure_view`\n(``strokeWidth=0`` and ``strokeOpacity=0`` also works):\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    cars = data.cars()\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N'\n    ).configure_axis(\n        grid=False\n    ).configure_view(\n        stroke=None\n    )\n\n\nIt is also possible to completely remove all borders and axes by\ncombining the above option with setting ``axis`` to ``None`` during encoding.\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    cars = data.cars()\n\n    alt.Chart(cars).mark_point().encode(\n        alt.X('Horsepower:Q').axis(None),\n        alt.Y('Miles_per_Gallon:Q').axis(None),\n        color='Origin:N'\n    ).configure_axis(\n        grid=False\n    ).configure_view(\n        stroke=None\n    )\n\n\nCustomizing Colors\n------------------\n\nAs discussed in :ref:`type-legend-scale`, Altair chooses a suitable default color\nscheme based on the type of the data that the color encodes. These defaults can\nbe customized using the :meth:`scale` method of the :class:`Color` class.\n\nColor Schemes\n~~~~~~~~~~~~~\n\nAltair  includes a set of named color schemes for both categorical and sequential\ndata, defined by the vega project; see the\n`Vega documentation <https://vega.github.io/vega/docs/schemes/>`_\nfor a full gallery of available color schemes.  These schemes\ncan be passed to the `scheme` argument of the :meth:`scale` method:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    cars = data.cars()\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower',\n        y='Miles_per_Gallon',\n        color=alt.Color('Acceleration').scale(scheme=\"lightgreyred\")\n    )\n\nThe color scheme we used above highlights points on one end of the scale,\nwhile keeping the rest muted.\nIf we want to highlight the lower ``Acceleration`` data to red color instead,\nwe can use the ``reverse`` parameter to reverse the color scheme:\n\n.. altair-plot::\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower',\n        y='Miles_per_Gallon',\n        color=alt.Color('Acceleration').scale(scheme=\"lightgreyred\", reverse=True)\n    )\n\nColor Domain and Range\n~~~~~~~~~~~~~~~~~~~~~~\n\nTo create a custom color scales,\nwe can use the ``domain`` and ``range`` parameters\nof the ``scale`` method for\nthe values and colors, respectively.\nThis works both for continuous scales,\nwhere it can help highlight specific ranges of values:\n\n.. altair-plot::\n\n    domain = [5, 8, 10, 12, 25]\n    range_ = ['#9cc8e2', '#9cc8e2', 'red', '#5ba3cf', '#125ca4']\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower',\n        y='Miles_per_Gallon',\n        color=alt.Color('Acceleration').scale(domain=domain, range=range_)\n    )\n\nAnd for discrete scales:\n\n.. altair-plot::\n\n    domain = ['Europe', \"Japan\", \"USA\"]\n    range_ = ['seagreen', 'firebrick', 'rebeccapurple']\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower',\n        y='Miles_per_Gallon',\n        color=alt.Color('Origin').scale(domain=domain, range=range_)\n    )\n\nRaw Color Values\n~~~~~~~~~~~~~~~~\n\nThe ``scale`` is what maps the raw input values into an appropriate color encoding\nfor displaying the data. If your data entries consist of raw color names or codes,\nyou can set ``scale(None)`` to use those colors directly:\n\n.. altair-plot::\n\n  import pandas as pd\n  import altair as alt\n\n  data = pd.DataFrame({\n      'x': range(6),\n      'color': ['red', 'steelblue', 'chartreuse', '#F4D03F', '#D35400', '#7D3C98']\n  })\n\n  alt.Chart(data).mark_point(\n      filled=True,\n      size=100\n  ).encode(\n      x='x',\n      color=alt.Color('color').scale(None)\n  )\n\nAdjusting the Width of Bar Marks\n--------------------------------\n\nThe width of the bars in a bar plot are controlled through the ``size`` property in the :meth:`~Chart.mark_bar()`:\n\n.. altair-plot::\n\n  import altair as alt\n  import pandas as pd\n\n  data = pd.DataFrame({'name': ['a', 'b'], 'value': [4, 10]})\n\n  alt.Chart(data).mark_bar(size=10).encode(\n      x='name:O',\n      y='value:Q'\n  )\n\nBut since ``mark_bar(size=10)`` only controls the width of the bars, it might become possible that the width of the chart is not adjusted accordingly:\n\n.. altair-plot::\n\n  alt.Chart(data).mark_bar(size=30).encode(\n      x='name:O',\n      y='value:Q'\n  )\n\nTherefore, it is often preferred to set the width of the entire chart relative to the number of distinct categories using :class:`Step`, which you can can see an example of a few charts down.\n\n.. _customization-chart-size:\n\nAdjusting Chart Size\n--------------------\nThe size of charts can be adjusted using the ``width`` and ``height`` properties.\nFor example:\n\n.. altair-plot::\n\n   import altair as alt\n   from altair.datasets import data\n\n   cars = data.cars()\n\n   alt.Chart(cars).mark_bar().encode(\n       x='Origin',\n       y='count()'\n   ).properties(\n       width=200,\n       height=150\n   )\n\nNote that in the case of faceted or other compound charts, this width and height applies to\nthe subchart rather than to the overall chart:\n\n.. altair-plot::\n\n   alt.Chart(cars).mark_bar().encode(\n       x='Origin',\n       y='count()',\n       column='Cylinders:Q'\n   ).properties(\n       width=100,\n       height=100\n   ).resolve_scale(\n       x='independent'\n   )\n\nTo change the chart size relative to the number of distinct categories, you can use the :class:`Step` class to specify the width/height for each category rather than for the entire chart:\n\n.. altair-plot::\n\n   alt.Chart(cars).mark_bar().encode(\n       x='Origin',\n       y='count()',\n       column='Cylinders:Q'\n   ).properties(\n       width=alt.Step(35),\n       height=100\n   ).resolve_scale(\n       x='independent'\n   )\n\n\nIf you want your chart size to respond to the width of the HTML page or container in which\nit is rendered, you can set ``width`` or ``height`` to the string ``\"container\"``:\n\n.. altair-plot::\n    :div_class_: full-width-plot\n\n    alt.Chart(cars).mark_bar().encode(\n        x='Origin',\n        y='count()',\n    ).properties(\n        width='container',\n        height=200\n    )\n\nNote that this will only scale with the container if its parent element has a size determined\noutside the chart itself; For example, the container may be a ``<div>`` element that has style\n``width: 100%; height: 300px``.\n\n\n.. _chart-themes:\n\nChart Themes\n------------\n.. note::\n\n   This material was changed considerably with the release of Altair ``5.5.0``.\n\nAltair makes available a theme registry that lets users apply chart configurations\nglobally within any Python session. \nThe :mod:`altair.theme` module provides :ref:`helper functions <api-theme>` to interact with the registry.\n\nEach theme in the registry is a function which define a specification dictionary\nthat will be added to every created chart.\nFor example, the default theme configures the default size of a single chart:\n\n    >>> import altair as alt\n    >>> default = alt.theme.get()\n    >>> default()\n    {'config': {'view': {'continuousWidth': 300, 'continuousHeight': 300}}}\n\nYou can see that any chart you create will have this theme applied, and these configurations\nadded to its specification:\n\n.. altair-plot::\n    :output: repr\n\n    import altair as alt\n    from altair.datasets import data\n\n    chart = alt.Chart(data.cars.url).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q'\n    )\n\n    chart.to_dict()\n\nThe rendered chart will then reflect these configurations:\n\n.. altair-plot::\n\n    chart\n\nChanging the Theme\n~~~~~~~~~~~~~~~~~~\nIf you would like to enable any other theme for the length of your Python session,\nyou can call :func:`altair.theme.enable`.\nFor example, Altair includes a theme in which the chart background is opaque\nrather than transparent:\n\n.. altair-plot::\n    :output: repr\n\n    alt.theme.enable('opaque')\n    chart.to_dict()\n\n.. altair-plot::\n\n    chart\n\nNotice that the background color of the chart is now set to white.\nIf you would like no theme applied to your chart, you can use the\ntheme named ``'none'``:\n\n.. altair-plot::\n    :output: repr\n\n    alt.theme.enable('none')\n    chart.to_dict()\n\n.. altair-plot::\n\n    chart\n\nBecause the view configuration is not set, the chart is smaller\nthan the default rendering.\n\nIf you would like to use any theme just for a single chart, you can use the\n``with`` statement to enable a temporary theme:\n\n.. altair-plot::\n   :output: none\n\n   with alt.theme.enable('default'):\n       spec = chart.to_json()\n\n.. note::\n    The above requires that a conversion/saving operation occurs during the ``with`` block,\n    such as :meth:`~Chart.to_dict`, :meth:`~Chart.to_json`, :meth:`~Chart.save`.\n    See https://github.com/vega/altair/issues/3586\n\nBuilt-in Themes\n~~~~~~~~~~~~~~~\nCurrently Altair does not offer many built-in themes, but we plan to add\nmore options in the future.\n\nYou can get a feel for the themes inherited from `Vega Themes`_ via *Vega-Altair Theme Test* below:\n\n.. altair-theme:: tests.altair_theme_test.alt_theme_test\n    :fold:\n    :summary: Show Vega-Altair Theme Test\n\nDefining a Custom Theme\n~~~~~~~~~~~~~~~~~~~~~~~\nA theme is simply a function that returns a dictionary of default values\nto be added to the chart specification at rendering time.\n\nUsing :func:`altair.theme.register`, we can both register and enable a theme \nat the site of the function definition.\n\nFor example, here we define a theme in which all marks are drawn with black\nfill unless otherwise specified:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    # define, register and enable theme\n    \n    @alt.theme.register(\"black_marks\", enable=True)\n    def black_marks() -> alt.theme.ThemeConfig:\n        return {\n            \"config\": {\n                \"view\": {\"continuousWidth\": 300, \"continuousHeight\": 300},\n                \"mark\": {\"color\": \"black\", \"fill\": \"black\"},\n            }\n        }\n\n\n    # draw the chart\n    cars = data.cars.url\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q'\n    )\n\n\nIf you want to restore the default theme, use:\n\n.. altair-plot::\n   :output: none\n\n   alt.themes.enable('default')\n\nWhen experimenting with your theme, you can use the code below to see how \nit translates across a range of charts/marks:\n\n.. altair-code-ref:: tests.altair_theme_test.alt_theme_test\n    :fold:\n    :summary: Show Vega-Altair Theme Test code\n\n\nFor more ideas on themes, see the `Vega Themes`_ repository.\n\nLocalization\n------------\nThe preferred format of numbers, dates, and currencies varies by language and locale.\nVega-Altair takes advantage of `D3's localization support`_ to make it easy to configure\nthe locale for your chart using the global ``alt.renderers.set_embed_options`` function.\n\nHere ``format_locale`` and ``time_format_locale`` may either be D3 format dictionaries,\nor strings with the names of pre-defined locales. For example, here we use the\nItalian locale (named ``it-IT``) for both currencies and dates:\n\n.. altair-plot::\n   :output: none\n\n   import altair as alt\n   from altair.datasets import data\n\n   alt.renderers.set_embed_options(format_locale=\"it-IT\", time_format_locale=\"it-IT\")\n\n   source = data.stocks.url\n   chart = alt.Chart(source).mark_area().transform_filter('year(datum.date) == 2009').encode(\n       x='date:T',\n       y=alt.Y('price:Q', axis=alt.Axis(format=\"$.0f\")),\n       color='symbol:N'\n   )\n   chart\n\n.. image:: /_static/stocks_it-IT.svg\n  :alt: Area chart of stock prices using Italian locale\n\nSee https://unpkg.com/d3-format/locale/ for a list of available format locale names, and\nsee https://unpkg.com/d3-time-format/locale/ for a list of available time format locales.\n\nThe configured localization settings persist upon saving.\n\n.. note::\n\n    The globally defined properties, ``format_locale`` and ``time_format_locale``, apply to\n    the full session and are not specific to individual charts. To revert localization settings\n    to the default U.S. English locale, use the following command::\n\n        alt.renderers.set_embed_options(format_locale=\"en-US\", time_format_locale=\"en-US\")\n\n.. _Vega Themes: https://github.com/vega/vega-themes/\n.. _`D3's localization support`: https://d3-wiki.readthedocs.io/zh-cn/master/Localization/\n"
  },
  {
    "path": "doc/user_guide/data.rst",
    "content": ".. currentmodule:: altair\n    \n.. _user-guide-data:\n\nSpecifying Data\n---------------\n\nThe basic data model used by Altair is tabular data,\nsimilar to a spreadsheet or database table.\nIndividual datasets are assumed to contain a collection of records (rows),\nwhich may contain any number of named data fields (columns).\nEach top-level chart object (i.e. :class:`Chart`, :class:`LayerChart`,\n:class:`VConcatChart`, :class:`HConcatChart`, :class:`RepeatChart`,\nand :class:`FacetChart`) accepts a dataset as its first argument.\n\nThere are many different ways of specifying a dataset:\n\n- as a `pandas DataFrame <http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html>`_\n- as a DataFrame that supports the DataFrame Interchange Protocol (contains a ``__dataframe__`` attribute), e.g. polars and pyarrow. This is experimental.\n- as a :class:`Data` or related object (i.e. :class:`UrlData`, :class:`InlineData`, :class:`NamedData`)\n- as a url string pointing to a ``json`` or ``csv`` formatted text file\n- as a `geopandas GeoDataFrame <http://geopandas.org/data_structures.html#geodataframe>`_, `Shapely Geometries <https://shapely.readthedocs.io/en/latest/manual.html#geometric-objects>`_, `GeoJSON Objects <https://github.com/jazzband/geojson#geojson-objects>`_ or other objects that support the ``__geo_interface__``\n- as a generated dataset such as numerical sequences or geographic reference elements\n\nWhen data is specified as a pandas DataFrame, Altair\nuses the data type information provided by pandas to automatically determine\nthe data types required in the encoding. For example, here we specify data via a pandas DataFrame\nand Altair automatically detects that the x-column should be visualized on a categorical (nominal) scale\nand that the y-column should be visualized on a quantitative scale:\n\n.. altair-plot::\n\n   import altair as alt\n   import pandas as pd\n\n   data = pd.DataFrame({'x': ['A', 'B', 'C', 'D', 'E'],\n                        'y': [5, 3, 6, 7, 2]})\n   alt.Chart(data).mark_bar().encode(\n       x='x',\n       y='y',\n   )\n\nBy comparison,\nall other ways of specifying the data (including non-pandas DataFrames)\nrequires encoding types to be declared explicitly.\nHere we create the same chart as above using a :class:`Data` object,\nwith the data specified as a JSON-style list of records:\n\n.. altair-plot::\n\n   import altair as alt\n\n   data = alt.Data(values=[{'x': 'A', 'y': 5},\n                           {'x': 'B', 'y': 3},\n                           {'x': 'C', 'y': 6},\n                           {'x': 'D', 'y': 7},\n                           {'x': 'E', 'y': 2}])\n   alt.Chart(data).mark_bar().encode(\n       x='x:N',  # specify nominal data\n       y='y:Q',  # specify quantitative data\n   )\n\nNotice the extra markup required in the encoding; because Altair cannot infer\nthe types within a :class:`Data` object, we must specify them manually\n(here we use :ref:`shorthand-description` to specify *nominal* (``N``) for ``x``\nand *quantitative* (``Q``) for ``y``; see :ref:`encoding-data-types`).\n\nSimilarly, we must also specify the data type when referencing data by URL:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n    url = data.cars.url\n\n    alt.Chart(url).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q'\n    )\n\nEncodings and their associated types are further discussed in :ref:`user-guide-encoding`.\nBelow we go into more detail about the different ways of specifying data in an Altair chart.\n\npandas DataFrame\n~~~~~~~~~~~~~~~~\n\n.. _data-in-index:\n\nIncluding Index Data\n^^^^^^^^^^^^^^^^^^^^\nBy design Altair only accesses dataframe columns, not dataframe indices.\nAt times, relevant data appears in the index. For example:\n\n.. altair-plot::\n   :output: repr\n\n   import numpy as np\n   rand = np.random.RandomState(0)\n\n   data = pd.DataFrame({'value': rand.randn(100).cumsum()},\n                       index=pd.date_range('2018', freq='D', periods=100))\n   data.head()\n\nIf you would like the index to be available to the chart, you can explicitly\nturn it into a column using the ``reset_index()`` method of pandas dataframes:\n\n.. altair-plot::\n\n   alt.Chart(data.reset_index()).mark_line().encode(\n       x='index:T',\n       y='value:Q'\n   )\n\nIf the index object does not have a ``name`` attribute set, the resulting\ncolumn will be called ``\"index\"``.\nMore information is available in the\n`pandas documentation <http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.reset_index.html>`_.\n\n\n.. _data-long-vs-wide:\n\nLong-form vs. Wide-form Data\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nThere are two common conventions for storing data in a dataframe, sometimes called\n*long-form* and *wide-form*. Both are sensible patterns for storing data in\na tabular format; briefly, the difference is this:\n\n- **wide-form data** has one row per *independent variable*, with metadata\n  recorded in the *row and column labels*.\n- **long-form data** has one row per *observation*, with metadata recorded\n  within the table as *values*.\n\nAltair's grammar works best with **long-form** data, in which each row\ncorresponds to a single observation along with its metadata.\n\nA concrete example will help in making this distinction more clear.\nConsider a dataset consisting of stock prices of several companies over time.\nThe wide-form version of the data might be arranged as follows:\n\n.. altair-plot::\n    :output: repr\n    :chart-var-name: wide_form\n\n    wide_form = pd.DataFrame({'Date': ['2007-10-01', '2007-11-01', '2007-12-01'],\n                              'AAPL': [189.95, 182.22, 198.08],\n                              'AMZN': [89.15, 90.56, 92.64],\n                              'GOOG': [707.00, 693.00, 691.48]})\n    print(wide_form)\n\nNotice that each row corresponds to a single time-stamp (here time is the\nindependent variable), while metadata for each observation\n(i.e. company name) is stored within the column labels.\n\nThe long-form version of the same data might look like this:\n\n.. altair-plot::\n    :output: repr\n    :chart-var-name: long_form\n\n    long_form = pd.DataFrame({'Date': ['2007-10-01', '2007-11-01', '2007-12-01',\n                                       '2007-10-01', '2007-11-01', '2007-12-01',\n                                       '2007-10-01', '2007-11-01', '2007-12-01'],\n                              'company': ['AAPL', 'AAPL', 'AAPL',\n                                          'AMZN', 'AMZN', 'AMZN',\n                                          'GOOG', 'GOOG', 'GOOG'],\n                              'price': [189.95, 182.22, 198.08,\n                                         89.15,  90.56,  92.64,\n                                        707.00, 693.00, 691.48]})\n    print(long_form)\n\nNotice here that each row contains a single observation (i.e. price), along\nwith the metadata for this observation (the date and company name).\nImportantly, the column and index labels no longer contain any useful metadata.\n\nAs mentioned above, Altair works best with this long-form data, because relevant\ndata and metadata are stored within the table itself, rather than within the\nlabels of rows and columns:\n\n.. altair-plot::\n\n    alt.Chart(long_form).mark_line().encode(\n      x='Date:T',\n      y='price:Q',\n      color='company:N'\n    )\n\nWide-form data can be similarly visualized using e.g. layering\n(see :ref:`layer-chart`), but it is far less convenient within Altair's grammar.\n\nIf you would like to convert data from wide-form to long-form, there are two possible\napproaches: it can be done as a preprocessing step using pandas, or as a transform\nstep within the chart itself. We will detail to two approaches below.\n\n.. _data-converting-long-form:\n\nConverting with pandas\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nThis sort of data manipulation can be done as a preprocessing step using pandas_,\nand is discussed in detail in the `Reshaping and Pivot Tables`_ section of the\npandas documentation.\n\nFor converting wide-form data to the long-form data used by Altair, the ``melt``\nmethod of dataframes can be used. The first argument to ``melt`` is the column\nor list of columns to treat as index variables; the remaining columns will\nbe combined into an indicator variable and a value variable whose names can\nbe optionally specified:\n\n.. altair-plot::\n    :output: repr\n\n    wide_form.melt('Date', var_name='company', value_name='price')\n\nFor more information on the ``melt`` method, see the `pandas melt documentation`_.\n\nIn case you would like to undo this operation and convert from long-form back\nto wide-form, the ``pivot`` method of dataframes is useful.\n\n.. altair-plot::\n    :output: repr\n\n    long_form.pivot(index='Date', columns='company', values='price').reset_index()\n\nFor more information on the ``pivot`` method, see the `pandas pivot documentation`_.\n\nConverting with Fold Transform\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\nIf you would like to avoid data preprocessing, you can reshape your data using Altair's\nFold Transform (see :ref:`user-guide-fold-transform` for a full discussion).\nWith it, the above chart can be reproduced as follows:\n\n.. altair-plot::\n\n    alt.Chart(wide_form).transform_fold(\n        ['AAPL', 'AMZN', 'GOOG'],\n        as_=['company', 'price']\n    ).mark_line().encode(\n        x='Date:T',\n        y='price:Q',\n        color='company:N'\n    )\n\nNotice that unlike the pandas ``melt`` function we must explicitly specify the columns\nto be folded. The ``as_`` argument is optional, with the default being ``[\"key\", \"value\"]``.\n\n\n.. _data-generated:\n\nGenerated Data\n~~~~~~~~~~~~~~\nAt times it is convenient to not use an external data source, but rather generate data for\ndisplay within the chart specification itself. The benefit is that the chart specification\ncan be made much smaller for generated data than for embedded data.\n\nSequence Generator\n^^^^^^^^^^^^^^^^^^\nHere is an example of using the :func:`sequence` function to generate a sequence of  *x*\ndata, along with a :ref:`user-guide-calculate-transform` to compute *y* data.\n\n.. altair-plot::\n\n   import altair as alt\n\n   # Note that the following generator is functionally similar to\n   # data = pd.DataFrame({'x': np.arange(0, 10, 0.1)})\n   data = alt.sequence(0, 10, 0.1, as_='x')\n\n   alt.Chart(data).transform_calculate(\n       y='sin(datum.x)'\n   ).mark_line().encode(\n       x='x:Q',\n       y='y:Q',\n   )\n\nGraticule Generator\n^^^^^^^^^^^^^^^^^^^\nAnother type of data that is convenient to generate in the chart itself is the latitude/longitude\nlines on a geographic visualization, known as a graticule. These can be created using Altair's\n:func:`graticule` generator function. Here is a simple example:\n\n.. altair-plot::\n\n   import altair as alt\n\n   data = alt.graticule(step=[15, 15])\n\n   alt.Chart(data).mark_geoshape(stroke='black').project(\n       'orthographic',\n       rotate=[0, -45, 0]\n   )\n\nSphere Generator\n^^^^^^^^^^^^^^^^\nFinally when visualizing the globe a sphere can be used as a background layer\nwithin a map to represent the extent of the Earth. This sphere data can be\ncreated using Altair's :func:`sphere` generator function. Here is an example:\n\n.. altair-plot::\n\n   import altair as alt\n\n   sphere_data = alt.sphere()\n   grat_data = alt.graticule(step=[15, 15])\n\n   background = alt.Chart(sphere_data).mark_geoshape(fill='aliceblue')\n   lines = alt.Chart(grat_data).mark_geoshape(stroke='lightgrey')\n\n   alt.layer(background, lines).project('naturalEarth1')\n\n.. _pandas: http://pandas.pydata.org/\n.. _pandas pivot documentation: https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.pivot.html\n.. _pandas melt documentation: https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.melt.html#pandas.DataFrame.melt\n.. _Reshaping and Pivot Tables: https://pandas.pydata.org/pandas-docs/stable/reshaping.html\n\n.. _spatial-data:\n\nSpatial Data\n~~~~~~~~~~~~\n\nIn this section, we explain different methods for reading spatial data into Altair.\nTo learn more about how to work with this data after you have read it in,\nplease see the :ref:`user-guide-geoshape-marks` mark page.\n\n\n.. _spatial-data-gdf:\n\nGeoPandas GeoDataFrame\n^^^^^^^^^^^^^^^^^^^^^^\n\nIt is convenient to use GeoPandas as the source for your spatial data.\nGeoPandas can read many types of spatial data and Altair works well with GeoDataFrames.\nHere we define four polygon geometries into a\nGeoDataFrame and visualize these using the ``mark_geoshape``.\n\n.. altair-plot::\n   :output: repr\n\n   from shapely import geometry\n   import geopandas as gpd\n   import altair as alt\n\n   data_geoms = [\n       {\"color\": \"#F3C14F\", \"geometry\": geometry.Polygon([[1.45, 3.75], [1.45, 0], [0, 0], [1.45, 3.75]])},\n       {\"color\": \"#4098D7\", \"geometry\": geometry.Polygon([[1.45, 0], [1.45, 3.75], [2.57, 3.75], [2.57, 0], [2.33, 0], [1.45, 0]])},\n       {\"color\": \"#66B4E2\", \"geometry\": geometry.Polygon([[2.33, 0], [2.33, 2.5], [3.47, 2.5], [3.47, 0], [3.2, 0], [2.57, 0], [2.33, 0]])},\n       {\"color\": \"#A9CDE0\", \"geometry\": geometry.Polygon([[3.2, 0], [3.2, 1.25], [4.32, 1.25], [4.32, 0], [3.47, 0], [3.2, 0]])},\n   ]\n\n   gdf_geoms = gpd.GeoDataFrame(data_geoms)\n   gdf_geoms\n\n\nSince the spatial data in our example is not geographic,\nwe use ``project`` configuration ``type=\"identity\", reflectY=True`` to draw the\ngeometries without applying a geographic projection. By using ``alt.Color(...).scale(None)`` we\ndisable the automatic color assignment in Altair\nand instead directly use the provided Hex color codes.\n\n.. altair-plot::\n\n   alt.Chart(gdf_geoms, title=\"Vega-Altair\").mark_geoshape().encode(\n       alt.Color(\"color:N\").scale(None)\n   ).project(type=\"identity\", reflectY=True)\n\n\n.. _spatial-data-inline-geojson:\n\nInline GeoJSON Object\n^^^^^^^^^^^^^^^^^^^^^\n\nIf your source data is a GeoJSON file and you do not want to load it\ninto a GeoPandas GeoDataFrame you can provide it as a dictionary to the Altair ``Data`` class. A\nGeoJSON file normally consists of a ``FeatureCollection`` with a list of\n``features`` where the information for each geometry is specified within a\n``properties`` dictionary. In the following example a GeoJSON-like data\nobject is specified into a ``Data`` class using the ``property``\nvalue of the ``key`` that contain the nested list (here named\n``features``).\n\n.. altair-plot::\n   :output: repr\n\n   obj_geojson = {\n       \"type\": \"FeatureCollection\",\n       \"features\":[\n           {\"type\": \"Feature\", \"properties\": {\"location\": \"left\"}, \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[1.45, 3.75], [1.45, 0], [0, 0], [1.45, 3.75]]]}},\n           {\"type\": \"Feature\", \"properties\": {\"location\": \"middle-left\"}, \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[1.45, 0], [1.45, 3.75], [2.57, 3.75], [2.57, 0], [2.33, 0], [1.45, 0]]]}},\n           {\"type\": \"Feature\", \"properties\": {\"location\": \"middle-right\"}, \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[2.33, 0], [2.33, 2.5], [3.47, 2.5], [3.47, 0], [3.2, 0], [2.57, 0], [2.33, 0]]]}},\n           {\"type\": \"Feature\", \"properties\": {\"location\": \"right\"}, \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[3.2, 0], [3.2, 1.25], [4.32, 1.25], [4.32, 0], [3.47, 0], [3.2, 0]]]}}\n       ]\n   }\n   data_obj_geojson = alt.Data(values=obj_geojson, format=alt.DataFormat(property=\"features\"))\n   data_obj_geojson\n\nThe label for each objects location is stored within the ``properties`` dictionary. To access these values\nyou can specify a nested variable name (here ``properties.location``) within the color\nchannel encoding. Here we change the coloring encoding to be based on this location label,\nand apply a ``magma`` color scheme instead of the default one.\nThe ``:O`` suffix indicates that we want Altair to treat these values as ordinal,\nand you can read more about it in the :ref:`encoding-data-types` page.\nfor the ordinal structured data.\n\n.. altair-plot::\n\n   alt.Chart(data_obj_geojson, title=\"Vega-Altair - ordinal scale\").mark_geoshape().encode(\n       alt.Color(\"properties.location:O\").scale(scheme='magma')\n   ).project(type=\"identity\", reflectY=True)\n\n\n.. _spatial-data-remote-geojson:\n\nGeoJSON File by URL\n^^^^^^^^^^^^^^^^^^^\n\nAltair can load GeoJSON resources directly from a web URL. Here we use\nan example from geojson.xyz. As is explained in :ref:`spatial-data-inline-geojson`,\nwe specify ``features`` as\nthe value for the ``property`` parameter in the ``alt.DataFormat()`` object\nand prepend the attribute we want to plot (``continent``)\nwith the name of the nested dictionary where the\ninformation of each geometry is stored (``properties``).\n\n.. altair-plot::\n   :output: repr\n\n   url_geojson = \"https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_110m_admin_0_countries.geojson\"\n   data_url_geojson = alt.Data(url=url_geojson, format=alt.DataFormat(property=\"features\"))\n   data_url_geojson\n\n.. altair-plot::\n\n    alt.Chart(data_url_geojson).mark_geoshape().encode(color='properties.continent:N')\n\n\n.. _spatial-data-inline-topojson:\n\nInline TopoJSON Object\n^^^^^^^^^^^^^^^^^^^^^^\n\nTopoJSON is an extension of GeoJSON, where the geometry of the features\nare referred to from a top-level object named arcs. Each shared arc is\nonly stored once to reduce the size of the data. A TopoJSON file object can contain\nmultiple objects (eg. boundary border and province border). When\ndefining a TopoJSON object for Altair we specify the ``topojson``\ndata format type and the name of the object we like to visualize using the\n``feature`` parameter. Here the name of this object key is ``MY_DATA``,\nbut this differs in each dataset.\n\n.. altair-plot::\n   :output: repr\n\n   obj_topojson = {\n       \"arcs\": [\n           [[1.0, 1.0], [0.0, 1.0], [0.0, 0.0], [1.0, 0.0]],\n           [[1.0, 0.0], [2.0, 0.0], [2.0, 1.0], [1.0, 1.0]],\n           [[1.0, 1.0], [1.0, 0.0]],\n       ],\n       \"objects\": {\n           \"MY_DATA\": {\n               \"geometries\": [\n                   {\"arcs\": [[-3, 0]], \"properties\": {\"name\": \"abc\"}, \"type\": \"Polygon\"},\n                   {\"arcs\": [[1, 2]], \"properties\": {\"name\": \"def\"}, \"type\": \"Polygon\"},\n               ],\n               \"type\": \"GeometryCollection\",\n           }\n       },\n       \"type\": \"Topology\",\n   }\n   data_obj_topojson = alt.Data(\n       values=obj_topojson, format=alt.DataFormat(feature=\"MY_DATA\", type=\"topojson\")\n   )\n   data_obj_topojson\n\n.. altair-plot::\n\n   alt.Chart(data_obj_topojson).mark_geoshape(\n   ).encode(\n       color=\"properties.name:N\"\n   ).project(\n       type='identity', reflectY=True\n   )\n\n\n.. _spatial-data-remote-topojson:\n\nTopoJSON File by URL\n^^^^^^^^^^^^^^^^^^^^\n\nAltair can load TopoJSON resources directly from a web URL. As\nexplained in :ref:`spatial-data-inline-topojson`, we have to use the\n``feature`` parameter to specify the object name (here ``boroughs``) and\ndefine the type of data as ``topjoson`` in the ``alt.DataFormat()`` object.\n\n.. altair-plot::\n   :output: repr\n\n   from altair.datasets import data\n\n   url_topojson = data.london_boroughs.url\n\n   data_url_topojson = alt.Data(\n       url=url_topojson, format=alt.DataFormat(feature=\"boroughs\", type=\"topojson\")\n   )\n\n   data_url_topojson\n\nNote: There also exist a shorthand to extract the objects from a\ntopojson file if this file is accessible by URL:\n``alt.topo_feature(url=url_topojson, feature=\"boroughs\")``\n\nWe color encode the Boroughs by there names as they are stored as an\nunique identifier (``id``). We use a ``symbolLimit`` of 33 in two\ncolumns to display all entries in the legend\nand change the color scheme to have more distinct colors.\nWe also add a tooltip which shows the name of the borough\nas we hover over it with the mouse.\n\n.. altair-plot::\n\n   alt.Chart(data_url_topojson, title=\"London-Boroughs\").mark_geoshape(\n       tooltip=True\n   ).encode(\n       alt.Color(\"id:N\").scale(scheme='tableau20').legend(columns=2, symbolLimit=33)\n   )\n\nSimilar to the ``feature`` option, there also exists the ``mesh``\nparameter. This parameter extracts a named TopoJSON object set.\nUnlike the feature option, the corresponding geo data is returned as\na single, unified mesh instance, not as individual GeoJSON features.\nExtracting a mesh is useful for more efficiently drawing borders\nor other geographic elements that you do not need to associate with\nspecific regions such as individual countries, states or counties.\n\nHere below we draw the same Boroughs of London, but now as mesh only.\n\nNote: you have to explicitly define ``filled=False`` to draw multi(lines)\nwithout fill color.\n\n.. altair-plot::\n\n   from altair.datasets import data\n\n   url_topojson = data.london_boroughs.url\n\n   data_url_topojson_mesh = alt.Data(\n       url=url_topojson, format=alt.DataFormat(mesh=\"boroughs\", type=\"topojson\")\n   )\n\n   alt.Chart(data_url_topojson_mesh, title=\"Border London-Boroughs\").mark_geoshape(\n       filled=False\n   )\n\n.. _spatial-data-nested-geojson:\n\nNested GeoJSON Objects\n^^^^^^^^^^^^^^^^^^^^^^\n\nGeoJSON data can also be nested within another dataset. In this case it\nis possible to use the ``shape`` encoding channel in combination with the\n``:G`` suffix to visualize the nested features as GeoJSON objects.\nIn the following example the GeoJSON object are nested within ``geo``\nin the list of dictionaries:\n\n.. altair-plot::\n\n   nested_features = [\n       {\"color\": \"#F3C14F\", \"geo\": {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[1.45, 3.75], [1.45, 0], [0, 0], [1.45, 3.75]]]}}},\n       {\"color\": \"#4098D7\", \"geo\": {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[1.45, 0], [1.45, 3.75], [2.57, 3.75], [2.57, 0], [2.33, 0], [1.45, 0]]]}}},\n       {\"color\": \"#66B4E2\", \"geo\": {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[2.33, 0], [2.33, 2.5], [3.47, 2.5], [3.47, 0], [3.2, 0], [2.57, 0], [2.33, 0]]]}}},\n       {\"color\": \"#A9CDE0\", \"geo\": {\"type\": \"Feature\", \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[3.2, 0], [3.2, 1.25], [4.32, 1.25], [4.32, 0], [3.47, 0], [3.2, 0]]]}}},\n   ]\n   data_nested_features = alt.Data(values=nested_features)\n\n   alt.Chart(data_nested_features, title=\"Vega-Altair\").mark_geoshape().encode(\n       shape=\"geo:G\",\n       color=alt.Color(\"color:N\").scale(None)\n   ).project(type=\"identity\", reflectY=True)\n\n\n.. _data-projections:\n\nProjections\n^^^^^^^^^^^\nFor geographic data it is best to use the World Geodetic System 1984 as\nits geographic coordinate reference system with units in decimal degrees.\nTry to avoid putting projected data into Altair, but reproject your spatial data to\nEPSG:4326 first.\nIf your data comes in a different projection (eg. with units in meters) and you don't\nhave the option to reproject the data, try using the project configuration\n``(type: 'identity', reflectY': True)``. It draws the geometries without applying a projection.\n\n\n.. _data-winding-order:\n\nWinding Order\n^^^^^^^^^^^^^\nLineString, Polygon and MultiPolygon geometries contain coordinates in an order: lines\ngo in a certain direction, and polygon rings do too. The GeoJSON-like structure of the\n``__geo_interface__`` recommends the right-hand rule winding order for Polygon and\nMultiPolygons. Meaning that the exterior rings should be counterclockwise and interior\nrings are clockwise. While it recommends the right-hand rule winding order, it does not\nreject geometries that do not use the right-hand rule.\n\nAltair does NOT follow the right-hand rule for geometries, but uses the left-hand rule.\nMeaning that exterior rings should be clockwise and interior rings should be\ncounterclockwise.\nIf you face a problem regarding winding order, try to force the left-hand rule on your\ndata before usage in Altair using GeoPandas for example as such:\n\n.. code:: python\n\n    from shapely.ops import orient\n    gdf.geometry = gdf.geometry.apply(orient, args=(-1,))\n\n.. toctree::\n   :maxdepth: 1\n   :caption: User Guide\n   :hidden:\n\n   self\n   encodings/index\n   marks/index\n   transform/index\n   interactions/index\n   compound_charts\n   scale_resolve\n   times_and_dates\n   customization\n   configuration\n   saving_charts\n\n\n.. toctree::\n   :maxdepth: 1\n   :caption: Advanced Usage\n   :hidden:\n\n   internals\n   display_frontends\n   custom_renderers\n   data_transformers\n   large_datasets\n"
  },
  {
    "path": "doc/user_guide/data_transformers.rst",
    "content": ".. _data-transformers:\n\nData Transformers\n=================\n\nBefore a Vega-Lite or Vega specification can be passed to a renderer, it typically\nhas to be transformed in a number of ways:\n\n* pandas Dataframe has to be sanitized and serialized to JSON.\n* The rows of a Dataframe might need to be sampled or limited to a maximum number.\n* The Dataframe might be written to a ``.csv`` of ``.json`` file for performance\n  reasons.\n\nThese data transformations are managed by the data transformation API of Altair.\n\n.. note::\n\n    The data transformation API of Altair should not be confused with the ``transform``\n    API of Vega and Vega-Lite.\n\nA data transformer is a Python function that takes a Vega-Lite data ``dict`` or\npandas ``DataFrame`` and returns a transformed version of either of these types::\n\n    from typing import Union\n    Data = Union[dict, pd.DataFrame]\n\n    def data_transformer(data: Data) -> Data:\n        # Transform and return the data\n        return transformed_data\n\nDataset Consolidation\n~~~~~~~~~~~~~~~~~~~~~\nDatasets passed as pandas dataframes can be represented in the chart in two\nways:\n\n- As literal dataset values in the ``data`` attribute at any level of the\n  specification\n- As a named dataset in the ``datasets`` attribute of the top-level\n  specification.\n\nThe former is a bit more simple, but common patterns of usage in Altair can\noften lead to full datasets being listed multiple times in their entirety\nwithin a single specification.\n\nFor this reason, Altair 2.2 and newer will by default move all\ndirectly-specified datasets into the top-level ``datasets`` entry, and\nreference them by a unique name determined from the hash of the data\nrepresentation. The benefit of using a hash-based name is that even if the\nuser specifies a dataset in multiple places when building the chart, the\nspecification will only include one copy.\n\nThis behavior can be modified by setting the ``consolidate_datasets`` attribute\nof the data transformer.\n\nFor example, consider this simple layered chart:\n\n.. altair-plot::\n   :chart-var-name: chart\n\t\t    \n   import altair as alt\n   import pandas as pd\n\n   df = pd.DataFrame({'x': range(5),\n                      'y': [1, 3, 4, 3, 5]})\n\n   line = alt.Chart(df).mark_line().encode(x='x', y='y')\n   points = alt.Chart(df).mark_point().encode(x='x', y='y')\n   chart = line + points\n\nIf we look at the resulting specification, we see that although the dataset\nwas specified twice, only one copy of it is output in the spec:\n\n.. altair-plot::\n   :output: stdout\n\n   from pprint import pprint\n   pprint(chart.to_dict())\n\nThis consolidation of datasets is an extra bit of processing that is turned on\nby default in all renderers.\n\nIf you would like to disable this dataset consolidation for any reason, you can\ndo so by setting ``alt.data_transformers.consolidate_datasets = False``, or\nby using the ``enable()`` context manager to do it only temporarily:\n\n.. altair-plot::\n   :output: stdout\n\n   with alt.data_transformers.enable(consolidate_datasets=False):\n       pprint(chart.to_dict())\n   \nNotice that now the dataset is not specified within the top-level ``datasets``\nattribute, but rather as values within the ``data`` attribute of each\nindividual layer. This duplication of data is the reason that dataset\nconsolidation is set to ``True`` by default.\n\n\nBuilt-in Data Transformers\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAltair includes a default set of data transformers with the following signatures.\n\nRaise a ``MaxRowsError`` if a Dataframe has more than ``max_rows`` rows::\n\n    limit_rows(data, max_rows=5000)\n\nRandomly sample a DataFrame (without replacement) before visualizing::\n\n    sample(data, n=None, frac=None)\n\nConvert a Dataframe to a separate ``.json`` file before visualization::\n\n    to_json(data, prefix='altair-data'):\n\nConvert a Dataframe to a separate ``.csv`` file before visualization::\n\n    to_csv(data, prefix='altair-data'):\n\nConvert a Dataframe to inline JSON values before visualization::\n\n    to_values(data):\n\nPiping\n~~~~~~\n\nMultiple data transformers can be piped together using ``pipe``::\n\n    from altair import limit_rows, to_values\n    from toolz.curried import pipe\n    pipe(data, limit_rows(10000), to_values)\n\nManaging Data Transformers\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAltair maintains a registry of data transformers, which includes a default\ndata transformer that is automatically applied to all Dataframes before rendering.\n\nTo see the registered transformers::\n\n    >>> import altair as alt\n    >>> alt.data_transformers.names()\n    ['default', 'json', 'csv']\n\nThe default data transformer is the following::\n\n    def default_data_transformer(data):\n        return pipe(data, limit_rows, to_values)\n\nThe ``json`` and ``csv`` data transformers will save a Dataframe to a temporary\n``.json`` or ``.csv`` file before rendering. There are a number of performance\nadvantages to these two data transformers:\n\n* The full dataset will not be saved in the notebook document.\n* The performance of the Vega-Lite/Vega JavaScript appears to be better\n  for standalone JSON/CSV files than for inline values.\n\nThere are disadvantages of the JSON/CSV data transformers:\n\n* The Dataframe will be exported to a temporary ``.json`` or ``.csv``\n  file that sits next to the notebook.\n* That notebook will not be able to re-render the visualization without\n  that temporary file (or re-running the cell).\n\nIn our experience, the performance improvement is significant enough that\nwe recommend using the ``json`` data transformer for any large datasets::\n\n    alt.data_transformers.enable('json')\n\nWe hope that others will write additional data transformers - imagine a\ntransformer which saves the dataset to a JSON file on S3, which could\nbe registered and enabled as::\n\n    alt.data_transformers.register('s3', lambda data: pipe(data, to_s3('mybucket')))\n    alt.data_transformers.enable('s3')\n\n\nStoring JSON Data in a Separate Directory\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nWhen creating many charts with ``alt.data_transformers.enable('json')`` the\nworking directory can get a bit cluttered. To avoid this we can build a simple\ncustom data transformer that stores all JSON files in separate directory.::\n\n    import os\n    import altair as alt\n    from toolz.curried import pipe\n\n\n    def json_dir(data, data_dir='altairdata'):\n        os.makedirs(data_dir, exist_ok=True)\n        return pipe(data, alt.to_json(filename=data_dir + '/{prefix}-{hash}.{extension}') )\n\n\n    alt.data_transformers.register('json_dir', json_dir)\n    alt.data_transformers.enable('json_dir', data_dir='mydata')\n\nAfter enabling this data transformer, the JSON files will be stored in what ``data_dir``\nwas set to when enabling the transformer or 'altairdata' by default. All we had to do\nwas to prefix the ``filename`` argument of the ``alt.to_json`` function with our\ndesired directory and make sure that the directory actually exists.\n"
  },
  {
    "path": "doc/user_guide/display_frontends.rst",
    "content": ".. _displaying-charts:\n\nDisplaying Altair Charts\n========================\n\nAltair produces `Vega-Lite`_ visualizations, which require a Javascript frontend to\ndisplay the charts.\nBecause notebook environments combine a Python backend with a Javascript frontend,\nmany users find them convenient for using Altair.\n\nAltair charts work out-of-the-box on `Jupyter Notebook`_, `JupyterLab`_, `Zeppelin`_,\nand related notebook environments, so long as there is a web connection to load the\nrequired javascript libraries.\n\nAltair can also be used with various IDEs that are enabled to display Altair charts,\nand can be used offline in most platforms with an appropriate frontend extension enabled;\ndetails are below.\n\n\n.. _renderers:\n\nAltair's Renderer Framework\n---------------------------\nBecause different display systems have different requirements and constraints, Altair provides\nan API to switch between various *renderers* to tune Altair's chart representation.\nThese can be chosen with the renderer registry in ``alt.renderers``.\nThe most used built-in renderers are:\n\n``alt.renderers.enable(\"html\")``\n  *(the default)* Output an HTML representation of the chart. The HTML renderer works\n  in JupyterLab_, `Jupyter Notebook`_, `Zeppelin`_, `VSCode-Python`_ and many related notebook frontends,\n  as well as Jupyter ecosystem tools like nbviewer_ and nbconvert_ HTML output.\n  It requires a web connection in order to load relevant Javascript libraries.\n\n``alt.renderers.enable(\"mimetype\")``\n  *(default prior to Altair 4.0):* Output a vega-lite specific mimetype that can be\n  interpreted by appropriate frontend extensions to display charts. This also outputs\n  a PNG representation of the plot, which is useful to view plots offline or on\n  platforms that don't support rendering vegaspecs, such as GitHub. It works with\n  newer versions of JupyterLab_, nteract_, and `VSCode-Python`_, but does not work\n  with the `Jupyter Notebook`_, or with tools like nbviewer_ and nbconvert_.\n\n``alt.renderers.enable(\"jupyter\")``\n  *(added in version 5.3):* Output the chart using :ref:`user-guide-jupyterchart`. This renderer\n  is compatible with environments that support third-party Jupyter Widgets including\n  JupyterLab_, `Jupyter Notebook`_, `VSCode-Python`_, and `Colab`_.\n  It requires a web connection in order to load relevant Javascript libraries.  Note that,\n  although this renderer uses ``JupyterChart``, it does not provide the\n  ability to access value and selection params in Python. To do so, create a ``JupyterChart``\n  object explicitly following the instructions in the :ref:`user-guide-jupyterchart`\n  documentation.\n\n``alt.renderers.enable(\"jupyter\", offline=True)``\n  *(added in version 5.3):* Same as the ``\"jupyter\"`` renderer above, but loads JavaScript\n  dependencies from the ``vl-convert-python`` package (rather than from an online CDN)\n  so that an internet connection is not required.\n\n``alt.renderers.enable(\"browser\")``\n  *(added in version 5.3):* Display charts in an external web browser. This renderer is\n  particularly useful when using Vega-Altair in a local non-Jupyter environment, such as\n  in `IPython`_ or `Spyder`_. See :ref:`display-browser` for more information.\n\nIn addition, Altair includes the following renderers:\n\n- ``\"default\"``, ``\"colab\"``, ``\"kaggle\"``, ``\"zeppelin\"``: identical to ``\"html\"``\n- ``\"jupyterlab\"``, ``\"nteract\"``: identical to ``\"mimetype\"``\n- ``\"png\"``: renderer that renders and converts the chart to PNG, outputting it\n  using the ``\"image/png\"`` MIME type.\n- ``\"svg\"``: renderer that renders and converts the chart to an SVG image,\n  outputting it using the ``\"image/svg+xml\"`` MIME type.\n- ``\"olli\"``: renderer that uses `Olli`_ to generate accessible text structures for screen reader users.\n- ``\"json\"``: renderer that outputs the raw JSON chart specification, using the\n  ``\"application/json\"`` MIME type.\n\nYou can use ``alt.renderers.names()`` to return all registered renderers as a Python list.\n\nOther renderers can be installed by third-party packages via Python's entrypoints system or you can create your own,\nsee :ref:`customizing-renderers`.\n\n.. _display-jupyterlab:\n\nDisplaying in JupyterLab\n------------------------\nJupyterLab 1.0 and later will work with Altair's default renderer with\na live web connection: no render enable step is required.\n\nOptionally, for offline rendering in JupyterLab, you can use the mimetype renderer::\n\n    # Optional in JupyterLab: requires an up-to-date vega labextension.\n    alt.renderers.enable('mimetype')\n\nand ensure you have the proper version of the vega labextension installed; for\nAltair 4 this can be installed with:\n\n.. code-block:: bash\n\n    $ jupyter labextension install @jupyterlab/vega5-extension\n\nIn JupyterLab version 2.0 or newer, this extension is installed by default, though the\nversion available in the JupyterLab release often takes a few months to catch up with\nnew Altair releases.\n\n\n.. _display-notebook:\n\nDisplaying in Jupyter Notebook\n------------------------------\nThe classic Jupyter Notebook will work with Altair's default renderer with\na live web connection: no render enable step is required.\n\nOptionally, for offline rendering in Jupyter Notebook, you can use the notebook renderer::\n\n    # Optional in Jupyter Notebook: requires an up-to-date vega nbextension.\n    alt.renderers.enable('notebook')\n \nThis renderer is provided by the `ipyvega`_ notebook extension, which can be\ninstalled and enabled either using pip:\n\n.. code-block:: bash\n\n    $ pip install vega\n\nor conda:\n\n.. code-block:: bash\n\n    $ conda install vega --channel conda-forge\n\nIn older versions of the notebook (<5.3) you need to additionally enable the extension:\n\n.. code-block:: bash\n\n    $ jupyter nbextension install --sys-prefix --py vega\n\n\n.. _display-nteract:\n\nDisplaying in nteract\n---------------------\nnteract_ cannot display HTML outputs natively, and so Altair's default ``html`` renderer\nwill not work. However, nteract natively includes vega and vega-lite mimetype-based rendering.\nTo use Altair in nteract, ensure you are using a version that supports the Vega-Lite v6\nmimetype, and use::\n\n    alt.renderers.enable('mimetype')\n\n\n.. _display-vscode:\n\nDisplaying in VSCode\n--------------------\n`VSCode-Python`_ works with Altair's default renderer with a live web connection: no render enable step is required.\n\nOptionally, for offline rendering, you can use the mimetype renderer::\n\n    # Optional in VS Code\n    alt.renderers.enable('mimetype')\n\n.. _display_dashboards:\n\nDashboards\n----------\nAltair is compatible with common Python dashboarding packages. Many of them even provide support for reading out :ref:`parameters <user-guide-interactions>` from the chart.\nThis allows you to e.g. select data points and update another part of the dashboard such as a table based on that selection:\n\n===================================================================================================================================  ===================================  =============================\nPackage                                                                                                                              Displays interactive Altair charts   Supports reading out parameters\n===================================================================================================================================  ===================================  =============================\n`Panel <https://panel.holoviz.org/reference/panes/Vega.html#altair>`_                                                                ✔                                    ✔\n`Plotly Dash <https://dash.plotly.com/dash-vega-components?utm_medium=altair>`_                                                      ✔                                    ✔\n`Jupyter Voila <https://voila.readthedocs.io/en/stable/>`_ using :ref:`JupyterChart <user-guide-jupyterchart>`                       ✔                                    ✔\n`Marimo <https://docs.marimo.io/guides/plotting.html>`_                                                                              ✔                                    ✔\n`Shiny <https://shiny.posit.co/py/docs/ipywidgets.html#quick-start>`_ using :ref:`JupyterChart <user-guide-jupyterchart>`            ✔                                    ✔\n`Solara <https://solara.dev/api/altair>`_                                                                                            ✔                                    ✔\n`Streamlit <https://docs.streamlit.io/library/api-reference/charts/st.altair_chart>`_                                                ✔                                    ✔\n===================================================================================================================================  ===================================  =============================\n\nThe above mentioned frameworks all require you to run a web application on a server if you want to share your work with others. A web application gives you a lot of flexibility, you can for example fetch data from a database based on the value of a dropdown menu in the dashboard. However, it comes with some complexity as well. \nFor use cases where the interactivity provided by Altair itself is enough, you can also use tools which generate HTML pages which do not require a web server such as `Quarto <https://quarto.org/>`_ or `Jupyter Book <https://jupyterbook.org/>`_.\n\nIf you are using a dashboarding package that is not listed here, please `open an issue <https://github.com/vega/altair/issues>`_ on GitHub so that we can add it.\n\n.. _display-general:\n\nWorking in environments without a JavaScript frontend\n-----------------------------------------------------   \nThe Vega-Lite specifications produced by Altair can be produced in any Python\nenvironment, but to render these specifications currently requires a JavaScript\nengine. For this reason, Altair works most seamlessly with the browser-based\nenvironments mentioned above. Even so, Altair can be used effectively in non-browser\nbased environments using the approaches described below.\n\nStatic Image Renderers\n~~~~~~~~~~~~~~~~~~~~~~\nThe ``\"png\"`` and ``\"svg\"`` renderers rely on the JavaScript engine embedded in\nthe vl-convert optional dependency to generate static images from Vega-Lite chart\nspecifications. These static images are then displayed in IPython-based environments\nusing the Mime Renderer Extensions system. This approach may be used to display static\nversions of Altair charts inline in the `IPython QtConsole`_ and `Spyder`_, as well as\nin browser-based environments like JupyterLab.\n\nThe ``\"svg\"`` renderer is enabled like this::\n\n    alt.renderers.enable(\"svg\")\n\n\nThe ``\"png\"`` renderer is enabled like this::\n\n    alt.renderers.enable(\"png\")\n\n\nThe ``\"png\"`` renderer supports the following keyword argument configuration options:\n\n- The ``scale_factor`` argument may be used to increase the chart size by the specified\n  scale factor (Default 1.0).\n- The ``ppi`` argument controls the pixels-per-inch resolution of the displayed image (Default 72).\n\nExample usage::\n\n    alt.renderers.enable(\"png\", scale_factor=2, ppi=144)\n\n\n.. _display-browser:\n\nBrowser Renderer\n~~~~~~~~~~~~~~~~\nTo support displaying charts with interactive features in non-browser based environments,\nthe ``\"browser\"`` renderer automatically opens charts in browser tabs of a system web browser.\n\nThe ``\"browser\"`` renderer is enabled like this::\n\n    alt.renderers.enable(\"browser\")\n\n\nThe ``\"browser\"`` renderer supports the following keyword argument configuration options:\n\n- The ``using`` argument may be used to specify which system web browser to use. This\n  may be set to a string to indicate the single browser that must be used (e.g. ``\"safari\"``),\n  or it may be set to a list of browser names where the first available browser is used. See the\n  documentation for the `webbrowser module`_ for the list of supported browser names. If not\n  specified, the system default browser is used.\n- The ``offline`` argument may be used to specify whether JavaScript dependencies should\n  be loaded from an online CDN or embedded alongside the chart specification. When ``offline``\n  is ``False`` (the default), JavaScript dependencies are loaded from an online CDN, and so\n  an internet connection is required. When ``offline`` is ``True``, JavaScript dependencies\n  are embedded alongside the chart specification and so no internet connection is required. Setting\n  ``offline`` to ``True`` requires the optional ``vl-convert-python`` dependency.\n- The ``port`` argument may be used to configure the system port that the chart HTML is served\n  on. Defaults to a random open port.\n\nLimitations:\n\n- The ``\"browser\"`` renderer sets up a temporary web server that serves the chart exactly once,\n  then opens the designated browser pointing to the server's URL. This approach does not require\n  the creation of temporary HTML files on disk, and it's memory efficient as there are no long-lived\n  web server processes required. A limitation of this approach is that the chart will be lost if the\n  browser is refreshed, and it's not possible to copy the chart URL and paste it in another browser\n  tab.\n- When used in IPython-based environments, the ``\"browser\"`` renderer will automatically open the\n  chart in the browser when the chart is the final value of the cell or command. This behavior is not\n  available in the standard ``python`` REPL. In this case, the ``chart.show()`` method may be used to\n  manually invoke the active renderer and open the chart in the browser.\n- This renderer is not compatible with remote environments like `Binder`_ or `Colab`_.\n\n\nManual ``save()`` and display\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nIf you would prefer, you can save your chart to a file (html, png, etc.) first and then display it.\nSee :ref:`user-guide-saving` for more information.\n\n.. _display-troubleshooting:\n\nTroubleshooting\n---------------\nAltair has a number of moving parts: it creates data structures in Python, those\nstructures are passed to front-end renderers, and the renderers run JavaScript\ncode to generate the output. This complexity means that it's possible to get\ninto strange states where things don't immediately work as expected.\n\nThis section summarizes some of the most common problems and their solutions.\n\n \n.. _troubleshooting-general:\n\nGeneral Troubleshooting\n~~~~~~~~~~~~~~~~~~~~~~~\n\nChart does not display at all\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nIf you are expecting a chart output and see nothing at all, it means that the\nJavascript rendering libraries are not being invoked.\nThis can happen for several reasons:\n\n1. You have an old browser that doesn't support JavaScript's `ECMAScript 6`_:\n   in this case, charts may not display properly or at all. For example, Altair\n   charts will not render in any version of Internet Explorer.\n   If this is the case, you will likely see syntax errors in your browser's\n   `Javascript Console`_.\n\n2. Your browser is unable to load the javascript libraries. This may be due to\n   a local firewall, an adblocker, or because your browser is offline. Check your\n   browser's `Javascript Console`_  to see if there are errors.\n\n3. You may be failing to trigger the notebook's display mechanism (see below).\n\nIf you are working in a notebook environment, the chart is only displayed if the\n**last line of the cell evaluates to a chart object**\n\nBy analogy, consider the output of simple Python operations::\n\n    >>> x = 4  # no output here\n    >>> x      # output here, because x is evaluated\n    4\n    >>> x * 2  # output here, because the expression is evaluated\n    8\n\nIf the last thing you type consists of an assignment operation, there will be no\noutput displayed. This turns out to be true of Altair charts as well:\n\n.. altair-plot::\n    :output: none\n\n    import altair as alt\n    from altair.datasets import data\n    cars = data.cars.url\n\n    chart = alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N',\n    )\n\nThe last statement is an assignment, so there is no output and the chart is not\nshown. If you have a chart assigned to a variable, you need to end the cell with\nan evaluation of that variable:\n\n.. altair-plot::\n\n    chart = alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N',\n    )\n\n    chart\n\nAlternatively, you can evaluate a chart directly, and not assign it to a variable,\nin which case the object definition itself is the final statement and will be\ndisplayed as an output:\n\n.. altair-plot::\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N',\n    )\n\nPlot displays, but the content is empty\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nSometimes charts may appear, but the content is empty; for example:\n\n.. altair-plot::\n\n    import altair as alt\n\n    alt.Chart('nonexistent_file.csv').mark_line().encode(\n        x='x:Q',\n        y='y:Q',\n    )\n\nIf this is the case, it generally means one of two things:\n\n1. your data is specified by a URL that is invalid or inaccessible\n2. your encodings do not match the columns in your data source\n\nIn the above example, ``nonexistent_file.csv`` doesn't exist, and so the chart\ndoes not render (associated warnings will be visible in the `Javascript Console`_).\n\nSome other specific situations that may cause this:\n\nYou have an adblocker active\n  Charts that reference data by URL can sometimes trigger false positives in your\n  browser's adblocker. Check your browser's `Javascript Console`_ for errors, and\n  try disabling your adblocker.\n\nYou are loading data cross-domain\n  If you save a chart to HTML and open it using a ``file://`` url in your browser,\n  most browsers will not allow the javascript to load datasets from an ``http://``\n  domain. This is a security feature in your browser that cannot be disabled.\n  To view such charts locally, a good approach is to use a simple local HTTP server\n  like the one provided by Python::\n  \n      $ python -m http.server\n  \nYour encodings do not match your data\n  A similar blank chart results if you refer to a field that does not exist\n  in the data, either because of a typo in your field name, or because the\n  column contains special characters (see below).\n\nHere is an example of a mis-specified field name leading to a blank chart:\n\n.. altair-plot::\n\n   import pandas as pd\n\n   data = pd.DataFrame({'x': [1, 2, 3],\n                        'y': [3, 1, 4]})\n\n   alt.Chart(data).mark_point().encode(\n       x='x:Q',\n       y='y:Q',\n       color='color:Q'  # <-- this field does not exist in the data!\n     )\n  \nAltair does not check whether fields are valid, because there are many avenues\nby which a field can be specified within the full schema, and it is too difficult\nto account for all corner cases. Improving the user experience in this is a\npriority; see https://github.com/vega/vega-lite/issues/3576.\n\nEncodings with special characters\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nThe Vega-Lite grammar on which Altair is based allows for encoding names to use\nspecial characters to access nested properties (See Vega-Lite's Field_ documentation).\n\nThis can lead to errors in Altair when trying to use such columns in your chart.\nFor example, the following chart is invalid:\n\n.. altair-plot::\n\n   import pandas as pd\n   data = pd.DataFrame({'x.value': [1, 2, 3]})\n\n   alt.Chart(data).mark_point().encode(\n       x='x.value:Q',\n   )\n\nTo plot this data directly, you must escape the period in the field name:\n\n.. altair-plot::\n\n   import pandas as pd\n   data = pd.DataFrame({'x.value': [1, 2, 3]})\n\n   alt.Chart(data).mark_point().encode(\n       x=r'x\\.value:Q',\n   )\n\nIn general, it is better to avoid special characters like ``\".\"``, ``\"[\"``, and ``\"]\"``\nin your data sources where possible.\n\n.. _troubleshooting-jupyterlab:\n\nTroubleshooting in JupyterLab\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n  \n.. _jupyterlab-vega-lite-4-object:\n\nVegaLite 4/5 Object\n^^^^^^^^^^^^^^^^^^^\n*If you are using the Jupyter notebook rather than JupyterLab, then refer to*\n:ref:`notebook-vega-lite-4-object`\n\nIf you are using JupyterLab (not Jupyter notebook) and see an error message\nmentioning either ``VegaLite 4 object`` or ``VegaLite 5 object``, then this means\nthat you have enabled the ``mimetype`` renderer, but that your JupyterLab\nfrontend does not support the VegaLite 4 or 5 mimetype.\n\nThe easiest solution is to use the default renderer::\n\n    alt.renderers.enable('default')\n\nand rerun the cell with the chart.\n\nIf you would like to use the mimetype rendering with JupyterLab,\nupdate JupyterLab to the newest version with ``pip install -U jupyterlab``\nor ``conda update jupyterlab``.\n  \n.. _jupyterlab-vega-lite-3-object:\n\nVegaLite 3 Object\n^^^^^^^^^^^^^^^^^\n*If you are using the Jupyter notebook rather than JupyterLab, then refer to*\n:ref:`notebook-vega-lite-3-object`\n\nIf you are using JupyterLab (not Jupyter notebook) and see the following output::\n\n    <VegaLite 3 object>\n\nThis most likely means that you are using too old a version of JupyterLab.\nAltair 3.0 or later works best with JupyterLab version 1.0 or later;\ncheck the version with::\n\n   $ jupyter lab --version\n   1.2.0\n\nIf you have an older jupyterlab version, then use ``pip install -U jupyterlab``\nor ``conda update jupyterlab`` to update JupyterLab, depending on how you\nfirst installed it.\n\nJavaScript output is disabled in JupyterLab\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIf you are using JupyterLab and see the following output::\n\n    JavaScript output is disabled in JupyterLab\n\nit can mean one of two things is wrong\n\n1. You are using an old version of Altair. JupyterLab only works with Altair\n   version 2.0 or newer; you can check the altair version by executing the\n   following in a notebook code cell::\n\n       import altair as alt\n       alt.__version__\n\n   If the version is older than 2.0, then exit JupyterLab and follow the\n   installation instructions at :ref:`display-jupyterlab`.\n\n2. You have enabled the wrong renderer. JupyterLab works with the default\n   renderer, but if you have used ``alt.renderers.enable()`` to enable\n   another renderer, charts will no longer render correctly in JupyterLab.\n   You can check which renderer is active by running::\n\n       import altair as alt\n       print(alt.renderers.active)\n\n   JupyterLab rendering will work only if the active renderer is ``\"default\"``\n   or ``\"jupyterlab\"``. You can re-enable the default renderer by running::\n\n       import altair as alt\n       alt.renderers.enable('default')\n\n   (Note that the default renderer is enabled, well, by default, and so this\n   is only necessary if you've somewhere changed the renderer explicitly).\n\n.. _jupyterlab-textual-chart-representation:\n\nTextual Chart Representation\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n*If you are using the Notebook rather than the JupyterLab, then refer to*\n:ref:`notebook-textual-chart-representation`\n\nIf you are using JupyterLab and see a textual representation of the Chart object\nsimilar to this::\n\n    Chart({\n      data: 'https://vega.github.io/vega-datasets/data/cars.json',\n      encoding: FacetedEncoding({\n        x: X({\n          shorthand: 'Horsepower'\n        })\n      }),\n      mark: 'point'\n    })\n\nit probably means that you are using an older Jupyter kernel.\nYou can confirm this by running::\n\n   import IPython; IPython.__version__\n   # 6.2.1\n\nAltair will not display correctly if using a kernel with IPython version 4.X or older.\n\nThe easiest way to address this is to change your kernel: choose \"Kernel\"->\"Change Kernel\"\nand then use the first kernel that appears.\n\n.. _jupyterlab-notebook-backend:\n\nJavascript Error: require is not defined\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nIf you are using JupyterLab and see the error::\n\n    Javascript Error: require is not defined\n\nThis likely means that you have enabled the notebook renderer, which is not\nsupported in JupyterLab: that is, you have somewhere run\n``alt.renderers.enable('notebook')``.\nJupyterLab supports Altair's default renderer, which you can re-enable using::\n\n    alt.renderers.enable('default')\n\n\n.. _troubleshooting-notebook:\n\nTroubleshooting in Notebooks\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. _notebook-vega-lite-4-object:\n\nNotebook: VegaLite 4/5 object\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n*If you are using JupyterLab rather than the Jupyter notebook, then refer to*\n:ref:`jupyterlab-vega-lite-4-object`\n\nIf you are using Jupyter Notebook (not JupyterLab) and see an error message\nmentioning either ``VegaLite 4 object`` or ``VegaLite 5 object``, then this means\nthat you have enabled the ``mimetype`` renderer. The easiest solution is to use the default renderer::\n\n    alt.renderers.enable('default')\n\nand rerun the cell with the chart.\n\n\n.. _notebook-vega-lite-3-object:\n\nNotebook: VegaLite 3 object\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n*If you are using JupyterLab rather than the Jupyter notebook, then refer to*\n:ref:`jupyterlab-vega-lite-3-object`\n\nIf you are using the notebook (not JupyterLab) and see the the following output::\n\n    <Vegalite 3 object>\n\nit means that either:\n\n1. You have forgotten to enable the notebook renderer. As mentioned\n   in :ref:`display-notebook`, you need to install version 2.0 or newer\n   of the ``vega`` package and Jupyter extension, and then enable it using::\n\n       import altair as alt\n       alt.renderers.enable('notebook')\n\n   in order to render charts in the classic notebook.\n\n   If the above code gives an error::\n\n       NoSuchEntryPoint: No 'notebook' entry point found in group 'altair.vegalite.v2.renderer'\n\n   This means that you have not installed the vega package. If you see this error,\n   please make sure to follow the standard installation instructions at\n   :ref:`display-notebook`.\n\n2. You have too old a version of Jupyter notebook. Run::\n\n       $ jupyter notebook --version\n\n   and make certain you have version 5.3 or newer. If not, then update the notebook\n   using either ``pip install -U jupyter notebook`` or ``conda update jupyter notebook``\n   depending on how you first installed the packages.\n\nIf you have done the above steps and charts still do not render, it likely means\nthat you are using a different *Kernel* within your notebook. Switch to the kernel\nnamed *Python 2* if you are using Python 2, or *Python 3* if you are using Python 3.\n\n.. _notebook-textual-chart-representation:\n\nNotebook: Textual Chart Representation\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n*If you are using the Notebook rather than the JupyterLab, then refer to*\n:ref:`jupyterlab-textual-chart-representation`\n\n*If you are not using a Jupyter notebook environment, then refer to*\n:ref:`troubleshooting-non-notebook`.\n\nIf you are using Jupyter notebook and see a textual representation of the Chart\nobject similar to this::\n\n    Chart({\n      data: 'https://vega.github.io/vega-datasets/data/cars.json',\n      encoding: FacetedEncoding({\n        x: X({\n          shorthand: 'Horsepower'\n        })\n      }),\n      mark: 'point'\n    })\n\nit probably means that you are using an older Jupyter kernel.\nYou can confirm this by running::\n\n   import IPython; IPython.__version__\n   # 6.2.1\n\nAltair will not display correctly if using a kernel with IPython version 4.X or older.\n\nThe easiest way to address this is to change your kernel:\nchoose \"Kernel\"->\"Change Kernel\" and then select \"Python 2\" or \"Python 3\",\ndepending on what version of Python you used when installing Altair.\n\n\n.. _troubleshooting-non-notebook:\n\nTroubleshooting outside of Jupyter\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nIf you are using Altair outside of a Jupyter notebook environment (such as a\nPython or IPython terminal) charts will be displayed as a textual\nrepresentation. Rendering of Altair charts requires executing Javascript code,\nwhich your Python terminal cannot do natively.\n\nFor recommendations on how to use Altair outside of notebook environments,\nsee :ref:`display-general`.\n\n\n.. _`ECMAScript 6`: https://www.w3schools.com/js/js_es6.asp\n.. _`Javascript Console`: https://webmasters.stackexchange.com/questions/8525/how-do-i-open-the-javascript-console-in-different-browsers\n.. _Field: https://vega.github.io/vega-lite/docs/field.html\n\n.. _ipyvega: https://github.com/vega/ipyvega/\n.. _JupyterLab: http://jupyterlab.readthedocs.io/en/stable/\n.. _nteract: https://nteract.io\n.. _nbconvert: https://nbconvert.readthedocs.io/\n.. _nbviewer: https://nbviewer.jupyter.org/\n.. _Colab: https://colab.research.google.com\n.. _Hydrogen: https://github.com/nteract/hydrogen\n.. _Jupyter Notebook: https://jupyter-notebook.readthedocs.io/en/stable/\n.. _Vega-Lite: http://vega.github.io/vega-lite\n.. _Vega: https://vega.github.io/vega/\n.. _VSCode-Python: https://code.visualstudio.com/docs/python/python-tutorial\n.. _Zeppelin: https://zeppelin.apache.org/\n.. _Binder: https://mybinder.org/\n.. _IPython: https://ipython.org/\n.. _Spyder: https://www.spyder-ide.org/\n.. _IPython QtConsole: https://qtconsole.readthedocs.io/en/stable/\n.. _webbrowser module: https://docs.python.org/3/library/webbrowser.html#webbrowser.register\n.. _Olli: https://mitvis.github.io/olli/\n"
  },
  {
    "path": "doc/user_guide/encodings/channel_options.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-encoding-channel-options:\n\nChannel Options\n---------------\n\nSome encoding channels allow for additional options to be expressed.\nThese can control things like axis properties, scale properties, headers and\ntitles, binning parameters, aggregation, sorting, and many more.\n\nThe section titles below refer to the channels introduced in :ref:`user-guide-encoding-channels`\nand show the accepted options for these channels.\n\n\nX and Y\n~~~~~~~\n\nThe :class:`X` and :class:`Y` encodings accept the following options:\n\n.. altair-object-table:: altair.PositionFieldDef\n\nColor, Fill, and Stroke\n~~~~~~~~~~~~~~~~~~~~~~~\n\nThe :class:`Color`, :class:`Fill`, and :class:`Stroke`  encodings accept the following options:\n\n.. altair-object-table:: altair.FieldOrDatumDefWithConditionMarkPropFieldDefGradientstringnull\n\nShape\n~~~~~\n\nThe :class:`Shape` encoding accepts the following options:\n\n.. altair-object-table:: altair.FieldOrDatumDefWithConditionMarkPropFieldDefTypeForShapestringnull\n\nOrder\n~~~~~\n\nThe :class:`Order` encoding accepts the following options:\n\n.. altair-object-table:: altair.OrderFieldDef\n\nAngle, FillOpacity, Opacity, Size, StrokeOpacity, and StrokeWidth\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe :class:`Angle`, :class:`FillOpacity`, :class:`Opacity`, :class:`Size`, :class:`StrokeOpacity`,\nand :class:`StrokeWidth` encodings accept the following options:\n\n.. altair-object-table:: altair.FieldOrDatumDefWithConditionMarkPropFieldDefnumber\n\nStrokeDash\n~~~~~~~~~~\n\nThe :class:`StrokeDash` encoding accepts the following options:\n\n.. altair-object-table:: altair.FieldOrDatumDefWithConditionMarkPropFieldDefnumberArray\n\nRow and Column\n~~~~~~~~~~~~~~\n\nThe :class:`Row` and :class:`Column`, and :class:`Facet` encodings accept the following options:\n\n.. altair-object-table:: altair.RowColumnEncodingFieldDef\n\nFacet\n~~~~~\n\nThe :class:`Facet` encoding accepts the following options:\n\n.. altair-object-table:: altair.FacetEncodingFieldDef\n\nText\n~~~~\n\nThe :class:`Text` encoding accepts the following options:\n\n.. altair-object-table:: altair.FieldOrDatumDefWithConditionStringFieldDefText\n\nHref, Tooltip, Url\n~~~~~~~~~~~~~~~~~~\n\nThe :class:`Href`, :class:`Tooltip`, and :class:`Url` encodings accept the following options:\n\n.. altair-object-table:: altair.StringFieldDefWithCondition\n\nDetail\n~~~~~~\n\nThe :class:`Detail` encoding accepts the following options:\n\n.. altair-object-table:: altair.FieldDefWithoutScale\n\nLatitude and Longitude\n~~~~~~~~~~~~~~~~~~~~~~\n\nThe :class:`Latitude` and :class:`Longitude` encodings accept the following options:\n\n.. altair-object-table:: altair.LatLongFieldDef\n\nRadius and Theta\n~~~~~~~~~~~~~~~~\n\nThe :class:`Radius` and :class:`Theta` encodings accept the following options:\n\n.. altair-object-table:: altair.PositionFieldDefBase\n\nLatitude2, Longitude2, Radius2, Theta2, X2, Y2, XError, YError, XError2, and YError2\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe :class:`Latitude2`, :class:`Longitude2`, :class:`Radius2`, :class:`Theta2`, :class:`X2`, :class:`Y2`, :class:`XError`, :class:`YError`, :class:`XError2`, and :class:`YError2` encodings accept the following options:\n\n.. altair-object-table:: altair.SecondaryFieldDef\n\n"
  },
  {
    "path": "doc/user_guide/encodings/channels.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-encoding-channels:\n\nChannels\n--------\n\nAltair provides a number of encoding channels that can be useful in different\ncircumstances. The following sections summarize them:\n\nPosition\n~~~~~~~~\n\n==========  ===================  =================================  ===================================\nChannel     Altair Class         Description                        Example\n==========  ===================  =================================  ===================================\nx           :class:`X`           The x-axis value                   :ref:`gallery_scatter_tooltips`\ny           :class:`Y`           The y-axis value                   :ref:`gallery_scatter_tooltips`\nx2          :class:`X2`          Second x value for ranges          :ref:`gallery_gantt_chart`\ny2          :class:`Y2`          Second y value for ranges          :ref:`gallery_candlestick_chart`\nlongitude   :class:`Longitude`   Longitude for geo charts           :ref:`gallery_point_map`\nlatitude    :class:`Latitude`    Latitude for geo charts            :ref:`gallery_point_map`\nlongitude2  :class:`Longitude2`  Second longitude value for ranges  :ref:`gallery_airport_connections`\nlatitude2   :class:`Latitude2`   Second latitude value for ranges   :ref:`gallery_airport_connections`\nxError      :class:`XError`      The x-axis error value             N/A\nyError      :class:`YError`      The y-axis error value             N/A\nxError2     :class:`XError2`     The second x-axis error value      N/A\nyError2     :class:`YError2`     The second y-axis error value      N/A\nxOffset     :class:`XOffset`     Offset to the x position           :ref:`gallery_grouped_bar_chart2`\nyOffset     :class:`YOffset`     Offset to the y position           :ref:`gallery_strip_plot_jitter`\ntheta       :class:`Theta`       The start arc angle                :ref:`gallery_radial_chart`\ntheta2      :class:`Theta2`      The end arc angle (radian)         :ref:`gallery_pacman_chart`\n==========  ===================  =================================  ===================================\n\nMark Property\n~~~~~~~~~~~~~\n\n=============  ======================  ==============================  =========================================\nChannel        Altair Class            Description                     Example\n=============  ======================  ==============================  =========================================\nangle          :class:`Angle`          The angle of the mark           :ref:`gallery_wind_vector_map`\ncolor          :class:`Color`          The color of the mark           :ref:`gallery_simple_heatmap`\nfill           :class:`Fill`           The fill for the mark           :ref:`gallery_ridgeline_plot`\nfillOpacity    :class:`FillOpacity`    The opacity of the mark's fill  N/A\nopacity        :class:`Opacity`        The opacity of the mark         :ref:`gallery_horizon_graph`\nradius         :class:`Radius`         The radius or the mark          :ref:`gallery_radial_chart`\nshape          :class:`Shape`          The shape of the mark           :ref:`gallery_us_incomebrackets_by_state_facet`\nsize           :class:`Size`           The size of the mark            :ref:`gallery_table_bubble_plot_github`\nstroke         :class:`Stroke`         The stroke of the mark          N/A\nstrokeDash     :class:`StrokeDash`     The stroke dash style           :ref:`gallery_multi_series_line`\nstrokeOpacity  :class:`StrokeOpacity`  The opacity of the line         N/A\nstrokeWidth    :class:`StrokeWidth`    The width of the line           N/A\n=============  ======================  ==============================  =========================================\n\nText and Tooltip\n^^^^^^^^^^^^^^^^\n\n=======  ================  ========================  =========================================\nChannel  Altair Class      Description               Example\n=======  ================  ========================  =========================================\ntext     :class:`Text`     Text to use for the mark  :ref:`gallery_scatter_with_labels`\ntooltip  :class:`Tooltip`  The tooltip value         :ref:`gallery_scatter_tooltips`\n=======  ================  ========================  =========================================\n\n.. _hyperlink-channel:\n\nHyperlink\n~~~~~~~~~\n\n=======  ================  ========================  =========================================\nChannel  Altair Class      Description               Example\n=======  ================  ========================  =========================================\nhref     :class:`Href`     Hyperlink for  points     :ref:`gallery_scatter_href`\n=======  ================  ========================  =========================================\n\nDetail\n~~~~~~\n\nGrouping data is an important operation in data visualization. For line and area marks,\nmapping an unaggregated data field to any\nnon-position channel will group the lines and stacked areas by that field.\nFor aggregated plots, all unaggregated fields encoded are used as grouping fields\nin the aggregation (similar to fields in ``GROUP BY`` in SQL).\n\nThe ``detail`` channel specifies an additional grouping field (or fields) for grouping\ndata without mapping the field(s) to any visual properties.\n\n=======  ================  ===============================  =========================================\nChannel  Altair Class      Description                      Example\n=======  ================  ===============================  =========================================\ndetail   :class:`Detail`   Additional property to group by  :ref:`gallery_ranged_dot_plot`\n=======  ================  ===============================  =========================================\n\nFor example here is a line chart showing stock prices of 5 tech companies over time.\nWe map the ``symbol`` variable to ``detail`` to use them to group lines.\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks()\n    alt.Chart(source).mark_line().encode(\n        x=\"date:T\",\n        y=\"price:Q\",\n        detail=\"symbol:N\"\n    )\n\n\nOrder\n~~~~~\n\nThe ``order`` option and :class:`Order` channel can sort how marks are drawn on the chart.\n\nFor stacked marks, this controls the order of components of the stack. Here, the elements of each bar are sorted alphabetically by the name of the nominal data in the color channel.\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    barley = data.barley()\n\n    alt.Chart(barley).mark_bar().encode(\n        x='variety:N',\n        y='sum(yield):Q',\n        color='site:N',\n        order=alt.Order(\"site\").sort(\"ascending\")\n    )\n\nThe order can be reversed by changing the sort option to `descending`.\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    barley = data.barley()\n\n    alt.Chart(barley).mark_bar().encode(\n        x='variety:N',\n        y='sum(yield):Q',\n        color='site:N',\n        order=alt.Order(\"site\").sort(\"descending\")\n    )\n\nThe same approach works for other mark types, like stacked areas charts.\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    barley = data.barley()\n\n    alt.Chart(barley).mark_area().encode(\n        x='variety:N',\n        y='sum(yield):Q',\n        color='site:N',\n        order=alt.Order(\"site\").sort(\"ascending\")\n    )\n\nNote that unlike the ``sort`` parameter to positional encoding channels,\nthe :class:`Order` channel cannot take a list of values to sort by\nand is not automatically sorted when an ordered pandas categorical column is passed.\nIf we want to sort stacked segments in a custom order, we can `follow the approach in this issue comment <https://github.com/vega/altair/issues/245#issuecomment-748443434>`_, although there might be edge cases where this is not fully supported. This workaround also makes the order of the segments align with the order that the colors shows up in a legend that uses custom sorting for the color domain.\n\nFor line marks, the :class:`Order` channel encodes the order in which data points are connected. This can be useful for creating a scatter plot that draws lines between the dots using a different field than the x and y axes.\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    driving = data.driving()\n\n    alt.Chart(driving).mark_line(point=True).encode(\n        alt.X('miles').scale(zero=False),\n        alt.Y('gas').scale(zero=False),\n        order='year'\n    )\n\nFacet\n~~~~~\nFor more information, see :ref:`facet-chart`.\n\n=======  ================  ===============================================  =============================================\nChannel  Altair Class      Description                                      Example\n=======  ================  ===============================================  =============================================\ncolumn   :class:`Column`   The column of a faceted plot                     :ref:`gallery_scatter_faceted`\nrow      :class:`Row`      The row of a faceted plot                        :ref:`gallery_beckers_barley_facet`\nfacet    :class:`Facet`    The row and/or column of a general faceted plot  :ref:`gallery_us_population_over_time_facet`\n=======  ================  ===============================================  =============================================\n"
  },
  {
    "path": "doc/user_guide/encodings/index.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-encoding:\n\nEncodings\n---------\n\nThe key to creating meaningful visualizations is to map *properties of the data*\nto *visual properties* in order to effectively communicate information.\nIn Altair, this mapping of visual properties to data columns is referred to\nas an **encoding**, and is most often expressed through the :meth:`Chart.encode`\nmethod.\n\nFor example, here we will visualize the cars dataset using four of the available\n**encoding channels** (see :ref:`user-guide-encoding-channels` for details): ``x`` (the x-axis value), ``y`` (the y-axis value),\n``color`` (the color of the marker), and ``shape`` (the shape of the point marker):\n\n.. altair-plot::\n\n   import altair as alt\n   from altair.datasets import data\n\n\n   cars = data.cars()\n\n   alt.Chart(cars).mark_point().encode(\n       x='Horsepower',\n       y='Miles_per_Gallon',\n       color='Origin',\n       shape='Origin'\n   )\n\nChannel Options\n~~~~~~~~~~~~~~~\n\nEach encoding channel accepts a number of **channel options** (see :ref:`user-guide-encoding-channel-options` for details) which can be used to further configure\nthe chart.\nAltair 5.0 introduced a method-based syntax for setting channel options as a more convenient alternative to the traditional attribute-based syntax described in :ref:`attribute-based-attribute-setting` (but you can still use the attribute-based syntax if you prefer).\n\n.. note::\n\n    With the release of Altair 5,\n    the documentation was updated to prefer the method-based syntax.\n    The gallery examples still include the attribute-based syntax\n    in addition to the method-based syntax.\n\n.. _method-based-attribute-setting:\n\nMethod-Based Syntax\n^^^^^^^^^^^^^^^^^^^\n\nThe method-based syntax replaces *keyword arguments* with *methods*.\nFor example, an ``axis`` option of the ``x`` channel encoding would traditionally be set using the ``axis`` keyword argument: ``x=alt.X('Horsepower', axis=alt.Axis(tickMinStep=50))``. To define the same :class:`X` object using the method-based syntax, we can instead use the more succinct ``x=alt.X('Horsepower').axis(tickMinStep=50)``.\n\nThe same technique works with all encoding channels and all channel options.  For example, notice how we make the analogous change with respect to the ``title`` option of the ``y`` channel. The following produces the same chart as the previous example.\n\n.. altair-plot::\n    alt.Chart(cars).mark_point().encode(\n        alt.X('Horsepower').axis(tickMinStep=50),\n        alt.Y('Miles_per_Gallon').title('Miles per Gallon'),\n        color='Origin',\n        shape='Origin'\n    )\n\nThese option-setter methods can also be chained together, as in the following, in which we set the ``axis``, ``bin``, and ``scale`` options of the ``x`` channel by using the corresponding methods (``axis``, ``bin``, and ``scale``).  We can break the ``x`` definition over multiple lines to improve readability.  (This is valid syntax because of the enclosing parentheses from ``encode``.)\n\n.. altair-plot::\n    alt.Chart(cars).mark_point().encode(\n        alt.X('Horsepower')\n            .axis(ticks=False)\n            .bin(maxbins=10)\n            .scale(domain=(30,300), reverse=True),\n        alt.Y('Miles_per_Gallon').title('Miles per Gallon'),\n        color='Origin',\n        shape='Origin'\n    )\n\n\n.. _attribute-based-attribute-setting:\n\nAttribute-Based Syntax\n^^^^^^^^^^^^^^^^^^^^^^\n\nThe two examples from the section above\nwould look as follows with the traditional attribute-based syntax:\n\n.. altair-plot::\n    alt.Chart(cars).mark_point().encode(\n        alt.X('Horsepower', axis=alt.Axis(tickMinStep=50)),\n        alt.Y('Miles_per_Gallon', title=\"Miles per Gallon\"),\n        color='Origin',\n        shape='Origin'\n    )\n\nFor specs making extensive use of channel options,\nthe attribute-based syntax can become quite verbose:\n\n.. altair-plot::\n    alt.Chart(cars).mark_point().encode(\n        alt.X(\n            'Horsepower',\n            axis=alt.Axis(ticks=False),\n            bin=alt.Bin(maxbins=10),\n            scale=alt.Scale(domain=(30,300), reverse=True)\n        ),\n        alt.Y('Miles_per_Gallon', title='Miles per Gallon'),\n        color='Origin',\n        shape='Origin'\n    )\n\n.. _encoding-data-types:\n\nEncoding Data Types\n~~~~~~~~~~~~~~~~~~~\nThe details of any mapping depend on the *type* of the data. Altair recognizes\nfive main data types:\n\n============  ==============  ================================================\nData Type     Shorthand Code  Description\n============  ==============  ================================================\nquantitative  ``Q``           a continuous real-valued quantity\nordinal       ``O``           a discrete ordered quantity\nnominal       ``N``           a discrete unordered category\ntemporal      ``T``           a time or date value\ngeojson       ``G``           a geographic shape\n============  ==============  ================================================\n\nFor data specified as a DataFrame, Altair can automatically determine the\ncorrect data type for each encoding, and creates appropriate scales and\nlegends to represent the data.\n\nIf types are not specified for data input as a DataFrame, Altair defaults to\n``quantitative`` for any numeric data, ``temporal`` for date/time data, and\n``nominal`` for string data, but be aware that these defaults are by no means\nalways the correct choice!\n\nThe types can either be expressed in a long-form using the channel encoding\nclasses such as :class:`X` and :class:`Y`, or in short-form using the\n:ref:`Shorthand Syntax <shorthand-description>` discussed below.\nFor example, the following two methods of specifying the type will lead to\nidentical plots:\n\n.. altair-plot::\n\n   alt.Chart(cars).mark_point().encode(\n       x='Acceleration:Q',\n       y='Miles_per_Gallon:Q',\n       color='Origin:N'\n   )\n\n.. altair-plot::\n\n  alt.Chart(cars).mark_point().encode(\n      alt.X('Acceleration', type='quantitative'),\n      alt.Y('Miles_per_Gallon', type='quantitative'),\n      alt.Color('Origin', type='nominal')\n  )\n\nThe shorthand form, ``x=\"name:Q\"``, is useful for its lack of boilerplate\nwhen doing quick data explorations. The long-form,\n``alt.X('name', type='quantitative')``, is useful when doing more fine-tuned\nadjustments to the encoding using channel options such as binning, axis, and scale.\n\nSpecifying the correct type for your data is important, as it affects the\nway Altair represents your encoding in the resulting plot.\n\n.. _type-legend-scale:\n\nEffect of Data Type on Color Scales\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAs an example of this, here we will represent the same data three different ways,\nwith the color encoded as a *quantitative*, *ordinal*, and *nominal* type,\nusing three horizontally-concatenated charts (see :ref:`hconcat-chart`):\n\n.. altair-plot::\n\n   base = alt.Chart(cars).mark_point().encode(\n       x='Horsepower:Q',\n       y='Miles_per_Gallon:Q',\n   ).properties(\n       width=140,\n       height=140\n   )\n\n   alt.hconcat(\n      base.encode(color='Cylinders:Q').properties(title='quantitative'),\n      base.encode(color='Cylinders:O').properties(title='ordinal'),\n      base.encode(color='Cylinders:N').properties(title='nominal'),\n   )\n\nThe type specification influences the way Altair, via Vega-Lite, decides on\nthe color scale to represent the value, and influences whether a discrete\nor continuous legend is used.\n\n.. _type-axis-scale:\n\nEffect of Data Type on Axis Scales\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nSimilarly, for x and y axis encodings, the type used for the data will affect\nthe scales used and the characteristics of the mark. For example, here is the\ndifference between a ``ordinal``, ``quantitative``, and ``temporal`` scale for a column\nthat contains integers specifying a year:\n\n.. altair-plot::\n\n    pop = data.population()\n\n    base = alt.Chart(pop).mark_bar().encode(\n        alt.Y('mean(people):Q').title('Total population')\n    ).properties(\n        width=140,\n        height=140\n    )\n\n    alt.hconcat(\n        base.encode(x='year:O').properties(title='ordinal'),\n        base.encode(x='year:Q').properties(title='quantitative'),\n        base.encode(x='year:T').properties(title='temporal')\n    )\n\nBecause values on quantitative and temporal scales do not have an inherent width, the bars do not\nfill the entire space between the values.\nThese scales clearly show the missing year of data that was not immediately\napparent when we treated the years as ordinal data,\nbut the axis formatting is undesirable in both cases.\n\nTo plot four digit integers as years with proper axis formatting,\ni.e. without thousands separator,\nwe recommend converting the integers to strings first,\nand the specifying a temporal data type in Altair.\nWhile it is also possible to change the axis format with ``.axis(format='i')``,\nit is preferred to specify the appropriate data type to Altair.\n\n.. altair-plot::\n\n    pop['year'] = pop['year'].astype(str)\n\n    base.mark_bar().encode(x='year:T').properties(title='temporal')\n\nThis kind of behavior is sometimes surprising to new users, but it emphasizes\nthe importance of thinking carefully about your data types when visualizing\ndata: a visual encoding that is suitable for categorical data may not be\nsuitable for quantitative data or temporal data, and vice versa.\n\n.. _shorthand-description:\n\nEncoding Shorthands\n~~~~~~~~~~~~~~~~~~~\n\nFor convenience, Altair allows the specification of the variable name along\nwith the aggregate and type within a simple shorthand string syntax.\nThis makes use of the type shorthand codes listed in :ref:`encoding-data-types`\nas well as the aggregate names listed in :ref:`agg-func-table`.\nThe following table shows examples of the shorthand specification alongside\nthe long-form equivalent:\n\n===================  =======================================================\nShorthand            Equivalent long-form\n===================  =======================================================\n``x='name'``         ``alt.X('name')``\n``x='name:Q'``       ``alt.X('name', type='quantitative')``\n``x='sum(name)'``    ``alt.X('name', aggregate='sum')``\n``x='sum(name):Q'``  ``alt.X('name', aggregate='sum', type='quantitative')``\n``x='count():Q'``    ``alt.X(aggregate='count', type='quantitative')``\n===================  =======================================================\n\nEscaping special characters in column names\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSeeing that Altair uses ``:`` as a special character\nto indicate the encoding data type,\nyou might wonder what happens\nwhen the column name in your data includes a colon.\nWhen this is the case\nyou will need to either rename the column or escape the colon.\nThis is also true for other special characters\nsuch as ``.`` and ``[]`` which are used to access nested attributes\nin some data structures.\n\nThe recommended thing to do when you have special characters in a column name\nis to rename your columns.\nFor example, in pandas you could replace ``:`` with ``_``\nvia ``df.rename(columns=lambda x: x.replace(':', '_'))``.\nIf you don't want to rename your columns\nyou will need to escape the special characters using a raw string with a backslash:\n\n.. altair-plot::\n\n    import pandas as pd\n\n    source = pd.DataFrame({\n        'col:colon': [1, 2, 3],\n        'col.period': ['A', 'B', 'C'],\n        'col[brackets]': range(3),\n    })\n\n    alt.Chart(source).mark_bar().encode(\n        x=r'col\\:colon',\n        # Remove the backslash in the title\n        y=alt.Y(r'col\\.period').title('col.period'),\n        # Specify the data type\n        color=r'col\\[brackets\\]:N',\n    )\n\nAs can be seen above,\nindicating the data type is optional\njust as for columns without escaped characters.\nNote that the axes titles include the backslashes by default\nand you will need to manually set the title strings to remove them.\nIf you are using the long form syntax for encodings,\nyou do not need to escape colons as the type is explicit,\ne.g. ``alt.X(field='col:colon', type='quantitative')``\n(but periods and brackets still need to be escaped\nin the long form syntax unless they are used to index nested data structures).\n\n\n.. _encoding-aggregates:\n\nBinning and Aggregation\n~~~~~~~~~~~~~~~~~~~~~~~\n\nBeyond simple channel encodings, Altair's visualizations are built on the\nconcept of the database-style grouping and aggregation; that is, the\n`split-apply-combine <https://www.jstatsoft.org/article/view/v040i01>`_\nabstraction that underpins many data analysis approaches.\n\nFor example, building a histogram from a one-dimensional dataset involves\nsplitting data based on the bin it falls in, aggregating the results within\neach bin using a *count* of the data, and then combining the results into\na final figure.\n\nIn Altair, such an operation looks like this:\n\n.. altair-plot::\n\n   alt.Chart(cars).mark_bar().encode(\n       alt.X('Horsepower').bin(),\n       y='count()'\n       # could also use alt.Y(aggregate='count', type='quantitative')\n   )\n\nNotice here we use the shorthand version of expressing an encoding channel\n(see :ref:`shorthand-description`) with the ``count`` aggregation,\nwhich is the one aggregation that does not require a field to be\nspecified.\n\nSimilarly, we can create a two-dimensional histogram using, for example, the\nsize of points to indicate counts within the grid (sometimes called\na \"Bubble Plot\"):\n\n.. altair-plot::\n\n   alt.Chart(cars).mark_point().encode(\n       alt.X('Horsepower').bin(),\n       alt.Y('Miles_per_Gallon').bin(),\n       size='count()',\n   )\n\nThere is no need, however, to limit aggregations to counts alone. For example,\nwe could similarly create a plot where the color of each point\nrepresents the mean of a third quantity, such as acceleration:\n\n.. altair-plot::\n\n   alt.Chart(cars).mark_circle().encode(\n       alt.X('Horsepower').bin(),\n       alt.Y('Miles_per_Gallon').bin(),\n       size='count()',\n       color='mean(Acceleration):Q'\n   )\n\nFor a full list of available aggregates, see :ref:`agg-func-table`.\n\n\nSort Option\n~~~~~~~~~~~\n\nSome channels accept a  :class:`sort` option which determines the\norder of the scale being used for the channel.\nBy default the scale is sorted in ascending alphabetical order,\nunless an `ordered pandas categorical column <https://pandas.pydata.org/docs/user_guide/categorical.html?highlight=categorical#sorting-and-order>`_ is passed (without an explicit type specification)\nin which case Altair will use the column's inherent order to sort the scale.\nThere are a number of different\noptions available to change the sort order:\n\n- ``sort='ascending'`` (Default) will sort the field's value in ascending order.\n  For string data, this uses standard alphabetical order.\n- ``sort='descending'`` will sort the field's value in descending order\n- Passing the name of an encoding channel to ``sort``, such as ``\"x\"`` or ``\"y\"``, allows for\n  sorting by that channel. An optional minus prefix can be used for a descending\n  sort. For example ``sort='-x'`` would sort by the x channel in descending order.\n- Passing a `Sequence <https://docs.python.org/3/library/stdtypes.html#sequence-types-list-tuple-range>`_ to ``sort`` allows you to explicitly set the order in which\n  you would like the encoding to appear\n- Using the ``field`` and ``op`` parameters to specify a field and aggregation operation to sort by.\n\nHere is an example of applying these five different sort approaches on the\nx-axis, using the barley dataset:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    barley = data.barley()\n\n    base = alt.Chart(barley).mark_bar().encode(\n        y='mean(yield):Q',\n        color=alt.Color('mean(yield):Q').legend(None)\n    ).properties(width=100, height=100)\n\n    # Sort x in ascending order\n    ascending = base.encode(\n        alt.X('site:N').sort('ascending')\n    ).properties(\n        title='Ascending'\n    )\n\n    # Sort x in descending order\n    descending = base.encode(\n        alt.X('site:N').sort('descending')\n    ).properties(\n        title='Descending'\n    )\n\n    # Sort x in an explicitly-specified order\n    explicit = base.encode(\n        alt.X('site:N').sort(\n            ['Duluth', 'Grand Rapids', 'Morris', 'University Farm', 'Waseca', 'Crookston']\n        )\n    ).properties(\n        title='Explicit'\n    )\n\n    # Sort according to encoding channel\n    sortchannel = base.encode(\n        alt.X('site:N').sort('y')\n    ).properties(\n        title='By Channel'\n    )\n\n    # Sort according to another field\n    sortfield = base.encode(\n        alt.X('site:N').sort(field='yield', op='mean')\n    ).properties(\n        title='By Yield'\n    )\n\n    alt.concat(\n        ascending,\n        descending,\n        explicit,\n        sortchannel,\n        sortfield,\n        columns=3\n    )\n\nThe last two charts are the same because the default aggregation\n(see :ref:`agg-func-table`) is ``mean``. To highlight the\ndifference between sorting via channel and sorting via field consider the\nfollowing example where we don't aggregate the data\nand use the `op` parameter to specify a different aggregation than `mean`\nto use when sorting:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    barley = data.barley()\n    base = alt.Chart(barley).mark_point().encode(\n        y='yield:Q',\n    ).properties(width=200)\n\n    # Sort according to encoding channel\n    sortchannel = base.encode(\n        alt.X('site:N').sort('y')\n    ).properties(\n        title='By Channel'\n    )\n\n    # Sort according to another field\n    sortfield = base.encode(\n        alt.X('site:N').sort(field='yield', op='max')\n    ).properties(\n        title='By Max Yield'\n    )\n    sortchannel | sortfield\n\n\nSorting Legends\n^^^^^^^^^^^^^^^\n\nJust as how the above examples show sorting of axes by specifying ``sort`` in the\n:class:`X` and :class:`Y` encodings, legends can be sorted by specifying\n``sort`` in the encoding used in the legend (e.g. color, shape, size, etc).\nBelow we show an example using the :class:`Color` encoding:\n\n.. altair-plot::\n\n    alt.Chart(barley).mark_bar().encode(\n        alt.X('mean(yield):Q'),\n        alt.Y('site:N').sort('x'),\n        alt.Color('site:N').sort([\n            'Morris', 'Duluth', 'Grand Rapids', 'University Farm', 'Waseca', 'Crookston'\n        ])\n    )\n\nHere the y-axis is sorted based on the x-values, while the color legend is\nsorted in the specified order, beginning with ``'Morris'``.\n\nIn the next example,\nspecifying ``field``, ``op`` and ``order``,\nsorts the legend sorted based on a chosen data field\nand operation.\n\n.. altair-plot::\n\n    alt.Chart(barley).mark_bar().encode(\n        alt.X('mean(yield):Q'),\n        alt.Y('site:N').sort('x'),\n        color=alt.Color('site').sort(field='yield', op='max', order='ascending')\n    )\n\nDatum and Value\n~~~~~~~~~~~~~~~\n\nSo far we always mapped an encoding channel to a column in our dataset. However, sometimes\nit is also useful to map to a single constant value. In Altair, you can do this with\n\n* ``datum``, which encodes a constant domain value via a scale using the same units as the underlying data\n* ``value``, which encodes a constant visual value, using absolute units such as an exact position in pixels, the name or RGB value of a color, the name of shape,  etc\n\n``datum`` is particularly useful for annotating a specific data value. \nFor example, you can use it with a rule mark to highlight a \nthreshold value (e.g., 300 dollars stock price).\n\n.. altair-plot::\n    \n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks()\n    base = alt.Chart(source)\n    lines = base.mark_line().encode(\n        x=\"date:T\",\n        y=\"price:Q\",\n        color=\"symbol:N\"\n    )\n    rule = base.mark_rule(strokeDash=[2, 2]).encode(\n        y=alt.datum(300)\n    )\n\n    lines + rule\n\nIf we instead used ``alt.value`` in this example, we would position the rule 300 pixels from the top of the chart border rather than at the 300 dollars position. Since the default charts height is 300 pixels, this will show the dotted line just on top of the x-axis -line:\n\n.. altair-plot::\n\n    rule = base.mark_rule(strokeDash=[2, 2]).encode(\n        y=alt.value(300)\n    )\n\n    lines + rule\n\nIf we want to use ``datum``  to highlight a certain year on the x-axis,\nwe can't simply type in the year as an integer,\nbut instead need to use ``datum`` together with :class:`DateTime`.\nHere we also set the color for the rule to the same one as the line for the symbol ``MSFT``\nwith ``alt.datum(\"MSFT\")``.\n\n.. altair-plot::\n    \n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks()\n    base = alt.Chart(source)\n    lines = base.mark_line().encode(\n        x=\"date:T\",\n        y=\"price:Q\",\n        color=\"symbol:N\"\n    )\n    rule = base.mark_rule(strokeDash=[2, 2]).encode(\n        x=alt.datum(alt.DateTime(year=2006)),\n        color=alt.datum(\"MSFT\")\n    )\n\n    lines + rule\n\n\nSimilar to when mapping to a data column, when using ``datum`` different encoding channels \nmay support ``band``, ``scale``, ``axis``, ``legend``, ``format``, or ``condition`` properties.\nHowever, data transforms (e.g. ``aggregate``, ``bin``, ``timeUnit``, ``sort``) cannot be applied.\n\nExpanding on the example above, if you would want to color the ``rule`` mark regardless of \nthe color scale used for the lines, you can use ``value``, e.g. ``alt.value(\"red\")``:\n\n.. altair-plot::\n    \n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks()\n    base = alt.Chart(source)\n    lines = base.mark_line().encode(\n        x=\"date:T\",\n        y=\"price:Q\",\n        color=\"symbol:N\"\n    )\n    rule = base.mark_rule(strokeDash=[2, 2]).encode(\n        x=alt.datum(alt.DateTime(year=2006)),\n        color=alt.value(\"red\")\n    )\n\n    lines + rule\n\nOne caution is that ``alt.datum`` and ``alt.value`` do not possess the (newly introduced as of Altair 5.0) method-based syntax to set channel options described in :ref:`method-based-attribute-setting`. For example, if you are using ``alt.datum`` for the ``y`` channel encoding and you wish to use an option setter method (e.g., ``scale``), then you can use :class:`YDatum` instead.  Here is a simple example.\n\n.. altair-plot::\n    \n    import altair as alt\n\n    alt.Chart().mark_bar().encode(\n        y=alt.YDatum(220).scale(domain=(0,500)),\n        color=alt.value(\"darkkhaki\")\n    )\n\nIf you were to instead use ``y=alt.datum(220).scale(domain=(0,500))``, an ``AttributeError`` would be raised, due to the fact that ``alt.datum(220)`` simply returns a Python dictionary and does not possess a ``scale`` attribute.  If you insisted on producing the preceding example using ``alt.datum``, one option would be to use ``y=alt.datum(220, scale={\"domain\": (0,500)})``.  Nevertheless, the ``alt.YDatum`` approach is strongly preferred to this \"by-hand\" approach of supplying a dictionary to ``scale``.  As one benefit, tab-completions are available using the ``alt.YDatum`` approach.  For example, typing ``alt.YDatum(220).scale(do`` and hitting ``tab`` in an environment such as JupyterLab will offer ``domain``, ``domainMax``, ``domainMid``, and ``domainMin`` as possible completions.\n\n.. toctree::\n   :hidden:\n\n   channels\n   channel_options\n"
  },
  {
    "path": "doc/user_guide/interactions/bindings_widgets.rst",
    "content": ".. currentmodule:: altair\n\n.. _binding-parameters:\n\nBindings & Widgets\n~~~~~~~~~~~~~~~~~~\n\nWith an understanding of the parameter types and conditions, you can now bind parameters to chart elements (e.g. legends) and widgets (e.g. drop-downs and sliders). This is done using the ``bind`` option inside ``param`` and ``selection``. As specified by `the Vega-lite binding docs <https://vega.github.io/vega-lite/docs/bind.html#input-element-binding>`_, there are three types of bindings available:\n\n1. Point and interval selections can be used for data-driven interactive elements, such as highlighting and filtering based on values in the data.\n2. Sliders and checkboxes can be used for logic-driven interactive elements, such as highlighting and filtering based on the absolute values in these widgets.\n3. Interval selections can be bound to a scale, such as zooming in on a map.\n\nThe following table summarizes the input elements that are supported in Vega-Lite:\n\n========================= ===========================================================================  ===============================================\nInput Element             Description                                                                   Example\n========================= ===========================================================================  ===============================================\n:class:`binding_checkbox` Renders as checkboxes allowing for multiple selections of items.                    :ref:`gallery_multiple_interactions`\n:class:`binding_radio`    Radio buttons that force only a single selection                                    :ref:`gallery_multiple_interactions`\n:class:`binding_select`   Drop down box for selecting a single item from a list                               :ref:`gallery_multiple_interactions`\n:class:`binding_range`    Shown as a slider to allow for selection along a scale.                             :ref:`gallery_us_population_over_time`\n:class:`binding`          General method that supports many HTML input elements\n========================= ===========================================================================  ===============================================\n\nWidget Binding\n^^^^^^^^^^^^^^\n\nWidgets are HTML input elements, such as drop-downs, sliders, radio buttons, and search boxes.\nThere are a three strategies for how variable and selection parameters\ncan be used together with widgets:\ndata-driven lookups, data-driven comparisons, and logic-driven comparisons.\n\nData-Driven Lookups\n-------------------\n\nData-driven lookups use the active value(s) of the widget\ntogether with a ``selection`` parameter\nto look up points with matching values in the chart's dataset.\nFor example,\nwe can establish a binding between an input widget and a point selection\nto filter the data as in the example below\nwhere a drop-down is used to highlight cars of a specific ``Origin``:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    cars = data.cars.url\n\n    input_dropdown = alt.binding_select(options=['Europe', 'Japan', 'USA'], name='Region ')\n    selection = alt.selection_point(fields=['Origin'], bind=input_dropdown)\n    color = (\n        alt.when(selection)\n        .then(alt.Color(\"Origin:N\").legend(None))\n        .otherwise(alt.value(\"lightgray\"))\n    )\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color=color,\n    ).add_params(\n        selection\n    )\n\nNote that although it looks like a value is selected in the dropdown from the start,\nwe need to set `value=` to actually start out with an initial selection in the chart.\nWe did this previously with variable parameters\nand selection parameters follow the same pattern as you will see further down\nin the :ref:`encoding-channel-binding` section.\n\nAs you can see above,\nwe are still using :ref:`conditions <conditions>` to make the chart respond to the selection,\njust as we did without widgets.\nBindings and input elements can also be used to filter data\nallowing the user to see just the selected points as in the example below.\nIn this example, we also add an empty selection\nto illustrate how to revert to showing all points\nafter a selection has been made in a radio button or drop-down\n(which cannot be deselected).\n\n\n.. altair-plot::\n\n    # Make radio button less cramped by adding a space after each label\n    # The spacing will only show up in your IDE, not on this doc page\n    options = ['Europe', 'Japan', 'USA']\n    labels = [option + ' ' for option in options]\n\n    input_dropdown = alt.binding_radio(\n        # Add the empty selection which shows all when clicked\n        options=options + [None],\n        labels=labels + ['All'],\n        name='Region: '\n    )\n    selection = alt.selection_point(\n        fields=['Origin'],\n        bind=input_dropdown,\n    )\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        # We need to set a constant domain to preserve the colors\n        # when only one region is shown at a time\n        color=alt.Color('Origin:N').scale(domain=options),\n    ).add_params(\n        selection\n    ).transform_filter(\n        selection\n    )\n\nIn addition to the widgets listed in the table above,\nAltair has access to `any html widget <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input>`_\nvia the more general ``binding`` function.\nIn the example below,\nwe use a search input to filter points that match the search string exactly.\nYou can hover over the points to see the car names\nand try typing one into the search box, e.g. ``vw pickup``\nto see the point highlighted\n(you need to type out the full name).\n\n.. altair-plot::\n\n    search_input = alt.selection_point(\n        fields=['Name'],\n        empty=False,  # Start with no points selected\n        bind=alt.binding(\n            input='search',\n            placeholder=\"Car model\",\n            name='Search ',\n        )\n    )\n    alt.Chart(data.cars.url).mark_point(size=60).encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        tooltip='Name:N',\n        opacity=alt.when(search_input).then(alt.value(1)).otherwise(alt.value(0.05)),\n    ).add_params(\n        search_input\n    )\n\nIt is not always useful to require an exact match to the search syntax,\nand when we will be learning about :ref:`expressions`,\nwe will see how we can match partial strings via a regex instead.\n\nData-Driven Comparisons\n-----------------------\n\nSo far we have seen the use of selections\nto lookup points with precisely matching values in our data.\nThis is often useful,\nbut sometimes we might want to make a more complex comparison\nthan an exact match.\nFor example,\nwe might want to create a condition\nwe select the points in the data that are above or below a threshold value,\nwhich is specified via a slider.\nFor this workflow it is recommended to use variable parameters via ``param``\nand as you can see below,\nwe use the special syntax ``datum.xval``\nto reference the column to compare against.\nPrefixing the column name with ``datum``\ntells Altair that we want to compare to a column in the dataframe,\nrather than to a Python variable called ``xval``,\nwhich would have been the case if we just wrote ``xval < selector``.\n\n.. altair-plot::\n\n    import numpy as np\n    import pandas as pd\n\n\n    rand = np.random.RandomState(42)\n    df = pd.DataFrame({\n        'xval': range(100),\n        'yval': rand.randn(100).cumsum()\n    })\n\n    slider = alt.binding_range(min=0, max=100, step=1, name='Cutoff ')\n    selector = alt.param(name='SelectorName', value=50, bind=slider)\n    predicate = alt.datum.xval < selector\n\n    alt.Chart(df).mark_point().encode(\n       x='xval',\n       y='yval',\n       color=alt.when(predicate).then(alt.value(\"red\")).otherwise(alt.value(\"blue\")),\n    ).add_params(\n       selector\n    )\n\nIn this particular case we could actually have used a selection parameter\nsince selection values can be accessed directly and used in expressions that affect the\nchart. For example, here we create a slider to choose a cutoff value, and color\npoints based on whether they are smaller or larger than the value:\n\n.. altair-plot::\n\n    slider = alt.binding_range(min=0, max=100, step=1, name='Cutoff ')\n    selector = alt.selection_point(\n        name=\"SelectorName\",\n        fields=['cutoff'],\n        bind=slider,\n        value=[{'cutoff': 50}]\n    )\n    predicate = alt.datum.xval < selector.cutoff\n\n    alt.Chart(df).mark_point().encode(\n        x='xval',\n        y='yval',\n        color=alt.when(predicate).then(alt.value(\"red\")).otherwise(alt.value(\"blue\")),\n    ).add_params(\n        selector\n    )\n\nWhile it can be useful to know\nhow to access selection values\nin expression strings,\nusing the parameters syntax introduced in Altair 5\noften provides a more convenient syntax\nfor simple interactions like this one\nsince they can also be accessed in expression strings\nas we saw above.\nSimilarly,\nit is often possible to use equality statements\nsuch as ``alt.datum.xval == selector`` to lookup exact values\nbut it is often more convenient to switch to a selection parameter\nand specify a field/encoding.\n\nLogic-Driven Comparisons\n------------------------\n\nA logic comparison is a type of comparison\nthat is based on logical rules and conditions,\nrather than on the actual data values themselves.\nFor example, for a checkbox widget\nwe want to check if the state of the checkbox is True or False\nand execute some action depending on whether it is checked or not.\nWhen we are using a checkbox as a toggle like this,\nwe need to use `param` instead of `selection_point`,\nsince we don't want to check if there are True/False values in our data,\njust if the value of the check box is True (checked) or False (unchecked):\n\n.. altair-plot::\n\n    bind_checkbox = alt.binding_checkbox(name='Scale point size by \"Acceleration\": ')\n    param_checkbox = alt.param(bind=bind_checkbox)\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        size=alt.when(param_checkbox).then(\"Acceleration:Q\").otherwise(alt.value(25)),\n    ).add_params(\n        param_checkbox\n    )\n\nAnother example of creating a widget binding that is independent of the data,\ninvolves an interesting use case for the more general ``binding`` function.\nIn the next example,\nthis function introduces a color picker\nwhere the user can choose the colors of the chart interactively:\n\n.. altair-plot::\n\n    color_usa = alt.param(value=\"#317bb4\", bind=alt.binding(input='color', name='USA '))\n    color_europe = alt.param(value=\"#ffb54d\", bind=alt.binding(input='color', name='Europe '))\n    color_japan = alt.param(value=\"#adadad\", bind=alt.binding(input='color', name='Japan '))\n\n    alt.Chart(data.cars.url).mark_circle().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color=alt.Color(\n            'Origin:N',\n            scale=alt.Scale(\n                domain=['USA', 'Europe', 'Japan'],\n                range=[color_usa, color_europe, color_japan]\n            )\n        )\n    ).add_params(\n        color_usa, color_europe, color_japan\n    )\n\n.. _legend-binding:\n\nLegend Binding\n^^^^^^^^^^^^^^\n\nAn interactive legend can often be helpful to assist in focusing in on groups of data.\nInstead of manually having to build a separate chart to use as a legend,\nAltair provides the ``bind='legend'`` option to facilitate the creation of clickable legends:\n\n.. altair-plot::\n\n    selection = alt.selection_point(fields=['Origin'], bind='legend')\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N',\n        opacity=alt.when(selection).then(alt.value(0.8)).otherwise(alt.value(0.2)),\n    ).add_params(\n        selection\n    )\n\nScale Binding\n^^^^^^^^^^^^^\n\nWith interval selections, the ``bind`` property can be set to the value of ``\"scales\"``. In these cases, the binding will automatically respond to the panning and zooming along the chart:\n\n.. altair-plot::\n\n    selection = alt.selection_interval(bind='scales')\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N',\n    ).add_params(\n        selection\n    )\n\nBecause this is such a common pattern,\nAltair provides the :meth:`interactive` method\nwhich creates a scale-bound selection more concisely:\n\n.. altair-plot::\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N',\n    ).interactive()\n\n.. _encoding-channel-binding:\n\nEncoding Channel Binding\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nTo update which columns are displayed in a chart\nbased on the selection in a widget,\nwe would need to bind the widget to an encoding channel.\nIn contrast to legend and scale bindings,\nit is not possible to setup a binding to an encoding channel\nin the selection initialization\n(e.g. by typing ``bind='x'``).\nInstead,\nparameters can be used to pass the value of a selection\nto an encoding channel.\nThis gives more flexibility,\nbut requires the use of a separate calculation transform\n(as in the example below)\nuntil https://github.com/vega/vega-lite/issues/7365 is resolved.\n\nIn this example,\nwe access the parameter value by referencing the parameter by name.\nBy indexing the data with the parameter value (via ``datum[]``)\nwe can extract the data column that matches the selected value of the parameter,\nand populate the x-channel with the values from this data column.\n\n.. altair-plot::\n\n    dropdown = alt.binding_select(\n        options=['Horsepower', 'Displacement', 'Weight_in_lbs', 'Acceleration'],\n        name='X-axis column '\n    )\n    xcol_param = alt.param(\n        value='Horsepower',\n        bind=dropdown\n    )\n\n    alt.Chart(data.cars.url).mark_circle().encode(\n        x=alt.X('x:Q').title(''),\n        y='Miles_per_Gallon:Q',\n        color='Origin:N'\n    ).transform_calculate(\n        x=f'datum[{xcol_param.name}]'\n    ).add_params(\n        xcol_param\n    )\n\nUsing parameters inside calculate transforms allows us to define dynamic computations\n(e.g. subtracting different pairs of columns),\nas you can see in the :ref:`gallery_interactive_column_selection` gallery example.\nIn that example,\nthe chart title is also dynamically updated using a parameter inside an expression\nwhich is described in more detail in :ref:`accessing-parameter-values`.\nNote that it is currently not possible to change the axis titles dynamically based on the selected parameter value,\nbut a text mark could be used instead\n(as in `this SO answer <https://stackoverflow.com/questions/71210072/can-i-turn-altair-axis-titles-into-links>`_),\nuntil https://github.com/vega/vega-lite/issues/7264 is resolved.\n"
  },
  {
    "path": "doc/user_guide/interactions/expressions.rst",
    "content": ".. currentmodule:: altair\n\n.. _expressions:\n\nExpressions\n~~~~~~~~~~~\n\nAltair allows custom interactions by utilizing the `expression language of Vega <https://vega.github.io/vega/docs/expressions/>`_ for writing basic formulas. A Vega expression string is a well-defined set of JavaScript-style operations.\nTo simplify building these expressions in Python, Altair provides the ``expr`` module, which offers constants and functions to construct expressions using Python syntax. Both JavaScript-syntax and Python-syntax are supported within Altair to define an expression\nand an introductory example of each is available in the :ref:`user-guide-calculate-transform` transform documentation so we recommend checking out that page before continuing.\n\nExpressions inside Parameters\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIn the following example, we define a range connected to a parameter named ``param_width``. We then assign two expressions via ``param`` using both JavaScript and Python-syntax.\nAs previously,\nwe access the parameter values by referencing the parameters by name;\nin JavaScript that is done via ``f\"{param_width.name}\"``\nwhereas in Python it is sufficient to just type the variable name.\nUsing these two expressions defined inside parameters, we can connect them to an encoding channel option, such as the title color of the axis. If the width is below ``200``, then the color is ``red``; otherwise, the color is ``blue``.\n\n.. altair-plot::\n\n    import altair as alt\n    import numpy as np\n    import pandas as pd\n    \n    rand = np.random.RandomState(42)\n    df = pd.DataFrame({\n        'xval': range(100),\n        'yval': rand.randn(100).cumsum()\n    })\n\n    bind_range = alt.binding_range(min=100, max=300, name='Slider value:  ')\n    param_width = alt.param(bind=bind_range)\n\n    # Examples of how to write both js and python expressions\n    param_color_js_expr = alt.param(expr=f\"{param_width.name} < 200 ? 'red' : 'black'\")\n    param_color_py_expr = alt.param(expr=alt.expr.if_(param_width < 200, 'red', 'black'))\n\n    chart = alt.Chart(df).mark_point().encode(\n        alt.X('xval').axis(titleColor=param_color_js_expr),\n        alt.Y('yval').axis(titleColor=param_color_py_expr)\n    ).add_params(\n        param_width,\n        param_color_js_expr,\n        param_color_py_expr\n    )\n    chart\n\nIn the example above, we used a JavaScript-style ternary operator ``f\"{param_width.name} < 200 ? 'red' : 'blue'\"`` which is equivalent to the Python function ``expr.if_(param_width < 200, 'red', 'blue')``.\nThe expressions defined as parameters also needed to be added to the chart within ``.add_params()``.\n\nInline Expressions\n^^^^^^^^^^^^^^^^^^\n\nIn addition to assigning an expression within a parameter definition as shown above,\nthe ``expr()`` utility function allows us to define inline expressions.\nInline expressions are not parameters,\nso they can be added directly in the chart spec instead of via ``add_params``,\nwhich is a convenient shorthand for writing out the full parameter code.\n\nIn this example, we modify the chart above to change the size of the points based on an inline expression. Instead of creating a conditional statement, we use the value of the expression as the size directly and therefore only need to specify the name of the parameter.\n\n.. altair-plot::\n\n    chart.mark_point(size=alt.expr(param_width.name))\n\nIn addition to modifying the ``mark_*`` parameters,\ninline expressions can be passed to encoding channels as a value definition.\nHere, we make the exact same modification to the chart as in the previous example\nvia this alternate approach:\n\n.. altair-plot::\n\n    chart.encode(size=alt.value(alt.expr(param_width.name)))\n\n`Some parameter names have special meaning in Vega-Lite <https://vega.github.io/vega-lite/docs/parameter.html#built-in-variable-parameters>`_, for example, naming a parameter ``width`` will automatically link it to the width of the chart.\n\n.. altair-plot::\n\n    bind_range = alt.binding_range(min=100, max=300, name='Chart width: ')\n    param_width = alt.param('width', bind=bind_range)\n\n    alt.Chart(df).mark_point().encode(\n        alt.X('xval'),\n        alt.Y('yval')\n    ).add_params(\n        param_width\n    )\n\n.. _accessing-parameter-values:\n\nInline Expressions in Titles\n----------------------------\n\nAn inline expression can be used to\nupdate the chart title to show the current value of the parameter.\nHere, we extend the code from the previous example\nby using an f-string inside an inline expression.\nThe additional quotations and plus signs are needed\nfor the parameter value to be interpreted correctly.\n\n.. altair-plot::\n\n    bind_range = alt.binding_range(min=100, max=300, name='Chart width: ')\n    param_width = alt.param('width', bind=bind_range)\n\n    # In Javascript, a number is converted to a string when added to an existing string,\n    # which is why we use this nested quotation.\n    title=alt.Title(alt.expr(f'\"This chart is \" + {param_width.name} + \" px wide\"'))\n    alt.Chart(df, title=title).mark_point().encode(\n        alt.X('xval'),\n        alt.Y('yval')\n    ).add_params(\n        param_width\n    )\n\nIn the example above,\nwe accessed the value of a variable parameter\nand inserted it into the chart title.\nIf we instead want our chart title to reflect the value from a selection parameter,\nit is not enough to reference only the name of the parameter.\nWe also need to reference the field specified by the selection parameter\n(i.e. ``Origin`` in the example below):\n\n.. altair-plot::\n\n    from altair.datasets import data\n    \n    cars = data.cars.url\n    input_dropdown = alt.binding_select(options=['Europe', 'Japan', 'USA'], name='Region ')\n    selection = alt.selection_point(fields=['Origin'], bind=input_dropdown, value='Europe')\n\n    title = alt.Title(alt.expr(f'\"Cars from \" + {selection.name}.Origin'))\n\n    alt.Chart(cars, title=title).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n    ).add_params(\n        selection\n    ).transform_filter(\n        selection\n    )\n\n\nA Regex Search Widget\n---------------------\n\nNow that we know the basics of expressions,\nlet's see how we can improve on our search input example\nto make the search string match via a regex pattern.\nTo do this we need to use ``expr.regex`` to define the regex string,\nand ``expr.test`` to test it against another string\n(in this case the string in the ``Name`` column).\nThe ``i`` option makes the regex case insensitive,\nand you can see that we have switched to using ``param`` instead of ``selection_point``\nsince we are doing something more complex\nthan looking up values with an exact match in the data.\nTo try this out, you can type ``mazda|ford`` in the search input box below.\n\n.. altair-plot::\n\n    search_input = alt.param(\n        value='',\n        bind=alt.binding(\n            input='search',\n            placeholder=\"Car model\",\n            name='Search ',\n        )\n    )\n    search_matches = alt.expr.test(alt.expr.regexp(search_input, \"i\"), alt.datum.Name)\n\n    alt.Chart(cars).mark_point(size=60).encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        tooltip='Name:N',\n        opacity=alt.when(search_matches).then(alt.value(1)).otherwise(alt.value(0.05)),\n    ).add_params(search_input)\n\nAnd remember, all this interactivity is client side.\nYou can save this chart as an HTML file or put it on a static site generator such as GitHub/GitLab pages\nand anyone can interact with it without having to install Python.\nQuite powerful!\n\nSummary of Expressions\n^^^^^^^^^^^^^^^^^^^^^^\n\n- Altair can utilize the expression language of Vega for writing basic formulas to enable custom interactions.\n- Both JavaScript-style syntax and Python-style syntax are supported in Altair to define expressions.\n- Altair provides the ``expr`` module which allows expressions to be constructed with Python syntax.\n- Expressions can be included within a chart specification using two approaches: through a ``param(expr=...)`` parameter definition or inline using the ``expr(...)`` utility function.\n- Expressions can be used anywhere the documentation mentions that an `ExprRef` is an accepted value. This is mainly in three locations within a chart specification: mark properties, encoding channel options, and within a value definition for an encoding channel. They are also supported in the chart title, but not yet for subtitles or guide titles (i.e. axis and legends, see https://github.com/vega/vega-lite/issues/7408 for details).\n"
  },
  {
    "path": "doc/user_guide/interactions/index.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-interactions:\n\nInteractive Charts\n==================\n\nOne of the unique features of Altair, inherited from Vega-Lite, is a\ndeclarative grammar of not just visualization, but also *interaction*.\nThis is both convenient and powerful,\nas we will see in this section.\nThere are three core concepts of this grammar:\n\n- Parameters are the basic building blocks in the grammar of interaction.\n  They can either be simple variables or more complex selections\n  that map user input (e.g., mouse clicks and drags) to data queries.\n- Conditions and filters can respond to changes in parameter values\n  and update chart elements based on that input.\n- Widgets and other chart input elements can bind to parameters\n  so that charts can be manipulated via drop-down menus, radio buttons, sliders, legends, etc.\n\nIn addition to these concepts,\nthere are two additional components that enhance the capabilities\nof interactive visualizations in Altair:\n\n- Expressions allow for custom calculation via writing basic formulas.\n  These can be used for fine-controlled interactivity,\n  and are also available outside encodings.\n- JupyterCharts allow access to Altair's parameters from Python,\n  e.g. printing the values of a selection in the plot.\n\nFurther reading\n---------------\n\nOnce you have worked through the subpages for the topics listed above,\nyou might wish to look through the :ref:`gallery-category-Interactive Charts` section of the example gallery\nfor ideas about how they can be applied to more interesting charts.\n\nIf you are planning to use Altair charts together with Dashboard packages,\nsee the section on :ref:`Dashboards <display_dashboards>`.\n\n.. toctree::\n   :hidden:\n\n   parameters\n   bindings_widgets\n   expressions\n   jupyter_chart\n"
  },
  {
    "path": "doc/user_guide/interactions/jupyter_chart.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-jupyterchart:\n\nJupyterChart\n============\nThe ``JupyterChart`` class, introduced in Vega-Altair 5.1, makes it possible to update charts\nafter they have been displayed and access the state of :ref:`user-guide-interactions` from Python.\n\nSupported Environments\n----------------------\n``JupyterChart`` is a `Jupyter Widget <https://ipywidgets.readthedocs.io/en/latest/>`_ built\non the `AnyWidget <https://anywidget.dev/>`_ library. As such, it's compatible with development\nenvironments and dashboard toolkits that support third party Jupyter Widgets.\nTested environments include:\n\n* Classic Jupyter Notebook\n* JupyterLab\n* Visual Studio Code\n* Google Colab\n* Voila\n\n.. note::\n    If you try ``JupyterChart`` in another environment that supports Jupyter Widgets,\n    `let us know how it goes <https://github.com/vega/altair/issues>`_ so that we can keep\n    this list up to date.\n\nBasic Usage\n-----------\nTo create a ``JupyterChart``, pass a regular ``Chart`` instance to the ``alt.JupyterChart``\nconstructor. The chart will be displayed automatically if the last expression in a notebook\ncell evaluates to a ``JupyterChart`` instance. For example:\n\n.. code-block:: python\n\n    import altair as alt\n    import pandas as pd\n\n    source = pd.DataFrame({\n        'a': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],\n        'b': [28, 55, 43, 91, 81, 53, 19, 87, 52]\n    })\n\n    chart = alt.Chart(source).mark_bar().encode(\n        x='a',\n        y='b'\n    )\n\n    jchart = alt.JupyterChart(chart)\n    jchart\n\n.. image:: /_static/jupyter_chart/simple_bar.svg\n  :alt: Bar chart with letters A through I on the x-axis\n\n\nUpdating Charts\n---------------\nThe ``JupyterChart``'s ``chart`` property can be assigned to a new chart instance, and the new chart\nwill immediately be displayed in place of the old one.\n\n.. code-block:: python\n\n    jchart.chart = chart.mark_bar(color=\"crimson\", cornerRadius=10)\n\n.. raw:: html\n\n    <video controls>\n      <source src=\"/_static/jupyter_chart/updating_charts.mov\">\n      Your browser does not support the video tag.\n    </video>\n\nParams: Variables and Selections\n--------------------------------\nAs described in :ref:`user-guide-interactions`, Vega-Altair's rich grammar of interactivity\nis built on the concept of parameters. In particular, variable parameters (which store a\nsimple value) and selection parameters (which map user interactions to data queries).\n\nThe ``JupyterChart`` class makes both variable and selection parameters available for use\nin Python.\n\nVariable Params\n---------------\nJupyterChart makes it possible to access, observe, set, and link variable parameters.\n\nAccessing Variable Params\n~~~~~~~~~~~~~~~~~~~~~~~~~\nA chart's variable parameters are stored in the ``params`` property of the ``JupyterChart``\ninstance. The values of individual named variable parameters may be accessed using\nregular attribute access. Here is an example that uses :ref:`binding-parameters` to bind a\nvariable parameter named ``cutoff`` to a slider. The current value of the ``cutoff`` variable\nis available as ``jchart.params.cutoff``.\n\n.. code-block:: python\n\n    import altair as alt\n    import pandas as pd\n    import numpy as np\n\n    rand = np.random.RandomState(42)\n\n    df = pd.DataFrame({\n        'xval': range(100),\n        'yval': rand.randn(100).cumsum()\n    })\n\n    slider = alt.binding_range(min=0, max=100, step=1)\n    cutoff = alt.param(name=\"cutoff\", bind=slider, value=50)\n    predicate = alt.datum.xval < cutoff\n\n    chart = alt.Chart(df).mark_point().encode(\n        x='xval',\n        y='yval',\n        color=alt.when(predicate).then(alt.value(\"red\")).otherwise(alt.value(\"blue\")),\n    ).add_params(\n        cutoff\n    )\n    jchart = alt.JupyterChart(chart)\n    jchart\n\n\n.. raw:: html\n\n    <video controls>\n      <source src=\"/_static/jupyter_chart/accessing_variable_params.mov\">\n      Your browser does not support the video tag.\n    </video>\n\n\nObserving Variable Params\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe `observe <https://ipywidgets.readthedocs.io/en/8.1.0/examples/Widget%20Events.html#traitlet-events>`_\nmethod on the ``params`` property may be used to register a callback that will be invoked when a\nparameter changes. In this example, a simple callback function is registered to print the value of\nthe ``cutoff`` parameter.\n\n.. code-block:: python\n\n    def on_cutoff_change(change):\n        print(change.new)\n\n    jchart.params.observe(on_cutoff_change, [\"cutoff\"])\n\n.. raw:: html\n\n    <video controls>\n      <source src=\"/_static/jupyter_chart/observing_variable_params.mov\">\n      Your browser does not support the video tag.\n    </video>\n\nSetting Variable Params\n~~~~~~~~~~~~~~~~~~~~~~~\nThe value of variable parameters may be updated from Python by assigning to the corresponding ``params``\nattribute. Here's an example of updating the ``cutoff`` variable parameter by assigning to ``jchart.params.cutoff``.\n\n.. raw:: html\n\n    <video controls>\n      <source src=\"/_static/jupyter_chart/setting_variable_params.mov\">\n      Your browser does not support the video tag.\n    </video>\n\n\nLinking Variable Params\n~~~~~~~~~~~~~~~~~~~~~~~\nBecause ``params`` is a traitlet object, it's possible to use the ipywidgets\n`link function <https://ipywidgets.readthedocs.io/en/8.1.0/examples/Widget%20Events.html#linking-widgets>`_\nto bind params to other ipywidgets. Here is an example of linking the ``cutoff`` variable parameter\nto the value of an ipywidgets ``IntSlider``.\n\n.. code-block:: python\n\n    from ipywidgets import IntSlider, link\n    slider = IntSlider(23, min=0, max=100)\n    link((slider, \"value\"), (jchart.params, \"cutoff\"))\n    slider\n\n.. raw:: html\n\n    <video controls>\n      <source src=\"/_static/jupyter_chart/linking_variable_params.mov\">\n      Your browser does not support the video tag.\n    </video>\n\nIf an ipywidget is linked to a Vega-Altair variable param, it's not necessary to also bind\nthe param to a Vega-Altair widget. Here, the example above is updated to control the ``cutoff``\nvariable's value only from the ``IntSlider`` ipywidget.\n\n.. code-block:: python\n\n    import pandas as pd\n    import numpy as np\n\n    rand = np.random.RandomState(42)\n\n    df = pd.DataFrame({\n        'xval': range(100),\n        'yval': rand.randn(100).cumsum()\n    })\n\n    cutoff = alt.param(name=\"cutoff\", value=50)\n    predicate = alt.datum.xval < cutoff\n\n    chart = alt.Chart(df).mark_point().encode(\n        x='xval',\n        y='yval',\n        color=alt.when(predicate).then(alt.value(\"red\")).otherwise(alt.value(\"blue\"))\n    ).add_params(\n        cutoff\n    )\n    jchart = alt.JupyterChart(chart)\n    jchart\n\n\n.. raw:: html\n\n    <video controls>\n      <source src=\"/_static/jupyter_chart/linking_variable_params2.mov\">\n      Your browser does not support the video tag.\n    </video>\n\n\nSelection Params\n----------------\nJupyterChart makes it possible to access and observe selection parameters. For the purpose of accessing\nselections from Python, selection parameters are divided into three types:\nPoint selections, index selections, and interval selection. These selection types are\nrepresented by Python classes named ``PointSelection``, ``IndexSelection``, and ``IntervalSelection``\nrespectively.\n\nInstances of these selection classes are available as properties of the JupyterChart's\n``selections`` property.\n\nPoint Selections\n~~~~~~~~~~~~~~~~\nThe ``PointSelection`` class is used to store the current state of a Vega-Altair point selection\n(as created by ``alt.selection_point()``) when either a ``fields`` or ``encodings`` specification\nis provided. One common example is a point selection with ``encodings=[\"color\"]`` that is bound to\nthe legend.\n\n.. code-block:: python\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n    brush = alt.selection_point(name=\"point\", encodings=[\"color\"], bind=\"legend\")\n\n    chart = alt.Chart(source).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color=alt.when(brush).then(\"Origin:N\").otherwise(alt.value(\"grey\")),\n    ).add_params(brush)\n\n    jchart = alt.JupyterChart(chart)\n    jchart\n\n.. raw:: html\n\n    <video controls>\n      <source src=\"/_static/jupyter_chart/point_selection_param.mov\">\n      Your browser does not support the video tag.\n    </video>\n\nThe ``PointSelection`` instance may be accessed as ``jchart.selections.point`` (Where \"point\" is the\nvalue of the ``name`` argument to ``alt.selection_point``).\n\nThe ``jchart.selections.point.value`` property contains a list of dictionaries where each element\nrepresents a single point in the selection. This list of dictionaries may be converted into a pandas\n`query <https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.query.html>`_ string as follows\n\n.. code-block:: python\n\n    filter = \" or \".join([\n        \" and \".join([\n            f\"`{col}` == {repr(val)}\" for col, val in sel.items()\n        ])\n        for sel in jchart.selections.point.value\n    ])\n    source.query(filter)\n\nFor example, when the Japan and Europe legend entries are selected, the ``filter`` string above will\nevaluate to ``\"`Origin` == 'Japan' or `Origin` == 'Europe'\"``, and the ``source.query(filter)`` expression\nwill evaluate to a pandas ``DataFrame`` containing the rows of ``source`` that are in the selection.\n\nIndex Selections\n~~~~~~~~~~~~~~~~\nThe ``IndexSelection`` class is used to store the current state of a Vega-Altair point selection\n(as created by ``alt.selection_point()``) when neither a ``fields`` nor ``encodings`` specification\nis provided.  In this case, the ``value`` property of the selection is a list of the indices\nof the selected rows. These indices can be used with the pandas DataFrame's ``iloc`` attribute to\nextract the selected rows in the input DataFrame.\n\n.. code-block:: python\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n    brush = alt.selection_point(name=\"point\")\n\n    chart = alt.Chart(source).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color=alt.when(brush).then(\"Origin:N\").otherwise(alt.value(\"grey\")),\n    ).add_params(brush)\n\n    jchart = alt.JupyterChart(chart)\n    jchart\n\n.. raw:: html\n\n    <video controls>\n      <source src=\"/_static/jupyter_chart/index_selection_param.mov\">\n      Your browser does not support the video tag.\n    </video>\n\n\n.. warning::\n    The indices returned will only correspond to the input DataFrame for charts that do not include\n    aggregations. If a chart includes aggregations, then the ``alt.selection_point`` specification\n    should include either a ``fields`` or ``encodings`` argument, which will result in the\n    ``JupyterChart`` containing a ``PointSelection`` rather than an ``IndexSelection``.\n\n\nInterval Selections\n~~~~~~~~~~~~~~~~~~~\nThe ``IntervalSelection`` class is used to store the current state of a Vega-Altair interval selection\n(as created by ``alt.selection_interval()``). In this case, the ``value`` property of the selection\nis a dictionary from column names to selection intervals\n\n.. code-block:: python\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n    brush = alt.selection_interval(name=\"interval\")\n\n    chart = alt.Chart(source).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color=alt.when(brush).then(\"Cylinders:O\").otherwise(alt.value(\"grey\")),\n    ).add_params(brush)\n\n    jchart = alt.JupyterChart(chart)\n    jchart\n\n\n.. raw:: html\n\n    <video controls>\n      <source src=\"/_static/jupyter_chart/interval_selection_param.mov\">\n      Your browser does not support the video tag.\n    </video>\n\nThe selection dictionary may be converted into a pandas\n`query <https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.query.html>`_ string as follows\n\n.. code-block:: python\n\n    filter = \" and \".join([\n        f\"{v[0]} <= `{k}` <= {v[1]}\"\n        for k, v in jchart.selections.interval.value.items()\n    ])\n    source.query(filter)\n\n\nFor example, when the x-selection is from 120 to 160 and the y-selection is from 25 to 35,\n``jchart.selections.interval.value`` will be ``{'Horsepower': [120, 160], 'Miles_per_Gallon': [25, 30]}``,\nthe ``filter`` string will be ``\"120 <= `Horsepower` <= 160 and 25 <= `Miles_per_Gallon` <= 35\"``, and the\n``source.query(filter)`` expression will evaluate to a pandas ``DataFrame`` that contains the rows of\n``source`` that are in the selection.\n\nObserving Selections\n~~~~~~~~~~~~~~~~~~~~\nAs with variable parameters, it's possible to register a callback function to be invoked\nwhen a selection changes by using the ``observe`` method on the ``selections`` property.\nHere is an example that listens for changes to an interval selection, then uses the selection\nvalue to filter the input DataFrame and display it's HTML representation. An ipywidgets ``VBox``\nis used to combine the chart and HTML table in a column layout.\n\n.. code-block:: python\n\n    import ipywidgets\n    from IPython.display import display\n    from ipywidgets import HTML, VBox\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n    brush = alt.selection_interval(name=\"brush\")\n\n    chart_widget = alt.JupyterChart(alt.Chart(source).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color=alt.when(brush).then(\"Cylinders:O\").otherwise(alt.value(\"grey\")),\n    ).add_params(brush))\n\n    table_widget = HTML(value=source.iloc[:0].to_html())\n\n    def on_select(change):\n        sel = change.new.value\n        if sel is None or 'Horsepower' not in sel:\n            filtered = source.iloc[:0]\n        else:\n            filter_query = (\n                f\"{sel['Horsepower'][0]} <= `Horsepower` <= {sel['Horsepower'][1]} and \"\n                f\"{sel['Miles_per_Gallon'][0]} <= `Miles_per_Gallon` <= {sel['Miles_per_Gallon'][1]}\"\n            )\n            filtered = source.query(filter_query)\n\n        table_widget.value = filtered.to_html()\n\n    chart_widget.selections.observe(on_select, [\"brush\"])\n\n    VBox([chart_widget, table_widget])\n\n.. raw:: html\n\n    <video controls>\n      <source src=\"/_static/jupyter_chart/linking_interval_selection.mov\">\n      Your browser does not support the video tag.\n    </video>\n\n.. _user-guide-jupyterchart-offline:\n\nOffline Usage\n-------------\nBy default, the ``JupyterChart`` widget loads its JavaScript dependencies dynamically from a CDN\nlocation, which requires an active internet connection. Starting in Altair 5.3, JupyterChart supports\nloading its JavaScript dependencies from the ``vl-convert-python`` package, which enables offline usage.\n\nOffline mode is enabled using the ``JupyterChart.enable_offline`` class method.\n\n.. code-block:: python\n\n    import altair as alt\n    alt.JupyterChart.enable_offline()\n\nThis only needs to be called once, after which all displayed JupyterCharts will operate in offline mode.\n\nOffline mode can be disabled by passing ``offline=False`` to this same method.\n\n.. code-block:: python\n\n    import altair as alt\n    alt.JupyterChart.enable_offline(offline=False)\n\nLimitations\n-----------\n\nSetting Selections\n~~~~~~~~~~~~~~~~~~\nIt's not currently possible to set selection states from Python.\n"
  },
  {
    "path": "doc/user_guide/interactions/parameters.rst",
    "content": ".. currentmodule:: altair\n\n.. _parameters:\n\nParameters, Conditions, & Filters\n=================================\n\nParameters\n~~~~~~~~~~\n\nParameters are the building blocks of interaction in Altair.\nThere are two types of parameters: *variables* and *selections*. We introduce these concepts through a series of examples.\n\n.. note::\n\n   This material was changed considerably with the release of Altair 5.\n\n.. _basic variable:\n\nVariables: Reusing Values\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nVariable parameters allow for a value to be defined once\nand then reused throughout the rest of the chart.\nHere is a simple scatter-plot created from the ``cars`` dataset:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    cars = data.cars.url\n\n    alt.Chart(cars).mark_circle().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N'\n    )\n\nVariable parameters are created using the :func:`param` function.\nHere,\nwe create a parameter with a default value of 0.1 using the ``value`` property:\n\n.. altair-plot::\n    :output: none\n\n    op_var = alt.param(value=0.1)\n\nIn order to use this variable in the chart specification, we explicitly add it to the chart using the :meth:`add_params` method, and we can then reference the variable within the chart specification.  Here we set the opacity using our ``op_var`` parameter. The :meth:`add_params` method adds the parameter to the chart, making it available for use in encodings, conditions, and filters.\n\n.. altair-plot::\n\n    op_var = alt.param(value=0.1)\n\n    alt.Chart(cars).mark_circle(opacity=op_var).encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N'\n    ).add_params(\n        op_var\n    )\n\nIt's reasonable to ask whether all this effort is necessary. Here is a more natural way to accomplish the same thing that avoids the use of both :func:`param` and ``add_params``.\n\n.. altair-plot::\n\n    op_var2 = 0.1\n\n    alt.Chart(cars).mark_circle(opacity=op_var2).encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N'\n    )\n\nThe benefit of using :func:`param` doesn't become apparent until we incorporate an additional component. In the following example we use the ``bind`` property of the parameter, so that the parameter becomes bound to an input element. In this example, that input element is a slider widget.\n\n.. altair-plot::\n\n    slider = alt.binding_range(min=0, max=1, step=0.05, name='opacity:')\n    op_var = alt.param(value=0.1, bind=slider)\n\n    alt.Chart(cars).mark_circle(opacity=op_var).encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N'\n    ).add_params(\n        op_var\n    )\n\nNow we can dynamically change the opacity of the points in our chart using the slider. You will learn much more about binding parameters to input elements such as widgets in the section :ref:`binding-parameters`.\n\n.. note::\n\n    A noteworthy aspect of Altair's interactivity is that these effects are controlled entirely within the web browser. This means that you can save charts as HTML files and share them with your colleagues who can access the interactivity via their browser without the need to install Python.\n\nSelections: Capturing Chart Interactions\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSelection parameters define data queries\nthat are driven by interactive manipulation of the chart\nby the user (e.g., via mouse clicks or drags).\nThere are two types of selections:\n:func:`selection_interval` and :func:`selection_point`.\n\nHere we will create a simple chart and then add a selection interval to it.\nWe could create a selection interval via ``param(select=\"interval\")``,\nbut it is more convenient to use the shorter ``selection_interval``.\n\nHere is a simple scatter-plot created from the ``cars`` dataset:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    cars = data.cars.url\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N'\n    )\n\nFirst we'll create an interval selection using the :func:`selection_interval`\nfunction (an interval selection is also referred to as a \"brush\"):\n\n.. altair-plot::\n    :output: none\n\n    brush = alt.selection_interval()\n\nWe can now add this selection interval to our chart via ``add_params``:\n\n.. altair-plot::\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N'\n    ).add_params(\n        brush\n    )\n\nThe result above is a chart that allows you to click and drag to create\na selection region, and to move this region once the region is created.\n\nSo far this example is very similar to what we did in the :ref:`variable example <basic variable>`:\nwe created a selection parameter using ``brush = alt.selection_interval()``,\nand we attached that parameter to the chart using ``add_params``.\nOne difference is that here we have not defined how the chart should respond to the selection; you will learn this in the next section.\n\n.. _conditions:\n\nConditions\n~~~~~~~~~~\n\n.. note::\n\n   This material was changed considerably with the release of Altair ``5.5.0``.\n   :func:`when` was introduced in ``5.4.0`` and should be preferred over :func:`condition`.\n\nThe example above is neat, but the selection interval doesn't actually *do* anything yet.\nTo make the chart respond to this selection, we need to reference ``brush`` within\nthe chart specification. Here, we will use the :func:`when` function to create\na conditional color encoding:\n\n.. altair-plot::\n\n    conditional = alt.when(brush).then(\"Origin:N\").otherwise(alt.value(\"lightgray\"))\n\n    alt.Chart(cars).mark_point().encode(\n        x=\"Horsepower:Q\",\n        y=\"Miles_per_Gallon:Q\",\n        color=conditional,\n    ).add_params(\n        brush\n    )\n\nAs you can see, the color of the points now changes depending on whether they are inside or outside the selection.\nAbove we are using the selection parameter ``brush`` as a *predicate*\n(something that evaluates as `True` or `False`).\n\nThis is controlled by our definition ``conditional``::\n\n    conditional = alt.when(brush).then(\"Origin:N\").otherwise(alt.value(\"lightgray\"))\n\nData points which fall within the selection evaluate as ``True``,\nand data points which fall outside the selection evaluate to ``False``.\nThe ``\"Origin:N\"`` specifies how to color the points which fall within the selection,\nand the ``alt.value('lightgray')`` specifies that the outside points should be given a constant color value.\n\nUnderstanding :func:`when`\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe ``when-then-otherwise`` syntax was directly inspired by `polars.when`_,\nand is similar to an ``if-else`` statement written in Python::\n\n    # alt.when(brush)\n    if brush:\n        # .then(\"Origin:N\")\n        color = \"Origin:N\"\n    else:\n        # .otherwise(alt.value(\"lightgray\"))\n        color = alt.value(\"lightgray\")\n\nOmitting the ``.otherwise()`` clause will use the channel default instead:\n\n.. altair-plot::\n\n    source = data.cars()\n    brush = alt.selection_interval()\n\n    points = alt.Chart(source).mark_point().encode(\n        x=\"Horsepower\",\n        y=\"Miles_per_Gallon\",\n        color=alt.when(brush).then(alt.value(\"goldenrod\"))\n    ).add_params(\n        brush\n    )\n\n    points\n\nMultiple conditional branches (``if, elif, ..., elif`` in Python)\nare expressed via chained calls to :func:`when`.\nYou will see an example with working code in :ref:`conditional-branches`\nwhen you have learned about different selection types.\n\nMore advanced use of conditions can be found\nin the :func:`when` API reference\nand in these gallery examples:\n\n- :ref:`gallery_dot_dash_plot`\n- :ref:`gallery_interactive_bar_select_highlight`\n- :ref:`gallery_multiline_tooltip_standard`\n- :ref:`gallery_scatter_point_paths_hover`\n- :ref:`gallery_waterfall_chart`\n\nLinking Conditions Across Charts\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nConditional encodings become even more powerful when the selection behavior is\ntied across multiple views of the data within a compound chart.\nFor example, here we create a :class:`Chart` using the same code as\nabove, and horizontally concatenate two versions of this chart: one\nwith the x-encoding tied to ``\"Horsepower\"``, and one with the x-encoding\ntied to ``\"Acceleration\"``\n\n.. altair-plot::\n\n    chart = alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color=alt.when(brush).then(\"Origin:N\").otherwise(alt.value(\"lightgray\")),\n    ).properties(\n        width=250,\n        height=250\n    ).add_params(\n        brush\n    )\n\n    chart | chart.encode(x='Acceleration:Q')\n\nBecause both copies of the chart reference the same selection object, the\nrenderer ties the selections together across panels, leading to a dynamic\ndisplay that helps you gain insight into the relationships within the\ndataset.\n\nEach selection type has attributes through which its behavior can be\ncustomized; for example we might wish for our brush to be tied only\nto the ``\"x\"`` encoding to emphasize that feature in the data.\nWe can modify the brush definition, and leave the rest of the code unchanged:\n\n.. altair-plot::\n\n    brush = alt.selection_interval(encodings=['x'])\n\n    chart = alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color=alt.when(brush).then(\"Origin:N\").otherwise(alt.value(\"lightgray\")),\n    ).properties(\n        width=250,\n        height=250\n    ).add_params(\n        brush\n    )\n\n    chart | chart.encode(x='Acceleration:Q')\n\nAs you might have noticed,\nthe selected points are sometimes obscured by some of the unselected points.\nTo bring the selected points to the foreground,\nwe can change the order in which they are laid out via the following conditional ``order`` encoding:\n\n.. altair-plot::\n\n    # Lower numbers for `order` means further into the background\n    selected_on_top = alt.when(brush).then(alt.value(1)).otherwise(alt.value(0))\n    chart.encode(order=selected_on_top) | chart.encode(order=selected_on_top, x='Acceleration:Q')\n\nYou can see another example of this in the :ref:`gallery_selection_zorder` gallery example.\n\nFilters\n~~~~~~~\n\nUsing a selection parameter to filter data works in much the same way\nas using it within :func:`when`.\nFor example, in ``transform_filter(brush)``,\nwe are again using the selection parameter ``brush`` as a predicate.\nData points which evaluate to ``True`` (i.e., data points which lie within the selection) are kept,\nand data points which evaluate to ``False`` are filtered out.\n\nIt is not possible to both select and filter in the same chart,\nso typically this functionality will be used when at least two sub-charts are present.\nIn the following example,\nwe attach the selection parameter to the upper chart,\nand then filter data in the lower chart based on the selection in the upper chart.\nYou can explore how the counts change in the bar chart\ndepending on the size and position of the selection in the scatter plot.\n\n.. altair-plot::\n\n    brush = alt.selection_interval()\n\n    points = alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N'\n    ).add_params(\n        brush\n    )\n\n    bars = alt.Chart(cars).mark_bar().encode(\n        x='count()',\n        y='Origin:N',\n        color='Origin:N'\n    ).transform_filter(\n        brush\n    )\n\n    points & bars\n\n\nSelection Types\n~~~~~~~~~~~~~~~\n\nNow that we have seen the basics of how we can use a selection to interact with a chart,\nlet's take a more systematic look at the types of selection parameters available in Altair.\nThere are two main types of selections you'll work with through mouse actions:\n\n1. **Interval selections**: Select ranges of data by clicking and dragging\n2. **Point selections**: Select individual data points by clicking or hovering\n\nTo demonstrate these selection types clearly, we'll use a consistent visualization\napproach. The following helper function creates a heatmap from the ``cars`` dataset\nwhere the color encoding responds to our selection:\n\n.. altair-plot::\n    :output: none\n\n    def make_example(selector: alt.Parameter) -> alt.Chart:\n        cars = data.cars.url\n\n        return alt.Chart(cars).mark_rect().encode(\n            x=\"Cylinders:O\",\n            y=\"Origin:N\",\n            color=alt.when(selector).then(\"count()\").otherwise(alt.value(\"lightgray\")),\n        ).properties(\n            width=300,\n            height=180\n        ).add_params(\n            selector\n        )\n\nInterval Selections\n^^^^^^^^^^^^^^^^^^^\nAn *interval* selection allows you to select a range of data elements by clicking and dragging.\nThis is often referred to as a \"brush\" selection and is commonly used for filtering,\nzooming, or highlighting ranges of data points.\n\nBasic Interval Selection\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nThe simplest interval selection is created with the :func:`selection_interval` function:\n\n.. altair-plot::\n\n   interval = alt.selection_interval()\n   make_example(interval)\n\nAs you click and drag on the plot, your mouse creates a selection region that can be\nmoved to change which data points are selected.\n\nCustomizing Interval Behavior\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nThe :func:`selection_interval` function accepts several arguments for customization.\nFor example, you can limit the selection to only the x-axis and set it so that\nan empty selection contains no points:\n\n.. altair-plot::\n\n   interval_x = alt.selection_interval(encodings=['x'], empty=False)\n   make_example(interval_x)\n\nThe ``empty=False`` argument can also be set inside :func:`when` to control\nhow individual conditions respond to empty selections.  \nBy default, `empty=True`, which means the selection predicate evaluates to \ntrue for *all* data points when the selection is empty.  \nWith `empty=False`, the predicate evaluates to false for all points when \nthe selection is empty. \nThis affects what happens when no data points are selected yet::\n\n    brush = alt.selection_interval()\n\n    # Default behavior (empty=True): When no selection is made in this example, all points will be colored according to their \"Origin\" category (they are considered as *selected*, and colored according to the `then` clause)\n    color=alt.when(brush).then(\"Origin:N\").otherwise(alt.value(\"lightgray\"))\n\n    # Custom behavior (empty=False): When no selection is made in this example, all points will be lightgray (they are considered as *unselected*, and colored according to the `otherwise` clause )\n    color=alt.when(brush, empty=False).then(\"Origin:N\").otherwise(alt.value(\"lightgray\"))\n\nSetting Initial Values\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nWhen creating interactive visualizations, you often want to guide users by\nstarting with a pre-selected region rather than an empty selection. You can do this\nusing the ``value`` parameter of :func:`selection_interval`.\n\nSetting initial values is particularly useful when:\n\n- Creating a filtered overview-detail pattern where a detailed subset is shown\n- Guiding viewer attention to a particular area of interest immediately\n- Preserving selection states across different visualizations or user sessions\n\nHere's an example using time series data where we initially focus on a specific date range\ncontaining the 2008 financial crisis:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n    import datetime as dt\n\n    source = data.sp500.url\n\n    # Define initial date range to select\n    date_range = (dt.date(2007, 6, 30), dt.date(2009, 6, 30))\n\n    # Create interval selection with initial value\n    brush = alt.selection_interval(\n        encodings=['x'],\n        value={'x': date_range}\n    )\n\n    # Create base chart for both panels\n    base = alt.Chart(source, width=600, height=200).mark_area().encode(\n        x = 'date:T',\n        y = 'price:Q'\n    )\n\n    # Upper panel shows detailed view filtered by the brush\n    upper = base.encode(\n        alt.X('date:T').scale(domain=brush)\n    )\n\n    # Lower panel shows overview with the brush control\n    lower = base.properties(\n        height=60\n    ).add_params(brush)\n\n    # Combine the two charts\n    upper & lower\n\nThis example demonstrates an \"overview+detail\" pattern - a common visualization technique\nwhere one chart shows the complete dataset while another shows a detailed view of the\nselected portion.\n\nWhen working with datetime values, you can use Python's native ``datetime.date`` or \n``datetime.datetime`` objects directly. Altair automatically handles the conversion of \nthese objects to the appropriate format for Vega-Lite.\n\nThe format of the ``value`` parameter depends on the encodings used in the selection:\n\n- For selections with `x` encoding: ``value={'x': [min, max]}``\n- For selections with `y` encoding: ``value={'y': [min, max]}``\n- For selections with both: ``value={'x': [xmin, xmax], 'y': [ymin, ymax]}``\n\nYou can also set initial values of a selection with categorical data. In this case the list/tuple specifies the exact categories to be selection rather than a range of categories. For example, to initially select only cars with 4 or 6 cylinders:\n\n.. altair-plot::\n\n    cylinder_select = alt.selection_interval(\n        encodings=['x'],\n        value={\"x\": [4, 6]}  # Select 4 and 6 (but not 5) cylinder cars\n    )\n    make_example(cylinder_select)\n\n\nPoint Selections\n^^^^^^^^^^^^^^^^\nA *point* selection allows you to select individual data elements one at a time.\nUnlike interval selections which select ranges, point selections work with discrete \ndata points, making them ideal for interactive legends, tooltips, and highlighting \nspecific data points.\n\nBasic Point Selection\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nThe simplest point selection is created with the :func:`selection_point` function. \nBy default, points are selected on click:\n\n.. altair-plot::\n\n    point = alt.selection_point()\n    make_example(point)\n\nBy changing the ``on`` parameter to `'pointerover'`, we can select points when hovering over them rather than on\nclick.\nThe ``on`` parameter accepts `any \"Event Stream Selector\" supported by Vega\n<https://vega.github.io/vega/docs/event-streams/#selector>`_\nand you can see more elaborate example at the end of the :ref:`parameter-composition` section.\nWe can also set the ``nearest`` flag to ``True`` so that the nearest\npoint is highlighted instead of when the pointer is directly touching a point:\n\n.. altair-plot::\n\n    point_nearest = alt.selection_point(on='pointerover', nearest=True)\n    make_example(point_nearest)\n\nPoint selections also support multi-selection. By default, you can add or remove \ndata points from your selection by holding the *shift* key while clicking. Try this\nbehavior in the examples above to see how it works.\n\nSetting Initial Values\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\nYou can also set initial values for point selections using the ``value`` parameter.  For point selections, the value is a dictionary specifying the initial selection based on fields or encodings.\n\n.. altair-plot::\n\n    point_initial = alt.selection_point(\n        fields=['Origin'],\n        value=[{'Origin': 'USA'}]  # Initially select USA\n    )\n    make_example(point_initial)\n\nSelection Targets\n~~~~~~~~~~~~~~~~~\n\nFor any but the simplest selections, the user needs to think about exactly\nwhat is targeted by the selection, and this can be controlled with either the\n``fields`` or ``encodings`` arguments. These control what data properties are\nused to determine which points are part of the selection.\n\nFor example, here we create a small chart that acts as an interactive legend,\nby targeting the Origin field using ``fields=['Origin']``. Clicking on points\nin the upper-right plot (the legend) will propagate a selection for all points\nwith a matching ``Origin``.\n\n.. altair-plot::\n\n    selection = alt.selection_point(fields=['Origin'])\n    color = (\n        alt.when(selection)\n        .then(alt.Color(\"Origin:N\").legend(None))\n        .otherwise(alt.value(\"lightgray\"))\n    )\n\n    scatter = alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color=color,\n        tooltip='Name:N'\n    )\n\n    legend = alt.Chart(cars).mark_point().encode(\n        alt.Y('Origin:N').axis(orient='right'),\n        color=color\n    ).add_params(\n        selection\n    )\n\n    scatter | legend\n\nAlternatively, we could express ``fields=['Origin']`` as ``encodings=['color']``, because our chart maps ``color`` to\n``'Origin'``. Also note that there is a shortcut to create interactive legends in Altair\ndescribed in the section :ref:`legend-binding`.\n\nSimilarly, we can specify multiple fields and/or encodings that must be\nmatched in order for a datum to be included in a selection.\nFor example, we could modify the above chart to create a two-dimensional\nclickable legend that will select points by both Origin and number of\ncylinders:\n\n.. altair-plot::\n\n    selection = alt.selection_point(fields=['Origin', 'Cylinders'])\n    color = (\n        alt.when(selection)\n        .then(alt.Color(\"Origin:N\").legend(None))\n        .otherwise(alt.value(\"lightgray\"))\n    )\n\n    scatter = alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color=color,\n        tooltip='Name:N'\n    )\n\n    legend = alt.Chart(cars).mark_rect().encode(\n        alt.Y('Origin:N').axis(orient='right'),\n        x='Cylinders:O',\n        color=color\n    ).add_params(\n        selection\n    )\n\n    scatter | legend\n\nBy fine-tuning the behavior of selections in this way, they can be used to\ncreate a wide variety of linked interactive chart types.\n\nCombining Parameters\n~~~~~~~~~~~~~~~~~~~~\n\nMultiple parameters can be combined in a single chart,\neither via multiple separate response conditions,\ndifferent conditional branches in :func:`when`,\nor parameter composition.\n\nMultiple conditions\n^^^^^^^^^^^^^^^^^^^\n\nIn this example,\npoints that are hovered with the pointer\nwill increase in size\nand those that are clicked\nwill be filled in with red.\nThe ``empty=False`` is to ensure that no points are selected to start.\nTry holding shift to select multiple points on either hover or click.\n\n.. altair-plot::\n\n    click = alt.selection_point(empty=False)\n    hover = alt.selection_point(on='pointerover', empty=False)\n\n    points = alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        fill=alt.when(click).then(alt.value('red')),\n        size=alt.when(hover).then(alt.value(1000))\n    ).add_params(\n        click, hover\n    )\n\n    points\n\n.. _conditional-branches:\n\nConditional branches\n^^^^^^^^^^^^^^^^^^^^\n\n:func:`when` allows the use of multiple ``then`` (``elif``) branches\nwhich can change the behavior of a single encoding\nin response to multiple different parameters.\nHere,\nwe fill hovered points in yellow,\nbefore changing the fill to red\nwhen a point is clicked.\nSince the mouse is hovering over points\nwhile clicking them,\nboth conditions will be active\nand the earlier branch takes precedence\n(you can try by changing the order of the two ``when.then`` clauses\nand observing that the points will not change to red when clicked).\n\n.. altair-plot::\n\n    click = alt.selection_point(empty=False)\n    hover = alt.selection_point(on='pointerover', empty=False)\n\n    points = alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        fill=(\n            alt.when(click)\n            .then(alt.value('red'))\n            .when(hover)\n            .then(alt.value('gold'))\n        ),\n        size=alt.when(hover).then(alt.value(1000))\n    ).add_params(\n        click, hover\n    )\n\n    points\n\n.. _parameter-composition:\n\nParameter Composition\n^^^^^^^^^^^^^^^^^^^^^\n\nAltair also supports combining multiple parameters using the ``&``, ``|``\nand ``~`` for respectively ``AND``, ``OR`` and ``NOT`` logical composition\noperands.\nThese parameter compositions can be used with both filters and conditions in Altair.\nIn the following example,\nonly the points that fall within the interval selections of both the scatter plots\nwill be counted in the bar chart\n(so you will need to make a selection in both charts\nbefore the bars shows up).\n\n.. altair-plot::\n\n    # empty=False ensure that no points are selected before a selection is drawn\n    brush = alt.selection_interval(empty=False)\n    brush2 = alt.selection_interval(empty=False)\n\n    points = alt.Chart(cars).mark_point(size=10).encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N'\n    )\n\n    points2 = points.encode(\n        x='Acceleration:Q',\n        y='Miles_per_Gallon:Q',\n    )\n\n    bars = alt.Chart(cars).mark_bar().encode(\n        x='count()',\n        y='Origin:N',\n        color='Origin:N'\n    ).transform_filter(\n        brush & brush2\n    )\n\n    (points.add_params(brush) | points2.add_params(brush2)) & bars\n\nTo illustrate how a more complex parameter composition\ncan be applied to a conditional encoding,\nwe can return to our heatmap example.\nLet's construct a scenario where there are two people who can make an interval\nselection in the same chart. The person Alex makes a selection box when the\nalt-key (macOS: option-key) is selected and Morgan can make a selection\nbox when the shift-key is selected.\nNow, we color the chart marks when they fall within Alex's or Morgan's\nselection, but not both's\n(note that you need to create both selections before seeing the effect).\nHere, we also use We use :class:`BrushConfig` to give the selection box of Morgan a different\nstyle to be able to tell them apart.\n\n.. altair-plot::\n\n    alex = alt.selection_interval(\n        on=\"[pointerdown[event.altKey], pointerup] > pointermove\",\n        empty=False,\n    )\n    morgan = alt.selection_interval(\n        on=\"[pointerdown[event.shiftKey], pointerup] > pointermove\",\n        mark=alt.BrushConfig(fill=\"#fdbb84\", fillOpacity=0.5, stroke=\"#e34a33\"),\n        empty=False,\n    )\n\n    exlusive_or = (alex | morgan) & ~(alex & morgan)\n\n    alt.Chart(cars).mark_rect().encode(\n        x='Cylinders:O',\n        y='Origin:O',\n        color=alt.when(exlusive_or).then(\"count()\").otherwise(alt.value(\"grey\")),\n    ).add_params(\n        alex, morgan\n    ).properties(\n        width=300,\n        height=180\n    )\n\nWith these operators, selections can be combined in arbitrary ways:\n\n- ``alex | morgan``: to select the rectangles that fall inside either\n  Alex's or Morgans' selection.\n- ``~(alex & morgan)``: to select the rectangles that fall outside\n  Alex's and Morgan's selections.\n- ``alex | ~morgan``: to select the rectangles that fall within Alex's\n  selection or outside the selection of Morgan\n\nFor more information on how to fine-tune selections, including specifying other\nmouse and keystroke options, see the `Vega-Lite Selection documentation\n<https://vega.github.io/vega-lite/docs/selection.html>`_.  Also see :class:`BrushConfig` for information on how to customize the appearance of the brush.\n\n.. _polars.when:\n    https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.when.html\n"
  },
  {
    "path": "doc/user_guide/internals.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-internals:\n\nAltair Internals\n================\nThis section will provide some details about how the Altair API relates to the\nVega-Lite visualization specification, and how you can use that knowledge to\nuse the package more effectively.\n\nFirst of all, it is important to realize that when stripped down to its core,\nAltair itself cannot render visualizations. Altair is an API that does one\nvery well-defined thing:\n\n- **Altair provides a Python API for generating validated Vega-Lite specifications**\n\nThat's it. In order to take those specifications and turn them into actual\nvisualizations requires a frontend that is correctly set up, but strictly\nspeaking that rendering is generally not controlled by the Altair package.\n\nAltair Chart to Vega-Lite Spec\n------------------------------\nSince Altair is fundamentally about constructing chart specifications, the central\nfunctionality of any chart object are the :meth:`~Chart.to_dict` and\n:meth:`~Chart.to_json` methods, which output the chart specification as a Python\ndict or JSON string, respectively. For example, here is a simple scatter chart,\nfrom which we can output the JSON representation:\n\n.. altair-plot::\n    :output: stdout\n\n    import altair as alt\n    from altair.datasets import data\n\n    chart = alt.Chart(data.cars.url).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N',\n    ).configure_view(\n        continuousHeight=300,\n        continuousWidth=300,\n    )\n\n    print(chart.to_json(indent=2))\n\nBefore returning the dict or JSON output, Altair validates it against the\n`Vega-Lite schema <https://github.com/vega/schema>`_ using the\n`jsonschema <https://python-jsonschema.readthedocs.io/en/latest/>`_ package.\nThe Vega-Lite schema defines valid attributes and values that can appear\nwithin the specification of a Vega-Lite chart.\n\nWith the JSON schema in hand, it can then be passed to a library such as\n`Vega-Embed <https://github.com/vega/vega-embed>`_ that knows how to read the\nspecification and render the chart that it describes, and the result is the\nfollowing visualization:\n\n.. altair-plot::\n   :hide-code:\n\n   chart\n\nWhenever you use Altair within JupyterLab, Jupyter notebook, or other frontends,\nit is frontend extensions that extract the JSON output from the Altair chart\nobject and pass that specification along to the appropriate rendering code.\n\nAltair's Low-Level Object Structure\n-----------------------------------\nThe standard API methods used in Altair (e.g. :meth:`~Chart.mark_point`,\n:meth:`~Chart.encode`, ``configure_*()``, ``transform_*()``, etc.)\nare higher-level convenience functions that wrap the low-level API.\nThat low-level API is essentially a Python object hierarchy that mirrors\nthat of the JSON schema definition.\n\nFor example, we can choose to avoid the convenience methods and rather construct\nthe above chart using these low-level object types directly:\n\n.. altair-plot::\n\n    alt.Chart(\n        data=alt.UrlData(\n            url='https://vega.github.io/vega-datasets/data/cars.json'\n        ),\n        mark='point',\n        encoding=alt.FacetedEncoding(\n            x=alt.PositionFieldDef(\n                field='Horsepower',\n                type='quantitative'\n            ),\n            y=alt.PositionFieldDef(\n                field='Miles_per_Gallon',\n                type='quantitative'\n            ),\n            color=alt.StringFieldDefWithCondition(\n                field='Origin',\n                type='nominal'\n            )\n        ),\n        config=alt.Config(\n            view=alt.ViewConfig(\n                continuousHeight=300,\n                continuousWidth=300\n            )\n        )\n    )\n\nThis low-level approach is much more verbose than the typical idiomatic approach\nto creating Altair charts, but it makes much more clear the mapping between\nAltair's python object structure and Vega-Lite's schema definition structure.\n\nOne of the nice features of Altair is that this low-level object hierarchy is not\nconstructed by hand, but rather *programmatically generated* from the Vega-Lite\nschema, using the ``generate_schema_wrapper.py`` script that you can find in\n`Altair's repository <https://github.com/vega/altair/blob/main/tools/generate_schema_wrapper.py>`_.\nThis auto-generation of code propagates descriptions from the vega-lite schema\ninto the Python class docstrings, from which the\n`API Reference <http://altair-viz.github.io/user_guide/API.html>`_\nwithin Altair's documentation are in turn automatically generated.\nThis means that as the Vega-Lite schema evolves, Altair can very quickly be brought\nup-to-date, and only the higher-level chart methods need to be updated by hand.\n\nConverting Vega-Lite to Altair\n------------------------------\nWith this knowledge in mind, and with a bit of practice, it is fairly\nstraightforward to construct an Altair chart from a Vega-Lite spec.\nFor example, consider the\n`Simple Bar Chart <https://vega.github.io/vega-lite/examples/bar.html>`_ example\nfrom the Vega-Lite documentation, which has the following JSON specification::\n\n    {\n      \"$schema\": \"https://vega.github.io/schema/vega-lite/v6.json\",\n      \"description\": \"A simple bar chart with embedded data.\",\n      \"data\": {\n        \"values\": [\n          {\"a\": \"A\",\"b\": 28}, {\"a\": \"B\",\"b\": 55}, {\"a\": \"C\",\"b\": 43},\n          {\"a\": \"D\",\"b\": 91}, {\"a\": \"E\",\"b\": 81}, {\"a\": \"F\",\"b\": 53},\n          {\"a\": \"G\",\"b\": 19}, {\"a\": \"H\",\"b\": 87}, {\"a\": \"I\",\"b\": 52}\n        ]\n      },\n      \"mark\": {\"type\": \"bar\"},\n      \"encoding\": {\n        \"x\": {\"field\": \"a\", \"type\": \"ordinal\"},\n        \"y\": {\"field\": \"b\", \"type\": \"quantitative\"}\n      }\n    }\n\nAt the lowest level, we can use the :meth:`~Chart.from_json` class method to\nconstruct an Altair chart object from this string of Vega-Lite JSON:\n\n.. altair-plot::\n\n    import altair as alt\n\n    alt.Chart.from_json(\"\"\"\n    {\n      \"$schema\": \"https://vega.github.io/schema/vega-lite/v6.json\",\n      \"description\": \"A simple bar chart with embedded data.\",\n      \"data\": {\n        \"values\": [\n          {\"a\": \"A\",\"b\": 28}, {\"a\": \"B\",\"b\": 55}, {\"a\": \"C\",\"b\": 43},\n          {\"a\": \"D\",\"b\": 91}, {\"a\": \"E\",\"b\": 81}, {\"a\": \"F\",\"b\": 53},\n          {\"a\": \"G\",\"b\": 19}, {\"a\": \"H\",\"b\": 87}, {\"a\": \"I\",\"b\": 52}\n        ]\n      },\n      \"mark\": {\"type\": \"bar\"},\n      \"encoding\": {\n        \"x\": {\"field\": \"a\", \"type\": \"ordinal\"},\n        \"y\": {\"field\": \"b\", \"type\": \"quantitative\"}\n      }\n    }\n    \"\"\")\n\nLikewise, if you have the Python dictionary equivalent of the JSON string,\nyou can use the :meth:`~Chart.from_dict` method to construct the chart object:\n\n.. altair-plot::\n\n    import altair as alt\n\n    alt.Chart.from_dict({\n      \"$schema\": \"https://vega.github.io/schema/vega-lite/v6.json\",\n      \"description\": \"A simple bar chart with embedded data.\",\n      \"data\": {\n        \"values\": [\n          {\"a\": \"A\",\"b\": 28}, {\"a\": \"B\",\"b\": 55}, {\"a\": \"C\",\"b\": 43},\n          {\"a\": \"D\",\"b\": 91}, {\"a\": \"E\",\"b\": 81}, {\"a\": \"F\",\"b\": 53},\n          {\"a\": \"G\",\"b\": 19}, {\"a\": \"H\",\"b\": 87}, {\"a\": \"I\",\"b\": 52}\n        ]\n      },\n      \"mark\": {\"type\": \"bar\"},\n      \"encoding\": {\n        \"x\": {\"field\": \"a\", \"type\": \"ordinal\"},\n        \"y\": {\"field\": \"b\", \"type\": \"quantitative\"}\n      }\n    })\n\nWith a bit more effort and some judicious copying and pasting, we can\nmanually convert this into more idiomatic Altair code for the same chart,\nincluding constructing a pandas dataframe from the data values:\n\n.. altair-plot::\n\n    import altair as alt\n    import pandas as pd\n\n    data = pd.DataFrame.from_records([\n          {\"a\": \"A\",\"b\": 28}, {\"a\": \"B\",\"b\": 55}, {\"a\": \"C\",\"b\": 43},\n          {\"a\": \"D\",\"b\": 91}, {\"a\": \"E\",\"b\": 81}, {\"a\": \"F\",\"b\": 53},\n          {\"a\": \"G\",\"b\": 19}, {\"a\": \"H\",\"b\": 87}, {\"a\": \"I\",\"b\": 52}\n        ])\n\n    alt.Chart(data).mark_bar().encode(\n        x='a:O',\n        y='b:Q'\n    )\n\nThe key is to realize that ``\"encoding\"`` properties are usually set using the\n:meth:`~Chart.encode` method, encoding types are usually computed from\nshort-hand type codes, ``\"transform\"`` and ``\"config\"`` properties come from\nthe ``transform_*()`` and ``configure_*()`` methods, and so on.\n\nThis approach is the process by which Altair contributors constructed many\nof the initial examples in the\n`Altair Example Gallery <https://altair-viz.github.io/gallery/index.html>`_,\ndrawing inspiration from the\n`Vega-Lite Example Gallery <https://vega.github.io/vega-lite/examples/>`_.\nBecoming familiar with the mapping between Altair and Vega-Lite at this level\nis useful in making use of the Vega-Lite documentation in places where Altair's\ndocumentation is weak or incomplete.\n"
  },
  {
    "path": "doc/user_guide/large_datasets.rst",
    "content": ".. _large-datasets:\n\nLarge Datasets\n--------------\nIf you try to create a plot that will directly embed a dataset with more than\n5000 rows, you will see a ``MaxRowsError``:\n\n.. altair-plot::\n   :output: none\n   \n   import altair as alt\n   import pandas as pd\n\n   data = pd.DataFrame({\"x\": range(10000)})\n   alt.Chart(data).mark_point()\n\n.. code-block:: none\n\n    MaxRowsError: The number of rows in your dataset is greater than the maximum allowed (5000).\n\n    Try enabling the VegaFusion data transformer which raises this limit by pre-evaluating data\n    transformations in Python.\n        >> import altair as alt\n        >> alt.data_transformers.enable(\"vegafusion\")\n\n    Or, see https://altair-viz.github.io/user_guide/large_datasets.html for additional information\n    on how to plot large datasets.\n\nThis is not because Altair cannot handle larger datasets, but it is because it\nis important for the user to think carefully about how large datasets are handled. \nThe following sections describe various considerations as well as approaches to deal with\nlarge datasets.\n\nIf you are certain you would like to embed your full untransformed dataset within the visualization\nspecification, you can disable the ``MaxRows`` check::\n\n    alt.data_transformers.disable_max_rows()\n\nChallenges\n~~~~~~~~~~\nBy design, Altair does not produce plots consisting of pixels, but plots\nconsisting of data plus a visualization specification. For example, here is a \nsimple chart made from a dataframe with three rows of data:\n\n.. altair-plot::\n    :output: none\n\n    import altair as alt\n    import pandas as pd\n    data = pd.DataFrame({'x': [1, 2, 3], 'y': [2, 1, 2]})\n\n    chart = alt.Chart(data).mark_line().encode(\n         x='x',\n         y='y'\n    )\n\n    from pprint import pprint\n    pprint(chart.to_dict())\n\n.. code-block:: none\n\n    {'$schema': 'https://vega.github.io/schema/vega-lite/v2.4.1.json',\n     'config': {'view': {'height': 300, 'width': 300}},\n     'data': {'values': [{'x': 1, 'y': 2}, {'x': 2, 'y': 1}, {'x': 3, 'y': 2}]},\n     'encoding': {'x': {'field': 'x', 'type': 'quantitative'},\n                  'y': {'field': 'y', 'type': 'quantitative'}},\n     'mark': 'line'}\n\nThe resulting specification includes a representation of the data converted\nto JSON format, and this specification is embedded in the notebook or web page\nwhere it can be used by Vega-Lite to render the plot.\nAs the size of the data grows, this explicit data storage can lead to some\nvery large specifications which can have various negative implications:\n\n* large notebook files which can slow down your notebook environment such as JupyterLab\n* if you display the chart on a website it slows down the loading of the page\n* slow evaluation of transforms as the calculations are performed in JavaScript which is not the fastest language for processing large amounts of data\n\n.. _vegafusion-data-transformer:\n\nVegaFusion Data Transformer\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\nThe easiest and most flexible approach for addressing a ``MaxRowsError`` is to\nenable the ``\"vegafusion\"`` data transformer, which was added in Altair 5.1.\n`VegaFusion`_ is an external project that provides efficient Rust implementations\nof most of Altair's data transformations. By evaluating data transformations (e.g. binning\nand aggregations) in Python, the size of the datasets that must be included in the final chart\nspecification are often greatly reduced. In addition, VegaFusion automatically removes\nunused columns, which reduces dataset size even for charts without data transformations.\n\nWhen the ``\"vegafusion\"`` data transformer is active, data transformations will be\npre-evaluated when :ref:`displaying-charts`, :ref:`user-guide-saving`, converted charts a dictionaries,\nand converting charts to JSON. When combined with :ref:`user-guide-jupyterchart` or the ``\"jupyter\"``\nrenderer (See :ref:`customizing-renderers`), data transformations will also be evaluated in Python\ndynamically in response to chart selection events.\n\nVegaFusion's development is sponsored by `Hex <https://hex.tech>`_.\n\nInstalling VegaFusion\n^^^^^^^^^^^^^^^^^^^^^\nThe VegaFusion dependencies can be installed using pip\n\n.. code-block:: none\n\n   pip install vegafusion\n\nor conda\n\n.. code-block:: none\n\n   conda install -c conda-forge vegafusion vl-convert-python\n\nEnabling the VegaFusion Data Transformer\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nActivate the VegaFusion data transformer with:\n\n.. code-block:: python\n\n    import altair as alt\n    alt.data_transformers.enable(\"vegafusion\")\n\nAll charts created after activating the VegaFusion data transformer\nwill work with datasets containing up to 100,000 rows.\nVegaFusion's row limit is applied after all supported data transformations have been applied.\nSo you are unlikely to reach it with a chart such as a histogram,\nbut you may hit it in the case of a large scatter chart or a chart that includes interactivity\nwhen not using ``JupyterChart`` or the ``\"jupyter\"`` renderer.\n\nIf you need to work with larger datasets, you can disable the maximum row limit\nor switch to using ``JupyterChart`` or the ``\"jupyter\"`` renderer described below.\n\nConverting to JSON or dictionary\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nWhen converting a VegaFusion chart to JSON with ``chart.to_json`` or to a Python dictionary with\n``chart.to_dict``, the ``format`` argument must be set to ``\"vega\"`` rather than the\ndefault of ``\"vega-lite\"``. For example:\n\n.. code-block:: python\n\n    chart.to_json(format=\"vega\")\n    chart.to_dict(format=\"vega\")\n\nThis is because VegaFusion works with Vega chart specifications\nrather than the Vega-Lite specifications produced by Altair. When the VegaFusion\ndata transformer is enabled, the `vl-convert`_\nlibrary is used to perform the conversion from Vega-Lite to Vega.\n\nLocal Timezone Configuration\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nSome Altair transformations (e.g. :ref:`user-guide-timeunit-transform`) are based on\na local timezone. Normally, the browser's local timezone is used. However, because\nVegaFusion evaluates these transforms in Python before rendering, it's not always possible\nto access the browser's timezone. Instead, the local timezone of the Python kernel will be\nused by default. In the case of a cloud notebook service, this may be difference than\nthe browser's local timezone.\n\nVegaFusion's local timezone may be customized using the ``vegafusion.set_local_tz``\nfunction. For example:\n\n.. code-block:: python\n\n    import vegafusion as vf\n    vf.set_local_tz(\"America/New_York\")\n\nWhen using ``JupyterChart`` or the ``\"jupyter\"`` renderer, the browser's local timezone\nis used.\n\nDuckDB Integration\n^^^^^^^^^^^^^^^^^^\nVegaFusion provides optional integration with `DuckDB`_. Because DuckDB can perform queries on pandas\nDataFrames without converting through Arrow, it's often faster than VegaFusion's default query engine\nwhich requires this conversion. See the `VegaFusion DuckDB`_ documentation for more information.\n\nInteractivity\n^^^^^^^^^^^^^\nWhen using the default ``\"html\"`` renderer with charts that use selections to filter data interactively,\nthe VegaFusion data transformer will include all of the data that participates in the interaction in the resulting chart specification. This makes it an unsuitable approach for building interactive charts that filter large datasets (e.g. crossfiltering a dataset with over a million rows).\n\nThe ``JupyterChart`` widget and the ``\"jupyter\"`` renderer are designed to work with the VegaFusion\ndata transformer to evaluate data transformations interactively in response to selection events.\nThis avoids the need to transfer the full dataset to the browser, and so supports\ninteractive exploration of aggregated datasets on the order of millions of rows.\n\nEither use ``JupyterChart`` directly:\n\n.. code-block:: python\n\n    import altair as alt\n    alt.data_transformers.enable(\"vegafusion\")\n    ...\n    alt.JupyterChart(chart)\n\nOr, enable the ``\"jupyter\"`` renderer and display charts as usual:\n\n.. code-block:: python\n\n    import altair as alt\n    alt.data_transformers.enable(\"vegafusion\")\n    alt.renderers.enable(\"jupyter\")\n    ...\n    chart\n\nCharts rendered this way require a running Python kernel and Jupyter Widget extension to\ndisplay, which works in many frontends including locally in the classic notebook, JupyterLab, and VSCode,\nas well as remotely in Colab and Binder.\n\n.. _passing-data-by-url:\n\nPassing Data by URL\n~~~~~~~~~~~~~~~~~~~\nA common approach when working with large datasets is to not embed the data directly,\nbut rather store it separately and pass it to the chart by URL. \nThis not only addresses the issue of large notebooks, but also leads to better\ninteractivity performance with large datasets.\n\n\nLocal Data Server\n^^^^^^^^^^^^^^^^^\nA convenient way to do this is by using the `altair_data_server <https://github.com/altair-viz/altair_data_server>`_\npackage. It serves your data from a local threaded server. First install the package:\n\n.. code-block:: none\n\n   pip install altair_data_server\n\nAnd then enable the data transformer::\n\n    import altair as alt\n    alt.data_transformers.enable('data_server')\n\nNote that this approach may not work on some cloud-based Jupyter notebook services.\nA disadvantage of this method is that if you reopen the notebook, the plot may no longer display\nas the data server is no longer running.\n\nLocal Filesystem\n^^^^^^^^^^^^^^^^\nYou can also persist the data to disk and then pass the path to Altair:\n\n.. altair-plot::\n   :output: none\n\n   url = 'data.json'\n   data.to_json(url, orient='records')\n\n   chart = alt.Chart(url).mark_line().encode(\n       x='x:Q',\n       y='y:Q'\n   )\n   pprint(chart.to_dict())\n\n\n.. code-block:: none\n\n    {'$schema': 'https://vega.github.io/schema/vega-lite/v2.4.1.json',\n     'config': {'view': {'height': 300, 'width': 300}},\n     'data': {'url': 'data.json'},\n     'encoding': {'x': {'field': 'x', 'type': 'quantitative'},\n                  'y': {'field': 'y', 'type': 'quantitative'}},\n     'mark': 'line'}\n\n\nAltair also has a ``JSON`` data transformer that will do this\ntransparently when enabled::\n\n    alt.data_transformers.enable('json')\n\nThere is a similar CSV data transformer, but it must be used more carefully\nbecause CSV does not preserve data types as JSON does.\n\nNote that the filesystem approach may not work on some cloud-based Jupyter\nnotebook services. A disadvantage of this method is also a loss of portability: if the notebook is\never moved, the data file must accompany it or the plot may not display.\n\nVega Datasets\n^^^^^^^^^^^^^\nIf you are working with one of the vega datasets, you can pass the data by URL\nusing the ``url`` attribute:\n\n.. code-block:: python\n\n   from altair.datasets import data\n   source = data.cars.url\n\n   alt.Chart(source).mark_point() # etc.\n\n\nPNG and SVG Renderers\n~~~~~~~~~~~~~~~~~~~~~\nThe approaches presented in :ref:`passing-data-by-url` have the disadvantage that the data is no longer\ncontained in the notebook and you therefore lose portability or don't see the charts when you reopen the notebook.\nFurthermore, the data still needs to be sent to the frontend, e.g. your browser, and any calculations will happen there.\n\nYou might achieve a speedup by enabling either the PNG or SVG renderer \nas described in :ref:`renderers`. Instead of a Vega-Lite specification, they will \nprerender the visualization and send only a static image to your notebook. This can\ngreatly reduce the amount of data that is being transmitted. The downside with this approach is,\nthat you loose all interactivity features of Altair.\n\nBoth renderers require you to install the `vl-convert`_ package, see :ref:`saving-png`.\n\n.. _preaggregate-and-filter:\n\nPreaggregate and Filter in pandas\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nAnother common approach is to perform data transformations such as aggregations\nand filters using pandas before passing the data to Altair.\n\nFor example, to create a bar chart for the ``barley`` dataset summing up ``yield`` grouped by ``site``,\nit is convenient to pass the unaggregated data to Altair:\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.barley()\n\n    alt.Chart(source).mark_bar().encode(\n        x=\"sum(yield):Q\",\n        y=alt.Y(\"site:N\").sort(\"-x\")\n    )\n\n\nThe above works well for smaller datasets but let's imagine that the ``barley`` dataset\nis larger and the resulting Altair chart slows down your notebook environment.\nTo reduce the data being passed to Altair, you could subset the dataframe to \nonly the necessary columns:\n\n.. code-block:: python\n\n    alt.Chart(source[[\"yield\", \"site\"]]).mark_bar().encode(\n        x=\"sum(yield):Q\",\n        y=alt.Y(\"site:N\").sort(\"-x\")\n    )\n\nYou could also precalculate the sum in pandas which would reduce the size of the dataset even more:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.barley()\n    source_aggregated = (\n        source.groupby(\"site\")[\"yield\"].sum().rename(\"sum_yield\").reset_index()\n    )\n\n    alt.Chart(source_aggregated).mark_bar().encode(\n        x=\"sum_yield:Q\",\n        y=alt.Y(\"site:N\").sort(\"-x\")\n    )\n\n\nPreaggregate Boxplot\n^^^^^^^^^^^^^^^^^^^^\nA boxplot is a useful way to visualize the distribution of data and it is simple to create\nin Altair.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    df = data.cars()\n\n    alt.Chart(df).mark_boxplot().encode(\n        x=\"Miles_per_Gallon:Q\",\n        y=\"Origin:N\",\n        color=alt.Color(\"Origin\").legend(None)\n    )\n\nIf you have a lot of data, you can perform the necessary calculations in pandas and only\npass the resulting summary statistics to Altair.\n\nFirst, let's define a few parameters where ``k`` stands for the multiplier which is used\nto calculate the boundaries of the whiskers.\n\n.. altair-plot::\n    :output: none\n    \n    import altair as alt\n    import pandas as pd\n    from altair.datasets import data\n\n    k = 1.5\n    group_by_column = \"Origin\"\n    value_column = \"Miles_per_Gallon\"\n\n\nIn the next step, we will calculate the summary statistics which are needed for the boxplot.\n\n.. altair-plot::\n    :output: repr\n    :chart-var-name: agg_stats\n    \n    df = data.cars()\n\n    agg_stats = df.groupby(group_by_column)[value_column].describe()\n    agg_stats[\"iqr\"] = agg_stats[\"75%\"] - agg_stats[\"25%\"]\n    agg_stats[\"min_\"] = agg_stats[\"25%\"] - k * agg_stats[\"iqr\"]\n    agg_stats[\"max_\"] = agg_stats[\"75%\"] + k * agg_stats[\"iqr\"]\n    data_points = df[[value_column, group_by_column]].merge(\n        agg_stats.reset_index()[[group_by_column, \"min_\", \"max_\"]]\n    )\n    # Lowest data point which is still above or equal to min_\n    # This will be the lower end of the whisker\n    agg_stats[\"lower\"] = (\n        data_points[data_points[value_column] >= data_points[\"min_\"]]\n        .groupby(group_by_column)[value_column]\n        .min()\n    )\n    # Highest data point which is still below or equal to max_\n    # This will be the upper end of the whisker\n    agg_stats[\"upper\"] = (\n        data_points[data_points[value_column] <= data_points[\"max_\"]]\n        .groupby(group_by_column)[value_column]\n        .max()\n    )\n    # Store all outliers as a list\n    agg_stats[\"outliers\"] = (\n        data_points[\n            (data_points[value_column] < data_points[\"min_\"])\n            | (data_points[value_column] > data_points[\"max_\"])\n        ]\n        .groupby(group_by_column)[value_column]\n        .apply(list)\n    )\n    agg_stats = agg_stats.reset_index()\n    \n    # Show whole dataframe\n    pd.set_option(\"display.max_columns\", 15)\n    print(agg_stats)\n\nAnd finally, we can create the same boxplot as above but we only pass the calculated\nsummary statistics to Altair instead of the full dataset.\n\n.. altair-plot::\n\n    base = alt.Chart(agg_stats).encode(\n        y=\"Origin:N\"\n    )\n\n    rules = base.mark_rule().encode(\n        x=alt.X(\"lower\").title(\"Miles_per_Gallon\"),\n        x2=\"upper\",\n    )\n\n    bars = base.mark_bar(size=14).encode(\n        x=\"25%\",\n        x2=\"75%\",\n        color=alt.Color(\"Origin\").legend(None),\n    )\n\n    ticks = base.mark_tick(color=\"white\", size=14).encode(\n        x=\"50%\"\n    )\n\n    outliers = base.transform_flatten(\n        flatten=[\"outliers\"]\n    ).mark_point(\n        style=\"boxplot-outliers\"\n    ).encode(\n        x=\"outliers:Q\",\n        color=\"Origin\",\n    )\n    \n    rules + bars + ticks + outliers\n\n.. _VegaFusion: https://vegafusion.io\n.. _DuckDB: https://duckdb.org/\n.. _VegaFusion DuckDB: https://vegafusion.io/duckdb.html\n.. _vl-convert: https://github.com/vega/vl-convert\n"
  },
  {
    "path": "doc/user_guide/marks/arc.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-arc-marks:\n\nArc\n~~~\n\nArc marks are circular arcs defined by a center point plus angular and radial extents.\nArc marks are typically used for radial plots such as pie and donut charts.\n\nArc Mark Properties\n-------------------\n.. altair-plot::\n    :hide-code:\n    :div_class: properties-example\n\n    import altair as alt\n    import numpy as np\n    import pandas as pd\n\n    rad_slider = alt.binding_range(min=0, max=100, step=1)\n    rad_var = alt.param(bind=rad_slider, value=0, name=\"radius\")\n\n    rad2_slider = alt.binding_range(min=0, max=100, step=1)\n    rad_var2 = alt.param(bind=rad_slider, value=50, name=\"radius2\")\n\n    theta_slider = alt.binding_range(min=-2 * np.pi, max=2 * np.pi)\n    theta_var = alt.param(bind=theta_slider, value=-0.73, name=\"theta_single_arc\")\n\n    theta_slider2 = alt.binding_range(min=-2 * np.pi, max=2 * np.pi)\n    theta2_var = alt.param(bind=theta_slider, value=0.73, name=\"theta2_single_arc\")\n\n    corner_slider = alt.binding_range(min=0, max=50, step=1)\n    corner_var = alt.param(bind=corner_slider, value=0, name=\"cornerRadius\")\n\n    pad_slider = alt.binding_range(min=0, max=np.pi / 2)\n    pad_var = alt.param(bind=pad_slider, value=0, name=\"padAngle\")\n\n    source = pd.DataFrame({\"category\": [1, 2, 3, 4, 5, 6], \"value\": [4, 6, 10, 3, 7, 8]})\n\n    c1 = alt.Chart(source, title=\"Single Arc\").mark_arc(\n        radius=rad_var,\n        radius2=rad_var2,\n        theta=theta_var,\n        theta2=theta2_var,\n        cornerRadius=corner_var,\n        padAngle=pad_var,\n    )\n\n    c2 = (\n        alt.Chart(source, title=\"Stacked Arcs\")\n        .mark_arc(\n            radius=rad_var,\n            radius2=rad_var2,\n            cornerRadius=corner_var,\n            padAngle=pad_var,\n        )\n        .encode(\n            theta=alt.Theta(field=\"value\", type=\"quantitative\"),\n            color=alt.Color(field=\"category\", type=\"nominal\"),\n        )\n    )\n\n    alt.hconcat(c1.properties(width=200), c2.properties(width=200)).add_params(\n        rad_var, rad_var2, theta_var, theta2_var, corner_var, pad_var\n    )\n\nAn ``arc`` mark definition can contain any :ref:`standard mark properties <mark-properties>`\nand the following special properties:\n\n.. altair-object-table:: altair.MarkDef\n   :properties: radius radius2 innerRadius outerRadius theta theta2 cornerRadius padAngle radiusOffset radius2Offset thetaOffset theta2Offset\n\nExamples\n--------\n\nWe can create a pie chart by encoding ``theta`` or ``color`` arc marks.\n\n.. altair-plot::\n    import pandas as pd\n    import altair as alt\n\n    source = pd.DataFrame({\"category\": [1, 2, 3, 4, 5, 6], \"value\": [4, 6, 10, 3, 7, 8]})\n\n    alt.Chart(source).mark_arc().encode(\n        theta=alt.Theta(field=\"value\", type=\"quantitative\"),\n        color=alt.Color(field=\"category\", type=\"nominal\"),\n    )\n\n\nSetting ``innerRadius`` to non-zero values will create a donut chart.\n\n.. altair-plot::\n    import pandas as pd\n    import altair as alt\n\n    source = pd.DataFrame({\"category\": [1, 2, 3, 4, 5, 6], \"value\": [4, 6, 10, 3, 7, 8]})\n\n    alt.Chart(source).mark_arc(innerRadius=50).encode(\n        theta=alt.Theta(field=\"value\", type=\"quantitative\"),\n        color=alt.Color(field=\"category\", type=\"nominal\"),\n    )\n\n\nYou can also add a text layer to add labels to a pie chart.\n\n.. altair-plot::\n    import pandas as pd\n    import altair as alt\n\n    source = pd.DataFrame(\n        {\"category\": [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"], \"value\": [4, 6, 10, 3, 7, 8]}\n    )\n\n    base = alt.Chart(source).encode(\n        theta=alt.Theta(\"value:Q\").stack(True),\n        color=alt.Color(\"category:N\").legend(None),\n    )\n\n    pie = base.mark_arc(outerRadius=120)\n    text = base.mark_text(radius=140, size=20).encode(\n        text=\"category:N\"\n    )\n\n    pie + text\n\n"
  },
  {
    "path": "doc/user_guide/marks/area.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-area-marks:\n\nArea\n~~~~~~~~~~\n``area`` represent multiple data element as a single area shape.\nArea marks are often used to show change over time, using either a single area or stacked areas.\n\nArea Mark Properties\n--------------------\n.. altair-plot::\n    :hide-code:\n    :div_class: properties-example\n\n    import altair as alt\n    import pandas as pd\n\n    interpolate_select = alt.binding_select(\n        options=[\n            \"basis\",\n            \"cardinal\",\n            \"catmull-rom\",\n            \"linear\",\n            \"monotone\",\n            \"natural\",\n            \"step\",\n            \"step-after\",\n            \"step-before\",\n        ],\n        name=\"interpolate\",\n    )\n    interpolate_var = alt.param(bind=interpolate_select, value=\"linear\")\n\n    tension_slider = alt.binding_range(min=0, max=1, step=0.05, name=\"tension\")\n    tension_var = alt.param(bind=tension_slider, value=0)\n\n    source = pd.DataFrame({\"u\": [1, 2, 3, 4, 5, 6], \"v\": [28, 55, 42, 34, 36, 38]})\n\n    alt.Chart(source).mark_area(interpolate=interpolate_var, tension=tension_var).encode(\n        x=\"u\", y=\"v\"\n    ).add_params(interpolate_var, tension_var)\n\n\nAn ``area`` mark definition can contain any :ref:`standard mark properties <mark-properties>`\nand the following line interpolation as well as line and point overlay properties:\n\n.. altair-object-table:: altair.MarkDef\n   :properties: align baseline orient interpolate tension line point\n\nExamples\n--------\n\nArea Chart\n^^^^^^^^^^\nUsing ``area`` mark with one temporal or ordinal field (typically on ``x``) and\none quantitative field (typically on ``y``) produces an area chart. For example,\nthe following area chart shows a number of unemployment people in the US over time.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.unemployment_across_industries.url\n\n    alt.Chart(source).mark_area().encode(\n        x=\"yearmonth(date):T\",\n        y=\"sum(count):Q\",\n    ).properties(width=300, height=200)\n\n\nArea Chart with Overlaying Lines and Point Markers\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nBy setting ``line`` and ``point`` properties of the mark definition\nto ``true`` or an object defining a property of the overlaying point marks, we can overlay line and point markers on top of area.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks.url\n\n    alt.Chart(source).mark_area(line=True, point=True).encode(\n        x=\"date:T\",\n        y=\"price:Q\",\n    ).transform_filter(\n        alt.datum.symbol == \"GOOG\"\n    )\n\nInstead of using a single color as the fill color of the area, we can set it to a gradient.\nIn this example, we are also customizing the overlay. For more information about gradient options see the `Vega-Lite Gradient documentation\n<https://vega.github.io/vega-lite/docs/gradient.html>`_.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks()\n\n    alt.Chart(source).transform_filter(alt.datum.symbol == \"GOOG\").mark_area(\n        line={\"color\": \"darkgreen\"},\n        color=alt.Gradient(\n            gradient=\"linear\",\n            stops=[\n                alt.GradientStop(color=\"white\", offset=0),\n                alt.GradientStop(color=\"darkgreen\", offset=1),\n            ],\n            x1=1,\n            x2=1,\n            y1=1,\n            y2=0,\n        ),\n    ).encode(\n        alt.X(\"date:T\"),\n        alt.Y(\"price:Q\"),\n    )\n\n\nStacked Area Chart\n^^^^^^^^^^^^^^^^^^\nAdding a color field to area chart creates stacked area chart by default. For example, here we split the area chart by industry.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.unemployment_across_industries.url\n\n    alt.Chart(source).mark_area().encode(\n        alt.X(\"yearmonth(date):T\").axis(format=\"%Y\", domain=False, tickSize=0),\n        alt.Y(\"sum(count):Q\"),\n        alt.Color(\"series:N\").scale(scheme=\"category20b\"),\n    )\n\n\nNormalized Stacked Area Chart\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou can also create a normalized stacked area chart by setting ``stack`` to ``\"normalize\"`` in the encoding channel. Here we can easily see the percentage of unemployment across industries.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.unemployment_across_industries.url\n\n    alt.Chart(source).mark_area().encode(\n        alt.X(\"yearmonth(date):T\").axis(format=\"%Y\", domain=False, tickSize=0),\n        alt.Y(\"sum(count):Q\").stack(\"normalize\"),\n        alt.Color(\"series:N\").scale(scheme=\"category20b\"),\n    )\n\n\nSteamgraph\n^^^^^^^^^^^\n\nWe can also shift the stacked area chart's baseline to center and produces a streamgraph by setting ``stack`` to ``\"center\"`` in the encoding channel.\nAdding the ``interactive`` method allows for zooming and panning the x-scale.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.unemployment_across_industries.url\n\n    alt.Chart(source).mark_area().encode(\n        alt.X(\"yearmonth(date):T\").axis(format=\"%Y\", domain=False, tickSize=0),\n        alt.Y(\"sum(count):Q\").stack(\"center\").axis(None),\n        alt.Color(\"series:N\").scale(scheme=\"category20b\"),\n    ).interactive()\n\n\nRanged Area\n^^^^^^^^^^^\nSpecifying ``X2`` or ``Y2`` for the quantitative axis of area marks produce ranged areas. For example, we can use ranged area to highlight the mininium and maximum measured temperatures over time, aggregated by ``monthdate``.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.seattle_weather()\n\n    alt.Chart(source).mark_area(opacity=0.7).encode(\n        alt.X(\"monthdate(date):T\").title(\"Date\"),\n        alt.Y(\"mean(temp_max):Q\").title(\"Daily Temperature Range (C)\"),\n        alt.Y2(\"mean(temp_min):Q\"),\n    ).properties(width=600, height=300)\n\n"
  },
  {
    "path": "doc/user_guide/marks/bar.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-bar-marks:\n\nBar\n~~~\n\nBar marks are useful in many visualizations, including bar charts, stacked bar charts, and timelines.\n\nBar Mark Properties\n-------------------\n.. altair-plot::\n    :hide-code:\n    :div_class: properties-example\n\n    import altair as alt\n    import pandas as pd\n\n    corner_slider = alt.binding_range(min=0, max=50, step=1)\n    corner_var = alt.param(bind=corner_slider, value=0, name=\"cornerRadius\")\n\n    source = pd.DataFrame(\n        {\n            \"a\": [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\"],\n            \"b\": [28, 55, 43, 91, 81, 53, 19, 87, 52],\n        }\n    )\n\n    alt.Chart(source).mark_bar(cornerRadius=corner_var).encode(\n        x=alt.X(\"a:N\").axis(labelAngle=0),\n        y=\"b:Q\",\n    ).add_params(corner_var)\n\n\n\nA ``bar`` mark definition can contain any :ref:`standard mark properties <mark-properties>`\nand the following special properties:\n\n.. altair-object-table:: altair.MarkDef\n   :properties: width height orient align baseline binSpacing cornerRadius cornerRadiusEnd cornerRadiusTopLeft cornerRadiusTopRight cornerRadiusBottomRight cornerRadiusBottomLeft\n\nExamples\n--------\n\nSingle Bar Chart\n^^^^^^^^^^^^^^^^\nMapping a quantitative field to either ``x`` or ``y`` of the ``bar`` mark produces a single bar chart.\n\n.. altair-plot::\n    import altair as alt\n    from altair import datum\n    from altair.datasets import data\n\n    source = data.population.url\n\n    alt.Chart(source).mark_bar().encode(\n        alt.X(\"sum(people):Q\").title(\"Population\")\n    ).transform_filter(\n        datum.year == 2000\n    )\n\n\nBar Chart\n^^^^^^^^^\nIf we map a different discrete field to the ``y`` channel, we can produce a horizontal bar chart. Specifying ``alt.Step(20)`` will adjust the bar's height per discrete step.\n\n.. altair-plot::\n    import altair as alt\n    from altair import datum\n    from altair.datasets import data\n\n    source = data.population.url\n\n    alt.Chart(source).mark_bar().encode(\n        alt.X(\"sum(people):Q\").title(\"Population\"),\n        alt.Y(\"age:O\"),\n    ).transform_filter(\n        datum.year == 2000\n    ).properties(height=alt.Step(20))\n\n\nBar Chart with a Temporal Axis\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nWhile the ``bar`` mark typically uses the ``x`` and ``y`` channels to encode\na pair of discrete and continuous fields, it can also be used with continuous\nfields on both channels. For example, given a bar chart with a temporal field\non ``x``, we can see that the x-scale is a continuous scale. By default, the size of\nbars on continuous scales will be set based on the ``continuousBandSize`` config.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.seattle_weather()\n\n    alt.Chart(source).mark_bar().encode(\n        alt.X(\"month(date):T\").title(\"Date\"),\n        alt.Y(\"mean(precipitation):Q\"),\n    )\n\n\nHistograms\n^^^^^^^^^^\n\nIf the data is not pre-aggregated (i.e. each record in the data field represents one item), mapping a binned quantitative field to ``x`` and aggregate ``count`` to ``y`` produces a histogram.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.movies.url\n\n    alt.Chart(source).mark_bar().encode(\n        alt.X(\"IMDB Rating:Q\").bin(),\n        y='count()',\n    )\n\nStacked Bar Chart\n^^^^^^^^^^^^^^^^^\nAdding color to the bar chart (by using the ``color`` attribute) creates a stacked bar chart by default. Here we also customize the color’s scale range to make the color a little nicer. (See ``stack`` for more details about customizing stack.)\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.barley()\n\n    alt.Chart(source).mark_bar().encode(\n        x=\"variety\",\n        y=\"sum(yield)\",\n        color=\"site\"\n    )\n\n\nGrouped Bar Chart with Offset\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n.. altair-plot::\n    import altair as alt\n    import pandas as pd\n\n    source = pd.DataFrame(\n        {\n            \"category\": [\"A\", \"A\", \"B\", \"B\", \"C\", \"C\"],\n            \"group\": [\"x\", \"y\", \"z\", \"x\", \"y\", \"z\"],\n            \"value\": [0.1, 0.6, 0.9, 0.7, 0.2, 0.6],\n        }\n    )\n\n    alt.Chart(source).mark_bar().encode(\n        x=alt.X(\"category:N\"),\n        xOffset=\"group:N\",\n        y=alt.Y(\"value:Q\"),\n        color=alt.Color(\"group:N\"),\n    )\n\n"
  },
  {
    "path": "doc/user_guide/marks/boxplot.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-boxplot-marks:\n\nBox Plot\n~~~~~~~~~\n\nA box plot summarizes a distribution of quantitative values using a set of summary statistics. The median tick in the box represents the median. The lower and upper parts of the box represent the first and third quartile respectively. Depending on the type of box plot, the ends of the whiskers can represent multiple things.\n\nTo create a box plot, use the ``mark_boxplot`` method.\n\nBox Plot Mark Properties\n^^^^^^^^^^^^^^^^^^^^^^^^\nA box plot's mark definition can contain the following properties:\n\n.. altair-object-table:: altair.BoxPlotDef\n   :properties: extent orient size color opacity\n\nBesides the properties listed above, ``box``, ``median``, ``rule``, ``outliers``, and ``ticks`` can be used to specify the underlying mark properties for different parts of the box plots as well.\n\nTypes of Box Plot\n^^^^^^^^^^^^^^^^^\nAltair supports two types of box plots, defined by the ``extent`` property in the mark definition object.\n\n1. Tukey Box Plot is the default box plot in Altair. For a Tukey box plot, the whisker 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). In this type of box plot, you can specify the constant k by setting the ``extent``. If there are outlier points beyond the whisker, they will be displayed using point marks.\nBy default, the extent is ``1.5``.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    alt.Chart(source).mark_boxplot().encode(\n        alt.X(\"Miles_per_Gallon:Q\").scale(zero=False)\n    )\n\n\n2. ``min-max`` Box Plot is a box plot where the lower and upper whiskers are defined as the min and max respectively. No points will be considered as outliers for this type of box plots.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    alt.Chart(source).mark_boxplot(extent=\"min-max\").encode(\n        alt.X(\"Miles_per_Gallon:Q\").scale(zero=False),\n        alt.Y(\"Origin:N\"),\n    )\n\n\nDimension and Orientation\n^^^^^^^^^^^^^^^^^^^^^^^^^\nAltair supports bot 1D and 2D box plots:\n\n1D box plot shows the distribution of a continuous field.\nA box plot’s orientation is automatically determined by the continuous field axis. For example, you can create a vertical 1D box plot by encoding a continuous field on the y axis.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    alt.Chart(source).mark_boxplot().encode(\n        alt.Y(\"Miles_per_Gallon:Q\").scale(zero=False)\n    )\n\n2D box plot shows the distribution of a continuous field, broken down by categories.\n\nFor 2D box plots with one continuous field and one discrete field, the box plot will be horizontal if the continuous field is on the x axis.\n\nColor, Size, and Opacity Encoding Channels\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou can customize the color, size, and opacity of the box in the box plot by using the ``color``, ``size``, and ``opacity`` encoding channels. The ``size`` is applied to only the box and median tick. The ``color`` is applied to only the box and the outlier points. Meanwhile, the ``opacity`` is applied to the whole ``boxplot``.\n\nAn example of a box plot where the ``color`` encoding channel is specified.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    alt.Chart(source).mark_boxplot(extent=\"min-max\").encode(\n        alt.X(\"Origin:N\"),\n        alt.Y(\"Miles_per_Gallon:Q\").scale(zero=False),\n        alt.Color(\"Origin:N\").legend(None),\n    )\n\n\nTooltip Encoding Channels\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou can add custom tooltips to box plots. The custom tooltip will override the default box plot's tooltips.\n\nIf the field in the tooltip encoding is unaggregated, it replaces the tooltips of the outlier marks. On the other hand, if the field in the tooltip encoding is aggregated, it replaces the tooltips of the box and whisker marks.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    alt.Chart(source).mark_boxplot(extent=\"min-max\").encode(\n        alt.X(\"Miles_per_Gallon:Q\").scale(zero=False),\n        alt.Y(\"Origin:N\"),\n        alt.Tooltip(\"mean(Miles_per_Gallon)\"),\n    )\n\n"
  },
  {
    "path": "doc/user_guide/marks/circle.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-circle-marks:\n\nCircle\n~~~~~~\n\n``circle`` mark is similar to ``point`` mark, except that (1) the ``shape`` value is always set to ``circle`` (2) they are filled by default.\n\nCircle Mark Properties\n^^^^^^^^^^^^^^^^^^^^^^\nA ``circle`` mark definition can contain any :ref:`standard mark properties <mark-properties>`\nand the following special properties:\n\n.. altair-object-table:: altair.MarkDef\n   :properties: size\n\nScatter Plot with Circle\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nHere is an example scatter plot with ``circle`` marks:\n\n.. altair-plot::\n   import altair as alt\n   from altair.datasets import data\n\n   source = data.cars.url\n\n   alt.Chart(source).mark_circle().encode(\n      x=(\"Horsepower:Q\"),\n      y=(\"Miles_per_Gallon:Q\"),\n   )\n\n\n"
  },
  {
    "path": "doc/user_guide/marks/errorband.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-errorband-marks:\n\nError Band\n~~~~~~~~~~\n\nAn error band summarizes an error range of quantitative values using a set of summary statistics, representing by area. Error band in Altair can either be used to aggregate raw data or directly visualize aggregated data.\n\nTo create an error band, use ``mark_errorband``.\n\nError Band Mark Properties\n^^^^^^^^^^^^^^^^^^^^^^^^^^\nAn ``errorband`` mark definition can contain the following properties:\n\n.. altair-object-table:: altair.ErrorBandDef\n   :properties: extent orient color opacity interpolate tension\n\nBesides the properties listed above, ``band`` and ``borders`` can be used to specify\nthe underlying mark properties for different parts of the error band as well.\n\nComparing the usage of Error Band to the usage of Error Bar\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAll the properties and usage of error band are identical to error bar’s, except the ``band`` and ``borders`` that replace the error bar’s ``rule`` and ``ticks``.\n\n**Error Band**\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars.url\n\n    alt.Chart(source).mark_errorband(extent=\"ci\", borders=True).encode(\n        x=\"year(Year)\",\n        y=alt.Y(\n            \"Miles_per_Gallon:Q\",\n            scale=alt.Scale(zero=False),\n            title=\"Miles per Gallon (95% CIs)\",\n        ),\n    )\n\n\n**Error Bar**\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars.url\n\n    alt.Chart(source).mark_errorbar(extent=\"ci\", ticks=True).encode(\n        x=\"year(Year)\",\n        y=alt.Y(\n            \"Miles_per_Gallon:Q\",\n            scale=alt.Scale(zero=False),\n            title=\"Miles per Gallon (95% CIs)\",\n        ),\n    )\n\nUsing Error Band to Aggregate Raw Data\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nIf the data is not aggregated yet, Altair will aggregate the data based on the ``extent`` properties in the mark definition as done in the error band showing confidence interval above. All other ``extent`` values are defined in Error Bar.\n\nUsing Error Band to Visualize Aggregated Data\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n1. Data is aggregated with low and high values of the error band\nIf the data is already pre-aggregated with low and high values of the error band, you can directly specify ``x`` and ``x2`` (or ``y`` and ``y2``) to use error band as a ranged mark.\n\n.. altair-plot::\n    import altair as alt\n    import pandas as pd\n\n    source = pd.DataFrame(\n        {\n            \"ci1\": [23.5007, 25.8214, 26.4472, 27.7074],\n            \"ci0\": [19.6912, 20.8554, 21.9749, 22.6203],\n            \"center\": [21.5735, 23.3750, 24.0611, 25.0931],\n            \"Year\": [189302400000, 220924800000, 252460800000, 283996800000],\n        }\n    )\n\n    band = alt.Chart(source).mark_errorband().encode(\n        alt.Y(\n            \"ci1:Q\",\n            scale=alt.Scale(zero=False),\n            title=\"Mean of Miles per Gallon (95% CIs)\"\n        ),\n        alt.Y2(\"ci0:Q\"),\n        alt.X(\"year(Year)\"),\n    )\n\n    line = alt.Chart(source).mark_line().encode(\n        alt.Y(\"center:Q\"),\n        alt.X(\"year(Year)\")\n    )\n\n    band + line\n\n2. Data is aggregated with center and error value(s)\nIf the data is already pre-aggregated with center and error values of the error band, you can use ``x/y``, ``x/yError``, and ``x/yError2`` as defined in Error Bar.\n\nDimension\n^^^^^^^^^\n\nAltair supports both 1D and 2D error bands:\n\nA **1D error band** shows the error range of a continuous field; it can be used to show the global error range of the whole plot.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars.url\n\n    band = alt.Chart(source).mark_errorband(extent=\"stdev\").encode(\n        alt.Y(\"Miles_per_Gallon:Q\").title(\"Miles per Gallon\")\n    )\n\n    points = alt.Chart(source).mark_point().encode(\n        x=\"Horsepower:Q\",\n        y=\"Miles_per_Gallon:Q\",\n    )\n\n    band + points\n\n\nA **2D error** band shows the error range of a continuous field for each dimension value such as year.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    line = alt.Chart(source).mark_line().encode(\n        x=\"Year\",\n        y=\"mean(Miles_per_Gallon)\"\n    )\n\n    band = alt.Chart(source).mark_errorband(extent=\"ci\").encode(\n        x=\"Year\",\n        y=alt.Y(\"Miles_per_Gallon\").title(\"Miles/Gallon\"),\n    )\n\n    band + line\n\nColor and Opacity Encoding Channels\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou can customize the color and opacity of the bands by using the ``color`` and ``opacity`` encoding channels.\n\nHere is an example of a ``errorband`` with the ``color`` encoding channel set to ``alt.value('black')``.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars.url\n\n    alt.Chart(source).mark_errorband(extent=\"ci\", borders=True).encode(\n        x=\"year(Year)\",\n        y=alt.Y(\"Miles_per_Gallon:Q\")\n            .scale(zero=False)\n            .title(\"Miles per Gallon (95% CIs)\"),\n        color=alt.value(\"black\")\n    )\n\n\n"
  },
  {
    "path": "doc/user_guide/marks/errorbar.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-errorbar-marks:\n\nError Bar\n~~~~~~~~~~\n\nAn error bar summarizes an error range of quantitative values using a set of summary statistics,\nrepresenting by rules (and optional end ticks). Error bars in Altair can either be used to aggregate\nraw data or directly visualize aggregated data.\n\nTo create an error bar, use ``mark_errorbar``.\n\nError Bar Mark Properties\n^^^^^^^^^^^^^^^^^^^^^^^^^\nAn ``errorbar`` mark definition can contain the following properties:\n\n.. altair-object-table:: altair.ErrorBarDef\n   :properties: extent orient color opacity\n\nBesides the properties listed above, ``rule`` and ``ticks`` can be used to specify\nthe underlying mark properties for different parts of the error bar as well.\n\nUsing Error Bars to Aggregate Raw Data\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nIf the data is not aggregated yet, Altair will aggregate the data based on the ``extent`` properties in the mark definition.\n\n1. **Error bars showing standard error** is the default error bar in Vega-Lite. It can also be explicitly specified by setting ``extent`` to ``\"stderr\"``. The length of lower and upper rules represent standard error. By default, the rule marks expand from the mean.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.barley()\n\n    error_bars = alt.Chart(source).mark_errorbar().encode(\n        x=alt.X('yield:Q').scale(zero=False),\n        y=alt.Y('variety:N')\n    )\n\n    points = alt.Chart(source).mark_point(\n        filled=True,\n        color=\"black\",\n    ).encode(\n        x=alt.X(\"mean(yield)\"),\n        y=alt.Y(\"variety:N\"),\n    )\n\n    error_bars + points\n\n2. **Error bar showing standard deviation** can be specified by setting ``extent`` to ``\"stdev\"``. For this type of error bar, the length of lower and upper rules represent standard deviation. Like an error bar that shows Standard Error, the rule marks expand from the mean by default.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.barley()\n\n    error_bars = alt.Chart(source).mark_errorbar(extent=\"stdev\").encode(\n        x=alt.X(\"yield:Q\").scale(zero=False),\n        y=alt.Y(\"variety:N\"),\n    )\n\n    points = alt.Chart(source).mark_point(filled=True, color=\"black\").encode(\n        x=alt.X(\"mean(yield)\"),\n        y=alt.Y(\"variety:N\"),\n    )\n\n    error_bars + points\n\n\n3. **Error bars showing interquartile range** can be specified by setting ``extent`` to ``\"iqr\"``. For this type of error bar, the rule marks expand from the first quartile to the third quartile.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.barley()\n\n    error_bars = alt.Chart(source).mark_errorbar(extent=\"iqr\").encode(\n        x=alt.X(\"yield:Q\").scale(zero=False),\n        y=alt.Y(\"variety:N\"),\n    )\n\n    points = alt.Chart(source).mark_point(\n        filled=True,\n        color=\"black\"\n    ).encode(\n        x=alt.X(\"mean(yield)\"),\n        y=alt.Y(\"variety:N\"),\n    )\n\n    error_bars + points\n\nUsing Error Bars to Visualize Aggregated Data\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n1. Data is aggregated with low and high values of the error bars\nIf the data is already pre-aggregated with low and high values of the error bars, you can directly specify ``x`` and ``x2`` (or ``y`` and ``y2``) to use error bar as a ranged mark.\n\n.. altair-plot::\n    import altair as alt\n    import pandas as pd\n\n    source = pd.DataFrame({\n        \"lower_yield\": [23.1311, 23.9503, 24.7778, 21.7823],\n        \"upper_yield\": [43.5522, 38.9775, 46.9167, 48.9732],\n        \"center\": [32.4, 30.96667, 33.966665, 30.45],\n        \"variety\": [\"Glabron\", \"Manchuria\", \"No. 457\", \"No. 462\"],\n    })\n\n    bar = alt.Chart(source).mark_errorbar().encode(\n        alt.X(\"upper_yield:Q\").scale(zero=False).title(\"yield\"),\n        alt.X2(\"lower_yield:Q\"),\n        alt.Y(\"variety:N\"),\n    )\n\n    point = alt.Chart(source).mark_point(\n        filled=True,\n        color=\"black\"\n    ).encode(\n        alt.X(\"center:Q\"),\n        alt.Y(\"variety:N\")\n    )\n\n    point + bar\n\n2. Data is aggregated with center and error value(s)\nIf the data is already pre-aggregated with center and error values of the error bars, you can directly specify ``x`` as center, ``xError`` and ``xError2`` as error values extended from center (or ``y``, ``yError``, and ``yError2``). If ``x/yError2`` is omitted, error bars have symmetric error values.\n\n.. altair-plot::\n    import altair as alt\n    import pandas as pd\n\n    source = pd.DataFrame({\n        \"yield_error\": [7.5522, 6.9775, 3.9167, 11.9732],\n        \"yield_center\": [32.4, 30.96667, 33.966665, 30.45],\n        \"variety\": [\"Glabron\", \"Manchuria\", \"No. 457\", \"No. 462\"],\n    })\n\n    bar = alt.Chart(source).mark_errorbar().encode(\n        x=alt.X(\"yield_center:Q\").scale(zero=False).title(\"yield\"),\n        xError=(\"yield_error:Q\"),\n        y=alt.Y(\"variety:N\"),\n    )\n\n    point = alt.Chart(source).mark_point(\n        filled=True,\n        color=\"black\"\n    ).encode(\n        alt.X(\"yield_center:Q\"),\n        alt.Y(\"variety:N\"),\n    )\n\n    point + bar\n\n**Note** if error is pre-aggregated with asymmetric error values one of ``x/yError`` and ``x/yError2`` has to be positive value and other has to be negative value.\n\nDimension & Orientation\n^^^^^^^^^^^^^^^^^^^^^^^\nAltair supports both 1D and 2D error bands:\n\nA **1D error band** shows the error range of a continuous field.\n\nThe orientation of an error bar is automatically determined by the continuous field axis. For example, you can create a vertical 1D error bar by encoding a continuous field on the y axis.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.barley()\n\n    error_bars = alt.Chart(source).mark_errorbar().encode(\n        alt.Y(\"yield:Q\").scale(zero=False)\n    )\n\n    points = alt.Chart(source).mark_point(\n        filled=True,\n        color=\"black\"\n    ).encode(\n        alt.Y(\"mean(yield)\")\n    )\n\n    error_bars + points\n\nA **2D error bar** shows the error range of a continuous field, broken down by categories.\n\nFor 2D error bars with one continuous field and one discrete field, the error bars will be horizontal if the continuous field is on the x axis. Alternatively, if the continuous field is on the y axis, the error bar will be vertical.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.barley()\n\n    error_bars = alt.Chart(source).mark_errorbar(extent=\"stdev\").encode(\n        alt.Y(\"yield:Q\").scale(zero=False),\n        alt.X(\"variety:N\"),\n    )\n\n    points = alt.Chart(source).mark_point(\n        filled=True,\n        color=\"black\",\n    ).encode(\n        alt.Y(\"mean(yield)\"),\n        alt.X(\"variety:N\"),\n    )\n\n    error_bars + points\n\nColor, and Opacity Encoding Channels\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nYou can customize the color and opacity of the bars by using the ``color`` and ``opacity`` encoding channels.\n\nHere is an example of a ``errorbar`` with the ``color`` encoding channel set to ``alt.value(\"#4682b4\")``.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.barley()\n\n    error_bars = alt.Chart(source).mark_errorbar(ticks=True).encode(\n        alt.X(\"yield:Q\").scale(zero=False),\n        alt.Y(\"variety:N\"),\n        color=alt.value(\"#4682b4\"),\n    )\n\n    points = alt.Chart(source).mark_point(\n        filled=True,\n        color=\"black\"\n    ).encode(\n        alt.X(\"mean(yield)\"),\n        alt.Y(\"variety:N\"),\n    )\n\n    error_bars + points\n\nTooltip Encoding Channels\n^^^^^^^^^^^^^^^^^^^^^^^^^\nYou can add custom tooltips to error bars. The custom tooltip will override the default error bar’s tooltips.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.barley()\n\n    alt.Chart(source).mark_errorbar().encode(\n        alt.X(\"yield:Q\").scale(zero=False),\n        alt.Y(\"variety:N\"),\n        tooltip=\"variety:N\",\n    )\n"
  },
  {
    "path": "doc/user_guide/marks/geoshape.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-geoshape-marks:\n\nGeoshape\n^^^^^^^^^^^^^\n``mark_geoshape`` represents an arbitrary shapes whose geometry is determined by specified spatial data.\n\nGeoshape Mark Properties\n^^^^^^^^^^^^^^^^^^^^^^^^\nA ``geoshape`` mark can contain any :ref:`standard mark properties <mark-properties>`.\n\nBasic Map\n^^^^^^^^^\nAltair can work with many different geographical data formats, including geojson and topojson files. Often, the most convenient input format to use is a ``GeoDataFrame``. Here we load the Natural Earth 110m Cultural Vectors dataset and create a basic map using ``mark_geoshape``:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n    import geopandas as gpd\n\n    url = \"https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_countries.zip\"\n    gdf_ne = gpd.read_file(url)  # zipped shapefile\n    gdf_ne = gdf_ne[[\"NAME\", \"CONTINENT\", \"POP_EST\", 'geometry']]\n\n    alt.Chart(gdf_ne).mark_geoshape()\n\nIn the example above, Altair applies a default blue ``fill`` color and uses a default map projection (``equalEarth``). We can customize the colors and boundary stroke widths using standard mark properties. Using the ``project`` method we can also define a custom map projection manually:\n\n.. altair-plot::\n\n    alt.Chart(gdf_ne).mark_geoshape(\n        fill='lightgrey', stroke='white', strokeWidth=0.5\n    ).project(\n        type='albers'\n    )\n\nFocus & Filtering\n^^^^^^^^^^^^^^^^^\nBy default Altair automatically adjusts the projection so that all the data fits within the width and height of the chart.\nMultiple approaches can be used to focus on specific regions of your spatial data. Namely:\n\n1. Filter the source data within your GeoDataFrame.\n2. Filter the source data using a ``transform_filter``.\n3. Specify ``scale`` (zoom level) and ``translate`` (panning) within the ``project`` method.\n4. Specify ``fit`` (extent) within the ``project`` & ``clip=True`` in the mark properties.\n\nThe following examples applies these approaches to focus on continental Africa:\n\n1. Filter the source data within your GeoDataFrame:\n\n.. altair-plot::\n\n    gdf_sel = gdf_ne.query(\"CONTINENT == 'Africa'\")\n\n    alt.Chart(gdf_sel).mark_geoshape()\n\n2. Filter the source data using a ``transform_filter``:\n\n.. altair-plot::\n\n    alt.Chart(gdf_ne).mark_geoshape().transform_filter(\n        alt.datum.CONTINENT == 'Africa'\n    )\n\n3. Specify ``scale`` (zoom level) and ``translate`` (panning) within the ``project`` method:\n\n.. altair-plot::\n\n    alt.Chart(gdf_ne).mark_geoshape().project(\n        scale=200,\n        translate=[160, 160]  # lon, lat\n    )\n\n4. Specify ``fit`` (extent) within the ``project`` method & ``clip=True`` in the mark properties:\n\n.. altair-plot::\n\n    extent_roi = gdf_ne.query(\"CONTINENT == 'Africa'\")\n    xmin, ymin, xmax, ymax = extent_roi.total_bounds\n\n    # fit object should be a GeoJSON-like Feature or FeatureCollection \n    extent_roi_feature = {\n        \"type\": \"Feature\", \n        \"geometry\": {\"type\": \"Polygon\", \n                     \"coordinates\": [[\n                         [xmax, ymax],\n                         [xmax, ymin],\n                         [xmin, ymin],\n                         [xmin, ymax],\n                         [xmax, ymax]]]},\n        \"properties\": {}\n    }\n\n    alt.Chart(gdf_ne).mark_geoshape(clip=True).project(\n        fit=extent_roi_feature\n    )\n\nCartesian coordinates\n^^^^^^^^^^^^^^^^^^^^^\nThe default projection of Altair is ``equalEarth``, which accurately represents the areas of the world's landmasses relative each other. This default assumes that your geometries are in degrees and referenced by longitude and latitude values.\nAnother widely used coordinate system for data visualization is the 2d cartesian coordinate system. This coordinate system does not take into account the curvature of the Earth.\n\nIn the following example the input geometry is not projected and is instead rendered directly in raw coordinates using the ``identity`` projection type. We have to define the ``reflectY`` as well since Canvas and SVG treats positive ``y`` as pointing down.\n\n.. altair-plot::\n\n    alt.Chart(gdf_sel).mark_geoshape().project(\n        type='identity',\n        reflectY=True\n    )\n\n.. note::\n\n    When working with spatial data, it's important to be aware of coordinate reference systems and geometry winding order. For detailed information on projections and winding order, see the :ref:`Spatial Data <spatial-data>` section in the data guide.\n\nMapping Polygons\n^^^^^^^^^^^^^^^^\nThe following example maps the visual property of the ``NAME`` column using the ``color`` encoding.\n\n.. altair-plot::\n\n    alt.Chart(gdf_sel).mark_geoshape().encode(\n        color='NAME:N'\n    )\n\nSince each country is represented by a (multi)polygon, we can separate the ``stroke`` and ``fill`` definitions as such:\n\n.. altair-plot::\n\n    alt.Chart(gdf_sel).mark_geoshape(\n        stroke='white',\n        strokeWidth=1.5\n    ).encode(\n        fill='NAME:N'\n    )\n\nMapping Lines\n^^^^^^^^^^^^^\nBy default Altair assumes for ``mark_geoshape`` that the mark's color is used for the fill color instead of the stroke color.\nThis means that if your source data contain (multi)lines, you will have to explicitly define the ``filled`` value as ``False``.\n\nCompare:\n\n.. altair-plot::\n\n    gs_line = gpd.GeoSeries.from_wkt(['LINESTRING (0 0, 1 1, 0 2, 2 2, -1 1, 1 0)'])\n    alt.Chart(gs_line).mark_geoshape().project(\n        type='identity',\n        reflectY=True\n    )\n\nWith:\n\n.. altair-plot::\n\n    gs_line = gpd.GeoSeries.from_wkt(['LINESTRING (0 0, 1 1, 0 2, 2 2, -1 1, 1 0)'])\n    alt.Chart(gs_line).mark_geoshape(\n        filled=False\n    ).project(\n        type='identity',\n        reflectY=True\n    )\n\nUsing this approach one can also style Polygons as if they are Linestrings:\n\n.. altair-plot::\n\n    alt.Chart(gdf_sel).mark_geoshape(\n        filled=False,\n        strokeWidth=1.5\n    ).encode(\n        stroke='NAME:N'\n    )\n\nMapping Points\n^^^^^^^^^^^^^^\nPoints can be drawn when they are defined as ``Points`` within a GeoDataFrame using ``mark_geoshape``.\nWe first assign the centroids of Polygons as Point geometry and plot these:\n\n.. altair-plot::\n    \n    # .copy() to prevent changing the original `gdf_sel` variable\n    # derive centroid in a projected CRS (in meters) and visualize in a geographic CRS (in degrees).\n    gdf_centroid = gpd.GeoDataFrame(\n        data=gdf_sel.copy(),\n        geometry=gdf_sel.geometry.to_crs(epsg=3857).centroid.to_crs(epsg=4326)\n    )\n\n    alt.Chart(gdf_centroid).mark_geoshape()\n\n\nCaveat: To use the ``size`` encoding for the Points you will need to use the ``mark_circle`` in combination with the ``latitude`` and ``longitude`` encoding channel definitions.\n\n.. altair-plot::\n\n    gdf_centroid[\"lon\"] = gdf_centroid.geometry.x\n    gdf_centroid[\"lat\"] = gdf_centroid.geometry.y\n\n    alt.Chart(gdf_centroid).mark_circle().encode(\n        longitude=\"lon:Q\", latitude=\"lat:Q\", size=\"POP_EST:Q\"\n    )\n\nAltair also contains expressions related to geographical features. We can for example define the ``centroids`` using a ``geoCentroid`` expression:\n\n.. altair-plot::\n\n    basemap = alt.Chart(gdf_sel).mark_geoshape(\n         fill='lightgray', stroke='white', strokeWidth=0.5\n    )\n\n    bubbles = alt.Chart(gdf_sel).transform_calculate(\n        centroid=alt.expr.geoCentroid(None, alt.datum)\n    ).mark_circle(\n        stroke='black'\n    ).encode(\n        longitude='centroid[0]:Q',\n        latitude='centroid[1]:Q',\n        size=\"POP_EST:Q\"\n    )\n\n    (basemap + bubbles).project(\n        type='identity', reflectY=True\n    )\n\nChoropleths\n^^^^^^^^^^^\n\nAn alternative to showing the population sizes as bubbles, is to create a \"Choropleth\" map. These are geographical heatmaps where the color or each region are mapped to the values of a column in the dataframe.\n\n.. altair-plot::\n\n    alt.Chart(gdf_sel).mark_geoshape().encode(\n        color='POP_EST'\n    )\n\nWhen we create choropleth maps, we need to be careful, because although the color changes according to the value of the column we are interested in, the size is tied to the area of each country and we might miss interesting values in small countries just because we can't easily see them on the map (e.g. if we were to visualize population density).\n\nLookup datasets\n^^^^^^^^^^^^^^^\nSometimes your data is separated in two datasets. One ``DataFrame`` with the data and one ``GeoDataFrame`` with the geometries.\nIn this case you can use the ``lookup`` transform to collect related information from the other dataset.\n\nYou can use the ``lookup`` transform in two directions:\n\n1. Use a ``GeoDataFrame`` with geometries as source and lookup related information in another ``DataFrame``.\n2. Use a ``DataFrame`` as source and lookup related geometries in a ``GeoDataFrame``.\n\nDepending on your use-case one or the other is more favorable.\n\nFirst we show an example of the first approach.\nHere we lookup the field ``rate`` from the ``df_us_unemp`` DataFrame, where the ``gdf_us_counties`` GeoDataFrame is used as source:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    gdf_us_counties = data.us_10m(layer=\"counties\")\n    df_us_unemp = data.unemployment()\n\n    alt.Chart(gdf_us_counties).mark_geoshape().transform_lookup(\n        lookup='id',\n        from_=alt.LookupData(data=df_us_unemp, key='id', fields=['rate'])\n    ).encode(\n        alt.Color('rate:Q')\n    ).project(\n        type='albersUsa'\n    )\n\nNext, we show an example of the second approach.\nHere we lookup the geometries through the fields ``geometry`` and ``type`` from the ``gdf_us_counties`` GeoDataFrame, where the ``df_us_unemp`` DataFrame is used as source.\n\n.. altair-plot::\n\n    alt.Chart(df_us_unemp).mark_geoshape().transform_lookup(\n        lookup='id',\n        from_=alt.LookupData(data=gdf_us_counties, key='id', fields=['geometry', 'type'])\n    ).encode(\n        alt.Color('rate:Q')\n    ).project(\n        type='albersUsa'\n    )\n\nChoropleth Classification\n^^^^^^^^^^^^^^^^^^^^^^^^^\nIn addition to displaying a continuous quantitative variable, choropleths can also be used to show discrete levels of a variable. While we should generally be careful to not create artificial groups when discretizing a continuous variable, it can be very useful when we have natural cutoff levels of a variable that we want to showcase clearly.\nWe first define a utility function ``classify()`` that we will use to showcase different approaches to make a choropleth map.\nWe apply it to define a choropleth map of the unemployment statistics of 2018 of US counties using a ``linear`` scale.\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    def classify(type, domain=None, nice=False, title=None):\n        # define data\n        us_counties = alt.topo_feature(data.us_10m.url, \"counties\")\n        us_unemp = data.unemployment.url\n\n        # define choropleth scale\n        if \"threshold\" in type:\n            scale = alt.Scale(type=type, domain=domain, scheme=\"inferno\")\n        else:\n            scale = alt.Scale(type=type, nice=nice, scheme=\"inferno\")\n\n        # define title\n        if title is None:\n            title = type\n\n        # define choropleth chart\n        choropleth = (\n            alt.Chart(us_counties, title=title)\n            .mark_geoshape()\n            .transform_lookup(\n                lookup=\"id\", from_=alt.LookupData(data=us_unemp, key=\"id\", fields=[\"rate\"])\n            )\n            .encode(\n                alt.Color(\n                    \"rate:Q\",\n                    scale=scale,\n                    legend=alt.Legend(\n                        direction=\"horizontal\", orient=\"bottom\", format=\".1%\"\n                    ),\n                )\n            )\n            .project(type=\"albersUsa\")\n        )\n        return choropleth\n\n    classify(type='linear')\n\nWe visualize the unemployment ``rate`` in percentage of 2018 with a ``linear`` scale range\nusing a ``mark_geoshape()`` to present the spatial patterns on a map. Each value/\ncounty has defined a `unique` color. This gives a bit of insight, but often we like to\ngroup the distribution into classes.\n\nBy grouping values in classes, you can classify the dataset so all values/geometries in\neach class get assigned the same color.\n\nHere we present a number of scale methods how Altair can be used:\n\n- ``quantile``, this type will divide your dataset (`domain`) into intervals of similar sizes. Each class contains more or less the same number of values/geometries (`equal counts`). The scale definition will look as follow:\n\n.. code:: python\n\n    alt.Scale(type='quantile')\n\nAnd applied in our utility function:\n\n.. altair-plot::\n\n    classify(type='quantile', title=['quantile', 'equal counts'])\n\n- ``quantize``, this type will divide the extent of your dataset (`range`) in equal intervals. Each class contains different number of values, but the step size is equal (`equal range`). The scale definition will look as follow:\n\n.. code:: python\n\n    alt.Scale(type='quantize')\n\nAnd applied in our utility function:\n\n.. altair-plot::\n\n    classify(type='quantize', title=['quantize', 'equal range'])\n\n\nThe ``quantize`` method can also be used in combination with ``nice``. This will `\"nice\"` the domain before applying quantization. As such:\n\n.. code:: python\n\n    alt.Scale(type='quantize', nice=True)\n\nAnd applied in our utility function:\n\n.. altair-plot::\n\n    classify(type='quantize', nice=True, title=['quantize', 'equal range nice'])\n\n- ``threshold``, this type will divide your dataset in separate classes by manually specifying the cut values. Each class is separated by defined classes. The scale definition will look as follow:\n\n.. code:: python\n\n    alt.Scale(type='threshold', domain=[0.05, 0.20])\n\nAnd applied in our utility function:\n\n.. altair-plot::\n\n    classify(type='threshold', domain=[0.05, 0.20])\n\nThe definition above will create 3 classes. One class with values below `0.05`, one\nclass with values from `0.05` to `0.20` and one class with values higher than `0.20`.\n\nSo which method provides the optimal data classification for choropleth maps? As\nusual, it depends.\n\nThere is another popular method that aid in determining class breaks.\nThis method will maximize the similarity of values in a class while maximizing the\ndistance between the classes (`natural breaks`). The method is also known as the\nFisher-Jenks algorithm and is similar to k-Means in 1D:\n\n-  By using the external Python package ``jenskpy`` we can derive these `optimum` breaks as such:\n\n.. code:: python\n\n    >>> from jenkspy import JenksNaturalBreaks\n    >>> jnb = JenksNaturalBreaks(5)\n    >>> jnb.fit(df_us_unemp['rate'])\n    >>> jnb.inner_breaks_\n    [0.061, 0.088, 0.116, 0.161]\n\nAnd applied in our utility function:\n\n.. altair-plot::\n\n    classify(type='threshold', domain=[0.061, 0.088, 0.116, 0.161],\n            title=['threshold Jenks','natural breaks'])\n\nCaveats:\n\n- For the type ``quantize`` and ``quantile`` scales we observe that the default number of classes is 5. You can change the number of classes using a ``SchemeParams()`` object. In the above specification we can change ``scheme='turbo'`` into ``scheme=alt.SchemeParams('turbo', count=2)`` to manually specify usage of 2 classes for the scheme within the scale.\n- The natural breaks method will determine the optimal class breaks given the required number of classes, but how many classes should you pick? One can investigate usage of goodness of variance fit (GVF), aka Jenks optimization method, to determine this.\n\nRepeat a Map\n^^^^^^^^^^^^\nThe :class:`RepeatChart` pattern, accessible via the :meth:`Chart.repeat` method\nprovides a convenient interface for a particular type of horizontal or vertical\nconcatenation of a multi-dimensional dataset.\n\nIn the following example we have a dataset referenced as ``source`` from which we use\nthree columns defining the ``population``, ``engineers`` and ``hurricanes`` of each US state.\n\nThe ``states`` is defined by making use of :func:`topo_feature` using ``url`` and ``feature``\nas parameters. This is a convenience function for extracting features from a topojson url.\n\nThese variables we provide as list in the ``.repeat()`` operator, which we refer to within\nthe color encoding as ``alt.repeat('row')``\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    states = alt.topo_feature(data.us_10m.url, 'states')\n    source = data.population_engineers_hurricanes.url\n    variable_list = ['population', 'engineers', 'hurricanes']\n\n    alt.Chart(states).mark_geoshape(tooltip=True).encode(\n        alt.Color(alt.repeat('row'), type='quantitative')\n    ).transform_lookup(\n        lookup='id',\n        from_=alt.LookupData(source, 'id', variable_list)\n    ).project(\n        type='albersUsa'\n    ).repeat(\n        row=variable_list\n    ).resolve_scale(\n        color='independent'\n    )\n\nFacet a Map\n^^^^^^^^^^^\nThe :class:`FacetChart` pattern, accessible via the :meth:`Chart.facet` method\nprovides a convenient interface for a particular type of horizontal or vertical\nconcatenation of a dataset where one field contain multiple ``variables``.\n\nUnfortunately, until https://github.com/vega/altair/issues/2369 is resolved\nregular faceting will not work for geographic visualization:\n\n.. altair-plot::\n\n    source = data.population_engineers_hurricanes().melt(id_vars=['state', 'id'])\n    us_states = data.us_10m(layer=\"states\")\n    gdf_comb = gpd.GeoDataFrame(source.join(us_states, on='id', rsuffix='_y'))\n\n    alt.Chart(gdf_comb).mark_geoshape().encode(\n        color=alt.Color('value:Q'),\n        facet=alt.Facet('variable:N').columns(3)\n    ).properties(\n        width=180,\n        height=130\n    ).resolve_scale('independent')\n\nFor now,\nthere are two possible workarounds.\nYou can either pass the geographic data\nvia a transform lookup instead of via :class:`Chart`\nas in the :ref:`gallery_us_incomebrackets_by_state_facet` gallery example.\nOr,\nyou can manually filter the data in pandas,\nand create a small multiples chart via concatenation\nas in the following example:\n\n.. altair-plot::\n\n    source = data.population_engineers_hurricanes().melt(id_vars=['state', 'id'])\n    us_states = data.us_10m(layer=\"states\")\n    gdf_comb = gpd.GeoDataFrame(source.join(us_states, on='id', rsuffix='_y'))\n\n    alt.concat(\n        *(\n            alt.Chart(gdf_comb[gdf_comb.variable == var], title=var)\n            .mark_geoshape()\n            .encode(\n                color=alt.Color(\n                    \"value:Q\", legend=alt.Legend(orient=\"bottom\", direction=\"horizontal\")\n                )\n            )\n            .project('albersUsa')\n            .properties(width=180, height=130)\n            for var in gdf_comb.variable.unique()\n        ),\n        columns=3\n    ).resolve_scale(color=\"independent\")\n\nInteractions\n^^^^^^^^^^^^\nOften a map does not come alone, but is used in combination with another chart.\nHere we provide an example of an interactive visualization of a bar chart and a map.\n\nThe data shows the states of the US in combination with a bar chart showing the 15 most\npopulous states. Using an ``alt.selection_point()`` we define a selection parameter that connects to our left-mouseclick.\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    # load the data\n    us_states = data.us_10m(layer=\"states\")\n    us_population = data.population_engineers_hurricanes()[[\"state\", \"id\", \"population\"]]\n\n    # define a pointer selection\n    click_state = alt.selection_point(fields=[\"state\"])\n    # define a condition on the opacity encoding depending on the selection\n    opacity = alt.when(click_state).then(alt.value(1)).otherwise(alt.value(0.2))\n\n    # create a choropleth map using a lookup transform\n    choropleth = (\n        alt.Chart(us_states)\n        .mark_geoshape()\n        .transform_lookup(\n            lookup=\"id\", from_=alt.LookupData(us_population, \"id\", [\"population\", \"state\"])\n        )\n        .encode(\n            color=\"population:Q\",\n            opacity=opacity,\n            tooltip=[\"state:N\", \"population:Q\"],\n        )\n        .project(type=\"albersUsa\")\n    )\n\n    # create a bar chart with the same conditional ``opacity`` encoding.\n    bars = (\n        alt.Chart(\n            us_population.nlargest(15, \"population\"), title=\"Top 15 states by population\"\n        )\n        .mark_bar()\n        .encode(\n            x=\"population\",\n            opacity=opacity,\n            color=\"population\",\n            y=alt.Y(\"state\").sort(\"-x\"),\n        )\n    )\n\n    (choropleth & bars).add_params(click_state)\n\n\nThe interaction is two-directional. If you click (shift-click for multi-selection) on a geometry or bar the selection receive an ``opacity`` of ``1`` and the remaining an ``opacity`` of ``0.2``.\nIt is also possible to create charts with interval selections,\nas can be seen in the :ref:`gallery_interval_selection_map_quakes` gallery example.\n\nExpressions\n^^^^^^^^^^^\nAltair expressions can be used within a geographical visualization. The following example\nvisualize earthquakes on the globe using an ``orthographic`` projection. Where we can rotate\nthe earth on a single-axis. (``rotate0``). The utility function :func:`sphere` is adopted to\nget a disk of the earth as background. The GeoDataFrame with the earthquakes has an ``XYZ``` point geometry, where each coordinate represent ``lon``, ``lat`` and ``depth`` respectively.\nWe use here an elegant way to access the nested point coordinates from the geometry column directly to draw circles. Using this approach we do not need to assign them to three separate columns first.\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    # load data\n    gdf_quakies = data.earthquakes()\n    gdf_world = data.world_110m(layer=\"countries\")\n\n    # define parameters\n    range0 = alt.binding_range(min=-180, max=180, step=5, name='rotate longitude ')\n    rotate0 = alt.param(value=120, bind=range0)\n    hover = alt.selection_point(on=\"pointerover\", clear=\"pointerout\")\n\n    # world disk\n    sphere = alt.Chart(alt.sphere()).mark_geoshape(\n        fill=\"aliceblue\", stroke=\"black\", strokeWidth=1.5\n    )\n\n    # countries as shapes\n    world = alt.Chart(gdf_world).mark_geoshape(\n        fill=\"mintcream\", stroke=\"black\", strokeWidth=0.35\n    )\n\n    # earthquakes as circles with fill for depth and size for magnitude\n    # the hover param is added on the mar_circle only\n    quakes = (\n        alt.Chart(gdf_quakies)\n        .mark_circle(opacity=0.35, tooltip=True, stroke=\"black\")\n        .transform_calculate(\n            lon=\"datum.geometry.coordinates[0]\",\n            lat=\"datum.geometry.coordinates[1]\",\n            depth=\"datum.geometry.coordinates[2]\",\n        )\n        .transform_filter(\n            ((rotate0 * -1 - 90 < alt.datum.lon) & (alt.datum.lon < rotate0 * -1 + 90)).expr\n        )\n        .encode(\n            longitude=\"lon:Q\",\n            latitude=\"lat:Q\",\n            strokeWidth=alt.when(hover, empty=False).then(alt.value(1)).otherwise(alt.value(0)),\n            size=alt.Size(\n                \"mag:Q\",\n                scale=alt.Scale(type=\"pow\", range=[1, 1000], domain=[0, 6], exponent=4),\n            ),\n            fill=alt.Fill(\n                \"depth:Q\", scale=alt.Scale(scheme=\"lightorange\", domain=[0, 400])\n            ),\n        )\n        .add_params(hover, rotate0)\n    )\n\n    # define projection and add the rotation param for all layers\n    comb = alt.layer(sphere, world, quakes).project(\n        type=\"orthographic\",\n        rotate=alt.expr(f\"[{rotate0.name}, 0, 0]\")\n    )\n    comb\n\nThe earthquakes are displayed using a ``mark_geoshape`` and filtered once out of sight of\nthe visible part of the world. A hover highlighting is added to get more insight of each earthquake.\n\nTile-based Maps\n^^^^^^^^^^^^^^^\n\nTo use tile-based maps (such as OpenStreetMap) as the background for ``mark_geoshape``,\nyou can use the package `Altair Tiles <https://altair-viz.github.io/altair_tiles>`_ together with Altair.\n"
  },
  {
    "path": "doc/user_guide/marks/image.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-image-marks:\n\nImage\n~~~~~~\n\nImage marks allow external images, such as icons or photographs, to be included in Altair visualizations. Image files such as PNG or JPG images are loaded from provided URLs.\n\nImage Mark Properties\n^^^^^^^^^^^^^^^^^^^^^\nAn ``image`` mark can contain any :ref:`standard mark properties <mark-properties>`\nand the following special properties:\n\n.. altair-object-table:: altair.MarkDef\n   :properties: url aspect align baseline\n\nScatter Plot with Image Marks\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. altair-plot::\n    import altair as alt\n    import pandas as pd\n\n    source = pd.DataFrame.from_records(\n        [\n            {\n                \"x\": 0.5,\n                \"y\": 0.5,\n                \"img\": \"https://vega.github.io/vega-datasets/data/ffox.png\",\n            },\n            {\n                \"x\": 1.5,\n                \"y\": 1.5,\n                \"img\": \"https://vega.github.io/vega-datasets/data/gimp.png\",\n            },\n            {\n                \"x\": 2.5,\n                \"y\": 2.5,\n                \"img\": \"https://vega.github.io/vega-datasets/data/7zip.png\",\n            },\n        ]\n    )\n\n    alt.Chart(source).mark_image(width=50, height=50).encode(x=\"x\", y=\"y\", url=\"img\")\n\nShow Image Marks with Selection\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nThis example demonstrates how to display image marks with drag selection. We create two charts:\none with point marks and the other with image marks, applying the selection filter only to the latter.\nBy combining these two charts, we can achieve the desired result.\n\n.. altair-plot::\n\n    import altair as alt\n    import pandas as pd\n\n    source = pd.DataFrame.from_records(\n        [{'a': 1, 'b': 1, 'image': 'https://altair-viz.github.io/_static/altair-logo-light.png'},\n        {'a': 2, 'b': 2, 'image': 'https://avatars.githubusercontent.com/u/11796929?s=200&v=4'}]\n    )\n\n    brush = alt.selection_interval()\n    point = alt.Chart(source).mark_circle(size=100).encode(\n        x='a',\n        y='b',\n    ).add_params(\n        brush\n    )\n\n    img = alt.Chart(source).mark_image(width=50, height=75).encode(\n        x='a',\n        y='b',\n        url='image'\n    ).transform_filter(\n        brush\n    )\n\n    point + img\n\nIn the layered chart, images may overlap one other. \nAn alternative is to use a faceted image chart beside the original chart:\n\n.. altair-plot::\n\n    img_faceted = alt.Chart(source, width=50, height=75).mark_image().encode(\n        url='image'\n    ).facet(\n        alt.Facet('image', title='', header=alt.Header(labelFontSize=0))\n    ).transform_filter(\n        brush\n    )\n\n    point | img_faceted\n\nIf we want the images to not be visible in the initial chart\nwe could add ``empty=False`` to the interval selection.\nHowever,\nAltair will not automatically resize the chart area to include the faceted chart\nwhen a selection is made,\nwhich means it seems like the selection has no effect.\nIn order to resize the chart automatically,\nwe need to explicitly set the ``autosize`` option in the ``configure`` method.\n\n.. altair-plot::\n\n    brush = alt.selection_interval(empty=False)\n    point = alt.Chart(source).mark_circle(size=100).encode(\n        x='a',\n        y='b',\n    ).add_params(\n        brush\n    )\n    img_faceted = alt.Chart(source, width=50, height=75).mark_image().encode(\n        url='image'\n    ).facet(\n        alt.Facet('image', title='', header=alt.Header(labelFontSize=0))\n    ).transform_filter(\n        brush\n    )\n\n    (point | img_faceted).configure(\n        autosize=alt.AutoSizeParams(resize=True)\n    )\n\n\nUse Local Images as Image Marks\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nWe could also show local images by first converting them to base64-encoded_ strings.\nIn the example below,\nwe load two images saved in the Altair repo;\nyou can replace the image paths below with the location of the desired images on your machine.\nThis approach also works with images stored as Numpy Arrays\nas can be seen in the tutorial :ref:`Displaying Numpy Images in Tooltips <numpy-tooltip-imgs>`.\n\n.. altair-plot::\n\n    import base64\n    import altair as alt\n    import pandas as pd\n\n    from io import BytesIO\n    from PIL import Image\n\n\n    image_paths = [\"doc/_static/gray-square.png\",\"doc/_static/altair-logo-light.png\"]\n    base64_images = []\n\n    for image_path in image_paths:\n        pil_image = Image.open(image_path)\n        output = BytesIO()\n        pil_image.save(output, format='PNG')\n        base64_images.append(\n            \"data:image/png;base64,\" + base64.b64encode(output.getvalue()).decode()\n        )\n\n    source = pd.DataFrame({\"x\": [1, 2], \"y\": [1, 2], \"image\": base64_images})\n    alt.Chart(source).mark_image(\n        width=50,\n        height=50\n    ).encode(\n        x='x',\n        y='y',\n        url='image'\n    )\n\nImage Tooltip\n^^^^^^^^^^^^^\nThis example shows how to render images in tooltips.\nEither URLs or local file paths can be used to reference the images.\nTo render the image, you must use the special column name \"image\" in your data \nand pass it as a list to the tooltip encoding.\n\n.. altair-plot::\n\n    import altair as alt\n    import pandas as pd\n\n    source = pd.DataFrame.from_records(\n        [{'a': 1, 'b': 1, 'image': 'https://altair-viz.github.io/_static/altair-logo-light.png'},\n         {'a': 2, 'b': 2, 'image': 'https://avatars.githubusercontent.com/u/11796929?s=200&v=4'}]\n    )\n\n    alt.Chart(source).mark_circle(size=200).encode(\n        x='a',\n        y='b',\n        tooltip=['image']  # Must be a list containing a field called \"image\"\n    )\n\n\n.. _base64-encoded: https://en.wikipedia.org/wiki/Binary-to-text_encoding\n"
  },
  {
    "path": "doc/user_guide/marks/index.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-marks:\n\nMarks\n~~~~~\n\nWe saw in :ref:`user-guide-encoding` that the :meth:`~Chart.encode` method is\nused to map columns to visual attributes of the plot.\nThe ``mark`` property is what specifies how exactly those attributes\nshould be represented on the plot.\n\nAltair supports the following primitive mark types:\n\n=========================================  =========================================  ================================================================================\nMark                                       Method                                     Description\n=========================================  =========================================  ================================================================================\n:ref:`user-guide-arc-marks`                :meth:`~Chart.mark_arc`                    A pie chart.\n:ref:`user-guide-area-marks`               :meth:`~Chart.mark_area`                   A filled area plot.\n:ref:`user-guide-bar-marks`                :meth:`~Chart.mark_bar`                    A bar plot.\n:ref:`user-guide-circle-marks`             :meth:`~Chart.mark_circle`                 A scatter plot with filled circles.\n:ref:`user-guide-geoshape-marks`           :meth:`~Chart.mark_geoshape`               Visualization containing spatial data\n:ref:`user-guide-image-marks`              :meth:`~Chart.mark_image`                  A scatter plot with image markers.\n:ref:`user-guide-line-marks`               :meth:`~Chart.mark_line`                   A line plot.\n:ref:`user-guide-point-marks`              :meth:`~Chart.mark_point`                  A scatter plot with configurable point shapes.\n:ref:`user-guide-rect-marks`               :meth:`~Chart.mark_rect`                   A filled rectangle, used for heatmaps\n:ref:`user-guide-rule-marks`               :meth:`~Chart.mark_rule`                   A vertical or horizontal line spanning the axis.\n:ref:`user-guide-square-marks`             :meth:`~Chart.mark_square`                 A scatter plot with filled squares.\n:ref:`user-guide-text-marks`               :meth:`~Chart.mark_text`                   A scatter plot with points represented by text.\n:ref:`user-guide-tick-marks`               :meth:`~Chart.mark_tick`                   A vertical or horizontal tick mark.\n:ref:`user-guide-trail-marks`              :meth:`~Chart.mark_trail`                  A line with variable widths.\n=========================================  =========================================  ================================================================================\n\nIn addition, Altair provides the following composite marks:\n\n=========================================  ==============================  ================================  ==================================\nMark Name                                  Method                          Description                       Example\n=========================================  ==============================  ================================  ==================================\n:ref:`user-guide-boxplot-marks`            :meth:`~Chart.mark_boxplot`     A box plot.                       :ref:`gallery_boxplot`\n:ref:`user-guide-errorband-marks`          :meth:`~Chart.mark_errorband`   A continuous band around a line.  :ref:`gallery_line_with_ci`\n:ref:`user-guide-errorbar-marks`           :meth:`~Chart.mark_errorbar`    An error bar around a point.      :ref:`gallery_errorbars_with_ci`\n=========================================  ==============================  ================================  ==================================\n\nIn Altair, marks can be most conveniently specified by the ``mark_*`` methods\nof the Chart object (e.g. ``mark_bar``), which take optional keyword arguments to configure the look of the marks.\n\n.. _mark-properties:\n\nMark Properties\n_______________\n\nThis section lists standard mark properties for primitive mark types. Additionally, some marks may have special mark properties (listed in their documentation page).\n\nGeneral Mark Properties\n^^^^^^^^^^^^^^^^^^^^^^^\n\n.. altair-object-table:: altair.MarkDef\n   :properties: aria description style tooltip clip invalid order\n\nPosition and Offset Properties\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. altair-object-table:: altair.MarkDef\n   :properties: x x2 width height y y2 xOffset x2Offset yOffset y2Offset\n\nColor Properties\n^^^^^^^^^^^^^^^^\n\n.. altair-object-table:: altair.MarkDef\n   :properties: filled color fill stroke blend opacity fillOpacity strokeOpacity\n\nStroke Style Properties\n^^^^^^^^^^^^^^^^^^^^^^^\n\n.. altair-object-table:: altair.MarkDef\n   :properties: strokeCap strokeDash strokeDashOffset strokeJoin strokeMiterLimit strokeWidth\n\nHyperlink Properties\n^^^^^^^^^^^^^^^^^^^^\nMarks can act as hyperlinks when the ``href`` property or :ref:`channel <hyperlink-channel>`\nis defined. When the ``href`` property is specified, the ``cursor`` mark property is\nset to ``\"pointer\"`` by default to serve as affordance for hyperlinks.\n\n.. altair-object-table:: altair.MarkDef\n   :properties: href cursor\n\n.. toctree::\n   :hidden:\n\n   arc\n   area\n   bar\n   boxplot\n   circle\n   errorband\n   errorbar\n   geoshape\n   image\n   line\n   point\n   rect\n   rule\n   square\n   text\n   tick\n   trail"
  },
  {
    "path": "doc/user_guide/marks/line.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-line-marks:\n\nLine\n~~~~\nThe ``line`` mark represents the data points stored in a field with a line connecting all of these points. Line marks are commonly used to depict trajectories or change over time. Unlike most other marks that represent one data element per mark, one line mark represents multiple data element as a single line, akin to ``area`` and ``trail``.\n\nNote: For line segments that connect (x,y) positions to (x2,y2) positions, please use ``rule`` marks. For continuous lines with varying size, please use ``trail`` marks.\n\nLine Mark Properties\n--------------------\n.. altair-plot::\n    :hide-code:\n    :div_class: properties-example\n\n    import altair as alt\n    import pandas as pd\n\n    interpolate_select = alt.binding_select(\n        options=[\n            \"basis\",\n            \"basis-open\",\n            \"basis-closed\",\n            \"bundle\",\n            \"cardinal\",\n            \"cardinal-open\",\n            \"cardinal-closed\",\n            \"catmull-rom\",\n            \"linear\",\n            \"linear-closed\",\n            \"monotone\",\n            \"natural\",\n            \"step\",\n            \"step-before\",\n            \"step-after\",\n        ],\n        name=\"interpolate\",\n    )\n    interpolate_var = alt.param(bind=interpolate_select, value=\"linear\")\n\n    tension_slider = alt.binding_range(min=0, max=1, step=0.05, name=\"tension\")\n    tension_var = alt.param(bind=tension_slider, value=0)\n\n    strokeWidth_slider = alt.binding_range(min=0, max=10, step=0.5, name=\"strokeWidth\")\n    strokeWidth_var = alt.param(bind=strokeWidth_slider, value=2)\n\n    strokeCap_select = alt.binding_select(\n        options=[\"butt\", \"round\", \"square\"],\n        name=\"strokeCap\",\n    )\n    strokeCap_var = alt.param(bind=strokeCap_select, value=\"butt\")\n\n    strokeDash_select = alt.binding_select(\n        options=[[1, 0], [8, 8], [8, 4], [4, 4], [4, 2], [2, 1], [1, 1]],\n        name=\"strokeDash\",\n    )\n    strokeDash_var = alt.param(bind=strokeDash_select, value=[1, 0])\n\n    source = pd.DataFrame({\"u\": [1, 2, 3, 4, 5, 6], \"v\": [28, 55, 42, 34, 36, 38]})\n\n    alt.Chart(source).mark_line(\n        interpolate=interpolate_var,\n        tension=tension_var,\n        strokeWidth=strokeWidth_var,\n        strokeCap=strokeCap_var,\n        strokeDash=strokeDash_var,\n    ).encode(x=\"u\", y=\"v\").add_params(\n        interpolate_var, tension_var, strokeWidth_var, strokeCap_var, strokeDash_var\n    )\n\nA ``line`` mark definition can contain any :ref:`standard mark properties <mark-properties>`\nand the following line interpolation and point overlay properties:\n\n.. altair-object-table:: altair.MarkDef\n    :properties: orient interpolate tension point\n\nExamples\n--------\nLine Chart\n^^^^^^^^^^\nUsing line with one temporal or ordinal field (typically on ``x``) and another quantitative field (typically on ``y``) produces a simple line chart with a single line.\n\n.. altair-plot::\n    import altair as alt\n    from altair import datum\n    from altair.datasets import data\n\n\n    source = data.stocks()\n\n    alt.Chart(source).mark_line().encode(\n        x=\"date\",\n        y=\"price\",\n    ).transform_filter(datum.symbol == \"GOOG\")\n\nWe can add create multiple lines by grouping along different attributes, such as ``color`` or ``detail``.\n\nMulti-series Colored Line Chart\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAdding a field to a mark property channel such as ``color`` groups data points into different series, producing a multi-series colored line chart.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks()\n\n    alt.Chart(source).mark_line().encode(\n        x=\"date\",\n        y=\"price\",\n        color=\"symbol\",\n    )\n\nWe can further apply selection to highlight a certain line on hover.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks()\n\n    highlight = alt.selection_point(\n        on=\"pointerover\", fields=[\"symbol\"], nearest=True\n    )\n\n    base = alt.Chart(source).encode(\n        x=\"date:T\",\n        y=\"price:Q\",\n        color=\"symbol:N\"\n    )\n\n    points = base.mark_circle().encode(\n        opacity=alt.value(0)\n    ).add_params(\n        highlight\n    ).properties(\n        width=600\n    )\n\n    lines = base.mark_line().encode(\n        size=alt.when(~highlight).then(alt.value(1)).otherwise(alt.value(3))\n    )\n\n    points + lines\n\nMulti-series Line Chart with Varying Dashes\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nAdding a field to ``strokeDash`` also produces a multi-series line chart.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks()\n\n    alt.Chart(source).mark_line().encode(\n        x=\"date\",\n        y=\"price\",\n        strokeDash=\"symbol\",\n    )\n\nWe can also use line grouping to create a line chart that has multiple parts with varying styles.\n\n.. altair-plot::\n    import altair as alt\n    import pandas as pd\n\n    source = pd.DataFrame({\n        \"a\": [\"A\", \"B\", \"D\", \"E\", \"E\", \"G\", \"H\"],\n        \"b\": [28, 55, 91, 81, 81, 19, 87],\n        \"predicted\": [False, False, False, False, True, True, True]\n    })\n\n    alt.Chart(source).mark_line().encode(\n        x=\"a:O\",\n        y=\"b:Q\",\n        strokeDash=\"predicted:N\"\n    )\n\nMulti-series Line Chart with the Detail Channel\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nTo group lines by a field without mapping the field to any visual properties, we can map the field to the ``detail`` channel to create a multi-series line chart with the same color.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks()\n\n    alt.Chart(source).mark_line().encode(\n        x=\"date\",\n        y=\"price\",\n        detail=\"symbol\",\n    )\n\nThe same method can be used to group lines for a ranged dot plot.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.countries()\n\n    base = alt.Chart(source).encode(\n        alt.X(\"life_expect:Q\")\n            .scale(zero=False)\n            .title(\"Life Expectancy (years)\"),\n        alt.Y(\"country:N\")\n            .axis(offset=5, ticks=False, minExtent=70, domain=False)\n            .title(\"Country\")\n    ).transform_filter(\n        alt.FieldOneOfPredicate(field=\"country\", oneOf=[\"China\", \"India\", \"United States\", \"Indonesia\", \"Brazil\"])\n    )\n\n\n    line = base.mark_line().encode(\n        detail=\"country\",\n        color=alt.value(\"#db646f\")\n    ).transform_filter(\n        alt.FieldOneOfPredicate(field=\"year\", oneOf=[1995, 2000])\n    )\n\n    point = base.mark_point(filled=True).encode(\n        alt.Color(\"year\").scale(range=[\"#e6959c\", \"#911a24\"], domain=[1995, 2000]),\n        size=alt.value(100),\n        opacity=alt.value(1),\n    )\n\n    line + point\n\nLine Chart with Point Markers\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nBy setting the ``point`` property of the mark definition to ``True`` or an object defining a property of the overlaying point marks, we can overlay point markers on top of a line.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks()\n\n    alt.Chart(source).mark_line(point=True).encode(\n        x=\"year(date)\",\n        y=\"mean(price):Q\",\n        color=\"symbol:N\"\n    )\n\nThis is equivalent to adding another layer of filled point marks.\n\nNote that the overlay point marks have ``opacity`` = 1 by default (instead of semi-transparent like normal point marks).\n\nHere we create stroked points by setting ``filled`` to ``False`` and ``fill`` to ``\"white\"``.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks()\n\n    alt.Chart(source).mark_line(\n        point=alt.OverlayMarkDef(filled=False, fill=\"white\")\n    ).encode(\n        x=\"year(date)\",\n        y=\"mean(price):Q\",\n        color=\"symbol:N\"\n    )\n\nCustom Ordering\n^^^^^^^^^^^^^^^\n\nBy default, the line's path (order of points in the line) is determined by data values on the temporal/ordinal field. However, a field can be mapped to the ``order`` channel for determining a custom path.\n\nFor example, to show a pattern of data change over time between gasoline price and miles driven per capita we use ``order`` channel to sort the points in the line by the year field. In this example, we also use the ``point`` property to overlay point marks over the line marks to highlight each data point.\nNow, the earliest datapoint (1956) is one endpoint of the line, and the latest\ndatapoint (2010) is the other endpoint of the line.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.driving()\n\n    alt.Chart(source).mark_line(point=True).encode(\n        alt.X(\"miles\").scale(zero=False),\n        alt.Y(\"gas\").scale(zero=False),\n        order=\"year\",\n        tooltip=[\"miles\", \"gas\", \"year\"],\n    )\n\nLine Interpolation\n^^^^^^^^^^^^^^^^^^\nThe ``interpolate`` property of a mark definition can be used to change line interpolation method. For example, we can set ``interpolate`` to ``\"monotone\"``.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks()\n\n    alt.Chart(source).mark_line(interpolate=\"monotone\").encode(\n        x=\"date\",\n        y=\"price\",\n    ).transform_filter(\n        alt.datum.symbol == \"GOOG\"\n    )\n\nWe can also set ``interpolate`` to ``\"step-after\"`` to create a step-chart.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks()\n\n    alt.Chart(source).mark_line(interpolate=\"step-after\").encode(\n        x=\"date\",\n        y=\"price\"\n    ).transform_filter(\n        alt.datum.symbol == \"GOOG\"\n    )\n\n\nGeo Line\n^^^^^^^^\nBy mapping geographic coordinate data to ``longitude`` and ``latitude`` channels of a corresponding projection, we can draw lines through geographic points.\n\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n    import pandas as pd\n\n    airports = data.airports.url\n    flights_airport = data.flights_airport.url\n\n    states = alt.topo_feature(data.us_10m.url, feature=\"states\")\n\n    lookup_data = alt.LookupData(\n        airports, key=\"iata\", fields=[\"state\", \"latitude\", \"longitude\"]\n    )\n\n    source = pd.DataFrame({\n        \"airport\": [\"SEA\", \"SFO\", \"LAX\", \"LAS\", \"DFW\", \"DEN\", \"ORD\", \"JFK\"],\n        \"order\": [1, 2, 3, 4, 5, 6, 7, 8],\n    })\n\n    background = alt.Chart(states).mark_geoshape(\n        fill=\"lightgray\",\n        stroke=\"white\"\n    ).properties(\n        width=750,\n        height=500,\n    ).project(\"albersUsa\")\n\n    line = alt.Chart(source).mark_line().encode(\n        latitude=\"latitude:Q\",\n        longitude=\"longitude:Q\",\n        order=\"order\"\n    ).transform_lookup(\n        lookup=\"airport\",\n        from_=lookup_data\n    )\n\n    background + line\n"
  },
  {
    "path": "doc/user_guide/marks/point.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-point-marks:\n\nPoint\n~~~~~\n``point`` mark represents each data point with a symbol. Point marks are commonly used in visualizations like scatter plots.\n\nPoint Mark Properties\n---------------------\n.. altair-plot::\n    :hide-code:\n    :div_class: properties-example\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    shape_select = alt.binding_select(\n        options=[\n            \"arrow\",\n            \"circle\",\n            \"square\",\n            \"cross\",\n            \"diamond\",\n            \"triangle\",\n            \"triangle-up\",\n            \"triangle-down\",\n            \"triangle-right\",\n            \"triangle-left\",\n            \"wedge\",\n            \"stroke\",\n            \"M-1,-1H1V1H-1Z\",\n            \"M0,.5L.6,.8L.5,.1L1,-.3L.3,-.4L0,-1L-.3,-.4L-1,-.3L-.5,.1L-.6,.8L0,.5Z\",\n        ],\n        name=\"shape\",\n    )\n    shape_var = alt.param(bind=shape_select, value=\"circle\")\n\n    angle_slider = alt.binding_range(min=-360, max=360, step=1, name=\"angle\")\n    angle_var = alt.param(bind=angle_slider, value=0)\n\n    size_slider = alt.binding_range(min=0, max=500, step=10, name=\"size\")\n    size_var = alt.param(bind=size_slider, value=50)\n\n    strokeWidth_slider = alt.binding_range(min=0, max=10, step=0.5, name=\"strokeWidth\")\n    strokeWidth_var = alt.param(bind=strokeWidth_slider, value=2)\n\n    alt.Chart(source).mark_point(\n        shape=shape_var,\n        angle=angle_var,\n        size=size_var,\n        strokeWidth=strokeWidth_var,\n    ).encode(x=\"Horsepower:Q\", y=\"Miles_per_Gallon:Q\").add_params(\n        shape_var, angle_var, size_var, strokeWidth_var\n    )\n\nA ``point`` mark definition can contain any :ref:`standard mark properties <mark-properties>`\nand the following special properties:\n\n.. altair-object-table:: altair.MarkDef\n   :properties: shape size\n\nExamples\n--------\nDot Plot\n^^^^^^^^\nMapping a field to either only ``x`` or only ``y`` of point marks creates a dot plot.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.movies()\n    alt.Chart(source).mark_point().encode(\n        x=\"IMDB Rating:Q\"\n    )\n\nScatter Plot\n^^^^^^^^^^^^\nMapping fields to both the ``x`` and ``y`` channels creates a scatter plot.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    alt.Chart(source).mark_point().encode(\n        x=\"Horsepower:Q\",\n        y=\"Miles_per_Gallon:Q\",\n    )\n\nBy default, ``point`` marks only have borders and are transparent inside. You can create a filled point by setting ``filled`` to ``True``.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    alt.Chart(source).mark_point(filled=True).encode(\n        x=\"Horsepower:Q\",\n        y=\"Miles_per_Gallon:Q\",\n    )\n\nBubble Plot\n^^^^^^^^^^^\nBy mapping a third field to the ``size`` channel in the scatter plot, we can create a bubble plot instead.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    alt.Chart(source).mark_point().encode(\n        x=\"Horsepower:Q\",\n        y=\"Miles_per_Gallon:Q\",\n        size=\"Acceleration:Q\",\n    )\n\nScatter Plot with Color and/or Shape\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFields can also be encoded in the scatter plot using the ``color`` or ``shape`` channels. For example, this specification encodes the field ``Origin`` with both ``color`` and ``shape``.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    alt.Chart(source).mark_point().encode(\n        alt.X(\"Miles_per_Gallon:Q\").scale(zero=False),\n        alt.Y(\"Horsepower:Q\").scale(zero=False),\n        color=\"Origin:N\",\n        shape=\"Origin:N\",\n    )\n\n\nDot Plot with Jittering\n^^^^^^^^^^^^^^^^^^^^^^^\nTo jitter points on a discrete scale, you can add a random offset:\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    alt.Chart(source).mark_point().encode(\n        x=\"Horsepower:Q\",\n        y=\"Cylinders:O\",\n        yOffset=\"random:Q\",\n    ).transform_calculate(\n        random=\"random()\"\n    ).properties(\n        height=alt.Step(50)\n    )\n\nWind Vector Example\n^^^^^^^^^^^^^^^^^^^\nWe can also use point mark with ``wedge`` as ``shape`` and ``angle`` encoding to create a wind vector map. Other shape options are:\n``\"circle\"``, ``\"square\"``, ``\"cross\"``, ``\"diamond\"``, ``\"triangle-up\"``, ``\"triangle-down\"``, ``\"triangle-right\"``, ``\"triangle-left\"``, ``\"stroke\"``, ``\"arrow\"``, and ``\"triangle\"``.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.windvectors()\n\n    alt.Chart(source).mark_point(shape=\"wedge\", filled=True).encode(\n        latitude=\"latitude\",\n        longitude=\"longitude\",\n        color=alt.Color(\"dir\").scale(domain=[0, 360], scheme=\"rainbow\").legend(None),\n        angle=alt.Angle(\"dir\").scale(domain=[0, 360], range=[180, 540]),\n        size=alt.Size(\"speed\").scale(rangeMax=500),\n    ).project(\"equalEarth\")\n\nGeo Point\n^^^^^^^^^\nBy mapping geographic coordinate data to ``longitude`` and ``latitude`` channels of a corresponding projection, we can visualize geographic points. The example below shows major airports in the US.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    airports = data.airports()\n    states = alt.topo_feature(data.us_10m.url, feature=\"states\")\n\n    # US states background\n    background = alt.Chart(states).mark_geoshape(\n        fill=\"lightgray\",\n        stroke=\"white\"\n    ).properties(\n        width=500,\n        height=300,\n    ).project(\"albersUsa\")\n\n    # airport positions on background\n    points = alt.Chart(airports).mark_circle(\n        size=10,\n        color=\"steelblue\",\n    ).encode(\n        longitude=\"longitude:Q\",\n        latitude=\"latitude:Q\",\n        tooltip=[\"name\", \"city\", \"state\"],\n    )\n\n    background + points\n\n"
  },
  {
    "path": "doc/user_guide/marks/rect.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-rect-marks:\n\nRect\n~~~~\n\nThe ``rect`` mark represents an arbitrary rectangle.\n\nRect Mark Properties\n--------------------\n.. altair-plot::\n    :hide-code:\n    :div_class: properties-example\n\n    import altair as alt\n\n    x_slider = alt.binding_range(min=1, max=100, step=1, name=\"x\")\n    x_var = alt.param(bind=x_slider, value=25)\n\n    x2_slider = alt.binding_range(min=1, max=100, step=1, name=\"x2\")\n    x2_var = alt.param(bind=x2_slider, value=75)\n\n    y_slider = alt.binding_range(min=1, max=100, step=1, name=\"y\")\n    y_var = alt.param(bind=y_slider, value=25)\n\n    y2_slider = alt.binding_range(min=1, max=100, step=1, name=\"y2\")\n    y2_var = alt.param(bind=y2_slider, value=75)\n\n    cornerRadius_slider = alt.binding_range(min=0, max=50, step=1)\n    cornerRadius_var = alt.param(bind=cornerRadius_slider, value=0, name=\"cornerRadius\")\n\n    alt.Chart().mark_rect(cornerRadius=cornerRadius_var, color=\"orange\").encode(\n        x=alt.XDatum(x_var, type=\"quantitative\", scale=alt.Scale(domain=[0, 100])),\n        x2=alt.X2Datum(x2_var),\n        y=alt.XDatum(y_var, type=\"quantitative\", scale=alt.Scale(domain=[0, 100])),\n        y2=alt.X2Datum(y2_var),\n    ).add_params(x_var, x2_var, y_var, y2_var, cornerRadius_var)\n\n\nA ``rect`` mark definition can contain any :ref:`standard mark properties <mark-properties>`\nand the following special properties:\n\n.. altair-object-table:: altair.MarkDef\n   :properties: width height align baseline cornerRadius\n\nExamples\n--------\nHeatmap\n^^^^^^^\n\nUsing the ``rect`` marks with discrete fields on ``x`` and ``y`` channels creates a heatmap.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.seattle_weather()\n\n    alt.Chart(source).mark_rect().encode(\n        alt.X(\"date(date):O\").axis(labelAngle=0, format=\"%e\").title(\"Day\"),\n        alt.Y(\"month(date):O\").title(\"Month\"),\n        alt.Color(\"max(temp_max):Q\").title(\"Max Temp\"),\n    )\n\n\nRanged Rectangles\n^^^^^^^^^^^^^^^^^\nSpecifying both ``x`` and ``x2`` and/or ``y`` and ``y2`` creates a rectangle that spans over certain x and/or y values.\n\nFor example, we can use ``rect`` to create an annotation ``layer`` that provides a shading between global ``min`` and ``max`` values.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    point = alt.Chart(source).mark_point().encode(\n        x=\"Horsepower:Q\",\n        y=\"Miles_per_Gallon:Q\",\n    )\n\n    rect = alt.Chart(source).mark_rect().encode(\n        y=\"max(Miles_per_Gallon)\",\n        y2=\"min(Miles_per_Gallon)\",\n        opacity=alt.value(0.2),\n    )\n\n    point + rect\n\n"
  },
  {
    "path": "doc/user_guide/marks/rule.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-rule-marks:\n\nRule\n~~~~\nThe ``rule`` mark represents each data point as a line segment. It can be used in two ways. First, as a line segment that spans the complete width or height of a view. Second, a rule can be used to draw a line segment between two positions.\n\nRule Mark Properties\n--------------------\n.. altair-plot::\n    :hide-code:\n    :div_class: properties-example\n\n    import altair as alt\n    import pandas as pd\n\n    x_slider = alt.binding_range(min=1, max=100, step=1)\n    x_var = alt.param(bind=x_slider, value=35, name=\"x\")\n\n    x2_slider = alt.binding_range(min=1, max=100, step=1)\n    x2_var = alt.param(bind=x2_slider, value=75, name=\"x2\")\n\n    y_slider = alt.binding_range(min=1, max=100, step=1)\n    y_var = alt.param(bind=y_slider, value=25, name=\"y\")\n\n    y2_slider = alt.binding_range(min=1, max=100, step=1)\n    y2_var = alt.param(bind=y2_slider, value=75, name=\"y2\")\n\n    strokeWidth_slider = alt.binding_range(min=0, max=10, step=0.5)\n    strokeWidth_var = alt.param(bind=strokeWidth_slider, value=2, name=\"strokeWidth\")\n\n    strokeCap_select = alt.binding_select(options=[\"butt\", \"round\", \"square\"])\n    strokeCap_var = alt.param(bind=strokeCap_select, value=\"butt\", name=\"strokeCap\")\n\n    strokeDash_select = alt.binding_select(\n        options=[[1, 0], [8, 8], [8, 4], [4, 4], [4, 2], [2, 1], [1, 1]]\n    )\n    strokeDash_var = alt.param(bind=strokeDash_select, value=[1, 0], name=\"strokeDash\")\n\n    alt.Chart().mark_rule(\n        color=\"orange\",\n        strokeWidth=strokeWidth_var,\n        strokeCap=strokeCap_var,\n        strokeDash=strokeDash_var,\n    ).encode(\n        x=alt.datum(x_var, type=\"quantitative\", scale=alt.Scale(domain=[0, 100])),\n        y=alt.datum(y_var, type=\"quantitative\", scale=alt.Scale(domain=[0, 100])),\n        x2=alt.datum(x2_var),\n        y2=alt.datum(y2_var),\n    ).add_params(\n        x_var,\n        x2_var,\n        y_var,\n        y2_var,\n        strokeWidth_var,\n        strokeCap_var,\n        strokeDash_var,\n    )\n\n\nA ``rule`` mark definition can contain any :ref:`standard mark properties <mark-properties>`.\n\nExamples\n--------\nWidth/Height-Spanning Rules\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\nIf the ``rule`` mark only has ``y`` encoding, the output view produces horizontal rules that spans the complete width. Similarly, if the ``rule`` mark only has ``x`` encoding, the output view produces vertical rules that spans the height.\n\nWe can use rules to show the average price of different stocks akin to ``tick`` marks.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks()\n\n    alt.Chart(source).mark_rule().encode(\n        y=\"mean(price):Q\",\n        size=alt.value(2),\n        color=\"symbol:N\"\n    )\n\n\nThe fact that rule marks span the width or the height of a single view make them useful as an annotation layer. For example, we can use rules to show average values of different stocks alongside the price curve.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks()\n\n    base = alt.Chart(source).properties(width=550)\n    line = base.mark_line().encode(\n        x=\"date\",\n        y=\"price\",\n        color=\"symbol\"\n    )\n    rule = base.mark_rule().encode(\n        y=\"average(price)\",\n        color=\"symbol\",\n        size=alt.value(2)\n    )\n\n    line + rule\n\nWe can also use a rule mark to show global mean value over a histogram.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.movies.url\n\n    base = alt.Chart(source)\n    bar = base.mark_bar().encode(\n        x=alt.X(\"IMDB Rating:Q\").bin().axis(None),\n        y=\"count()\"\n    )\n    rule = base.mark_rule(color=\"red\").encode(\n        x=\"mean(IMDB Rating):Q\",\n        size=alt.value(5),\n    )\n\n    bar + rule\n\n\nRanged Rules\n^^^^^^^^^^^^\nTo control the spans of horizontal/vertical rules, ``x`` and ``x2``/ ``y`` and ``y2`` channels can be specified.\n\nFor example, we can use ``y`` and ``y2`` show the ``\"min\"`` and ``\"max\"`` values of horsepowers for cars from different locations.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    alt.Chart(source).mark_rule().encode(\n        x=\"Origin\",\n        y=\"min(Horsepower)\",\n        y2=\"max(Horsepower)\",\n    )\n\n\nDiagonal Line\n^^^^^^^^^^^^^\nBy using ``alt.value`` with the special ``'width'`` and ``'height'`` signals, you can draw a diagonal line that spans the full extent of the chart from corner to corner regardless of the extent of the x and y domains (i.e. the line is drawn in \"pixel space\").\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    points = alt.Chart(source).mark_circle(size=60).encode(\n        x=alt.X(\"Horsepower:Q\"),\n        y=alt.Y(\"Miles_per_Gallon:Q\"),\n    )\n\n    diagonal = alt.Chart().mark_rule(strokeDash=[4, 4]).encode(\n        x=alt.value(0),\n        y=alt.value(\"height\"),\n        x2=alt.value(\"width\"),\n        y2=alt.value(0),\n    )\n\n    (points + diagonal).interactive()\n\nIdentity Line (x=y)\n^^^^^^^^^^^^^^^^^^^^\nWhen comparing two related variables (e.g. predicted vs actual values), drawing a line representing a perfect relationship (i.e. an \"identity line\" at x=y) can facilitate comparisons. In contrast to the diagonal line above that was drawn in pixel space, we now need to draw the line in data space. Therefore we use ``alt.datum`` instead of ``alt.value``. If our chart is static, we can manually enter the x and y coordinates to draw the identity line. But, if we want to draw an identity line that is robust to zooming and panning, we instead need to compute the line dynamically using the ``domain`` expression which redraws the line each time the range of the x (or y) domain changes.\n\n.. altair-plot::\n    import altair as alt\n    import pandas as pd\n    import numpy as np\n\n    rng = np.random.RandomState(42)\n    actual = rng.uniform(10, 90, 50)\n    predicted = actual + rng.normal(0, 12, 50)\n\n    source = pd.DataFrame({\"actual\": actual, \"predicted\": predicted})\n\n    points = alt.Chart(source).mark_circle(size=60).encode(\n        x=alt.X(\"actual:Q\"),\n        y=alt.Y(\"predicted:Q\"),\n    )\n\n    identity_line = alt.Chart().mark_rule(strokeDash=[4, 4]).encode(\n        x=alt.datum(alt.expr(\"domain('x')[0]\"), type=\"quantitative\"),\n        y=alt.datum(alt.expr(\"domain('x')[0]\"), type=\"quantitative\"),\n        x2=alt.datum(alt.expr(\"domain('x')[1]\")),  # inherits \"quantitative\" from x\n        y2=alt.datum(alt.expr(\"domain('x')[1]\")),  # inherits \"quantitative\" from y\n    )  # either the x or y domain could be used to compute the line coordinates\n\n    (points + identity_line).interactive()\n"
  },
  {
    "path": "doc/user_guide/marks/square.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-square-marks:\n\nSquare\n~~~~~~\n``square`` mark is similar to ``point`` mark, except that (1) the ``shape`` value is always set to ``square`` (2) they are filled by default.\n\nSquare Mark Properties\n----------------------\nA ``square`` mark definition can contain any :ref:`standard mark properties <mark-properties>`\nand the following special properties:\n\n.. altair-object-table:: altair.MarkDef\n   :properties: size\n\nScatter Plot with Square\n------------------------\n.. altair-plot::\n   import altair as alt\n   from altair.datasets import data\n\n   source = data.cars()\n\n   alt.Chart(source).mark_square().encode(\n      x=\"Horsepower:Q\",\n      y=\"Miles_per_Gallon:Q\",\n   )\n"
  },
  {
    "path": "doc/user_guide/marks/text.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-text-marks:\n\nText\n~~~~~~\n``text`` mark represents each data point with a text instead of a point.\n\nText Mark Properties\n--------------------\n.. altair-plot::\n    :hide-code:\n    :div_class: properties-example\n\n    import altair as alt\n    import pandas as pd\n\n    angle_slider = alt.binding_range(min=-180, max=180, step=1)\n    angle_var = alt.param(bind=angle_slider, value=0, name=\"angle\")\n\n    dx_slider = alt.binding_range(min=-20, max=20, step=1)\n    dx_var = alt.param(bind=dx_slider, value=5, name=\"dx\")\n\n    dy_slider = alt.binding_range(min=-20, max=20, step=1)\n    dy_var = alt.param(bind=dy_slider, value=0, name=\"dy\")\n\n    xOffset_slider = alt.binding_range(min=-20, max=20, step=1)\n    xOffset_var = alt.param(bind=xOffset_slider, value=0, name=\"xOffset\")\n\n    yOffset_slider = alt.binding_range(min=-20, max=20, step=1)\n    yOffset_var = alt.param(bind=yOffset_slider, value=0, name=\"yOffset\")\n\n    fontSize_slider = alt.binding_range(min=1, max=36, step=1)\n    fontSize_var = alt.param(bind=fontSize_slider, value=14, name=\"fontSize\")\n\n    limit_slider = alt.binding_range(min=0, max=150, step=1)\n    limit_var = alt.param(bind=limit_slider, value=0, name=\"limit\")\n\n    align_select = alt.binding_select(options=[\"left\", \"center\", \"right\"])\n    align_var = alt.param(bind=align_select, value=\"left\", name=\"align\")\n\n    baseline_select = alt.binding_select(options=[\"alphabetic\", \"top\", \"middle\", \"bottom\"])\n    baseline_var = alt.param(bind=baseline_select, value=\"middle\", name=\"baseline\")\n\n    font_select = alt.binding_select(options=[\"sans-serif\", \"serif\", \"monospace\"])\n    font_var = alt.param(bind=font_select, value=\"sans-serif\", name=\"font\")\n\n    fontWeight_select = alt.binding_select(options=[\"normal\", \"bold\"])\n    fontWeight_var = alt.param(bind=fontWeight_select, value=\"normal\", name=\"fontWeight\")\n\n    fontStyle_select = alt.binding_select(options=[\"normal\", \"italic\"])\n    fontStyle_var = alt.param(bind=fontStyle_select, value=\"normal\", name=\"fontStyle\")\n\n    source = pd.DataFrame(\n        {\n            \"a\": [30, 25, 70],\n            \"b\": [28, 65, 43],\n            \"label\": [\"Andy\", \"Brian\", \"Charlie\"],\n        }\n    )\n\n    base = alt.Chart(source).encode(\n        x=alt.X(\"a:Q\").axis(labelAngle=0).scale(domain=[0, 100]),\n        y=alt.Y(\"b:Q\").scale(domain=[0, 100]),\n    )\n\n    pts = base.mark_point()\n\n    text = base.mark_text(\n        dx=dx_var,\n        dy=dy_var,\n        xOffset=xOffset_var,\n        yOffset=yOffset_var,\n        angle=angle_var,\n        align=align_var,\n        baseline=baseline_var,\n        font=font_var,\n        fontSize=fontSize_var,\n        fontStyle=fontStyle_var,\n        fontWeight=fontWeight_var,\n        limit=limit_var,\n    ).encode(text=\"label:N\")\n\n    (pts + text).add_params(\n        dx_var,\n        dy_var,\n        xOffset_var,\n        yOffset_var,\n        angle_var,\n        align_var,\n        baseline_var,\n        font_var,\n        fontSize_var,\n        fontStyle_var,\n        fontWeight_var,\n        limit_var,\n    )\n\n\nA ``text`` mark definition can contain any :ref:`standard mark properties <mark-properties>`\nand the following special properties:\n\n.. altair-object-table:: altair.MarkDef\n   :properties: angle align baseline dir dx dy ellipsis font fontSize fontStyle fontWeight limit lineHeight radius text theta\n\nExamples\n--------\nText Table Heatmap\n^^^^^^^^^^^^^^^^^^\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    base = alt.Chart(source).transform_aggregate(\n        num_cars=\"count()\",\n        groupby=[\"Origin\", \"Cylinders\"],\n    ).encode(\n        alt.X(\"Cylinders:O\").scale(paddingInner=0),\n        alt.Y(\"Origin:O\").scale(paddingInner=0),\n    )\n\n    heatmap = base.mark_rect().encode(\n        alt.Color(\"num_cars:Q\")\n            .scale(scheme=\"viridis\")\n            .legend(direction=\"horizontal\")\n    )\n\n    predicate = alt.datum.num_cars > 100\n    text = base.mark_text(baseline=\"middle\").encode(\n        text=\"num_cars:Q\",\n        color=alt.when(predicate).then(alt.value(\"black\")).otherwise(alt.value(\"white\")),\n    )\n\n    heatmap + text\n\nLabels\n^^^^^^\nYou can also use ``text`` marks as labels for other marks and set offset (``dx`` or ``dy``), ``align``, and ``baseline`` properties of the mark definition.\n\n.. altair-plot::\n    import altair as alt\n    import pandas as pd\n\n    source = pd.DataFrame({\n        \"a\": [\"A\", \"B\", \"C\"],\n        \"b\": [28, 55, 43]\n    })\n\n    bar = alt.Chart(source).mark_bar().encode(\n        y=\"a:N\",\n        x=alt.X(\"b:Q\").scale(domain=[0, 60])\n    )\n    text = bar.mark_text(\n        align=\"left\",\n        baseline=\"middle\",\n        dx=3\n    ).encode(text=\"b\")\n\n    bar + text\n\nLabels Position Based on Condition\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nBy default, text mark as labels in Altair are positioned above or to the right of the value. \nHowever, when dealing with negative values, this default positioning can lead to label overlap with the bar. \nTo address this issue, you can set label positions via :ref:`expressions`. \nHere's an example demonstrating how to do this:\n\n.. altair-plot::\n    import altair as alt\n    import pandas as pd\n\n    source = pd.DataFrame({\n        \"a\": [\"A\", \"B\", \"C\"],\n        \"b\": [28, -5, 10]\n    })\n\n    bar = alt.Chart(source).mark_bar().encode(\n        y=\"a:N\",\n        x=alt.X(\"b:Q\").scale(domain=[-10, 35])\n    )\n\n    text_conditioned = bar.mark_text(\n        align=\"left\",\n        baseline=\"middle\",\n        dx=alt.expr(alt.expr.if_(alt.datum.b >= 0, 10, -20))\n    ).encode(text=\"b\")\n\n    bar + text_conditioned\n\n\nScatter Plot with Text\n^^^^^^^^^^^^^^^^^^^^^^\nMapping a field to ``text`` channel of text mark sets the mark's text value. For example, we can make a colored scatter plot with text marks showing the initial character of its origin, instead of ``point`` marks.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n    from altair import datum\n\n    source = data.cars()\n\n    alt.Chart(source).mark_text().encode(\n        x=\"Horsepower:Q\",\n        y=\"Miles_per_Gallon:Q\",\n        color=\"Origin:N\",\n        text=\"Origin[0]:N\",\n    )\n\nGeo Text\n^^^^^^^^\nBy mapping geographic coordinate data to ``longitude`` and ``latitude`` channels of a corresponding projection, we can show text at accurate locations. The example below shows the name of every US state capital at the location of the capital.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    states = alt.topo_feature(data.us_10m.url, feature=\"states\")\n\n    source = data.us_state_capitals()\n\n    background = alt.Chart(states).mark_geoshape(\n        fill=\"lightgray\",\n        stroke=\"white\",\n    ).properties(\n        width=750,\n        height=500,\n    ).project(\"albersUsa\")\n\n    line = alt.Chart(source).mark_text(dy=-10).encode(\n        latitude=\"lat:Q\",\n        longitude=\"lon:Q\",\n        text=\"city:N\"\n    )\n\n    point = alt.Chart(source).mark_circle().encode(\n        latitude=\"lat:Q\",\n        longitude=\"lon:Q\",\n        color=alt.value(\"orange\"),\n    )\n\n    background + line + point\n"
  },
  {
    "path": "doc/user_guide/marks/tick.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-tick-marks:\n\nTick\n~~~~\nThe ``tick`` mark represents each data point as a short line. This is a useful mark for displaying the distribution of values in a field.\n\nTick Mark Properties\n--------------------\nA ``tick`` mark definition can contain any :ref:`standard mark properties <mark-properties>`\nand the following special properties:\n\n.. altair-object-table:: altair.MarkDef\n   :properties: cornerRadius orient\n\nExamples\n--------\nDot Plot\n^^^^^^^^\nThe following dot plot uses tick marks to show the distribution of precipitation in Seattle.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.seattle_weather()\n\n    alt.Chart(source).mark_tick().encode(\n        x=\"precipitation:Q\"\n    )\n\nStrip Plot\n^^^^^^^^^^\nBy adding a ``y`` field, a strip plot can be created that shows the distribution of horsepower by number of cylinders.\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    alt.Chart(source).mark_tick().encode(\n        x=\"Horsepower:Q\",\n        y=\"Cylinders:O\",\n    )\n\n\nCustomizing Tick’s Size and Thickness\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.seattle_weather()\n\n    alt.Chart(source).mark_tick().encode(\n        x=\"precipitation:Q\"\n    ).configure_tick(\n        thickness=2,\n        bandSize=10,\n    )\n"
  },
  {
    "path": "doc/user_guide/marks/trail.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-trail-marks:\n\nTrail\n~~~~~\nThe ``trail`` mark represents the data points stored in a field with a line connecting all of these points. Trail is similar to the ``line`` mark but a trail can have variable widths determined by backing data. Unlike lines, trails do not support different interpolation methods and use ``fill`` (not ``stroke``) for their color. Trail marks are useful if you want to draw lines with changing size to reflect the underlying data.\n\nTrail Mark Properties\n---------------------\nA ``trail`` mark definition can contain any :ref:`standard mark properties <mark-properties>`\nand the following special properties:\n\n.. altair-object-table:: altair.MarkDef\n   :properties: orient\n\nExamples\n--------\nLine Chart with Varying Size\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.stocks()\n\n    alt.Chart(source).mark_trail().encode(\n        x=\"date\",\n        y=\"price\",\n        color=\"symbol\",\n        size=\"price\",\n    )\n\nComet Chart Showing Changes Between Two States\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n.. altair-plot::\n    import altair as alt\n    from altair.datasets import data\n\n    alt.Chart(data.barley.url).transform_pivot(\n        \"year\",\n        value=\"yield\",\n        groupby=[\"variety\", \"site\"]\n    ).transform_fold(\n        [\"1931\", \"1932\"],\n        as_=[\"year\", \"yield\"]\n    ).transform_calculate(\n        calculate=\"datum['1932'] - datum['1931']\",\n        as_=\"delta\"\n    ).mark_trail().encode(\n        alt.X(\"year:O\").title(None),\n        alt.Y(\"variety:N\").title(\"Variety\"),\n        alt.Size(\"yield:Q\")\n            .scale(range=[0, 12])\n            .legend(values=[20, 60])\n            .title(\"Barley Yield (bushels/acre)\"),\n        alt.Color(\"delta:Q\")\n            .scale(domainMid=0)\n            .title(\"Yield Delta (%)\"),\n        alt.Tooltip([\"year:O\", \"yield:Q\"]),\n        alt.Column(\"site:N\").title(\"Site\"),\n    ).configure_legend(\n        orient='bottom',\n        direction='horizontal'\n    ).configure_view(\n        stroke=None\n    ).properties(\n        title=\"Barley Yield comparison between 1932 and 1931\"\n    )\n"
  },
  {
    "path": "doc/user_guide/saving_charts.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-saving:\n\nSaving Altair Charts\n--------------------\nAltair chart objects have a :meth:`Chart.save` method which allows charts\nto be saved in a variety of formats. \n\n.. saving-json:\n\nJSON format\n~~~~~~~~~~~\nThe fundamental chart representation output by Altair is a JSON string format;\none of the core methods provided by Altair is :meth:`Chart.to_json`, which\nreturns a JSON string that represents the chart content.\nAdditionally, you can save a chart to a JSON file using :meth:`Chart.save`,\nby passing a filename with a ``.json`` extension.\n\nFor example, here we save a simple scatter-plot to JSON:\n\n.. code-block:: python\n\n    import altair as alt\n    from altair.datasets import data\n\n    chart = alt.Chart(data.cars.url).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N'\n    )\n\n    chart.save('chart.json')\n\nThe contents of the resulting file will look something like this:\n\n.. code-block:: json\n\n    {\n      \"$schema\": \"https://vega.github.io/schema/vega-lite/v6.json\",\n      \"config\": {\n        \"view\": {\n          \"continuousHeight\": 300,\n          \"continuousWidth\": 300\n        }\n      },\n      \"data\": {\n        \"url\": \"https://vega.github.io/vega-datasets/data/cars.json\"\n      },\n      \"encoding\": {\n        \"color\": {\n          \"field\": \"Origin\",\n          \"type\": \"nominal\"\n        },\n        \"x\": {\n          \"field\": \"Horsepower\",\n          \"type\": \"quantitative\"\n        },\n        \"y\": {\n          \"field\": \"Miles_per_Gallon\",\n          \"type\": \"quantitative\"\n        }\n      },\n      \"mark\": {\"type\": \"point\"}\n    }\n\nThis JSON can then be inserted into any web page using the vegaEmbed_ library.\n\n.. saving-html:\n\nHTML format\n~~~~~~~~~~~\nIf you wish for Altair to take care of the HTML embedding for you, you can\nsave a chart directly to an HTML file using\n\n.. code-block:: python\n\n    chart.save('chart.html')\n\nThis will create a simple HTML template page that loads Vega, Vega-Lite, and\nvegaEmbed, such that when opened in a browser the chart will be rendered.\n\nFor example, saving the above scatter-plot to HTML creates a file with\nthe following contents, which can be opened and rendered in any modern\njavascript-enabled web browser:\n\n.. code-block:: HTML\n\n    <!DOCTYPE html>\n    <html>\n    <head>\n      <script src=\"https://cdn.jsdelivr.net/npm/vega@6\"></script>\n      <script src=\"https://cdn.jsdelivr.net/npm/vega-lite@6\"></script>\n      <script src=\"https://cdn.jsdelivr.net/npm/vega-embed@7\"></script>\n    </head>\n    <body>\n      <div id=\"vis\"></div>\n      <script type=\"text/javascript\">\n        var spec = {\n          \"$schema\": \"https://vega.github.io/schema/vega-lite/v6.json\",\n          \"config\": {\n            \"view\": {\n              \"continuousHeight\": 300,\n              \"continuousWidth\": 300\n            }\n          },\n          \"data\": {\n            \"url\": \"https://vega.github.io/vega-datasets/data/cars.json\"\n          },\n          \"encoding\": {\n            \"color\": {\n              \"field\": \"Origin\",\n              \"type\": \"nominal\"\n            },\n            \"x\": {\n              \"field\": \"Horsepower\",\n              \"type\": \"quantitative\"\n            },\n            \"y\": {\n              \"field\": \"Miles_per_Gallon\",\n              \"type\": \"quantitative\"\n            }\n          },\n          \"mark\": {\"type\": \"point\"}\n        };\n        var opt = {\"renderer\": \"canvas\", \"actions\": false};\n        vegaEmbed(\"#vis\", spec, opt);\n      </script>\n    </body>\n    </html>\n\nYou can view the result here: `chart.html </_static/chart.html>`_.\n\nBy default, ``canvas`` is used for rendering the visualization in vegaEmbed. To \nchange to ``svg`` rendering, use the ``embed_options`` as such:\n\n.. code-block:: python\n\n    chart.save('chart.html', embed_options={'renderer':'svg'})\n\nIf you need an HTML string object for further processing in custom HTML reports,\nyou can use the :meth:`Chart.to_html` method:\n\n.. code-block:: python\n\n    html_string = chart.to_html()\n    # Use html_string in your custom HTML generation\n\nThe :meth:`Chart.to_html` method returns a string containing the HTML representation\nof the chart, which can be embedded into larger HTML documents or processed\nprogrammatically.\n\n\n.. note::\n\n   This is not the same as ``alt.renderers.enable('svg')``, what renders the \n   chart as a static ``svg`` image within a Jupyter notebook.\n\n\nOffline HTML support\n^^^^^^^^^^^^^^^^^^^^\nBy default, an HTML file generated by ``chart.save('chart.html')`` loads the necessary JavaScript dependencies from an online CDN location. This results in a small HTML file, but it means that an active internet connection is required in order to display the chart.\n\nAs an alternative, the ``inline=True`` keyword argument may be provided to ``chart.save`` to generate an HTML file that includes all necessary JavaScript dependencies inline. This results in a larger file size, but HTML files generated this way do not require an active internet connection to display.\n\n.. code-block:: python\n\n    chart.save('chart.html', inline=True)\n\n.. note::\n\n   Calling ``chart.save`` with ``inline=True`` requires :ref:`additional-dependencies`.\n\n\n.. _saving-png:\n\nPNG, SVG, and PDF format\n~~~~~~~~~~~~~~~~~~~~~~~~\nTo save an Altair chart object as a PNG, SVG, or PDF image, you can use\n\n.. code-block:: python\n\n    chart.save('chart.png')\n    chart.save('chart.svg')\n    chart.save('chart.pdf')\n\n.. note::\n\n   :ref:`additional-dependencies` are required to save charts as images by running the javascript\n   code necessary to interpret the Vega-Lite specification and output it in the form of an image.\n\n\naltair_saver\n^^^^^^^^^^^^\n\n.. note::\n   \n   altair_saver was used in Altair 4 and earlier versions. It is no longer maintained and got superseded by vl-convert_ which provides a superior user experience and performance.\n\n\nPNG Figure Size/Resolution\n^^^^^^^^^^^^^^^^^^^^^^^^^^\nWhen using ``chart.save()`` to create a PNG image, the resolution of the resulting image\ndefaults to 72 pixels per inch (ppi). To change the resolution of the image, while maintaining\nthe same physical size, the ``ppi`` argument may be provided to ``chart.save``. For example,\nto save the image with a resolution of 200 pixels-per-inch::\n\n    chart.save('chart.png', ppi=200)\n\n\nTo change the physical size of the resulting image while preserving the resolution, the\n``scale_factor`` argument may be used. For example, to save the image at double the default\nsize at the default resolution of 72 ppi::\n\n    chart.save('chart.png', scale_factor=2)\n\n.. _additional-dependencies:\n\nAdditional Dependencies\n~~~~~~~~~~~~~~~~~~~~~~~\nSaving charts to images or offline HTML files requires the vl-convert_ package::\n\n    conda install -c conda-forge vl-convert-python\n\nor::\n\n    pip install vl-convert-python\n\nvl-convert_ does not require any external dependencies.\nSee the vl-convert documentation for information and for known\n`limitations <https://github.com/vega/vl-convert#limitations>`_.\n\nSharable URL\n~~~~~~~~~~~~\nThe :meth:`Chart.to_url` method can be used to build a sharable URL that opens the chart\nspecification in the online Vega editor_.\n\n.. altair-plot::\n    :output: repr\n\n    import altair as alt\n    from altair.datasets import data\n\n    chart = alt.Chart(data.cars.url).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='Origin:N'\n    )\n\n    chart.to_url()\n\n.. _vl-convert: https://github.com/vega/vl-convert\n.. _vegaEmbed: https://github.com/vega/vega-embed\n.. _editor: https://vega.github.io/editor/\n"
  },
  {
    "path": "doc/user_guide/scale_resolve.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-resolve:\n\nScale & Guide Resolution\n------------------------\nWhen creating compound charts (see :ref:`user-guide-compound`), altair defaults\nto using shared chart scales and guides (e.g. axes, legends, etc.).\nThis default can be adjusted using the :meth:`Chart.resolve_scale`,\n:meth:`Chart.resolve_axis`, and :meth:`Chart.resolve_legend` functions.\n\nFor example, suppose you would like to concatenate two charts with separate\ncolor scales; the default behavior is for the color scale to be created for\na union of the two color encoding domains:\n\n.. altair-plot::\n\n   import altair as alt\n   from altair.datasets import data\n   \n   source = data.cars()\n   \n   base = alt.Chart(source).mark_point().encode(\n       x='Horsepower:Q',\n       y='Miles_per_Gallon:Q'\n   ).properties(\n       width=200,\n       height=200\n   )\n   \n   alt.concat(\n       base.encode(color='Origin:N'),\n       base.encode(color='Cylinders:O')\n   )\n\nThis default can be changed by setting the scale resolution for the color to\n``\"independent\"`` (rather than the default, ``\"shared\"``):\n\n.. altair-plot::\n   \n   alt.concat(\n       base.encode(color='Origin:N'),\n       base.encode(color='Cylinders:O')\n   ).resolve_scale(\n       color='independent'\n   )\n\nDual Y Axis\n~~~~~~~~~~~\n\nA common technique for combining chart containing different measures is using a\ndual y axis. There are two strategies to achieve this result using altair. The\nfirst is to manually specify the mark color and associated axis title color of\neach layer. \n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.cars()\n\n    base = alt.Chart(source).encode(x='year(Year):T')\n\n    line_A = base.mark_line(color='#5276A7').encode(\n        alt.Y('average(Horsepower):Q').axis(titleColor='#5276A7')\n    )\n\n    line_B = base.mark_line(color='#F18727').encode(\n        alt.Y('average(Miles_per_Gallon):Q').axis(titleColor='#F18727')\n    )\n\n    alt.layer(line_A, line_B).resolve_scale(y='independent')\n\nIn this case the axis colors act as a pseudo-legend.  Alternatively if you want\na legend the :ref:`user-guide-filter-transform` and\n:ref:`user-guide-fold-transform` must be applied.  Legends are only created in\nVega-Lite to represent an encoding.\n\n.. altair-plot::\n\n    base = alt.Chart(source).mark_line().transform_fold(\n        ['Horsepower', 'Miles_per_Gallon'],\n        as_=['Measure', 'Value']\n    ).encode(\n        alt.Color('Measure:N'),\n        alt.X('year(Year):T')\n    )\n\n    line_A = base.transform_filter(\n        alt.datum.Measure == 'Horsepower'\n    ).encode(\n        alt.Y('average(Value):Q').title('Horsepower')\n    )\n\n    line_B = base.transform_filter(\n        alt.datum.Measure == 'Miles_per_Gallon'\n    ).encode(\n        alt.Y('average(Value):Q').title('Miles_per_Gallon')\n    )\n\n    alt.layer(line_A, line_B).resolve_scale(y='independent')\n\nNote that dual axis charts might be misleading about\nrelationships in your data. For further reading on the topic see `The case against dual axis\ncharts <https://blog.datawrapper.de/dualaxis/>`__ by Lisa Charlotte Rost.\n"
  },
  {
    "path": "doc/user_guide/times_and_dates.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-time:\n\nTimes & Dates\n=============\nWorking with dates, times, and timezones is often one of the more challenging\naspects of data analysis. In Altair, the difficulties are compounded by the\nfact that users are writing Python code, which outputs JSON-serialized\ntimestamps, which are interpreted by Javascript, and then rendered by your\nbrowser. At each of these steps, there are things that can go wrong, but\nAltair and Vega-Lite do their best to ensure that dates are interpreted and\nvisualized in a consistent way.\n\n\nAltair and pandas Datetimes\n---------------------------\n\nAltair is designed to work best with `pandas timeseries`_. A standard\ntimezone-agnostic date/time column in a pandas dataframe will be both\ninterpreted and displayed as local user time. For example, here is a dataset\ncontaining hourly temperatures measured in Seattle:\n\n.. altair-plot::\n    :output: repr\n\n    import altair as alt\n    from altair.datasets import data\n\n    temps = data.seattle_weather_hourly_normals()\n    temps.head()\n\nWe can see from the ``dtypes`` attribute that the times are encoded as a standard\n64-bit datetime, without any specified timezone:\n\n.. altair-plot::\n    :output: repr\n\n    temps.dtypes\n\nWe can use Altair to visualize this datetime data; for clarity in this\nexample, we'll limit ourselves to the first two weeks of data:\n\n.. altair-plot::\n\n    temps = temps[temps.date < '2010-01-15']\n\n    alt.Chart(temps).mark_line().encode(\n        x='date:T',\n        y='temperature:Q'\n    )\n\nNotice that for date/time values we use the ``T`` to indicate a temporal\nencoding: while this is optional for pandas datetime input, it is good practice\nto specify a type explicitly; see :ref:`encoding-data-types` for more discussion.\nIf you want Altair to plot four digit integers as years,\nyou need to cast them as strings before changing the data type to temporal,\nplease see the :ref:`type-axis-scale` for details.\n\nFor date-time inputs like these, it can sometimes be useful to extract particular\ntime units (e.g. hours of the day, dates of the month, etc.).\nIn Altair, this can be done with a time unit transform, discussed in detail in\n:ref:`user-guide-timeunit-transform`.\nFor example, we might decide we want a heatmap with hour of the day on the\nx-axis, and day of the month on the y-axis:\n\n.. altair-plot::\n\n    alt.Chart(temps).mark_rect().encode(\n        alt.X('hoursminutes(date):O').title('hour of day'),\n        alt.Y('monthdate(date):O').title('date'),\n        alt.Color('temperature:Q').title('temperature (C)')\n    )\n\nUnless you are using a non-ES6 browser (See :ref:`note-browser-compliance`),\nyou will notice that the chart created by this code reflects hours starting\nat 00:00:00 on January 1st, just as in the data we input.\nThis is because both the input timestamps and the plot outputs are using\nlocal time.\n\nSpecifying Time Zones\n---------------------\nIf you are viewing the above visualizations in a supported browser (see\n:ref:`note-browser-compliance`), the times are both serialized and\nrendered in local time, so that the ``January 1st 00:00:00`` row renders in\nthe chart as ``00:00`` on ``January 1st``.\n\nIn Altair, simple dates without an explicit timezone are treated as local time,\nand in Vega-Lite, unless otherwise specified, times are rendered in the local\ntime of the browser that does the rendering.\n\nIf you would like your dates to instead be time-zone aware, you can set the\ntimezone explicitly in the input dataframe. Since Seattle is in the\n``US/Pacific`` timezone, we can localize the timestamps in pandas as follows:\n\n.. altair-plot::\n   :output: repr\n\n   temps['date_pacific'] = temps['date'].dt.tz_localize('US/Pacific')\n   temps.dtypes\n\nNotice that the timezone is now part of the pandas datatype.\nIf we repeat the above chart with this timezone-aware data, the result will\nrender **according to the timezone of the browser rendering it**:\n\n.. altair-plot::\n\n    alt.Chart(temps).mark_rect().encode(\n        alt.X('hoursminutes(date_pacific):O').title('hour of day'),\n        alt.Y('monthdate(date_pacific):O').title('date'),\n        alt.Color('temperature:Q').title('temperature (C)')\n    )\n\nIf you are viewing this chart on a computer whose time is set to the west coast\nof the US, it should appear identical to the first version. If you are rendering\nthe chart in any other timezone, it will render using a timezone correction\ncomputed from the location set in your system.\n\n.. _explicit-utc-time:\n\nUsing UTC Time\n--------------\nThis user-local rendering can sometimes be confusing, because it leads to the\nsame output being visualized differently by different users.\nIf you want timezone-aware data to appear the same to every user regardless of\nlocation, the best approach is to adopt a standard timezone in which to render\nthe data. One commonly-used standard is `Coordinated Universal Time (UTC)`_.\nIn Altair, any of the ``timeUnit`` bins can be prefixed with ``utc`` in\norder to extract UTC time units.\n\nHere is the above chart visualized in UTC time, which will render the same way\nregardless of the system location:\n\n.. altair-plot::\n\n    alt.Chart(temps).mark_rect().encode(\n        alt.X('utchoursminutes(date_pacific):O').title('UTC hour of day'),\n        alt.Y('utcmonthdate(date_pacific):O').title('UTC date'),\n        alt.Color('temperature:Q').title('temperature (C)')\n    )\n\nTo make your charts as portable as possible (even in non-ES6 browsers which parse\ntimezone-agnostic times as UTC), you can explicitly work\nin UTC time, both on the pandas side and on the Vega-Lite side:\n\n\n.. altair-plot::\n\n   temps['date_utc'] = temps['date'].dt.tz_localize('UTC')\n\n   alt.Chart(temps).mark_rect().encode(\n       alt.X('utchoursminutes(date_utc):O').title('hour of day'),\n       alt.Y('utcmonthdate(date_utc):O').title('date'),\n       alt.Color('temperature:Q').title('temperature (C)')\n   )\n\nThis is somewhat less convenient than the default behavior for timezone-agnostic\ndates, in which both pandas and Vega-Lite assume times are local\n(except in non-ES6 browsers; see :ref:`note-browser-compliance`),\nbut it gets around browser incompatibilities by explicitly working in UTC, which\ngives similar results even in older browsers.\n\n.. _note-browser-compliance:\n\nNote on Browser Compliance\n--------------------------\n\n.. note:: Warning about non-ES6 Browsers\n\n   The discussion below applies to modern browsers which support `ECMAScript 6`_,\n   in which time strings like ``\"2018-01-01T12:00:00\"`` without a trailing ``\"Z\"``\n   are treated as local time rather than `Coordinated Universal Time (UTC)`_.\n   For example, recent versions of Chrome and Firefox are ES6-compliant,\n   while Safari 11 is not.\n   If you are using a non-ES6 browser, this means that times displayed in Altair\n   charts may be rendered with a timezone offset, unless you explicitly use\n   UTC time (see :ref:`explicit-utc-time`).\n\nThe following chart will help you determine if your browser parses dates in the\nway that Altair expects:\n\n.. altair-plot::\n    :links: none\n\n    import altair as alt\n    import pandas as pd\n\n    df = pd.DataFrame({'local': ['2018-01-01T00:00:00'],\n                       'utc': ['2018-01-01T00:00:00Z']})\n    when_compliant = alt.when(compliant=True)\n\n    alt.Chart(df).transform_calculate(\n        compliant=\"hours(datum.local) != hours(datum.utc) ? true : false\",\n    ).mark_text(size=20, baseline=\"middle\").encode(\n        text=when_compliant.then(alt.value(\"OK\")).otherwise(alt.value(\"not OK\")),\n        color=when_compliant.then(alt.value(\"green\")).otherwise(alt.value(\"red\")),\n    ).properties(width=80, height=50)\n\nIf the above output contains a red \"not OK\":\n\n.. altair-plot::\n   :hide-code:\n   :links: none\n\n   alt.Chart(df).mark_text(size=10, baseline='middle').encode(\n       alt.TextValue('not OK'),\n       alt.ColorValue('red')\n   ).properties(width=40, height=25)\n\nit means that your browser's date parsing is not ES6-compliant.\nIf it contains a green \"OK\":\n\n.. altair-plot::\n   :hide-code:\n   :links: none\n\n   alt.Chart(df).mark_text(size=10, baseline='middle').encode(\n       alt.TextValue('OK'),\n       alt.ColorValue('green')\n   ).properties(width=40, height=25)\n\nthen it means that your browser parses dates as Altair expects, either because\nit is ES6-compliant or because your computer locale happens to be set to\nthe UTC+0 (GMT) timezone.\n\n.. _Coordinated Universal Time (UTC): https://en.wikipedia.org/wiki/Coordinated_Universal_Time\n.. _pandas timeseries: https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html\n.. _ECMAScript 6: http://www.ecma-international.org/ecma-262/6.0/\n"
  },
  {
    "path": "doc/user_guide/transform/aggregate.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-aggregate-transform:\n\nAggregate\n~~~~~~~~~\nThere are two ways to aggregate data within Altair: within the encoding itself,\nor using a top level aggregate transform.\n\nThe aggregate property of a field definition can be used to compute aggregate\nsummary statistics (e.g., :code:`median`, :code:`min`, :code:`max`) over groups of data.\n\nIf any field in the specified encoding channels contains an aggregate,\nthe resulting visualization will show aggregate data. In this case, all\nfields without a specified aggregation function are treated as group-by fields\nin the aggregation process.\n\nFor example, the following bar chart aggregates mean of ``acceleration``,\ngrouped by the number of Cylinders.\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    cars = data.cars.url\n\n    alt.Chart(cars).mark_bar().encode(\n        y='Cylinders:O',\n        x='mean(Acceleration):Q',\n    )\n\nThe Altair shorthand string::\n\n    # ...\n    x='mean(Acceleration):Q',\n    # ...\n\nis made available for convenience, and is equivalent to the longer form::\n\n    # ...\n    x=alt.X(field='Acceleration', aggregate='mean', type='quantitative'),\n    # ...\n\nFor more information on shorthand encodings specifications, see\n:ref:`shorthand-description`.\n\nThe same plot can be shown via an explicitly computed aggregation, using the\n:meth:`~Chart.transform_aggregate` method:\n\n.. altair-plot::\n\n    alt.Chart(cars).mark_bar().encode(\n        y='Cylinders:O',\n        x='mean_acc:Q'\n    ).transform_aggregate(\n        mean_acc='mean(Acceleration)',\n        groupby=[\"Cylinders\"]\n    )\n\nThe alternative to using aggregate functions is to preprocess the data with\nPandas, and then plot the resulting DataFrame:\n\n.. altair-plot::\n\n   cars_df = data.cars()\n   source = (\n      cars_df.groupby('Cylinders')\n      .Acceleration\n      .mean()\n      .reset_index()\n      .rename(columns={'Acceleration': 'mean_acc'})\n   )\n\n   alt.Chart(source).mark_bar().encode(\n      y='Cylinders:O',\n      x='mean_acc:Q'\n   )\n\n.. note::\n   Altair transforms are great for quick exploration, while upfront analysis using\n   dedicated dataframe libraries can be faster for large datasets. See :doc:`../data_transformers` for details.\n\nBecause :code:`Cylinders` is of type :code:`int64` in the :code:`source`\nDataFrame, Altair would have treated it as a :code:`qualitative` --instead of\n:code:`ordinal`-- type, had we not specified it. Making the type of data\nexplicit is important since it affects the resulting plot; see\n:ref:`type-legend-scale` and :ref:`type-axis-scale` for two illustrated\nexamples. As a rule of thumb, it is better to make the data type explicit,\ninstead of relying on an implicit type conversion.\n\nFunctions Without Arguments\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nAggregate functions can be used without arguments. \nIn such cases, the function operates directly on the input objects \nand returns the same value regardless of the provided field.\n\nThe following chart demonstrates this by counting the number of cars with\nrespect to their country of origin.\n\n.. altair-plot::\n\n   alt.Chart(cars).mark_bar().encode(\n      y='Origin:N',\n      # shorthand form of alt.X(aggregate='count')\n      x='count()'\n   )\n\n.. note::\n   The :code:`count` aggregate function is of type :code:`quantitative` by default,\n   it does not matter if the source data is a DataFrame, URL pointer, CSV file or JSON file.\n\nFunctions that handle categorical data (such as :code:`count`,\n:code:`missing`, :code:`distinct` and :code:`valid`) are the ones that get\nthe most out of this feature.\n\nArgmin and Argmax Functions\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\nThe :code:`argmin` and :code:`argmax` functions help you find values from\none field that correspond to the minimum or maximum values in another\nfield. For example, you might want to find the production budget of\nmovies that earned the highest gross revenue in each genre.\n\nThese functions must be used with the :meth:`~Chart.transform_aggregate`\nmethod rather than their shorthand notations. They return objects that act\nas selectors for values in other columns, rather than returning values\ndirectly. You can think of the returned object as a dictionary where the\ncolumn serves as a key to retrieve corresponding values.\n\n\nTo illustrate this, let's compare the weights of cars with the highest\nhorsepower across different regions of origin:\n\n.. altair-plot::\n\n   alt.Chart(cars).mark_bar().encode(\n      x='greatest_hp[Weight_in_lbs]:Q',\n      y='Origin:N'\n   ).transform_aggregate(\n      greatest_hp='argmax(Horsepower)',\n      groupby=['Origin']\n   )\n\nThis visualization reveals an interesting contrast: among cars with the\nhighest horsepower in their respective regions, Japanese cars are notably\nlighter, while American cars are substantially heavier.\n\nSee :ref:`gallery_line_chart_with_custom_legend` for another example that uses\n:code:`argmax`. The case of :code:`argmin` is completely similar.\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_aggregate` method is built on the :class:`~AggregateTransform`\nclass, which has the following options:\n\n.. altair-object-table:: altair.AggregateTransform\n\nThe :class:`~AggregatedFieldDef` objects have the following options:\n\n.. altair-object-table:: altair.AggregatedFieldDef\n\n.. _agg-func-table:\n\nAggregation Functions\n^^^^^^^^^^^^^^^^^^^^^\n\nIn addition to ``count`` and ``average``, there are a large number of available\naggregation functions built into Altair; they are listed in the following tables:\n\nCount-related Functions\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n=========  ===========================================================================  =====================================\nAggregate  Description                                                                  Example\n=========  ===========================================================================  =====================================\ncount      The total count of data objects in the group.                                :ref:`gallery_simple_heatmap`\nvalid      The count of field values that are not null or undefined.                    N/A\nmissing    The count of null or undefined field values.                                 N/A\ndistinct   The count of distinct field values.                                          N/A\nvalues     A list of data objects in the group.                                         N/A\n=========  ===========================================================================  =====================================\n\nBasic Mathematical Operations\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n=========  ===========================================================================  =====================================\nAggregate  Description                                                                  Example\n=========  ===========================================================================  =====================================\nsum        The sum of field values.                                                     :ref:`gallery_streamgraph`\nproduct    The product of field values.                                                 N/A\n=========  ===========================================================================  =====================================\n\nCentral Tendency Measures\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n=========  ===========================================================================  =====================================\nAggregate  Description                                                                  Example\n=========  ===========================================================================  =====================================\nmean       The mean (average) field value.                                              :ref:`gallery_scatter_with_layered_histogram`\naverage    The mean (average) field value. Identical to mean.                           :ref:`gallery_layer_line_color_rule`\nmedian     The median field value                                                       :ref:`gallery_boxplot`\nvariance   The sample variance of field values.                                         N/A\nvariancep  The population variance of field values.                                     N/A\nstdev      The sample standard deviation of field values.                               N/A\nstdevp     The population standard deviation of field values.                           N/A\nstderr     The standard error of the field values.                                      N/A\n=========  ===========================================================================  =====================================\n\nDistribution Statistics\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n=========  ===========================================================================  =====================================\nAggregate  Description                                                                  Example\n=========  ===========================================================================  =====================================\nq1         The lower quartile boundary of values.                                       :ref:`gallery_boxplot`\nq3         The upper quartile boundary of values.                                       :ref:`gallery_boxplot`\nci0        The lower boundary of the bootstrapped 95% confidence interval of the mean.  :ref:`gallery_sorted_error_bars_with_ci`\nci1        The upper boundary of the bootstrapped 95% confidence interval of the mean.  :ref:`gallery_sorted_error_bars_with_ci`\n=========  ===========================================================================  =====================================\n\nRange Functions\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\n\n=========  ===========================================================================  =====================================\nAggregate  Description                                                                  Example\n=========  ===========================================================================  =====================================\nmin        The minimum field value.                                                     :ref:`gallery_boxplot`\nmax        The maximum field value.                                                     :ref:`gallery_boxplot`\nargmin     An input data object containing the minimum field value.                     N/A\nargmax     An input data object containing the maximum field value.                     :ref:`gallery_line_chart_with_custom_legend`\n=========  ===========================================================================  =====================================\n"
  },
  {
    "path": "doc/user_guide/transform/bin.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-bin-transform:\n\nBin\n~~~\nAs with :ref:`user-guide-aggregate-transform`, there are two ways to apply\na bin transform in Altair: within the encoding itself, or using a top-level\nbin transform.\n\nAn common application of a bin transform is when creating a histogram:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    movies = data.movies.url\n\n    alt.Chart(movies).mark_bar().encode(\n        alt.X(\"IMDB Rating:Q\").bin(),\n        y='count()',\n    )\n\nBut a bin transform can be useful in other applications; for example, here we\nbin a continuous field to create a discrete color map:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    cars = data.cars.url\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color=alt.Color('Acceleration:Q').bin(maxbins=5)\n    )\n\nIn the first case we use ``bin()`` without any arguments,\nwhich uses the default bin settings.\nIn the second case, we exercise more fine-tuned control over the bin parameters\nby passing the ``maxbins`` argument.\n\nIf you are using the same bins in multiple chart components, it can be useful\nto instead define the binning at the top level, using :meth:`~Chart.transform_bin`\nmethod.\n\nHere is the above histogram created using a top-level bin transform:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    movies = data.movies.url\n\n    alt.Chart(movies).mark_bar().encode(\n        x='binned_rating:O',\n        y='count()',\n    ).transform_bin(\n        'binned_rating', field='IMDB Rating'\n    )\n\nAnd here is the transformed color scale using a top-level bin transform:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    cars = data.cars.url\n\n    alt.Chart(cars).mark_point().encode(\n        x='Horsepower:Q',\n        y='Miles_per_Gallon:Q',\n        color='binned_acc:O'\n    ).transform_bin(\n        'binned_acc', 'Acceleration', bin=alt.Bin(maxbins=5)\n    )\n\nThe advantage of the top-level transform is that the same named field can be\nused in multiple places in the chart if desired.\nNote the slight difference in binning behavior between the encoding-based bins\n(which preserve the range of the bins) and the transform-based bins (which\ncollapse each bin to a single representative value.\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_bin` method is built on the :class:`~BinTransform`\nclass, which has the following options:\n\n.. altair-object-table:: altair.BinTransform\n"
  },
  {
    "path": "doc/user_guide/transform/calculate.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-calculate-transform:\n\nCalculate\n~~~~~~~~~\nThe calculate transform allows the user to define new fields in the dataset\nwhich are calculated from other fields using an expression syntax.\n\nAs a simple example, here we take data with a simple input sequence, and compute\na some trigonometric quantities:\n\n.. altair-plot::\n\n    import altair as alt\n    import pandas as pd\n\n    data = pd.DataFrame({'t': range(101)})\n\n    alt.Chart(data).mark_line().encode(\n        x='x:Q',\n        y='y:Q',\n        order='t:Q'\n    ).transform_calculate(\n        x='cos(datum.t * PI / 50)',\n        y='sin(datum.t * PI / 25)'\n    )\n\nEach argument within ``transform_calculate`` is a `Vega expression`_ string,\nwhich is a well-defined set of javascript-style operations that can be used\nto calculate a new field from an existing one.\n\nTo streamline building these Vega expressions in Python, Altair provides the\n:mod:`expr` module which provides constants and functions to allow\nthese expressions to be constructed with Python syntax; for example:\n\n.. altair-plot::\n\n    alt.Chart(data).mark_line().encode(\n        x='x:Q',\n        y='y:Q',\n        order='t:Q'\n    ).transform_calculate(\n        x=alt.expr.cos(alt.datum.t * alt.expr.PI / 50),\n        y=alt.expr.sin(alt.datum.t * alt.expr.PI / 25)\n    )\n\nAltair expressions are designed to output valid Vega expressions. The benefit of\nusing them is that proper syntax is ensured by the Python interpreter, and tab\ncompletion of the :mod:`~expr` submodule can be used to explore the\navailable functions and constants.\n\nThese expressions can also be used when constructing a\n:ref:`user-guide-filter-transform`, as we shall see next.\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_calculate` method is built on the :class:`~CalculateTransform`\nclass, which has the following options:\n\n.. altair-object-table:: altair.CalculateTransform\n\n.. _Vega expression: https://vega.github.io/vega/docs/expressions/\n"
  },
  {
    "path": "doc/user_guide/transform/density.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-density-transform:\n\nDensity\n~~~~~~~\nThe density transform performs one-dimensional\n`kernel density estimation <https://en.wikipedia.org/wiki/Kernel_density_estimation>`_\nover input data and generates a new column of samples of the estimated densities.\n\nHere is a simple example, showing the distribution of IMDB ratings from the movies\ndataset:\n\n.. altair-plot::\n\n   import altair as alt\n   from altair.datasets import data\n\n   alt.Chart(data.movies.url).transform_density(\n       'IMDB Rating',\n       as_=['IMDB Rating', 'density'],\n   ).mark_area().encode(\n       x=\"IMDB Rating:Q\",\n       y='density:Q',\n   )\n\nThe density can also be computed on a per-group basis, by specifying the ``groupby``\nargument. Here we split the above density computation across movie genres:\n\n.. altair-plot::\n\n   import altair as alt\n   from altair.datasets import data\n\n   alt.Chart(\n       data.movies.url,\n       width=120,\n       height=80\n   ).transform_filter(\n       'isValid(datum.Major_Genre)'\n   ).transform_density(\n       'IMDB Rating',\n       groupby=['Major_Genre'],\n       as_=['IMDB Rating', 'density'],\n       extent=[1, 10],\n   ).mark_area().encode(\n       x=\"IMDB Rating:Q\",\n       y='density:Q',\n   ).facet(\n       'Major_Genre:N',\n       columns=4\n   )\n\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_density` method is built on the\n:class:`~DensityTransform` class, which has the following options:\n\n.. altair-object-table:: altair.DensityTransform\n"
  },
  {
    "path": "doc/user_guide/transform/extent.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-extent-transform:\n\nExtent\n~~~~~~\nThe extent transform can be used to find the extent of a field and stores the result in a :ref:`parameter <parameters>`.\n\nAs an example, consider the following dataset:\n\n.. altair-plot::\n    :output: none\n   \n    import pandas as pd\n    df = pd.DataFrame(\n        [\n            {\"a\": \"A\", \"b\": 28},\n            {\"a\": \"B\", \"b\": 55},\n            {\"a\": \"C\", \"b\": 43},\n            {\"a\": \"D\", \"b\": 91},\n            {\"a\": \"E\", \"b\": 81},\n            {\"a\": \"F\", \"b\": 53},\n            {\"a\": \"G\", \"b\": 19},\n            {\"a\": \"H\", \"b\": 87},\n            {\"a\": \"I\", \"b\": 52},\n        ]\n    )\n    \nWe can use the extent transform to extract the minimum and maximum values of column ``b`` and then use those values to place rules:\n\n.. altair-plot::\n    \n    import altair as alt\n    \n    base = alt.Chart(df, title=\"A Simple Bar Chart with Lines at Extents\").transform_extent(\n        extent=\"b\", param=\"b_extent\"\n    )\n    bars = base.mark_bar().encode(x=\"b\", y=\"a\")\n    lower_extent_rule = base.mark_rule(stroke=\"firebrick\").encode(\n        x=alt.value(alt.expr(\"scale('x', b_extent[0])\"))\n    )\n    upper_extent_rule = base.mark_rule(stroke=\"firebrick\").encode(\n        x=alt.value(alt.expr(\"scale('x', b_extent[1])\"))\n    )\n    bars + lower_extent_rule + upper_extent_rule\n\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_extent` method is built on the :class:`~ExtentTransform`\nclass, which has the following options:\n\n.. altair-object-table:: altair.ExtentTransform\n"
  },
  {
    "path": "doc/user_guide/transform/filter.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-filter-transform:\n\nFilter\n~~~~~~\nThe filter transform removes objects from a data stream based on a provided\nfilter expression, selection, or other filter predicate. A filter can be\nadded at the top level of a chart using the :meth:`Chart.transform_filter`\nmethod. The argument to ``transform_filter`` can be one of a number of\nexpressions and objects:\n\n1. A `Vega expression`_ expressed as a string or built using the :mod:`~expr` module\n2. A Field predicate, such as :class:`~FieldOneOfPredicate`,\n   :class:`~FieldRangePredicate`, :class:`~FieldEqualPredicate`,\n   :class:`~FieldLTPredicate`, :class:`~FieldGTPredicate`,\n   :class:`~FieldLTEPredicate`, :class:`~FieldGTEPredicate`,\n3. A Selection predicate or object created by :func:`selection`\n4. A Logical operand that combines any of the above\n\nWe'll show a brief example of each of these in the following sections\n\n.. _filter-expression:\n\nFilter Expression\n^^^^^^^^^^^^^^^^^\nA filter expression uses the `Vega expression`_ language, either specified\ndirectly as a string, or built using the :mod:`~expr` module.\nThis can be useful when, for example, selecting only a subset of data.\n\nFor example:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair import datum\n\n    from altair.datasets import data\n    pop = data.population.url\n\n    alt.Chart(pop).mark_area().encode(\n        x='age:O',\n        y='people:Q',\n    ).transform_filter(\n        (datum.year == 2000) & (datum.sex == 1)\n    )\n\nNotice that, like in the :ref:`user-guide-filter-transform`, data values are\nreferenced via the name ``datum``.\n\nField Predicates\n^^^^^^^^^^^^^^^^\nField predicates overlap somewhat in function with expression predicates, but\nhave the advantage that their contents are validated by the schema. Examples\nare:\n\n- :class:`~FieldEqualPredicate` evaluates whether a field is equal to\n  a particular value\n- :class:`~FieldOneOfPredicate` evaluates whether a field is among a list of\n  specified values.\n- :class:`~FieldRangePredicate` evaluates whether a continuous field is within\n  a range of values.\n- :class:`~FieldLTPredicate` evaluates whether a continuous field is less\n  than a given value\n- :class:`~FieldGTPredicate` evaluates whether a continuous field is greater\n  than a given value\n- :class:`~FieldLTEPredicate` evaluates whether a continuous field is less\n  than or equal to a given value\n- :class:`~FieldGTEPredicate` evaluates whether a continuous field is greater\n  than or equal to a given value\n\nHere is an example of a :class:`~FieldEqualPredicate` used to select just the\nvalues from year 2000 as in the above chart:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n    pop = data.population.url\n\n    alt.Chart(pop).mark_line().encode(\n        x='age:O',\n        y='sum(people):Q',\n        color='year:O'\n    ).transform_filter(\n        alt.FieldEqualPredicate(field='year', equal=2000)\n    )\n\nA :class:`~FieldOneOfPredicate` is similar, but allows selection of any number\nof specific values:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n    pop = data.population.url\n\n    alt.Chart(pop).mark_line().encode(\n        x='age:O',\n        y='sum(people):Q',\n        color='year:O'\n    ).transform_filter(\n        alt.FieldOneOfPredicate(field='year', oneOf=[1900, 1950, 2000])\n    )\n\nFinally, a :meth:`~FieldRangePredicate` allows selecting values within a\nparticular continuous range:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n    pop = data.population.url\n\n    alt.Chart(pop).mark_line().encode(\n        x='age:O',\n        y='sum(people):Q',\n        color='year:O'\n    ).transform_filter(\n        alt.FieldRangePredicate(field='year', range=[1960, 2000])\n    )\n\nSelection Predicates\n^^^^^^^^^^^^^^^^^^^^\nSelection predicates can be used to filter data based on a selection. While\nthese can be constructed directly using a :class:`~SelectionPredicate` class,\nin Altair it is often more convenient to construct them using the\n:func:`~selection` function. For example, this chart uses a multi-selection\nthat allows the user to click or shift-click on the bars in the bottom chart\nto select the data to be shown in the top chart:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n    pop = data.population.url\n\n    selection = alt.selection_point(fields=['year'])\n\n    top = alt.Chart(width=600, height=200).mark_line().encode(\n        x=\"age:O\",\n        y=\"sum(people):Q\",\n        color=\"year:O\"\n    ).transform_filter(\n        selection\n    )\n\n    color = alt.when(selection).then(alt.value(\"steelblue\")).otherwise(alt.value(\"lightgray\"))\n    bottom = alt.Chart(width=600, height=100).mark_bar().encode(\n        x=\"year:O\",\n        y=\"sum(people):Q\",\n        color=color\n    ).add_params(\n        selection\n    )\n\n    alt.vconcat(top, bottom, data=pop)\n\nLogical Operands\n^^^^^^^^^^^^^^^^\nAt times it is useful to combine several types of predicates into a single\nselection. We can use ``&``, ``|`` and ``~`` for respectively \n``AND``, ``OR`` and ``NOT`` logical composition operands.\n\nFor example, here we wish to plot US population distributions for all data *except* the years *1950-1960*.\n\nFirst, we use a :class:`~FieldRangePredicate` to select *1950-1960*:\n\n.. altair-plot::\n    :output: none\n    \n    import altair as alt\n    from altair.datasets import data\n\n    source = data.population.url\n    chart = alt.Chart(source).mark_line().encode(\n        x=\"age:O\",\n        y=\"sum(people):Q\",\n        color=\"year:O\"\n    ).properties(\n        width=600, height=200\n    )\n\n    between_1950_60 = alt.FieldRangePredicate(field=\"year\", range=[1950, 1960])\n\nThen, we can *invert* this selection using ``~``:\n\n.. altair-plot::\n\n    # NOT between 1950-1960\n    chart.transform_filter(~between_1950_60)\n\nWe can further refine our filter by *composing* multiple predicates together.\nIn this case, using ``datum``:\n\n.. altair-plot::\n\n    chart.transform_filter(~between_1950_60 & (datum.age <= 70))\n\nWhen passing multiple predicates they will be reduced with ``&``:\n\n.. altair-plot::\n\n    chart.transform_filter(datum.year > 1980, datum.age != 90)\n\nUsing keyword-argument ``constraints`` can simplify our first example in :ref:`filter-expression`:\n\n.. altair-plot::\n\n    alt.Chart(source).mark_area().encode(\n        x=\"age:O\",\n        y=\"people:Q\",\n    ).transform_filter(year=2000, sex=1)\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_filter` method is built on the :class:`~FilterTransform`\nclass, which has the following options:\n\n.. altair-object-table:: altair.FilterTransform\n\n.. _Vega expression: https://vega.github.io/vega/docs/expressions/\n"
  },
  {
    "path": "doc/user_guide/transform/flatten.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-flatten-transform:\n\nFlatten\n~~~~~~~\nThe flatten transform can be used to extract the contents of arrays from data entries.\nThis will not generally be useful for well-structured data within pandas dataframes,\nbut it can be useful for working with data from other sources.\n\nAs an example, consider this dataset which uses a common convention in JSON data,\na set of fields each containing a list of entries:\n\n.. altair-plot::\n   :output: none\n\n   import numpy as np\n\n   rand = np.random.RandomState(0)\n\n   def generate_data(N):\n       mean = rand.randn()\n       std = rand.rand()\n       return list(rand.normal(mean, std, N))\n\n   data = [\n       {'label': 'A', 'values': generate_data(20)},\n       {'label': 'B', 'values': generate_data(30)},\n       {'label': 'C', 'values': generate_data(40)},\n       {'label': 'D', 'values': generate_data(50)},\n   ]\n\nThis kind of data structure does not work well in the context of dataframe\nrepresentations, as we can see by loading this into pandas:\n\n.. altair-plot::\n   :output: repr\n\n   import pandas as pd\n   df = pd.DataFrame.from_records(data)\n   df\n\nAlair's flatten transform allows you to extract the contents of these arrays\ninto a column that can be referenced by an encoding:\n\n.. altair-plot::\n\n   import altair as alt\n\n   alt.Chart(df).transform_flatten(\n       ['values']\n   ).mark_tick().encode(\n       x='values:Q',\n       y='label:N',\n   )\n\nThis can be particularly useful in cleaning up data specified via a JSON URL,\nwithout having to first load the data for manipulation in pandas.\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_flatten` method is built on the :class:`~FlattenTransform`\nclass, which has the following options:\n\n.. altair-object-table:: altair.FlattenTransform\n"
  },
  {
    "path": "doc/user_guide/transform/fold.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-fold-transform:\n\nFold\n~~~~\nThe fold transform is, in short, a way to convert wide-form data to long-form\ndata directly without any preprocessing (see :ref:`data-long-vs-wide` for more\ninformation). Fold transforms are the opposite of the :ref:`user-guide-pivot-transform`.\n\nSo, for example, if your data consist of multiple columns that record parallel\ndata for different categories, you can use the fold transform to encode based\non those categories:\n\n.. altair-plot::\n\n   import numpy as np\n   import pandas as pd\n   import altair as alt\n\n   rand = np.random.RandomState(0)\n   data = pd.DataFrame({\n       'date': pd.date_range('2019-01-01', freq='D', periods=30),\n       'A': rand.randn(30).cumsum(),\n       'B': rand.randn(30).cumsum(),\n       'C': rand.randn(30).cumsum(),\n   })\n\n   alt.Chart(data).transform_fold(\n       ['A', 'B', 'C'],\n   ).mark_line().encode(\n       x='date:T',\n       y='value:Q',\n       color='key:N'\n   )\n\nNotice here that the fold transform essentially stacks all the values\nfrom the specified columns into a single new field named ``\"value\"``,\nwith the associated names in a field named ``\"key\"``.\n\nFor an example of the fold transform in action, see :ref:`gallery_parallel_coordinates`.\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_fold` method is built on the :class:`~FoldTransform`\nclass, which has the following options:\n\n.. altair-object-table:: altair.FoldTransform\n"
  },
  {
    "path": "doc/user_guide/transform/impute.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-impute-transform:\n\nImpute\n~~~~~~\nThe impute transform allows you to fill-in missing entries in a dataset.\nAs an example, consider the following data, which includes missing values\nthat we filter-out of the long-form representation (see :ref:`data-long-vs-wide`\nfor more on this):\n\n.. altair-plot::\n   :output: repr\n\n   import numpy as np\n   import pandas as pd\n\n   data = pd.DataFrame({\n       't': range(5),\n       'x': [2, np.nan, 3, 1, 3],\n       'y': [5, 7, 5, np.nan, 4]\n   }).melt('t').dropna()\n   data\n\nNotice the result: the ``x`` series has no entry at ``t=1``, and the ``y``\nseries has a missing entry at ``t=3``. If we use Altair to visualize this\ndata directly, the line skips the missing entries:\n\n.. altair-plot::\n\n   import altair as alt\n\n   raw = alt.Chart(data).mark_line(point=True).encode(\n       x='t:Q',\n       y='value:Q',\n       color='variable:N'\n   )\n   raw\n\nThis is not always desirable, because (particularly for a line plot with\nno points) it can imply the existence of data that is not there.\n\nImpute via Encodings\n^^^^^^^^^^^^^^^^^^^^\nTo address this, you can use the impute method of the encoding channel.\nFor example, we can impute using a constant value (we'll show the raw chart\nlightly in the background for reference):\n\n.. altair-plot::\n\n   background = raw.encode(opacity=alt.value(0.2))\n   chart = alt.Chart(data).mark_line(point=True).encode(\n       x='t:Q',\n       y=alt.Y('value:Q').impute(value=0),\n       color='variable:N'\n   )\n   background + chart\n\nOr we can impute using any supported aggregate:\n\n.. altair-plot::\n\n   chart = alt.Chart(data).mark_line(point=True).encode(\n       x='t:Q',\n       y=alt.Y('value:Q').impute(method='mean'),\n       color='variable:N'\n   )\n   background + chart\n\nImpute via Transform\n^^^^^^^^^^^^^^^^^^^^\nSimilar to the :ref:`user-guide-bin-transform` and :ref:`user-guide-aggregate-transform`,\nit is also possible to specify the impute transform outside the encoding as a\ntransform. For example, here is the equivalent of the above two charts:\n\n.. altair-plot::\n\n   chart = alt.Chart(data).transform_impute(\n       impute='value',\n       key='t',\n       value=0,\n       groupby=['variable']\n   ).mark_line(point=True).encode(\n       x='t:Q',\n       y='value:Q',\n       color='variable:N'\n   )\n   background + chart\n\n.. altair-plot::\n\n   chart = alt.Chart(data).transform_impute(\n       impute='value',\n       key='t',\n       method='mean',\n       groupby=['variable']\n   ).mark_line(point=True).encode(\n       x='t:Q',\n       y='value:Q',\n       color='variable:N'\n   )\n   background + chart\n\nIf you would like to use more localized imputed values, you can specify a\n``frame`` parameter similar to the :ref:`user-guide-window-transform` that\nwill control which values are used for the imputation. For example, here\nwe impute missing values using the mean of the neighboring points on either\nside:\n\n.. altair-plot::\n\n   chart = alt.Chart(data).transform_impute(\n       impute='value',\n       key='t',\n       method='mean',\n       frame=[-1, 1],\n       groupby=['variable']\n   ).mark_line(point=True).encode(\n       x='t:Q',\n       y='value:Q',\n       color='variable:N'\n   )\n   background + chart\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_impute` method is built on the :class:`~ImputeTransform`\nclass, which has the following options:\n\n.. altair-object-table:: altair.ImputeTransform\n"
  },
  {
    "path": "doc/user_guide/transform/index.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-transformations:\n\nData Transformations\n--------------------\nIt is often necessary to transform or filter data in the process of visualizing\nit. In Altair you can do this one of two ways:\n\n1. Before the chart definition, using standard pandas data transformations.\n2. Within the chart definition, using Vega-Lite's data transformation tools.\n\nIn most cases, we suggest that you use the first approach, because it is more\nstraightforward to those who are familiar with data manipulation in Python, and\nbecause the pandas package offers much more flexibility than Vega-Lite in\navailable data manipulations.\n\nThe second approach becomes useful when the data source is not a dataframe, but,\nfor example, a URL pointer to a JSON or CSV file. It can also be useful in a\ncompound chart where different views of the dataset require different\ntransformations.\n\nThis second approach -- specifying data transformations within the chart\nspecification itself -- can be accomplished using the ``transform_*``\nmethods of top-level objects:\n\n=========================================  =========================================  ================================================================================\nTransform                                  Method                                     Description\n=========================================  =========================================  ================================================================================\n:ref:`user-guide-aggregate-transform`      :meth:`~Chart.transform_aggregate`         Create a new data column by aggregating an existing column.\n:ref:`user-guide-bin-transform`            :meth:`~Chart.transform_bin`               Create a new data column by binning an existing column.\n:ref:`user-guide-calculate-transform`      :meth:`~Chart.transform_calculate`         Create a new data column using an arithmetic calculation on an existing column.\n:ref:`user-guide-density-transform`        :meth:`~Chart.transform_density`           Create a new data column with the kernel density estimate of the input.\n:ref:`user-guide-extent-transform`         :meth:`~Chart.transform_extent`            Find the extent of a field and store the result in a parameter.\n:ref:`user-guide-filter-transform`         :meth:`~Chart.transform_filter`            Select a subset of data based on a condition.\n:ref:`user-guide-flatten-transform`        :meth:`~Chart.transform_flatten`           Flatten array data into columns.\n:ref:`user-guide-fold-transform`           :meth:`~Chart.transform_fold`              Convert wide-form data into long-form data (opposite of pivot).\n:ref:`user-guide-impute-transform`         :meth:`~Chart.transform_impute`            Impute missing data.\n:ref:`user-guide-joinaggregate-transform`  :meth:`~Chart.transform_joinaggregate`     Aggregate transform joined to original data.\n:ref:`user-guide-loess-transform`          :meth:`~Chart.transform_loess`             Create a new column with LOESS smoothing of data.\n:ref:`user-guide-lookup-transform`         :meth:`~Chart.transform_lookup`            One-sided join of two datasets based on a lookup key.\n:ref:`user-guide-pivot-transform`          :meth:`~Chart.transform_pivot`             Convert long-form data into wide-form data (opposite of fold).\n:ref:`user-guide-quantile-transform`       :meth:`~Chart.transform_quantile`          Compute empirical quantiles of a dataset.\n:ref:`user-guide-regression-transform`     :meth:`~Chart.transform_regression`        Fit a regression model to a dataset.\n:ref:`user-guide-sample-transform`         :meth:`~Chart.transform_sample`            Random sub-sample of the rows in the dataset.\n:ref:`user-guide-stack-transform`          :meth:`~Chart.transform_stack`             Compute stacked version of values.\n:ref:`user-guide-timeunit-transform`       :meth:`~Chart.transform_timeunit`          Discretize/group a date by a time unit (day, month, year, etc.)\n:ref:`user-guide-window-transform`         :meth:`~Chart.transform_window`            Compute a windowed aggregation\n=========================================  =========================================  ================================================================================\n\nAccessing Transformed Data\n~~~~~~~~~~~~~~~~~~~~~~~~~~\nWhen charts are displayed, data transformations are performed in the browser by\nthe Vega JavaScript library. It's often helpful to inspect transformed data\nresults in the process of building a chart. One approach is to display the\ntransformed data results in a table composed of :ref:`Text<user-guide-text-marks>`\nmarks as in the :ref:`gallery_scatter_linked_table` gallery example.\n\nWhile this approach works, it's somewhat cumbersome, and still does not make it\npossible to access the transformed data from Python. To make transformed data\nresults available in Python, Altair provides the :meth:`~Chart.transformed_data`\nChart method which integrates with `VegaFusion <https://vegafusion.io/>`_\nto evaluate data transformations in the Python kernel.\n\nFirst, install VegaFusion with the embed extras enabled.\n\n.. code-block:: none\n\n   pip install \"vegafusion[embed]\"\n\nThen create an Altair chart and call the :meth:`~Chart.transformed_data` method\nto extract a pandas DataFrame containing the transformed data.\n\n.. altair-plot::\n    :output: repr\n\n    import altair as alt\n    from altair.datasets import data\n\n    cars = data.cars.url\n    chart = alt.Chart(cars).mark_bar().encode(\n        y='Cylinders:O',\n        x='mean_acc:Q'\n    ).transform_aggregate(\n        mean_acc='mean(Acceleration)',\n        groupby=[\"Cylinders\"]\n    )\n    chart.transformed_data()\n\nThe :meth:`~Chart.transformed_data` method currently supports most, but not all,\nof Altair's transforms. See the table below.\n\n=========================================  =========\nTransform                                  Supported\n=========================================  =========\n:ref:`user-guide-aggregate-transform`        ✔\n:ref:`user-guide-bin-transform`              ✔\n:ref:`user-guide-calculate-transform`        ✔\n:ref:`user-guide-density-transform`\n:ref:`user-guide-extent-transform`           ✔\n:ref:`user-guide-filter-transform`           ✔\n:ref:`user-guide-flatten-transform`\n:ref:`user-guide-fold-transform`             ✔\n:ref:`user-guide-impute-transform`           ✔\n:ref:`user-guide-joinaggregate-transform`    ✔\n:ref:`user-guide-loess-transform`\n:ref:`user-guide-lookup-transform`\n:ref:`user-guide-pivot-transform`            ✔\n:ref:`user-guide-quantile-transform`\n:ref:`user-guide-regression-transform`\n:ref:`user-guide-sample-transform`\n:ref:`user-guide-stack-transform`            ✔\n:ref:`user-guide-timeunit-transform`         ✔\n:ref:`user-guide-window-transform`           ✔\n=========================================  =========\n\n.. toctree::\n   :hidden:\n\n   aggregate\n   bin\n   calculate\n   density\n   extent\n   filter\n   flatten\n   fold\n   impute\n   joinaggregate\n   lookup\n   loess\n   pivot\n   quantile\n   regression\n   sample\n   stack\n   timeunit\n   window"
  },
  {
    "path": "doc/user_guide/transform/joinaggregate.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-joinaggregate-transform:\n\nJoin Aggregate\n~~~~~~~~~~~~~~\nThe Join Aggregate transform acts in almost every way the same as an Aggregate\ntransform, but the resulting aggregate is joined to the original dataset.\nTo make this more clear, consider the following dataset:\n\n.. altair-plot::\n   :output: repr\n\n   import pandas as pd\n   import numpy as np\n\n   rand = np.random.RandomState(0)\n\n   df = pd.DataFrame({\n       'label': rand.choice(['A', 'B', 'C'], 10),\n       'value': rand.randn(10),\n   })\n   df\n\nHere is a pandas operation that is equivalent to Altair's Aggregate transform,\nusing the mean as an example:\n\n.. altair-plot::\n   :output: repr\n\n   mean = df.groupby('label').mean().reset_index()\n   mean\n\nAnd here is an output that is equivalent to Altair's Join Aggregate:\n\n.. altair-plot::\n   :output: repr\n\n   pd.merge(df, mean, on='label', suffixes=['', '_mean'])\n\nNotice that the join aggregate joins the aggregated value with the original\ndataframe, such that the aggregated values can be used in tandem with the\noriginal values if desired.\n\nHere is an example of how the join aggregate might be used: we compare the\nIMDB and Rotten Tomatoes movie ratings, normalized by their mean and\nstandard deviation, which requires calculations on the joined data:\n\n.. altair-plot::\n\n   import altair as alt\n   from altair.datasets import data\n\n   alt.Chart(data.movies.url).transform_filter(\n       'datum[\"IMDB Rating\"] != null  && datum[\"Rotten Tomatoes Rating\"] != null'\n   ).transform_joinaggregate(\n       IMDB_mean='mean(IMDB Rating)',\n       IMDB_std='stdev(IMDB Rating)',\n       RT_mean='mean(Rotten Tomatoes Rating)',\n       RT_std='stdev(Rotten Tomatoes Rating)'\n   ).transform_calculate(\n       IMDB_Deviation='(datum[\"IMDB Rating\"] - datum.IMDB_mean) / datum.IMDB_std',\n       Rotten_Tomatoes_Deviation='(datum[\"Rotten Tomatoes Rating\"] - datum.RT_mean) / datum.RT_std'\n   ).mark_point().encode(\n       x='IMDB_Deviation:Q',\n       y=\"Rotten_Tomatoes_Deviation:Q\"\n   )\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_joinaggregate` method is built on the\n:class:`~JoinAggregateTransform` class, which has the following options:\n\n.. altair-object-table:: altair.JoinAggregateTransform\n"
  },
  {
    "path": "doc/user_guide/transform/loess.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-loess-transform:\n\nLOESS\n~~~~~\nThe LOESS transform (LOcally Estimated Scatterplot Smoothing) uses a\nlocally-estimated regression  to produce a trend line.\nLOESS performs a sequence of local weighted regressions over a sliding\nwindow of nearest-neighbor points. For standard parametric regression options,\nsee the :ref:`user-guide-regression-transform`.\n\nHere is an example of using LOESS to smooth samples from a Gaussian random walk:\n\n.. altair-plot::\n\n   import altair as alt\n   import pandas as pd\n   import numpy as np\n\n   np.random.seed(42)\n\n   df = pd.DataFrame({\n       'x': range(100),\n       'y': np.random.randn(100).cumsum()\n   })\n\n   chart = alt.Chart(df).mark_point().encode(\n       x='x',\n       y='y'\n   )\n\n   chart + chart.transform_loess('x', 'y').mark_line()\n\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_loess` method is built on the\n:class:`~LoessTransform` class, which has the following options:\n\n.. altair-object-table:: altair.LoessTransform\n"
  },
  {
    "path": "doc/user_guide/transform/lookup.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-lookup-transform:\n\nLookup\n~~~~~~\nThe Lookup transform extends a primary data source by looking up values from\nanother data source; it is similar to a one-sided join. A lookup can be added\nat the top level of a chart using the :meth:`Chart.transform_lookup` method.\n\nBy way of example, imagine you have two sources of data that you would like\nto combine and plot: one is a list of names of people along with their height\nand weight, and the other is some information about which groups they belong\nto. This example data is available in the `altair.datasets` package:\n\n.. altair-plot::\n   :output: none\n\n   from altair.datasets import data\n   people = data.lookup_people()\n   groups = data.lookup_groups()\n\nWe know how to visualize each of these datasets separately; for example:\n\n.. altair-plot::\n\n    import altair as alt\n\n    top = alt.Chart(people).mark_square(size=200).encode(\n        x=alt.X('age:Q').scale(zero=False),\n        y=alt.Y('height:Q').scale(zero=False),\n        color='name:N',\n        tooltip='name:N'\n    ).properties(\n        width=400, height=200\n    )\n\n    bottom = alt.Chart(groups).mark_rect().encode(\n        x='person:N',\n        y='group:O'\n    ).properties(\n        width=400, height=100\n    )\n\n    alt.vconcat(top, bottom)\n\nIf we would like to plot features that reference both datasets (for example, the\naverage age within each group), we need to combine the two datasets.\nThis can be done either as a data preprocessing step, using tools available\nin pandas, or as part of the visualization using a :class:`~LookupTransform`\nin Altair.\n\nCombining Datasets with pandas.merge\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\npandas provides a wide range of tools for merging and joining datasets; see\n`Merge, Join, and Concatenate <https://pandas.pydata.org/pandas-docs/stable/merging.html>`_\nfor some detailed examples.\nFor the above data, we can merge the data and create a combined chart as follows:\n\n.. altair-plot::\n\n    import pandas as pd\n    merged = pd.merge(groups, people, how='left',\n                      left_on='person', right_on='name')\n\n    alt.Chart(merged).mark_bar().encode(\n        x='mean(age):Q',\n        y='group:O'\n    )\n\nWe specify a left join, meaning that for each entry of the \"person\" column in\nthe groups, we seek the \"name\" column in people and add the entry to the data.\nFrom this, we can easily create a bar chart representing the mean age in each group.\n\nCombining Datasets with a Lookup Transform\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nFor some data sources (e.g. data available at a URL, or data that is streaming),\nit is desirable to have a means of joining data without having to download\nit for pre-processing in pandas.\nThis is where Altair's :meth:`~Chart.transform_lookup` comes in.\nTo reproduce the above combined plot by combining datasets within the\nchart specification itself, we can do the following:\n\n.. altair-plot::\n\n    alt.Chart(groups).mark_bar().encode(\n        x='mean(age):Q',\n        y='group:O'\n    ).transform_lookup(\n        lookup='person',\n        from_=alt.LookupData(data=people, key='name',\n                             fields=['age', 'height'])\n    )\n\nHere ``lookup`` names the field in the groups dataset on which we will match,\nand the ``from_`` argument specifies a :class:`~LookupData` structure where\nwe supply the second dataset, the lookup key, and the fields we would like to\nextract.\n\nExample: Lookup Transforms for Geographical Visualization\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nLookup transforms are often particularly important for geographic visualization,\nwhere it is common to combine tabular datasets with datasets that specify\ngeographic boundaries to be visualized; for example, here is a visualization\nof unemployment rates per county in the US:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    counties = alt.topo_feature(data.us_10m.url, 'counties')\n    unemp_data = data.unemployment.url\n\n    alt.Chart(counties).mark_geoshape().encode(\n        color='rate:Q'\n    ).transform_lookup(\n        lookup='id',\n        from_=alt.LookupData(unemp_data, 'id', ['rate'])\n    ).properties(\n        projection={'type': 'albersUsa'},\n        width=500, height=300\n    )\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_lookup` method is built on the :class:`~LookupTransform`\nclass, which has the following options:\n\n.. altair-object-table:: altair.LookupTransform\n"
  },
  {
    "path": "doc/user_guide/transform/pivot.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-pivot-transform:\n\nPivot\n~~~~~\nThe pivot transform is, in short, a way to convert long-form data to wide-form\ndata directly without any preprocessing (see :ref:`data-long-vs-wide` for more\ninformation). Pivot transforms are useful for creating matrix or cross-tabulation\ndata, acting as an inverse to the :ref:`user-guide-fold-transform`.\n\nHere is an example, using Olympic medals data:\n\n.. altair-plot::\n\n   import altair as alt\n   import pandas as pd\n\n   df = pd.DataFrame.from_records([\n       {\"country\": \"Norway\", \"type\": \"gold\", \"count\": 14},\n       {\"country\": \"Norway\", \"type\": \"silver\", \"count\": 14},\n       {\"country\": \"Norway\", \"type\": \"bronze\", \"count\": 11},\n       {\"country\": \"Germany\", \"type\": \"gold\", \"count\": 14},\n       {\"country\": \"Germany\", \"type\": \"silver\", \"count\": 10},\n       {\"country\": \"Germany\", \"type\": \"bronze\", \"count\": 7},\n       {\"country\": \"Canada\", \"type\": \"gold\", \"count\": 11},\n       {\"country\": \"Canada\", \"type\": \"silver\", \"count\": 8},\n       {\"country\": \"Canada\", \"type\": \"bronze\", \"count\": 10}\n   ])\n\n   alt.Chart(df).transform_pivot(\n       'type',\n       groupby=['country'],\n       value='count'\n   ).mark_bar().encode(\n       x='gold:Q',\n       y='country:N',\n   )\n\nThe pivot transform, when combined with other elements of the Altair grammar, enables some\nvery interesting chart types. For example, here we use pivot to create a single tooltip for\nvalues on multiple lines:\n\n.. altair-plot::\n\n   import altair as alt\n   from altair.datasets import data\n\n   source = data.stocks()\n   base = alt.Chart(source).encode(x='date:T')\n   columns = sorted(source.symbol.unique())\n   selection = alt.selection_point(\n       fields=['date'], nearest=True, on='pointerover', empty=False, clear='pointerout'\n   )\n\n   lines = base.mark_line().encode(y='price:Q', color='symbol:N')\n   points = lines.mark_point().transform_filter(selection)\n\n   rule = base.transform_pivot(\n       'symbol', value='price', groupby=['date']\n   ).mark_rule().encode(\n       opacity=alt.when(selection).then(alt.value(0.3)).otherwise(alt.value(0)),\n       tooltip=[alt.Tooltip(c, type='quantitative') for c in columns]\n   ).add_params(selection)\n\n   lines + points + rule\n\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_pivot` method is built on the :class:`~PivotTransform`\nclass, which has the following options:\n\n.. altair-object-table:: altair.PivotTransform\n"
  },
  {
    "path": "doc/user_guide/transform/quantile.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-quantile-transform:\n\nQuantile\n~~~~~~~~\nThe quantile transform calculates empirical `quantile <https://en.wikipedia.org/wiki/Quantile>`_\nvalues for input data. If a groupby parameter is provided, quantiles are estimated\nseparately per group. Among other uses, the quantile transform is useful for creating\n`quantile-quantile (Q-Q) plots <https://en.wikipedia.org/wiki/Q%E2%80%93Q_plot>`_.\n\nHere is an example of a quantile plot of normally-distributed data:\n\n.. altair-plot::\n\n   import altair as alt\n   import pandas as pd\n   import numpy as np\n\n   np.random.seed(42)\n   df = pd.DataFrame({'x': np.random.randn(200)})\n\n   alt.Chart(df).transform_quantile(\n       'x', step=0.01\n   ).mark_point().encode(\n       x='prob:Q',\n       y='value:Q'\n   )\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_quantile` method is built on the :class:`~QuantileTransform`\nclass, which has the following options:\n\n.. altair-object-table:: altair.QuantileTransform\n"
  },
  {
    "path": "doc/user_guide/transform/regression.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-regression-transform:\n\nRegression\n~~~~~~~~~~\n\nThe regression transform fits two-dimensional regression models to smooth and\npredict data. This transform can fit multiple models for input data (one per group)\nand generates new data objects that represent points for summary trend lines.\nAlternatively, this transform can be used to generate a set of objects containing\nregression model parameters, one per group.\n\nThis transform supports parametric models for the following functional forms:\n\n- linear (``linear``): *y = a + b * x*\n- logarithmic (``log``): *y = a + b * log(x)*\n- exponential (``exp``): *y = a * e^(b * x)*\n- power (``pow``): *y = a * x^b*\n- quadratic (``quad``): *y = a + b * x + c * x^2*\n- polynomial (``poly``): *y = a + b * x + … + k * x^(order)*\n\nAll models are fit using ordinary least squares.\nFor non-parametric locally weighted regression, see the\n:ref:`user-guide-loess-transform`.\n\nHere is an example of a simple linear regression plotted on top of data:\n\n.. altair-plot::\n\n   import altair as alt\n   import pandas as pd\n   import numpy as np\n\n   np.random.seed(42)\n   x = np.linspace(0, 10)\n   y = x - 5 + np.random.randn(len(x))\n\n   df = pd.DataFrame({'x': x, 'y': y})\n\n   chart = alt.Chart(df).mark_point().encode(\n       x='x',\n       y='y'\n   )\n\n   chart + chart.transform_regression('x', 'y').mark_line()\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_regression` method is built on the :class:`~RegressionTransform`\nclass, which has the following options:\n\n.. altair-object-table:: altair.RegressionTransform\n"
  },
  {
    "path": "doc/user_guide/transform/sample.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-sample-transform:\n\nSample\n~~~~~~\nThe sample transform is one of the simpler of all Altair's data transforms;\nit takes a single parameter ``sample`` which specified a number of rows to\nrandomly choose from the dataset. The resulting chart will be created using\nonly this random subset of the data.\n\nFor example, here we chart the full cars dataset alongside a sample of 100\nrows:\n\n.. altair-plot::\n\n   import altair as alt\n   from altair.datasets import data\n\n   source = data.cars.url\n\n   chart = alt.Chart(source).mark_point().encode(\n       x='Horsepower:Q',\n       y='Miles_per_Gallon:Q',\n       color='Origin:N'\n   ).properties(\n       width=200,\n       height=200\n   )\n\n   chart | chart.transform_sample(100)\n\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_sample` method is built on the :class:`~SampleTransform`\nclass, which has the following options:\n\n.. altair-object-table:: altair.SampleTransform\n"
  },
  {
    "path": "doc/user_guide/transform/stack.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-stack-transform:\n\nStack\n~~~~~\nThe stack transform allows you to compute values associated with stacked versions\nof encodings. For example, consider this stacked bar chart:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.barley()\n\n    alt.Chart(source).mark_bar().encode(\n        column='year:O',\n        x='yield:Q',\n        y='variety:N',\n        color='site:N'\n    ).properties(width=220)\n\nImplicitly, this data is being grouped and stacked, but what if you would like to\naccess those stacked values directly?\nWe can construct that same chart manually using the stack transform:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    source = data.barley()\n\n    alt.Chart(source).transform_stack(\n        stack='yield',\n        as_=['yield_1', 'yield_2'],\n        groupby=['year', 'variety'],\n        sort=[alt.SortField('site', 'descending')]\n    ).mark_bar().encode(\n        column='year:O',\n        x=alt.X('yield_1:Q').title('yield'),\n        x2='yield_2:Q',\n        y='variety:N',\n        color='site:N',\n        tooltip=['site', 'yield', 'variety']\n    ).properties(width=220)\n\nNotice that the bars are now explicitly drawn between values computed and\nspecified within the x and x2 encodings.\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_stack` method is built on the :class:`~StackTransform`\nclass, which has the following options:\n\n.. altair-object-table:: altair.StackTransform\n"
  },
  {
    "path": "doc/user_guide/transform/timeunit.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-timeunit-transform:\n\nTimeUnit\n~~~~~~~~\nTimeUnit transforms are used to discretize dates and times within Altair.\nAs with the :ref:`user-guide-aggregate-transform` and :ref:`user-guide-bin-transform`\ndiscussed above, they can be defined either as part of the encoding, or as a\ntop-level transform.\n\nThese are the available time units:\n\n- ``\"year\"``, ``\"yearquarter\"``, ``\"yearquartermonth\"``, ``\"yearmonth\"``,\n  ``\"yearmonthdate\"``, ``\"yearmonthdatehours\"``, ``\"yearmonthdatehoursminutes\"``,\n  ``\"yearmonthdatehoursminutesseconds\"``.\n- ``\"quarter\"``, ``\"quartermonth\"``\n- ``\"month\"``, ``\"monthdate\"``\n- ``\"date\"`` (Day of month, i.e., 1 - 31)\n- ``\"day\"`` (Day of week, i.e., Monday - Friday)\n- ``\"hours\"``, ``\"hoursminutes\"``, ``\"hoursminutesseconds\"``\n- ``\"minutes\"``, ``\"minutesseconds\"``\n- ``\"seconds\"``, ``\"secondsmilliseconds\"``\n- ``\"milliseconds\"``\n\nTimeUnit Within Encoding\n^^^^^^^^^^^^^^^^^^^^^^^^\nAny temperatureoral field definition can include a ``timeUnit`` argument to discretize\nthe temperatureoral data.\n\nFor example, here we plot a dataset that consists of hourly temperatureerature\nmeasurements in Seattle during the year 2010:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    temperatures = data.seattle_weather_hourly_normals.url\n\n    alt.Chart(temperatures).mark_line().encode(\n        x='date:T',\n        y='temperature:Q'\n    )\n\nThe plot is too busy due to the amount of data points squeezed into the short\ntime; we can make it a bit cleaner by discretizing it, for example, by month\nand plotting only the mean monthly temperatureerature:\n\n.. altair-plot::\n\n    alt.Chart(temperatures).mark_line().encode(\n        x='month(date):T',\n        y='mean(temperature):Q'\n    )\n\nNotice that by default timeUnit output is a continuous quantity; if you would\ninstead like it to be a categorical, you can specify the ordinal (``O``) or\nnominal (``N``) type.\nThis can be useful when plotting a bar chart or other discrete chart type:\n\n.. altair-plot::\n\n    alt.Chart(temperatures).mark_bar().encode(\n        x='month(date):O',\n        y='mean(temperature):Q'\n    )\n\nMultiple time units can be combined within a single plot to yield interesting\nviews of your data; for example, here we extract both the month and the day\nto give a profile of Seattle temperatureeratures through the year:\n\n.. altair-plot::\n\n    alt.Chart(temperatures).mark_rect().encode(\n        alt.X('date(date):O').title('day'),\n        alt.Y('month(date):O').title('month'),\n        color='max(temperature):Q'\n    ).properties(\n        title=\"2010 Daily High Temperatures in Seattle (C)\"\n    )\n\nTimeUnit as a Transform\n^^^^^^^^^^^^^^^^^^^^^^^\nOther times it is convenient to specify a timeUnit as a top-level transform,\nparticularly when the value may be reused.\nThis can be done most conveniently using the :meth:`Chart.transform_timeunit`\nmethod. For example:\n\n.. altair-plot::\n\n    alt.Chart(temperatures).mark_line().encode(\n        alt.X('month:T').axis(format='%b'),\n        y='mean(temperature):Q'\n    ).transform_timeunit(\n        month='month(date)'\n    )\n\nNotice that because the ``timeUnit`` is not part of the encoding channel here,\nit is often necessary to add an axis formatter to ensure appropriate axis\nlabels.\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_timeunit` method is built on the :class:`~TimeUnitTransform`\nclass, which has the following options:\n\n.. altair-object-table:: altair.TimeUnitTransform\n"
  },
  {
    "path": "doc/user_guide/transform/window.rst",
    "content": ".. currentmodule:: altair\n\n.. _user-guide-window-transform:\n\nWindow\n~~~~~~\nThe window transform performs calculations over sorted groups of data objects.\nThese calculations include ranking, lead/lag analysis, and aggregates such as cumulative sums and averages.\nCalculated values are written back to the input data stream, where they can be referenced by encodings.\n\nFor example, consider the following cumulative frequency distribution:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    alt.Chart(data.movies.url).transform_aggregate(\n        count='count(*)',\n        groupby=['IMDB Rating']\n    ).transform_window(\n        sort=[{'field': 'IMDB Rating'}],\n        frame=[None, 0],\n        cumulative_count='sum(count)',\n    ).mark_area().encode(\n        x='IMDB Rating:Q',\n        y='cumulative_count:Q',\n    )\n\nFirst, we aggregate the data to count movies grouped by IMDB Rating.\nThis creates a dataset where each row represents a unique IMDB Rating and its count.\nNext, we apply the window transform with a sort field definition, which indicates how data objects should be sorted within the window.\nHere, movies should be sorted by their IMDB rating.\nWe then pass the frame, which indicates how many data objects before and after the current data object should be included within the window.\nHere, all movies up to and including the current movie should be included.\nFinally, we pass a window field definition, which indicates how data objects should be aggregated within the window.\nHere, we sum the counts to create a cumulative count.\n\nThere are many aggregation functions built into Altair.\nAs well as those given in :ref:`agg-func-table`, we can use the following within window field definitions:\n\n============  =========  =========================================================================================================================================================================================================================================================================================================================\nAggregate     Parameter  Description\n============  =========  =========================================================================================================================================================================================================================================================================================================================\nrow_number    None       Assigns each data object a consecutive row number, starting from 1.\nrank          None       Assigns a rank order value to each data object in a window, starting from 1. Peer values are assigned the same rank. Subsequent rank scores incorporate the number of prior values. For example, if the first two values tie for rank 1, the third value is assigned rank 3.\ndense_rank    None       Assigns dense rank order values to each data object in a window, starting from 1. Peer values are assigned the same rank. Subsequent rank scores do not incorporate the number of prior values. For example, if the first two values tie for rank 1, the third value is assigned rank 2.\npercent_rank  None       Assigns a percentage rank order value to each data object in a window. The percent is calculated as (rank - 1) / (group_size - 1).\ncume_dist     None       Assigns a cumulative distribution value between 0 and 1 to each data object in a window.\nntile         Number     Assigns a quantile (e.g., percentile) value to each data object in a window. Accepts an integer parameter indicating the number of buckets to use (e.g., 100 for percentiles, 5 for quintiles).\nlag           Number     Assigns a value from the data object that precedes the current object by a specified number of positions. If no such object exists, assigns ``null``. Accepts an offset parameter (default ``1``) that indicates the number of positions. This operation must have a corresponding entry in the `fields` parameter array.\nlead          Number     Assigns a value from the data object that follows the current object by a specified number of positions. If no such object exists, assigns ``null``. Accepts an offset parameter (default ``1``) that indicates the number of positions. This operation must have a corresponding entry in the `fields` parameter array.\nfirst_value   None       Assigns a value from the first data object in the current sliding window frame. This operation must have a corresponding entry in the `fields` parameter array.\nlast_value    None       Assigns a value from the last data object in the current sliding window frame. This operation must have a corresponding entry in the `fields` parameter array.\nnth_value     Number     Assigns a value from the nth data object in the current sliding window frame. If no such object exists, assigns ``null``. Requires a non-negative integer parameter that indicates the offset from the start of the window frame. This operation must have a corresponding entry in the `fields` parameter array.\n============  =========  =========================================================================================================================================================================================================================================================================================================================\n\nWhile an aggregate transform computes a single value that summarises all data objects, a window transform adds a new property to each data object.\nThis new property is computed from the neighbouring data objects: that is, from the data objects delimited by the window field definition.\nFor example, consider the following time series of stock prices:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    alt.Chart(data.stocks.url).mark_line().encode(\n        x='date:T',\n        y='price:Q',\n        color='symbol:N',\n    )\n\nIt's hard to see the overall pattern in the above example, because Google's stock price is much higher than the other stock prices.\nIf we plot the `z-scores`_ of the stock prices, rather than the stock prices themselves, then the overall pattern becomes clearer:\n\n.. altair-plot::\n\n    import altair as alt\n    from altair.datasets import data\n\n    alt.Chart(data.stocks.url).transform_window(\n        mean_price='mean(price)',\n        stdev_price='stdev(price)',\n        frame=[None, None],\n        groupby=['symbol'],\n    ).transform_calculate(\n        z_score=(alt.datum.price - alt.datum.mean_price) / alt.datum.stdev_price,\n    ).mark_line().encode(\n        x='date:T',\n        y='z_score:Q',\n        color='symbol:N',\n    )\n\nBy using two aggregation functions (``mean`` and ``stdev``) within the window transform, we are able to compute the z-scores within the calculate transform.\n\nFor more information about the arguments to the window transform, see :class:`WindowTransform` and `the Vega-Lite documentation <https://vega.github.io/vega-lite/docs/window.html>`_.\n\nTransform Options\n^^^^^^^^^^^^^^^^^\nThe :meth:`~Chart.transform_window` method is built on the :class:`~WindowTransform`\nclass, which has the following options:\n\n.. altair-object-table:: altair.WindowTransform\n\n.. _z-scores: https://en.wikipedia.org/w/index.php?title=Z-score\n"
  },
  {
    "path": "paper/paper.bib",
    "content": "@article{2011-d3,\n title = {D3: Data-Driven Documents},\n author = {Bostock, Michael and Ogievetsky, Vadim and Heer, Jeffrey},\n journal = {IEEE Trans. Visualization \\& Comp. Graphics (Proc. InfoVis)},\n year = {2011},\n url = {http://idl.cs.washington.edu/papers/d3},\n doi = {10.1109/TVCG.2011.185},\n}\n\n@article{2017-vega-lite,\n title = {Vega-Lite: A Grammar of Interactive Graphics},\n author = {Satyanarayan, Arvind and Moritz, Dominik and Wongsuphasawat, Kanit and Heer, Jeffrey},\n journal = {IEEE Trans. Visualization \\& Comp. Graphics (Proc. InfoVis)},\n year = {2017},\n url = {http://idl.cs.washington.edu/papers/vega-lite},\n doi = {10.1109/TVCG.2016.2599030},\n}\n\n@inproceedings{2017-voyager2,\n title = {Voyager 2: Augmenting Visual Analysis with Partial View Specifications},\n author = {Wongsuphasawat, Kanit and Qu, Zening and Moritz, Dominik and Chang, Riley and Ouk, Felix and Anand, Anushka and Mackinlay, Jock and Howe, Bill and Heer, Jeffrey},\n booktitle = {Proceedings of the 2017 {CHI Conference on Human Factors in Computing Systems}},\n series = {CHI '17},\n year = {2017},\n isbn = {978-1-4503-4655-9},\n location = {Denver, Colorado, USA},\n pages = {2648--2659},\n numpages = {12},\n url = {http://idl.cs.washington.edu/papers/voyager2},\n doi = {10.1145/3025453.3025768},\n acmid = {3025768},\n publisher = {ACM},\n address = {New York, NY, USA},\n}\n\n@article{2016-voyager,\n title = {Voyager: Exploratory Analysis via Faceted Browsing of Visualization Recommendations},\n author = {Wongsuphasawat, Kanit and Moritz, Dominik and Anand, Anushka and Mackinlay, Jock and Howe, Bill and Heer, Jeffrey},\n journal = {IEEE Trans. Visualization \\& Comp. Graphics (Proc. InfoVis)},\n year = {2016},\n url = {http://idl.cs.washington.edu/papers/voyager},\n doi = {10.1109/TVCG.2015.2467191},\n}\n\n@article{2016-reactive-vega-architecture,\n title = {Reactive {Vega}: A Streaming Dataflow Architecture for Declarative Interactive Visualization},\n author = {Satyanarayan, Arvind and Russell, Ryan and Hoffswell, Jane and Heer, Jeffrey},\n journal = {IEEE Trans. Visualization \\& Comp. Graphics (Proc. InfoVis)},\n year = {2016},\n url = {http://idl.cs.washington.edu/papers/reactive-vega-architecture},\n doi = {10.1109/TVCG.2015.2467091},\n}\n\n@book{1977-exploratory,\n  title={Exploratory data analysis},\n  author={Tukey, John W},\n  volume={2},\n  year={1977},\n  publisher={Reading, Mass.},\n  doi = {10.1002/bimj.4710230408 },\n}\n\n@book{2005-grammar,\n author = {Wilkinson, Leland},\n title = {The Grammar of Graphics},\n series = {Statistics and Computing},\n year = {2005},\n isbn = {0387245448},\n publisher = {Springer-Verlag New York, Inc.},\n address = {Secaucus, NJ, USA},\n doi = {10.1007/0-387-28695-0},\n}\n"
  },
  {
    "path": "paper/paper.md",
    "content": "---\ntitle: 'Altair: Interactive Statistical Visualizations for Python'\ntags:\n  - Python\n  - visualization\n  - statistics\n  - Jupyter\nauthors:\n  - name: Jacob VanderPlas\n    orcid: 0000-0002-9623-3401\n    affiliation: 1\n  - name: Brian E. Granger\n    orcid: 0000-0002-5223-6168\n    affiliation: 2\n  - name: Jeffrey Heer\n    orcid: 0000-0002-6175-1655\n    affiliation: 1\n  - name: Dominik Moritz\n    orcid: 0000-0002-3110-1053\n    affiliation: 1\n  - name: Kanit Wongsuphasawat\n    orcid: 0000-0001-7231-279X\n    affiliation: 1\n  - name: Arvind Satyanarayan\n    orcid: 0000-0001-5564-635X\n    affiliation: 3\n  - name: Eitan Lees\n    orcid: 0000-0003-0988-6015\n    affiliation: 4\n  - name: Ilia Timofeev\n    orcid: 0000-0003-1795-943X\n    affiliation: 5\n  - name: Ben Welsh\n    orcid: 0000-0002-5200-7269\n    affiliation: 6\n  - name: Scott Sievert\n    orcid: 0000-0002-4275-3452\n    affiliation: 7\n    \naffiliations:\n  - name: University of Washington\n    index: 1\n  - name: California Polytechnic State University, San Luis Obispo\n    index: 2\n  - name: MIT CSAIL\n    index: 3\n  - name: Florida State University\n    index: 4\n  - name: TTS Consulting\n    index: 5\n  - name: Los Angeles Times Data Desk\n    index: 6\n  - name: University of Wisconsin--Madison\n    index: 7\ndate: 07 August 2018\nbibliography: paper.bib\n---\n\n# Summary\n\nAltair is a declarative statistical visualization library for Python.\nStatistical visualization is a constrained subset of data visualization focused on the creation of visualizations\nthat are helpful in statistical modeling. The constrained model of statistical visualization is usually expressed\nin terms of a visualization grammar [@2005-grammar] that specifies how input data is transformed and mapped to visual\nproperties (position, color, size, etc.).\n\nAltair is based on the Vega-Lite visualization grammar [@2017-vega-lite], which allows a wide range of statistical\nvisualizations to be expressed using a small number of grammar primitives. Vega-Lite implements a view composition\nalgebra in conjunction with a novel grammar of interactions that allow users to specify interactive charts in a few\nlines of code. Vega-Lite is declarative; visualizations are specified using JSON data that follows the\n[Vega-Lite JSON schema](https://github.com/vega/schema). As a Python library, Altair provides an API oriented towards\nscientists and data scientists doing exploratory data analysis [@1977-exploratory]. Altair's Python API emits Vega-Lite\nJSON data, which is then rendered in a user-interface such as the Jupyter Notebook, JupyterLab, or nteract using the\n[Vega-Lite JavaScript library](https://vega.github.io/vega-lite/). Vega-Lite JSON is compiled to a full Vega\nspecification [@2016-reactive-vega-architecture], which is then parsed and executed using a reactive runtime that\ninternally makes use of D3.js [@2011-d3]. \n\nThe declarative nature of the Vega-Lite visualization grammar [@2005-grammar; @2017-vega-lite], and its encoding in a\nformal JSON schema, provide Altair with a number of benefits. First, much of the Altair Python code and tests are\ngenerated from the Vega-Lite JSON schema, ensuring strict conformance with the Vega-Lite specification. Second, the JSON\ndata produced by Altair and consumed by Vega-Lite provides a natural serialization and file format for statistical\nvisualizations. This is leveraged by JupyterLab, which provides built-in rendering of these files. Third, the JSON data \nprovides a clean integration point for non-programming based visualization user-interfaces such as Voyager\n[@2016-voyager;@2017-voyager2].\n\nIn addition to [static documentation](https://altair-viz.github.io/), Altair includes a set of Jupyter Notebooks with\nexamples and an interactive tutorial. These notebooks can be read by anyone with only a web-browser through\n[binder](https://mybinder.org/).\n\n-![Seattle Weather Interactive Visualization](seattle_weather_interactive.png)\n\nThe example above is an interactive Altair visualization of the weather in Seattle. The plot on the *left* shows the\ninitial state: a scatterplot showing the temperature and dominant weather type between January and December, and a bar\nchart showing the counts grouped by weather type. The plot in the *middle* shows a brush that the user has drawn to\nfocus on the summers; which are dominantly sunny. In the last plot on the *right*, the user has clicked on the a bar\nto filter the scatterplot.\n\nThese interactions are achieved through two selections: an interval selection on the scatterplot and a multi selection\non the bar chart. The selections drive filters in the other plot. The code for this and other examples is in the\n[Altair gallery](https://altair-viz.github.io/gallery/).\n\n# Acknowledgements\n\nWe thank the many contributors that created examples, wrote documentation, and reported bugs. You can find [an up-to-date\nlist of contributors on GitHub](https://github.com/vega/altair/graphs/contributors).\n\n# References\n"
  },
  {
    "path": "pyproject.toml",
    "content": "# this file contains:\n# 1 build system configuration\n# 2 project configuration\n# 3 tool configuration, for:\n# - hatch\n# - ruff\n# - pytest\n# - mypy\n# - pyright (experimental)\n\n[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nname = \"altair\"\nauthors = [{ name = \"Vega-Altair Contributors\" }]\ndependencies = [\n    \"typing_extensions>=4.12.0; python_version<'3.15'\",\n    \"jinja2\",\n    # If you update the minimum required jsonschema version, also update it in build.yml\n    \"jsonschema>=3.0\",\n    \"packaging\",\n    \"narwhals>=2.4.0\",\n]\ndescription = \"Vega-Altair: A declarative statistical visualization library for Python.\"\nreadme = \"README.md\"\nkeywords = [\n    \"declarative\",\n    \"statistics\",\n    \"visualization\",\n    \"interactive\",\n    \"json\",\n    \"vega-lite\",\n]\nrequires-python = \">=3.10\"\ndynamic = [\"version\"]\nlicense = { file = \"LICENSE\" }\nclassifiers = [\n    \"Development Status :: 5 - Production/Stable\",\n    \"Environment :: Console\",\n    \"Intended Audience :: Science/Research\",\n    \"License :: OSI Approved :: BSD License\",\n    \"Natural Language :: English\",\n    \"Programming Language :: Python :: 3.10\",\n    \"Programming Language :: Python :: 3.11\",\n    \"Programming Language :: Python :: 3.12\",\n    \"Programming Language :: Python :: 3.13\",\n    \"Programming Language :: Python :: 3.14\",\n    \"Typing :: Typed\",\n]\n\n[project.urls]\nDocumentation = \"https://altair-viz.github.io\"\nSource = \"https://github.com/vega/altair\"\n\n[project.optional-dependencies]\nsave = [\n    \"vl-convert-python>=1.8.0\",\n]\nall = [\n    \"altair[save]\",\n    \"pandas>=1.1.3\",\n    \"numpy\",\n    \"pyarrow>=11\",\n    \"vegafusion>=2.0.3\",\n    \"anywidget>=0.9.0\",\n    \"altair_tiles>=0.3.0\"\n]\ndev = [\n    \"hatch>=1.13.0\",\n    \"ruff>=0.9.5\",\n    \"duckdb>=1.0\",\n    \"ipython\",\n    \"ipykernel\",\n    \"pandas>=1.1.3\",\n    \"pyarrow-stubs\",\n    \"pytest\",\n    \"pytest-cov\",\n    \"pytest-xdist[psutil]~=3.5\",\n    \"mistune\",\n    \"mypy\",\n    \"pandas-stubs<2.3.3\",\n    \"types-jsonschema\",\n    \"types-setuptools\",\n    \"geopandas>=0.14.3\",\n    \"polars>=0.20.3\",\n    \"taskipy>=1.14.1\",\n    \"tomli>=2.2.1\",\n]\ndoc = [\n    \"sphinx\",\n    \"docutils\",\n    \"sphinxext_altair\",\n    \"jinja2\",\n    \"numpydoc\",\n    \"pillow\",\n    \"pydata-sphinx-theme>=0.14.1\",\n    \"myst-parser\",\n    \"sphinx_copybutton\",\n    \"sphinx-design\",\n    \"scipy\",\n    \"scipy-stubs; python_version>='3.10'\",\n]\n\n[dependency-groups]\ngeospatial = [\n    \"geopandas>=0.14.3\",\n    \"polars-st>=0.1.0a27 ; python_full_version>='3.10'\",\n]\n\n[tool.altair.vega]\n# Minimum/exact versions, for projects under the `vega` organization\nvega-datasets = \"v3.2.1\" # https://github.com/vega/vega-datasets\nvega-embed    = \"v7\"     # https://github.com/vega/vega-embed\nvega-lite     = \"v6.1.0\" # https://github.com/vega/vega-lite\n\n[tool.hatch]\nbuild    = { include = [\"/altair\"], artifacts = [\"altair/jupyter/js/index.js\"] }\nmetadata = { allow-direct-references = true }\nversion  = { path = \"altair/__init__.py\" }\n\n[tool.hatch.envs]\n# https://hatch.pypa.io/latest/how-to/environment/select-installer/#enabling-uv\ndefault = { features = [\"all\", \"dev\"], installer = \"uv\" }\ndoc     = { features = [\"all\", \"dev\", \"doc\"] }\n\n[tool.hatch.envs.hatch-test]\n# https://hatch.pypa.io/latest/tutorials/testing/overview/\nfeatures = [\"all\", \"dev\", \"doc\"]\nmatrix   = [{ python = [\"3.10\", \"3.11\", \"3.12\", \"3.13\", \"3.14\"] }]\n\n[tool.ruff]\nextend-exclude = [\n    \".git\",\n    \"__pycache__\",\n    \"build\",\n    \"tests/examples_arguments_syntax\",\n    \"tests/examples_methods_syntax\",\n]\nindent-width = 4\nline-length = 88\ntarget-version = \"py310\"\n\n[tool.ruff.lint]\nextend-safe-fixes = [\n    # https://docs.astral.sh/ruff/settings/#lint_extend-safe-fixes\n    \"ANN204\",  # missing-return-type-special-method\n    \"C405\",    # unnecessary-literal-set\n    \"C419\",    # unnecessary-comprehension-in-call\n    \"C420\",    # unnecessary-dict-comprehension-for-iterable\n    \"D200\",    # fits-on-one-line\n    \"D301\",    # escape-sequence-in-docstring\n    \"D400\",    # ends-in-period\n    \"EM101\",   # raw-string-in-exception\n    \"EM102\",   # f-string-in-exception\n    \"PLR6201\", # literal-membership\n    \"TC\",      # flake8-type-checking\n    \"UP006\",   # non-pep585-annotation\n    \"UP007\",   # non-pep604-annotation-union\n    \"UP008\",   # super-call-with-parameters\n    \"W291\",    # trailing-whitespace\n    \"W293\",    # blank line contains whitespace\n]\nextend-select = [\n    \"FURB\",    # refurb\n    \"PLR1733\", # unnecessary-dict-index-lookup\n    \"PLR1736\", # unnecessary-list-index-lookup\n]\nignore = [\n    # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules\n    \"ANN401\", # any-type\n    \"D100\",   # undocumented-public-module\n    \"D101\",   # undocumented-public-class\n    \"D102\",   # undocumented-public-method\n    \"D103\",   # undocumented-public-function\n    \"D104\",   # undocumented-public-package\n    \"D105\",   # undocumented-magic-method\n    \"D107\",   # undocumented-public-init\n    \"D206\",   # indent-with-spaces\n    \"D212\",   # multi-line-summary-first-line (D213 is the opposite of this)\n    \"D401\",   # non-imperative-mood\n    \"D413\",   # missing-blank-line-after-last-section\n    \"E501\",   # line-too-long\n    \"RUF012\", # mutable-class-default\n    \"RUF052\", # used-dummy-variable\n    \"SIM105\", # suppressible-exception (https://github.com/vega/altair/pull/3431#discussion_r1629808660)\n    \"W505\",   # doc-line-too-long\n]\nmccabe.max-complexity = 10      # https://docs.astral.sh/ruff/settings/#lint_mccabe_max-complexity\npreview               = false   # https://docs.astral.sh/ruff/preview/\npydocstyle.convention = \"numpy\" # https://docs.astral.sh/ruff/settings/#lintpydocstyle\nselect = [\n    \"ANN\",     # flake8-annotations\n    \"B\",       # flake8-bugbear\n    \"C4\",      # flake8-comprehensions\n    \"C901\",    # complex-structure\n    \"D\",       # pydocstyle\n    \"D213\",    # multi-line-summary-second-line\n    \"E\",       # pycodestyle-error\n    \"EM\",      # flake8-errmsg\n    \"F\",       # pyflakes\n    \"FA\",      # flake8-future-annotations\n    \"FLY\",     # flynt\n    \"I001\",    # unsorted-imports\n    \"NPY\",     # numpy-specific-rules\n    \"PIE\",     # flake8-pie\n    \"PLC0208\", # iteration-over-set\n    \"PLR0402\", # manual-from-import\n    \"PLR1711\", # useless-return\n    \"PLR1714\", # repeated-equality-comparison\n    \"PLR5501\", # collapsible-else-if\n    \"PLW0120\", # useless-else-on-loop\n    \"PLW1510\", # subprocess-run-without-check\n    \"PLW3301\", # nested-min-max\n    \"PT\",      # flake8-pytest-style\n    \"PTH\",     # flake8-use-pathlib\n    \"RUF\",     # Ruff-specific rules\n    \"SIM\",     # flake8-simplify\n    \"TC\",      # flake8-type-checking\n    \"TID\",     # flake8-tidy-imports\n    \"UP\",      # pyupgrade\n    \"W\",       # pycodestyle-warning\n]\n\n[tool.ruff.lint.isort]\nclasses = [\"datum\", \"expr\"]\nextra-standard-library = [\"typing_extensions\"]\nknown-first-party = [\n    \"altair_tiles\",\n    \"sphinxext_altair\",\n    \"vegafusion\",\n    \"vl_convert\",\n]\nsplit-on-trailing-comma = false\n\n[tool.ruff.lint.flake8-tidy-imports.banned-api]\n# https://docs.astral.sh/ruff/settings/#lint_flake8-tidy-imports_banned-api\n\"narwhals.dependencies\".msg = \"\"\"\nImport `dependencies` from `narwhals.stable.v1` instead.\n\"\"\"\n\"narwhals.dtypes\".msg = \"\"\"\nImport `dtypes` from `narwhals.stable.v1` instead.\n\"\"\"\n\"narwhals.typing\".msg = \"\"\"\nImport `typing` from `narwhals.stable.v1` instead.\n\"\"\"\n\"typing.Optional\".msg = \"\"\"\nUse `Union[T, None]` instead.\n`typing.Optional` is likely to be confused with `altair.typing.Optional`, \\\nwhich have a similar but different semantic meaning.\nSee https://github.com/vega/altair/pull/3449\n\"\"\"\n\n[tool.ruff.lint.per-file-ignores]\n\"!altair/vegalite/v6/api.py\" = [\"ANN\"]  # Only enforce annotation rules on public api\n\"tests/**/*.py\"              = [\"C901\"] # Allow complex if/elif branching during tests\n\n[tool.ruff.format]\ndocstring-code-format      = true # https://docs.astral.sh/ruff/formatter/#docstring-formatting\ndocstring-code-line-length = 88\nline-ending                = \"lf\"\n\n[tool.taskipy.settings]\ncwd = \".\"\n\n[tool.taskipy.tasks]\nlint       = \"ruff check\"\nformat     = \"ruff format --diff --check\"\nruff-check = \"task lint && task format\"\nruff-fix   = \"task lint && ruff format\"\ntype-check = \"mypy altair tests\"\n\npytest-serial = \"pytest -m \\\"no_xdist\\\" --numprocesses=1\"\npytest        = \"pytest && task pytest-serial\"\ntest          = \"task ruff-check && task type-check && task pytest\"\ntest-fast     = \"task ruff-fix && pytest -m \\\"not slow and not datasets_debug and not no_xdist\\\"\"\ntest-slow     = \"task ruff-fix && pytest -m \\\"slow and not datasets_debug and not no_xdist\\\"\"\ntest-datasets = \"task ruff-fix && pytest tests -k test_datasets -m \\\"not no_xdist\\\" && task pytest-serial\"\ntest-min      = \"task ruff-check && task type-check && hatch test --python 3.10\"\ntest-all      = \"task ruff-check && task type-check && hatch test --all\"\n\ngenerate-schema-wrapper = \"mypy tools && python tools/generate_schema_wrapper.py && task test\"\nupdate-init-file        = \"python tools/update_init_file.py && task ruff-fix\"\n\ndoc-clean               = \"python -c \\\"import tools;tools.fs.rm('doc/_build')\\\"\"\ndoc-clean-generated     = \"python -c \\\"import tools;tools.fs.rm('doc/user_guide/generated', 'doc/gallery')\\\"\"\ndoc-clean-images        = \"python -c \\\"import tools;tools.fs.rm('doc/_images')\\\"\"\ndoc-clean-all           = \"task doc-clean && task doc-clean-generated && task doc-clean-images\"\ndoc-mkdir               = \"python -c \\\"import tools;tools.fs.mkdir('doc/_images')\\\"\"\ndoc-build-html          = \"task doc-mkdir && sphinx-build -b html -d doc/_build/doctrees doc doc/_build/html\"\ndoc-clean-build         = \"task doc-clean-all && task doc-build-html\"\ndoc-serve               = \"python -m http.server --bind \\\"127.0.0.1\\\" --directory doc/_build/html 8000\"\ndoc-publish             = \"python tools/sync_website.py\"\ndoc-publish-clean-build = \"task doc-clean-build && task doc-publish\"\n\nclean   = \"python -c \\\"import tools;tools.fs.rm('dist')\\\"\"\nbuild   = \"task clean && uv build\"\npublish = \"task build && uv publish\"\n\nnightly-build   = \"python tools/generate_nightly_version.py --update && task build\"\nnightly-release = \"task nightly-build && echo 'Package built, ready for GitHub release'\"\n\n[tool.pytest.ini_options]\n# Pytest does not need to search these folders for test functions.\n# They contain examples which are being executed by the\n# test_examples tests.\nnorecursedirs = [\n    \"tests/examples_arguments_syntax\",\n    \"tests/examples_methods_syntax\"\n]\ntestpaths = [\"tests\",\"altair\",\"tools\"]\naddopts = [\n    \"--numprocesses=logical\",\n    \"--doctest-modules\",\n    \"-m not datasets_debug and not no_xdist\",\n]\n# https://docs.pytest.org/en/stable/how-to/mark.html#registering-marks\nmarkers = [\n    \"slow: Label tests as slow (deselect with '-m \\\"not slow\\\"')\",\n    \"datasets_debug: Disabled by default due to high number of requests\",\n    \"no_xdist: Unsafe to run in parallel\",\n    \"geospatial: Tests that require geopandas (deselect with '-m \\\"not geospatial\\\"')\"\n]\n\n[tool.mypy]\nwarn_unused_ignores = true\npretty = true\n\n[[tool.mypy.overrides]]\nmodule = [\n    \"pyarrow.*\",\n    \"yaml.*\",\n    \"pandas.lib.*\",\n    \"geopandas.*\",\n    \"nbformat.*\",\n    \"ipykernel.*\",\n    \"ibis.*\",\n    \"vegafusion.*\",\n    \"scipy.*\",\n    \"polars_st.*\",\n    \"duckdb.*\",\n]\nignore_missing_imports = true\ndisable_error_code = [\"import-untyped\"]\n\n[[tool.mypy.overrides]]\nmodule = [\n    \"tests/examples_arguments_syntax.*\",\n    \"tests/examples_methods_syntax.*\",\n]\ndisable_error_code = [\"annotation-unchecked\"]\n\n[tool.pyright]\nenableExperimentalFeatures = true\npythonPlatform = \"All\"\npythonVersion = \"3.10\"\nreportTypedDictNotRequiredAccess = \"none\"\nreportIncompatibleMethodOverride = \"none\"\nreportUnusedExpression = \"none\"\nreportUnsupportedDunderAll = \"none\"\ninclude = [\"altair\", \"doc\", \"tests\", \"tools\", \"sphinxext\"]\nignore = [\n    \"./altair/vegalite/v6/schema/channels.py\",  # 716 warns\n    \"./altair/vegalite/v6/schema/mixins.py\",    # 1001 warns\n    \"./altair/jupyter/\",                        # Mostly untyped\n    \"./tests/test_jupyter_chart.py\",            # Based on untyped module\n    \"../../../**/Lib\",                          # stdlib\n    \"../../../**/typeshed*\"                     # typeshed-fallback\n]\n"
  },
  {
    "path": "sphinxext/__init__.py",
    "content": ""
  },
  {
    "path": "sphinxext/altairgallery.py",
    "content": "from __future__ import annotations\n\nimport collections\nimport hashlib\nimport json\nimport random\nimport shutil\nimport warnings\nfrom operator import itemgetter\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any\n\nimport jinja2\nfrom docutils import nodes\nfrom docutils.parsers.rst import Directive\nfrom docutils.parsers.rst.directives import flag\nfrom docutils.statemachine import StringList\nfrom sphinx.util.nodes import nested_parse_with_titles\n\nfrom altair.utils.execeval import eval_block\nfrom tests.examples_arguments_syntax import iter_examples_arguments_syntax\nfrom tests.examples_methods_syntax import iter_examples_methods_syntax\n\nfrom .utils import (\n    create_generic_image,\n    create_thumbnail,\n    get_docstring_and_rest,\n    prev_this_next,\n)\n\nif TYPE_CHECKING:\n    from docutils.nodes import Node\n\n\nEXAMPLE_MODULE = \"altair.examples\"\n\n\nGALLERY_TEMPLATE = jinja2.Template(\n    \"\"\"\n.. This document is auto-generated by the altair-gallery extension. Do not modify directly.\n\n.. _{{ gallery_ref }}:\n\n{{ title }}\n{% for char in title %}-{% endfor %}\n\nThis gallery contains a selection of examples of the plots Altair can create. Some may seem fairly complicated at first glance, but they are built by combining a simple set of declarative building blocks.\n\nMany draw upon sample datasets compiled by the `Vega <https://vega.github.io/vega/>`_ project.\n\nIf you can't find the plots you are looking for here, make sure to check out the :ref:`altair-ecosystem` section, which has links to packages for making e.g. network diagrams and animations.\n\n.. note::\n\n    With the release of Altair 6, the documentation was updated to use\n    ``from altair.datasets import data`` instead of ``from vega_datasets import data``.\n    This change also introduced updated column names in some datasets (e.g., spaces\n    instead of underscores).\n\n{% for grouper, group in examples %}\n\n.. _gallery-category-{{ grouper }}:\n\n{{ grouper }}\n{% for char in grouper %}~{% endfor %}\n\n.. raw:: html\n\n   <span class=\"gallery\">\n   {% for example in group %}\n   <a class=\"imagegroup\" href=\"{{ example.name }}.html\">\n   <span\n        class=\"image\" alt=\"{{ example.title }}\"\n{% if example['use_svg'] %}\n        style=\"background-image: url(..{{ image_dir }}/{{ example.name }}-thumb.svg);\"\n{% else %}\n        style=\"background-image: url(..{{ image_dir }}/{{ example.name }}-thumb.png);\"\n{% endif %}\n    ></span>\n\n     <span class=\"image-title\">{{ example.title }}</span>\n   </a>\n   {% endfor %}\n   </span>\n\n   <div style='clear:both;'></div>\n\n{% endfor %}\n\n\n.. toctree::\n   :maxdepth: 2\n   :caption: Examples\n   :hidden:\n\n   Gallery <self>\n   Tutorials <../case_studies/index>\n\"\"\"\n)\n\nMINIGALLERY_TEMPLATE = jinja2.Template(\n    \"\"\"\n.. raw:: html\n\n    <div id=\"showcase\">\n      <div class=\"examples\">\n      {% for example in examples %}\n      <a\n        class=\"preview\" href=\"{{ gallery_dir }}/{{ example.name }}.html\"\n{% if example['use_svg'] %}\n        style=\"background-image: url(.{{ image_dir }}/{{ example.name }}-thumb.svg)\"\n{% else %}\n        style=\"background-image: url(.{{ image_dir }}/{{ example.name }}-thumb.png)\"\n{% endif %}\n      ></a>\n      {% endfor %}\n      </div>\n    </div>\n\"\"\"\n)\n\n\nEXAMPLE_TEMPLATE = jinja2.Template(\n    \"\"\"\n:orphan:\n:html_theme.sidebar_secondary.remove:\n\n.. This document is auto-generated by the altair-gallery extension. Do not modify directly.\n\n.. _gallery_{{ name }}:\n\n{{ docstring }}\n\n.. altair-plot::\n    {% if code_below %}:remove-code:{% endif %}\n    {% if strict %}:strict:{% endif %}\n\n{{ code | indent(4) }}\n\n.. tab-set::\n\n    .. tab-item:: Method syntax\n        :sync: method\n\n        .. code:: python\n\n{{ method_code | indent(12) }}\n\n    .. tab-item:: Attribute syntax\n        :sync: attribute\n\n        .. code:: python\n\n{{ code | indent(12) }}\n\"\"\"\n)\n\n\ndef save_example_pngs(\n    examples: list[dict[str, Any]], image_dir: Path, make_thumbnails: bool = True\n) -> None:\n    \"\"\"Save example pngs and (optionally) thumbnails.\"\"\"\n    encoding = \"utf-8\"\n\n    # store hashes so that we know whether images need to be generated\n    hash_file: Path = image_dir / \"_image_hashes.json\"\n\n    if hash_file.exists():\n        with hash_file.open(encoding=encoding) as f:\n            hashes = json.load(f)\n    else:\n        hashes = {}\n\n    for example in examples:\n        name: str = example[\"name\"]\n        use_svg: bool = example[\"use_svg\"]\n        code = example[\"code\"]\n\n        filename = name + (\".svg\" if use_svg else \".png\")\n        image_file = image_dir / filename\n\n        example_hash = hashlib.sha256(code.encode()).hexdigest()[:32]\n        hashes_match = hashes.get(filename, \"\") == example_hash\n\n        if hashes_match and image_file.exists():\n            print(f\"-> using cached {image_file!s}\")\n        else:\n            # the file changed or the image file does not exist. Generate it.\n            print(f\"-> saving {image_file!s}\")\n            chart = eval_block(code, strict=True)\n            try:\n                chart.save(image_file)\n                hashes[filename] = example_hash\n            except ImportError:\n                warnings.warn(\"Unable to save image: using generic image\", stacklevel=1)\n                create_generic_image(image_file)\n\n            with hash_file.open(\"w\", encoding=encoding) as f:\n                json.dump(hashes, f)\n\n        if make_thumbnails:\n            params = example.get(\"galleryParameters\", {})\n            if use_svg:\n                # Thumbnail for SVG is identical to original image\n                shutil.copyfile(image_file, image_dir / f\"{name}-thumb.svg\")\n            else:\n                create_thumbnail(image_file, image_dir / f\"{name}-thumb.png\", **params)\n\n    # Save hashes so we know whether we need to re-generate plots\n    with hash_file.open(\"w\", encoding=encoding) as f:\n        json.dump(hashes, f)\n\n\ndef populate_examples(**kwds: Any) -> list[dict[str, Any]]:\n    \"\"\"Iterate through Altair examples and extract code.\"\"\"\n    examples = sorted(iter_examples_arguments_syntax(), key=itemgetter(\"name\"))\n    method_examples = {x[\"name\"]: x for x in iter_examples_methods_syntax()}\n\n    for example in examples:\n        docstring, category, code, lineno = get_docstring_and_rest(example[\"filename\"])\n        if example[\"name\"] in method_examples:\n            _, _, method_code, _ = get_docstring_and_rest(\n                method_examples[example[\"name\"]][\"filename\"]\n            )\n        else:\n            method_code = code\n            code += (\n                \"# No channel encoding options are specified in this chart\\n\"\n                \"# so the code is the same as for the method-based syntax.\\n\"\n            )\n        example.update(kwds)\n        if category is None:\n            msg = f\"The example {example['name']} is not assigned to a category\"\n            raise Exception(msg)\n        example.update(\n            {\n                \"docstring\": docstring,\n                \"title\": docstring.strip().split(\"\\n\")[0],\n                \"code\": code,\n                \"method_code\": method_code,\n                \"category\": category.title(),\n                \"lineno\": lineno,\n            }\n        )\n\n    return examples\n\n\ndef _indices(x: str, /) -> list[int]:\n    return [int(idx) for idx in x.split()]\n\n\nclass AltairMiniGalleryDirective(Directive):\n    has_content = False\n\n    option_spec = {\n        \"size\": int,\n        \"names\": str,\n        \"indices\": _indices,\n        \"shuffle\": flag,\n        \"seed\": int,\n        \"titles\": bool,\n        \"width\": str,\n    }\n\n    def run(self) -> list[Node]:\n        size = self.options.get(\"size\", 15)\n        names = [name.strip() for name in self.options.get(\"names\", \"\").split(\",\")]\n        indices = self.options.get(\"indices\", [])\n        shuffle = \"shuffle\" in self.options\n        seed = self.options.get(\"seed\", 42)\n        titles = self.options.get(\"titles\", False)\n        width = self.options.get(\"width\", None)\n\n        env = self.state.document.settings.env\n        app = env.app\n\n        gallery_dir = app.builder.config.altair_gallery_dir\n\n        examples = populate_examples()\n\n        if names:\n            if len(names) < size:\n                msg = (\n                    \"altair-minigallery: if names are specified, \"\n                    \"the list must be at least as long as size.\"\n                )\n                raise ValueError(msg)\n            mapping = {example[\"name\"]: example for example in examples}\n            examples = [mapping[name] for name in names]\n        else:\n            if indices:\n                examples = [examples[i] for i in indices]\n            if shuffle:\n                random.seed(seed)\n                random.shuffle(examples)\n            if size:\n                examples = examples[:size]\n\n        include = MINIGALLERY_TEMPLATE.render(\n            image_dir=\"/_static\",\n            gallery_dir=gallery_dir,\n            examples=examples,\n            titles=titles,\n            width=width,\n        )\n\n        # parse and return documentation\n        result = StringList()\n        for line in include.split(\"\\n\"):\n            result.append(line, \"<altair-minigallery>\")\n        node = nodes.paragraph()\n        node.document = self.state.document\n        nested_parse_with_titles(self.state, result, node)\n\n        return node.children\n\n\ndef main(app) -> None:\n    src_dir = Path(app.builder.srcdir)\n    target_dir: Path = src_dir / Path(app.builder.config.altair_gallery_dir)\n    image_dir: Path = src_dir / \"_images\"\n\n    gallery_ref = app.builder.config.altair_gallery_ref\n    gallery_title = app.builder.config.altair_gallery_title\n    examples = populate_examples(gallery_ref=gallery_ref, code_below=True, strict=False)\n\n    target_dir.mkdir(parents=True, exist_ok=True)\n    image_dir.mkdir(exist_ok=True)\n\n    examples = sorted(examples, key=itemgetter(\"title\"))\n    examples_toc = collections.OrderedDict(\n        {\n            \"Simple Charts\": [],\n            \"Bar Charts\": [],\n            \"Line Charts\": [],\n            \"Area Charts\": [],\n            \"Circular Plots\": [],\n            \"Scatter Plots\": [],\n            \"Uncertainties And Trends\": [],\n            \"Distributions\": [],\n            \"Tables\": [],\n            \"Maps\": [],\n            \"Interactive Charts\": [],\n            \"Advanced Calculations\": [],\n            \"Case Studies\": [],\n        }\n    )\n    for d in examples:\n        examples_toc[d[\"category\"]].append(d)\n\n    encoding = \"utf-8\"\n\n    # Write the gallery index file\n    fp = target_dir / \"index.rst\"\n    fp.write_text(\n        GALLERY_TEMPLATE.render(\n            title=gallery_title,\n            examples=examples_toc.items(),\n            image_dir=\"/_static\",\n            gallery_ref=gallery_ref,\n        ),\n        encoding=encoding,\n    )\n\n    # save the images to file\n    save_example_pngs(examples, image_dir)\n\n    # Write the individual example files\n    for prev_ex, example, next_ex in prev_this_next(examples):\n        if prev_ex:\n            example[\"prev_ref\"] = \"gallery_{name}\".format(**prev_ex)\n        if next_ex:\n            example[\"next_ref\"] = \"gallery_{name}\".format(**next_ex)\n        fp = target_dir / \"\".join((example[\"name\"], \".rst\"))\n        fp.write_text(EXAMPLE_TEMPLATE.render(example), encoding=encoding)\n\n\ndef setup(app) -> None:\n    app.connect(\"builder-inited\", main)\n    app.add_css_file(\"altair-gallery.css\")\n    app.add_config_value(\"altair_gallery_dir\", \"gallery\", \"env\")\n    app.add_config_value(\"altair_gallery_ref\", \"example-gallery\", \"env\")\n    app.add_config_value(\"altair_gallery_title\", \"Example Gallery\", \"env\")\n    app.add_directive_to_domain(\"py\", \"altair-minigallery\", AltairMiniGalleryDirective)\n"
  },
  {
    "path": "sphinxext/code_ref.py",
    "content": "\"\"\"Sphinx extension providing formatted code blocks, referencing some function.\"\"\"\n\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Literal, cast, get_args\n\nfrom docutils import nodes\nfrom docutils.parsers.rst import directives\nfrom sphinx.util.docutils import SphinxDirective\nfrom sphinx.util.parsing import nested_parse_to_nodes\n\nfrom altair.vegalite.v6.schema._typing import VegaThemes\nfrom tools.codemod import extract_func_def, extract_func_def_embed\n\nif TYPE_CHECKING:\n    import sys\n    from collections.abc import Callable, Iterable, Iterator, Mapping, Sequence\n    from typing import Any, ClassVar, TypeAlias, TypeVar\n\n    from docutils.parsers.rst.states import RSTState, RSTStateMachine\n    from docutils.statemachine import StringList\n    from sphinx.application import Sphinx\n\n    if sys.version_info >= (3, 12):\n        from typing import TypeAliasType\n    else:\n        from typing_extensions import TypeAliasType\n\n    T = TypeVar(\"T\")\n    OneOrIter = TypeAliasType(\"OneOrIter\", T | Iterable[T], type_params=(T,))\n\n_OutputShort: TypeAlias = Literal[\"code\", \"plot\"]\n_OutputLong: TypeAlias = Literal[\"code-block\", \"altair-plot\"]\n_OUTPUT_REMAP: Mapping[_OutputShort, _OutputLong] = {\n    \"code\": \"code-block\",\n    \"plot\": \"altair-plot\",\n}\n_Option: TypeAlias = Literal[\"output\", \"fold\", \"summary\"]\n\n_PYSCRIPT_URL_FMT = \"https://pyscript.net/releases/{0}/core.js\"\n_PYSCRIPT_VERSION = \"2025.2.2\"\n_PYSCRIPT_URL = _PYSCRIPT_URL_FMT.format(_PYSCRIPT_VERSION)\n\n\ndef validate_output(output: Any) -> _OutputLong:\n    output = output.strip().lower()\n    if output not in {\"plot\", \"code\"}:\n        msg = f\":output: option must be one of {get_args(_OutputShort)!r}\"\n        raise TypeError(msg)\n    else:\n        short = cast(\"_OutputShort\", output)\n        return _OUTPUT_REMAP[short]\n\n\ndef validate_packages(packages: Any) -> str:\n    if packages is None:\n        return '[\"altair\", \"vega-datasets\"]'\n    else:\n        split = [pkg.strip() for pkg in packages.split(\",\")]\n        if len(split) == 1:\n            return f'[\"{split[0]}\"]'\n        else:\n            return f\"[{','.join(split)}]\"\n\n\ndef raw_html(text: str, /) -> nodes.raw:\n    return nodes.raw(\"\", text, format=\"html\")\n\n\ndef maybe_details(\n    parsed: Iterable[nodes.Node], options: dict[_Option, Any], *, default_summary: str\n) -> Sequence[nodes.Node]:\n    \"\"\"\n    Wrap ``parsed`` in a folding `details`_ block if requested.\n\n    Parameters\n    ----------\n    parsed\n        Target nodes that have been processed.\n    options\n        Optional arguments provided to ``.. altair-code-ref::``.\n\n        .. note::\n            If no relevant options are  specified,\n            ``parsed`` is returned unchanged.\n\n    default_summary\n        Label text used when **only** specifying ``:fold:``.\n\n    .. _details:\n        https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details\n    \"\"\"\n\n    def gen() -> Iterator[nodes.Node]:\n        if {\"fold\", \"summary\"}.isdisjoint(options.keys()):\n            yield from parsed\n        else:\n            summary = options.get(\"summary\", default_summary)\n            yield raw_html(f\"<p><details><summary><a>{summary}</a></summary>\")\n            yield from parsed\n            yield raw_html(\"</details></p>\")\n\n    return list(gen())\n\n\ndef theme_names() -> tuple[Sequence[str], Sequence[str]]:\n    names: set[str] = set(get_args(VegaThemes))\n    carbon = {nm for nm in names if nm.startswith(\"carbon\")}\n    return [\"default\", *sorted(names - carbon)], sorted(carbon)\n\n\ndef option(label: str, value: str | None = None, /) -> nodes.raw:\n    s = f\"<option value={value!r}>\" if value else \"<option>\"\n    return raw_html(f\"{s}{label}</option>\\n\")\n\n\ndef optgroup(label: str, *options: OneOrIter[nodes.raw]) -> Iterator[nodes.raw]:\n    yield raw_html(f\"<optgroup label={label!r}>\\n\")\n    for opt in options:\n        if isinstance(opt, nodes.raw):\n            yield opt\n        else:\n            yield from opt\n    yield raw_html(\"</optgroup>\\n\")\n\n\ndef dropdown(\n    id: str, label: str | None, extra_select: str, *options: OneOrIter[nodes.raw]\n) -> Iterator[nodes.raw]:\n    if label:\n        yield raw_html(f\"<label for={id!r}>{label}</label>\\n\")\n    select_text = f\"<select id={id!r}\"\n    if extra_select:\n        select_text = f\"{select_text} {extra_select}\"\n    yield raw_html(f\"{select_text}>\\n\")\n    for opt in options:\n        if isinstance(opt, nodes.raw):\n            yield opt\n        else:\n            yield from opt\n    yield raw_html(\"</select>\\n\")\n\n\ndef pyscript(\n    packages: str, target_div_id: str, loading_label: str, py_code: str\n) -> Iterator[nodes.raw]:\n    PY = \"py\"\n    LB, RB = \"{\", \"}\"\n    packages = f\"\"\"\"packages\":{packages}\"\"\"\n    yield raw_html(f\"<div id={target_div_id!r}>{loading_label}</div>\\n\")\n    yield raw_html(f\"<script type={PY!r} config='{LB}{packages}{RB}'>\\n\")\n    yield raw_html(py_code)\n    yield raw_html(\"</script>\\n\")\n\n\ndef _before_code(refresh_name: str, select_id: str, target_div_id: str) -> str:\n    INDENT = \" \" * 4\n    return (\n        f\"from js import document\\n\"\n        f\"from pyscript import display\\n\"\n        f\"import altair as alt\\n\\n\"\n        f\"def {refresh_name}(*args):\\n\"\n        f\"{INDENT}selected = document.getElementById({select_id!r}).value\\n\"\n        f\"{INDENT}alt.renderers.set_embed_options(theme=selected)\\n\"\n        f\"{INDENT}display(chart, append=False, target={target_div_id!r})\\n\"\n    )\n\n\nclass ThemeDirective(SphinxDirective):\n    \"\"\"\n    Theme preview directive.\n\n    Similar to ``CodeRefDirective``, but uses `PyScript`_ to access the browser.\n\n    .. _PyScript:\n        https://pyscript.net/\n    \"\"\"\n\n    has_content: ClassVar[bool] = False\n    required_arguments: ClassVar[int] = 1\n    option_spec = {\n        \"packages\": validate_packages,\n        \"dropdown-label\": directives.unchanged,\n        \"loading-label\": directives.unchanged,\n        \"fold\": directives.flag,\n        \"summary\": directives.unchanged_required,\n    }\n\n    def run(self) -> Sequence[nodes.Node]:\n        results: list[nodes.Node] = []\n        SELECT_ID = \"embed_theme\"\n        REFRESH_NAME = \"apply_embed_input\"\n        TARGET_DIV_ID = \"render_altair\"\n        standard_names, carbon_names = theme_names()\n\n        qual_name = self.arguments[0]\n        module_name, func_name = qual_name.rsplit(\".\", 1)\n        dropdown_label = self.options.get(\"dropdown-label\", \"Select theme:\")\n        loading_label = self.options.get(\"loading-label\", \"loading...\")\n        packages: str = self.options.get(\"packages\", validate_packages(None))\n\n        results.append(raw_html(\"<div><p>\\n\"))\n        results.extend(\n            dropdown(\n                SELECT_ID,\n                dropdown_label,\n                f\"py-input={REFRESH_NAME!r}\",\n                (option(nm) for nm in standard_names),\n                optgroup(\"Carbon\", (option(nm) for nm in carbon_names)),\n            )\n        )\n        py_code = extract_func_def_embed(\n            module_name,\n            func_name,\n            before=_before_code(REFRESH_NAME, SELECT_ID, TARGET_DIV_ID),\n            after=f\"{REFRESH_NAME}()\",\n            assign_to=\"chart\",\n            indent=4,\n        )\n        # For PyScript/Pyodide compatibility, use vega_datasets until new Altair is published\n        py_code = py_code.replace(\n            \"from altair.datasets import data\", \"from vega_datasets import data\"\n        )\n        # vega_datasets uses underscores in column names, not spaces\n        # Order matters: do aggregation functions first (they contain field names)\n        py_code = py_code.replace(\"mean(IMDB Rating)\", \"mean(IMDB_Rating)\")\n        py_code = py_code.replace(\n            \"mean(Rotten Tomatoes Rating)\", \"mean(Rotten_Tomatoes_Rating)\"\n        )\n        py_code = py_code.replace('datum[\"IMDB Rating\"]', \"datum.IMDB_Rating\")\n        py_code = py_code.replace(\n            'datum[\"Rotten Tomatoes Rating\"]', \"datum.Rotten_Tomatoes_Rating\"\n        )\n        py_code = py_code.replace('datum[\"IMDB Votes\"]', \"datum.IMDB_Votes\")\n        # Field references in encodings (remaining ones)\n        py_code = py_code.replace('\"IMDB Rating\"', '\"IMDB_Rating\"')\n        py_code = py_code.replace(\n            '\"Rotten Tomatoes Rating\"', '\"Rotten_Tomatoes_Rating\"'\n        )\n        py_code = py_code.replace('\"IMDB Votes\"', '\"IMDB_Votes\"')\n        py_code = py_code.replace('\"Release Date:T\"', '\"Release_Date:T\"')\n        py_code = py_code.replace('\"Release Date\"', '\"Release_Date\"')\n        # Restore display titles that were caught by the broad field replacement above\n        py_code = py_code.replace('.title(\"Release_Date\")', '.title(\"Release Date\")')\n        py_code = py_code.replace(\"'IMDB Rating'\", \"'IMDB_Rating'\")\n        py_code = py_code.replace(\n            \"'Rotten Tomatoes Rating'\", \"'Rotten_Tomatoes_Rating'\"\n        )\n        py_code = py_code.replace(\"'IMDB Votes'\", \"'IMDB_Votes'\")\n        py_code = py_code.replace(\"'Release Date'\", \"'Release_Date'\")\n\n        results.extend(\n            pyscript(packages, TARGET_DIV_ID, loading_label, py_code=py_code)\n        )\n        results.append(raw_html(\"</div></p>\\n\"))\n        return maybe_details(\n            results,\n            self.options,  # pyright: ignore[reportArgumentType]\n            default_summary=\"Show Vega-Altair Theme Test\",\n        )\n\n\nclass PyScriptDirective(SphinxDirective):\n    \"\"\"Placeholder for non-theme related directive.\"\"\"\n\n    has_content: ClassVar[bool] = False\n    option_spec = {\"packages\": directives.unchanged}\n\n    def run(self) -> Sequence[nodes.Node]:\n        raise NotImplementedError\n\n\nclass CodeRefDirective(SphinxDirective):\n    \"\"\"\n    Formatted code block, referencing the contents of a function definition.\n\n    Options:\n\n        .. altair-code-ref::\n            :output: [code, plot]\n            :fold: flag\n            :summary: str\n\n    Examples\n    --------\n    Reference a function, generating a code block:\n\n        .. altair-code-ref:: package.module.function\n\n    Wrap the code block in a collapsible `details`_ tag:\n\n        .. altair-code-ref:: package.module.function\n            :fold:\n\n    Override default ``\"Show code\"`` `details`_ summary:\n\n        .. altair-code-ref:: package.module.function\n            :fold:\n            :summary: Look here!\n\n    Use `altair-plot`_ instead of a code block:\n\n        .. altair-code-ref:: package.module.function\n            :output: plot\n\n    .. note::\n        Using `altair-plot`_ currently ignores the other options.\n\n    .. _details:\n        https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details\n    .. _altair-plot:\n        https://github.com/vega/sphinxext-altair\n    \"\"\"\n\n    has_content: ClassVar[bool] = False\n    required_arguments: ClassVar[int] = 1\n    option_spec: ClassVar[dict[_Option, Callable[[str], Any]]] = {  # pyright: ignore[reportIncompatibleVariableOverride]\n        \"output\": validate_output,\n        \"fold\": directives.flag,\n        \"summary\": directives.unchanged_required,\n    }\n\n    def __init__(\n        self,\n        name: str,\n        arguments: list[str],\n        options: dict[_Option, Any],\n        content: StringList,\n        lineno: int,\n        content_offset: int,\n        block_text: str,\n        state: RSTState,\n        state_machine: RSTStateMachine,\n    ) -> None:\n        super().__init__(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)  # fmt: skip # pyright: ignore[reportArgumentType]\n        self.options: dict[_Option, Any]  # pyright: ignore[reportIncompatibleVariableOverride]\n\n    def run(self) -> Sequence[nodes.Node]:\n        qual_name = self.arguments[0]\n        module_name, func_name = qual_name.rsplit(\".\", 1)\n        output: _OutputLong = self.options.get(\"output\", \"code-block\")\n        content = extract_func_def(module_name, func_name, output=output)\n        parsed = nested_parse_to_nodes(self.state, content)\n        return maybe_details(parsed, self.options, default_summary=\"Show code\")\n\n\ndef setup(app: Sphinx) -> None:\n    app.add_directive_to_domain(\"py\", \"altair-code-ref\", CodeRefDirective)\n    app.add_js_file(_PYSCRIPT_URL, loading_method=\"defer\", type=\"module\")\n    # app.add_directive(\"altair-pyscript\", PyScriptDirective)\n    app.add_directive(\"altair-theme\", ThemeDirective)\n"
  },
  {
    "path": "sphinxext/schematable.py",
    "content": "from __future__ import annotations\n\nimport importlib\nimport re\nimport warnings\nfrom typing import TYPE_CHECKING, Any\n\nfrom docutils import frontend, nodes, utils\nfrom docutils.parsers.rst import Directive\nfrom docutils.parsers.rst.directives import flag\nfrom myst_parser.parsers.docutils_ import Parser\nfrom sphinx import addnodes\n\nfrom tools.schemapi.utils import SchemaInfo, fix_docstring_issues\n\nif TYPE_CHECKING:\n    from collections.abc import Iterator, Sequence\n\n\ndef type_description(schema: dict[str, Any]) -> str:\n    \"\"\"Return a concise type description for the given schema.\"\"\"\n    if not schema or not isinstance(schema, dict) or schema.keys() == {\"description\"}:\n        return \"any\"\n    elif \"$ref\" in schema:\n        return \":class:`{}`\".format(schema[\"$ref\"].split(\"/\")[-1])\n    elif \"enum\" in schema:\n        return \"[{}]\".format(\", \".join(repr(s) for s in schema[\"enum\"]))\n    elif \"type\" in schema:\n        if isinstance(schema[\"type\"], list):\n            return \"[{}]\".format(\", \".join(schema[\"type\"]))\n        elif schema[\"type\"] == \"array\":\n            return \"array({})\".format(type_description(schema.get(\"items\", {})))\n        elif schema[\"type\"] == \"object\":\n            return \"dict\"\n        else:\n            return \"`{}`\".format(schema[\"type\"])\n    elif \"anyOf\" in schema:\n        return \"anyOf({})\".format(\n            \", \".join(type_description(s) for s in schema[\"anyOf\"])\n        )\n    else:\n        warnings.warn(\n            f\"cannot infer type for schema with keys {schema.keys()}\",\n            stacklevel=1,\n        )\n        return \"--\"\n\n\ndef prepare_table_header(\n    titles: Sequence[str], widths: Sequence[float]\n) -> tuple[nodes.table, nodes.tbody]:\n    \"\"\"Build docutil empty table.\"\"\"\n    ncols = len(titles)\n    assert len(widths) == ncols\n\n    tgroup = nodes.tgroup(cols=ncols)\n    for width in widths:\n        tgroup += nodes.colspec(colwidth=width)\n    header = nodes.row()\n    for title in titles:\n        header += nodes.entry(\"\", nodes.paragraph(text=title))\n    tgroup += nodes.thead(\"\", header)\n\n    tbody = nodes.tbody()\n    tgroup += tbody\n\n    return nodes.table(\"\", tgroup), tbody\n\n\nreClassDef = re.compile(r\":class:`([^`]+)`\")\nreCode = re.compile(r\"`([^`]+)`\")\n\n\ndef add_class_def(node: nodes.paragraph, classDef: str) -> nodes.paragraph:\n    \"\"\"Add reference on classDef to node.\"\"\"\n    ref = addnodes.pending_xref(\n        reftarget=classDef,\n        reftype=\"class\",\n        refdomain=\"py\",  # py:class=\"None\" py:module=\"altair\" refdoc=\"user_guide/marks\"\n        refexplicit=False,\n        # refdoc=\"\",\n        refwarn=False,\n    )\n    ref[\"py:class\"] = \"None\"\n    ref[\"py:module\"] = \"altair\"\n\n    ref += nodes.literal(text=classDef, classes=[\"xref\", \"py\", \"py-class\"])\n    node += ref\n    return node\n\n\ndef add_text(node: nodes.paragraph, text: str) -> nodes.paragraph:\n    \"\"\"Add text with inline code to node.\"\"\"\n    is_text = True\n    for part in reCode.split(text):\n        if part:\n            if is_text:\n                node += nodes.Text(part, part)  # pyright: ignore[reportCallIssue]\n            else:\n                node += nodes.literal(part, part)\n\n        is_text = not is_text\n\n    return node\n\n\ndef build_row(\n    item: tuple[str, dict[str, Any]], rootschema: dict[str, Any] | None\n) -> nodes.row:\n    \"\"\"Return nodes.row with property description.\"\"\"\n    prop, propschema = item\n    row = nodes.row()\n\n    # Property\n\n    row += nodes.entry(\"\", nodes.paragraph(text=prop), classes=[\"vl-prop\"])\n\n    # Type\n    str_type = type_description(propschema)\n    par_type = nodes.paragraph()\n\n    is_text = True\n    for part in reClassDef.split(str_type):\n        if part:\n            if is_text:\n                add_text(par_type, part)\n            else:\n                add_class_def(par_type, part)\n        is_text = not is_text\n\n    # row += nodes.entry('')\n    row += nodes.entry(\"\", par_type, classes=[\"vl-type-def\"])\n\n    # Description\n    md_parser = Parser()\n    # str_descr = \"***Required.*** \" if required else \"\"\n    description = SchemaInfo(propschema, rootschema).deep_description\n    description = description or \" \"\n    str_descr = \"\"\n    str_descr += description\n    str_descr = fix_docstring_issues(str_descr)\n    document_settings = frontend.get_default_settings()\n    document_settings.setdefault(\"raw_enabled\", True)\n    doc_descr = utils.new_document(\"schema_description\", document_settings)\n    md_parser.parse(str_descr, doc_descr)\n\n    # row += nodes.entry('', *doc_descr.children, classes=\"vl-decsr\")\n    row += nodes.entry(\"\", *doc_descr.children, classes=[\"vl-decsr\"])\n\n    return row\n\n\ndef build_schema_table(\n    items: Iterator[tuple[str, dict[str, Any]]], rootschema: dict[str, Any] | None\n) -> nodes.table:\n    \"\"\"Return schema table of items (iterator of prop, schema.item, required).\"\"\"\n    table, tbody = prepare_table_header(\n        [\"Property\", \"Type\", \"Description\"], [10, 20, 50]\n    )\n    for item in items:\n        tbody += build_row(item, rootschema)\n\n    return table\n\n\ndef select_items_from_schema(\n    schema: dict[str, Any], props: list[str] | None = None\n) -> Iterator[tuple[Any, Any] | tuple[str, Any]]:\n    \"\"\"Return iterator  (prop, schema.item) on prop, return all in None.\"\"\"\n    properties = schema.get(\"properties\", {})\n    if not props:\n        for prop, item in properties.items():\n            yield prop, item\n    else:\n        for prop in props:\n            try:\n                yield prop, properties[prop]\n            except KeyError as err:\n                msg = f\"Can't find property: {prop}\"\n                raise Exception(msg) from err\n\n\ndef prepare_schema_table(\n    schema: dict[str, Any],\n    rootschema: dict[str, Any] | None,\n    props: list[str] | None = None,\n) -> nodes.table:\n    items = select_items_from_schema(schema, props)\n    return build_schema_table(items, rootschema)\n\n\ndef validate_properties(properties: str) -> list[str]:\n    return properties.strip().split()\n\n\nclass AltairObjectTableDirective(Directive):\n    \"\"\"\n    Directive for building a table of attribute descriptions.\n\n    Usage:\n\n    .. altair-object-table:: altair.MarkConfig\n\n    \"\"\"\n\n    has_content = False\n    required_arguments = 1\n\n    option_spec = {\"properties\": validate_properties, \"dont-collapse-table\": flag}\n\n    def run(self) -> list:\n        objectname = self.arguments[0]\n        modname, classname = objectname.rsplit(\".\", 1)\n        module = importlib.import_module(modname)\n        cls: type[Any] = getattr(module, classname)\n        schema = cls.resolve_references(cls._schema)\n\n        properties = self.options.get(\"properties\", None)\n        dont_collapse_table = \"dont-collapse-table\" in self.options\n\n        result = []\n        if not dont_collapse_table:\n            html = \"<details><summary><a>Click to show table</a></summary>\"\n            raw_html = nodes.raw(\"\", html, format=\"html\")\n            result += [raw_html]\n        # create the table from the object\n        result.append(prepare_schema_table(schema, cls._rootschema, props=properties))\n\n        if not dont_collapse_table:\n            html = \"</details>\"\n            raw_html = nodes.raw(\"\", html, format=\"html\")\n            result += [raw_html]\n\n        return result\n\n\ndef setup(app) -> None:\n    app.add_directive(\"altair-object-table\", AltairObjectTableDirective)\n"
  },
  {
    "path": "sphinxext/utils.py",
    "content": "from __future__ import annotations\n\nimport ast\nimport hashlib\nimport itertools\nimport json\nimport re\nfrom pathlib import Path\nfrom typing import Any\n\n\ndef create_thumbnail(\n    image_filename: Path,\n    thumb_filename: Path,\n    window_size: tuple[float, float] = (280, 160),\n) -> None:\n    \"\"\"Create a thumbnail whose shortest dimension matches the window.\"\"\"\n    from PIL import Image\n\n    im = Image.open(image_filename)\n    im_width, im_height = im.size\n    width, height = window_size\n\n    width_factor, height_factor = width / im_width, height / im_height\n\n    if width_factor > height_factor:\n        final_width = width\n        final_height = int(im_height * width_factor)\n    else:\n        final_height = height\n        final_width = int(im_width * height_factor)\n\n    thumb = im.resize((final_width, final_height), Image.Resampling.LANCZOS)\n    thumb.save(thumb_filename)\n\n\ndef create_generic_image(\n    filename: Path, shape: tuple[float, float] = (200, 300), gradient: bool = True\n) -> None:\n    \"\"\"Create a generic image.\"\"\"\n    import numpy as np\n    from PIL import Image\n\n    assert len(shape) == 2\n\n    arr = np.zeros((shape[0], shape[1], 3))\n    if gradient:\n        # gradient from gray to white\n        arr += np.linspace(128, 255, shape[1])[:, None]  # pyright: ignore[reportCallIssue,reportArgumentType]\n    im = Image.fromarray(arr.astype(\"uint8\"))\n    im.save(filename)\n\n\nSYNTAX_ERROR_DOCSTRING = \"\"\"\nSyntaxError\n===========\nExample script with invalid Python syntax\n\"\"\"\n\n\ndef _parse_source_file(filename: str | Path) -> tuple[ast.Module | None, str]:\n    \"\"\"\n    Parse source file into AST node.\n\n    Parameters\n    ----------\n    filename : str\n        File path\n\n    Returns\n    -------\n    node : AST node\n    content : utf-8 encoded string\n\n    Notes\n    -----\n    This function adapted from the sphinx-gallery project; license: BSD-3\n    https://github.com/sphinx-gallery/sphinx-gallery/\n    \"\"\"\n    content = Path(filename).read_text(encoding=\"utf-8\")\n    # change from Windows format to UNIX for uniformity\n    content = content.replace(\"\\r\\n\", \"\\n\")\n\n    try:\n        node = ast.parse(content)\n    except SyntaxError:\n        node = None\n    return node, content\n\n\ndef get_docstring_and_rest(filename: str | Path) -> tuple[str, str | None, str, int]:\n    \"\"\"\n    Separate ``filename`` content between docstring and the rest.\n\n    Strongly inspired from ast.get_docstring.\n\n    Parameters\n    ----------\n    filename: str\n        The path to the file containing the code to be read\n\n    Returns\n    -------\n    docstring: str\n        docstring of ``filename``\n    category: list\n        list of categories specified by the \"# category:\" comment\n    rest: str\n        ``filename`` content without the docstring\n    lineno: int\n         the line number on which the code starts\n\n    Notes\n    -----\n    This function adapted from the sphinx-gallery project; license: BSD-3\n    https://github.com/sphinx-gallery/sphinx-gallery/\n    \"\"\"\n    node, content = _parse_source_file(filename)\n\n    # Find the category comment\n    find_category = re.compile(r\"^#\\s*category:\\s*(.*)$\", re.MULTILINE)\n    match = find_category.search(content)\n    if match is not None:\n        category = match.groups()[0]\n        # remove this comment from the content\n        content = find_category.sub(\"\", content)\n    else:\n        category = None\n\n    lineno = 1\n\n    if node is None:\n        return SYNTAX_ERROR_DOCSTRING, category, content, lineno\n\n    if not isinstance(node, ast.Module):\n        msg = f\"This function only supports modules. You provided {node.__class__.__name__}\"\n        raise TypeError(msg)\n    try:\n        # In python 3.7 module knows its docstring.\n        # Everything else will raise an attribute error\n        docstring = node.docstring  # pyright: ignore[reportAttributeAccessIssue]\n\n        import tokenize\n        from io import BytesIO\n\n        ts = tokenize.tokenize(BytesIO(content).readline)  # pyright: ignore[reportArgumentType]\n        ds_lines = 0\n        # find the first string according to the tokenizer and get\n        # it's end row\n        for tk in ts:\n            if tk.exact_type == 3:\n                ds_lines, _ = tk.end\n                break\n        # grab the rest of the file\n        rest = \"\\n\".join(content.split(\"\\n\")[ds_lines:])\n        lineno = ds_lines + 1\n\n    except AttributeError:\n        # this block can be removed when python 3.6 support is dropped\n        if (\n            node.body\n            and isinstance(node.body[0], ast.Expr)\n            and isinstance(node.body[0].value, ast.Constant)\n        ):\n            docstring_node = node.body[0]\n            docstring = docstring_node.value.s  # pyright: ignore[reportAttributeAccessIssue]\n            # python2.7: Code was read in bytes needs decoding to utf-8\n            # unless future unicode_literals is imported in source which\n            # make ast output unicode strings\n            if hasattr(docstring, \"decode\") and not isinstance(docstring, str):\n                docstring = docstring.decode(\"utf-8\")\n            # python3.8: has end_lineno\n            lineno = getattr(\n                docstring_node, \"end_lineno\", docstring_node.lineno\n            )  # The last line of the string.\n            # This get the content of the file after the docstring last line\n            # Note: 'maxsplit' argument is not a keyword argument in python2\n            rest = content.split(\"\\n\", lineno)[-1]\n            lineno += 1\n        else:\n            docstring, rest = \"\", \"\"\n\n    if not docstring:\n        msg = (\n            f'Could not find docstring in file \"{filename}\". '\n            \"A docstring is required for the example gallery.\"\n        )\n        raise ValueError(msg)\n    return docstring, category, rest, lineno\n\n\ndef prev_this_next(\n    it: list[dict[str, Any]], sentinel: None = None\n) -> zip[tuple[dict[str, Any] | None, dict[str, Any], dict[str, Any] | None]]:\n    \"\"\"Utility to return (prev, this, next) tuples from an iterator.\"\"\"\n    i1, i2, i3 = itertools.tee(it, 3)\n    next(i3, None)\n    return zip(\n        itertools.chain([sentinel], i1),\n        i2,\n        itertools.chain(i3, [sentinel]),\n        strict=False,\n    )\n\n\ndef dict_hash(dct: dict[Any, Any]) -> Any:\n    \"\"\"Return a hash of the contents of a dictionary.\"\"\"\n    serialized = json.dumps(dct, sort_keys=True)\n\n    try:\n        m = hashlib.sha256(serialized)[:32]  # pyright: ignore[reportArgumentType,reportIndexIssue]\n    except TypeError:\n        m = hashlib.sha256(serialized.encode())[:32]  # pyright: ignore[reportIndexIssue]\n\n    return m.hexdigest()\n"
  },
  {
    "path": "tests/__init__.py",
    "content": "from __future__ import annotations\n\nimport pkgutil\nimport re\nimport sys\nfrom importlib.util import find_spec\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, overload\n\nimport pytest\n\nfrom tests import examples_arguments_syntax, examples_methods_syntax\n\nif TYPE_CHECKING:\n    from collections.abc import Collection, Iterator, Mapping\n    from re import Pattern\n    from typing import TypeAlias\n\n    from _pytest.mark import ParameterSet  # pyright: ignore[reportPrivateImportUsage]\n    from _pytest.mark.structures import (\n        Markable,  # pyright: ignore[reportPrivateImportUsage]\n    )\n\n    MarksType: TypeAlias = (\n        \"pytest.MarkDecorator | Collection[pytest.MarkDecorator | pytest.Mark]\"\n    )\n\n\ndef windows_has_tzdata() -> bool:\n    \"\"\"\n    From PyArrow: python/pyarrow/tests/util.py.\n\n    This is the default location where tz.cpp will look for (until we make\n    this configurable at run-time)\n\n    Skip test on Windows when the tz database is not configured.\n\n    See https://github.com/vega/altair/issues/3050.\n    \"\"\"\n    return (Path.home() / \"Downloads\" / \"tzdata\").exists()\n\n\nslow: pytest.MarkDecorator = pytest.mark.slow()\n\"\"\"\nCustom ``pytest.mark`` decorator.\n\nBy default **all** tests are run.\n\nSlow tests can be **excluded** using::\n\n    >>> hatch run test-fast  # doctest: +SKIP\n\nTo run **only** slow tests use::\n\n    >>> hatch run test-slow  # doctest: +SKIP\n\nEither script can accept ``pytest`` args::\n\n    >>> hatch run test-slow --durations=25  # doctest: +SKIP\n\"\"\"\n\nno_xdist: pytest.MarkDecorator = pytest.mark.no_xdist()\n\"\"\"\nCustom ``pytest.mark`` decorator.\n\nEach marked test will run **serially**, after all other selected tests.\n\n.. tip::\n   Use as a last resort when a test depends on manipulating global state.\n\"\"\"\n\nskip_requires_ipython: pytest.MarkDecorator = pytest.mark.skipif(\n    find_spec(\"IPython\") is None, reason=\"`IPython` not installed.\"\n)\n\"\"\"\n``pytest.mark.skipif`` decorator.\n\nApplies when `IPython`_ import would fail.\n\n.. _IPython:\n   https://github.com/ipython/ipython\n\"\"\"\n\nskip_requires_vl_convert: pytest.MarkDecorator = pytest.mark.skipif(\n    find_spec(\"vl_convert\") is None, reason=\"`vl_convert` not installed.\"\n)\n\"\"\"\n``pytest.mark.skipif`` decorator.\n\nApplies when `vl-convert`_ import would fail.\n\n.. _vl-convert:\n   https://github.com/vega/vl-convert\n\"\"\"\n\nskip_requires_vegafusion: pytest.MarkDecorator = pytest.mark.skipif(\n    find_spec(\"vegafusion\") is None, reason=\"`vegafusion` not installed.\"\n)\n\"\"\"\n``pytest.mark.skipif`` decorator.\n\nApplies when `vegafusion`_ import would fail.\n\n.. _vegafusion:\n    https://github.com/vega/vegafusion\n\"\"\"\n\nskip_requires_scipy: pytest.MarkDecorator = pytest.mark.skipif(\n    find_spec(\"scipy\") is None, reason=\"`scipy` not installed.\"\n)\n\nskip_requires_geopandas: pytest.MarkDecorator = pytest.mark.skipif(\n    find_spec(\"geopandas\") is None, reason=\"`geopandas` not installed.\"\n)\n\"\"\"\n``pytest.mark.skipif`` decorator.\n\nApplies when `geopandas`_ import would fail.\n\n.. _geopandas:\n    https://geopandas.org/\n\"\"\"\n\nskip_requires_duckdb: pytest.MarkDecorator = pytest.mark.skipif(\n    find_spec(\"duckdb\") is None, reason=\"`duckdb` not installed.\"\n)\n\"\"\"\n``pytest.mark.skipif`` decorator.\n\nApplies when `duckdb`_ import would fail.\n\n.. _duckdb:\n    https://duckdb.org/\n\"\"\"\n\nskip_requires_polars: pytest.MarkDecorator = pytest.mark.skipif(\n    find_spec(\"polars\") is None, reason=\"`polars` not installed.\"\n)\n\"\"\"\n``pytest.mark.skipif`` decorator.\n\nApplies when `polars`_ import would fail.\n\n.. _polars:\n    https://pola.rs/\n\"\"\"\n\n\n@overload\ndef skip_requires_pyarrow(\n    fn: None = ..., /, *, requires_tzdata: bool = ...\n) -> pytest.MarkDecorator: ...\n\n\n@overload\ndef skip_requires_pyarrow(\n    fn: Markable, /, *, requires_tzdata: bool = ...\n) -> Markable: ...\n\n\ndef skip_requires_pyarrow(\n    fn: Markable | None = None, /, *, requires_tzdata: bool = False\n) -> pytest.MarkDecorator | Markable:\n    \"\"\"\n    ``pytest.mark.skipif`` decorator.\n\n    Applies when `pyarrow`_ import would fail.\n\n    Additionally, we mark as expected to fail on `Windows`.\n\n    https://github.com/vega/altair/issues/3050\n\n    .. _pyarrow:\n        https://pypi.org/project/pyarrow/\n    \"\"\"\n    composed = pytest.mark.skipif(\n        find_spec(\"pyarrow\") is None, reason=\"`pyarrow` not installed.\"\n    )\n    if requires_tzdata:\n        composed = pytest.mark.xfail(\n            sys.platform == \"win32\" and not windows_has_tzdata(),\n            reason=\"Timezone database is not installed on Windows\",\n        )(composed)\n\n    return composed if fn is None else composed(fn)\n\n\ndef id_func_str_only(val) -> str:\n    \"\"\"\n    Ensures the generated test-id name uses only `filename` and not `source`.\n\n    Without this, the name is repr(source code)-filename\n    \"\"\"\n    if not isinstance(val, str):\n        return \"\"\n    else:\n        return val\n\n\ndef _wrap_mark_specs(\n    pattern_marks: Mapping[Pattern[str] | str, MarksType], /\n) -> dict[Pattern[str], MarksType]:\n    return {\n        (re.compile(p) if not isinstance(p, re.Pattern) else p): marks\n        for p, marks in pattern_marks.items()\n    }\n\n\ndef _fill_marks(\n    mark_specs: dict[Pattern[str], MarksType], string: str, /\n) -> MarksType | tuple[()]:\n    it = (v for k, v in mark_specs.items() if k.search(string))\n    return next(it, ())\n\n\ndef _distributed_examples(\n    *exclude_prefixes: str, marks: Mapping[Pattern[str] | str, MarksType] | None = None\n) -> Iterator[ParameterSet]:\n    \"\"\"\n    Yields ``pytest.mark.parametrize`` arguments for all examples.\n\n    Parameters\n    ----------\n    *exclude_prefixes\n        Any file starting with these will be **skipped**.\n    marks\n        Mapping of ``re.search(..., )`` patterns to ``pytest.param(marks=...)``.\n\n        The **first** match (if any) will be inserted into ``marks``.\n    \"\"\"\n    RE_NAME: Pattern[str] = re.compile(r\"^tests\\.(.*)\")\n    mark_specs = _wrap_mark_specs(marks) if marks else {}\n\n    for pkg in [examples_arguments_syntax, examples_methods_syntax]:\n        pkg_name = pkg.__name__\n        if match := RE_NAME.match(pkg_name):\n            pkg_name_unqual: str = match.group(1)\n        else:\n            msg = f\"Failed to match pattern {RE_NAME.pattern!r} against {pkg_name!r}\"\n            raise ValueError(msg)\n        for _, mod_name, is_pkg in pkgutil.iter_modules(pkg.__path__):\n            if not (is_pkg or mod_name.startswith(exclude_prefixes)):\n                file_name = f\"{mod_name}.py\"\n                msg_name = f\"{pkg_name_unqual}.{file_name}\"\n                if source := pkgutil.get_data(pkg_name, file_name):\n                    yield pytest.param(\n                        source, msg_name, marks=_fill_marks(mark_specs, msg_name)\n                    )\n                else:\n                    msg = (\n                        f\"Failed to get source data from `{pkg_name}.{file_name}`.\\n\"\n                        f\"pkgutil.get_data(...) returned: {pkgutil.get_data(pkg_name, file_name)!r}\"\n                    )\n                    raise TypeError(msg)\n\n\nignore_DataFrameGroupBy: pytest.MarkDecorator = pytest.mark.filterwarnings(\n    \"ignore:DataFrameGroupBy.apply.*:DeprecationWarning\"\n)\n\"\"\"\n``pytest.mark.filterwarnings`` decorator.\n\nHides ``pandas`` warning(s)::\n\n    \"ignore:DataFrameGroupBy.apply.*:DeprecationWarning\"\n\"\"\"\n\n\ndistributed_examples: pytest.MarkDecorator = pytest.mark.parametrize(\n    (\"source\", \"filename\"),\n    tuple(\n        _distributed_examples(\n            \"_\",\n            \"interval_selection_map_quakes\",\n            marks={\n                \"beckers_barley.+facet\": slow,\n                \"lasagna_plot\": slow,\n                \"line_chart_with_cumsum_faceted\": slow,\n                \"layered_bar_chart\": slow,\n                \"multiple_interactions\": slow,\n                \"layered_histogram\": slow,\n                \"stacked_bar_chart_with_text\": slow,\n                \"bar_chart_with_labels\": slow,\n                \"interactive_cross_highlight\": slow,\n                \"wind_vector_map\": slow,\n                r\"\\.point_map\\.py\": slow,\n                \"line_chart_with_color_datum\": slow,\n                \"deviation_ellipses\": skip_requires_scipy,\n            },\n        )\n    ),\n    ids=id_func_str_only,\n)\n\"\"\"\n``pytest.mark.parametrize`` decorator.\n\nProvides **all** examples, using both `arguments` & `methods` syntax.\n\nThe decorated test can evaluate each resulting chart via::\n\n    from altair.utils.execeval import eval_block\n\n    @distributed_examples\n    def test_some_stuff(source: Any, filename: str) -> None:\n        chart: ChartType | None = eval_block(source)\n        ... # Perform any assertions\n\nNotes\n-----\n- See `#3431 comment`_ for performance benefit.\n- `interval_selection_map_quakes` requires `#3418`_ fix\n\n.. _#3431 comment:\n   https://github.com/vega/altair/pull/3431#issuecomment-2168508048\n.. _#3418:\n   https://github.com/vega/altair/issues/3418\n\"\"\"\n"
  },
  {
    "path": "tests/altair_theme_test.py",
    "content": "# ruff: noqa: E711\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from altair.typing import ChartType\n\n\ndef alt_theme_test() -> ChartType:\n    import altair as alt\n    from altair.datasets import data\n\n    us_10m = data.us_10m.url\n    unemployment = data.unemployment.url\n    movies = data.movies.url\n    barley = data.barley.url\n    iowa_electricity = data.iowa_electricity.url\n    common_data = alt.InlineData(\n        [\n            {\"Index\": 1, \"Value\": 28, \"Position\": 1, \"Category\": \"A\"},\n            {\"Index\": 2, \"Value\": 55, \"Position\": 2, \"Category\": \"A\"},\n            {\"Index\": 3, \"Value\": 43, \"Position\": 3, \"Category\": \"A\"},\n            {\"Index\": 4, \"Value\": 91, \"Position\": 4, \"Category\": \"A\"},\n            {\"Index\": 5, \"Value\": 81, \"Position\": 5, \"Category\": \"A\"},\n            {\"Index\": 6, \"Value\": 53, \"Position\": 6, \"Category\": \"A\"},\n            {\"Index\": 7, \"Value\": 19, \"Position\": 1, \"Category\": \"B\"},\n            {\"Index\": 8, \"Value\": 87, \"Position\": 2, \"Category\": \"B\"},\n            {\"Index\": 9, \"Value\": 52, \"Position\": 3, \"Category\": \"B\"},\n            {\"Index\": 10, \"Value\": 48, \"Position\": 4, \"Category\": \"B\"},\n            {\"Index\": 11, \"Value\": 24, \"Position\": 5, \"Category\": \"B\"},\n            {\"Index\": 12, \"Value\": 49, \"Position\": 6, \"Category\": \"B\"},\n            {\"Index\": 13, \"Value\": 87, \"Position\": 1, \"Category\": \"C\"},\n            {\"Index\": 14, \"Value\": 66, \"Position\": 2, \"Category\": \"C\"},\n            {\"Index\": 15, \"Value\": 17, \"Position\": 3, \"Category\": \"C\"},\n            {\"Index\": 16, \"Value\": 27, \"Position\": 4, \"Category\": \"C\"},\n            {\"Index\": 17, \"Value\": 68, \"Position\": 5, \"Category\": \"C\"},\n            {\"Index\": 18, \"Value\": 16, \"Position\": 6, \"Category\": \"C\"},\n        ]\n    )\n\n    HEIGHT_SMALL = 140\n    STANDARD = 180\n    WIDTH_GEO = int(STANDARD * 1.667)\n\n    bar = (\n        alt.Chart(common_data, height=HEIGHT_SMALL, width=STANDARD, title=\"Bar\")\n        .mark_bar()\n        .encode(\n            x=alt.X(\"Index:O\").axis(offset=1), y=alt.Y(\"Value:Q\"), tooltip=\"Value:Q\"\n        )\n        .transform_filter(alt.datum[\"Index\"] <= 9)\n    )\n    line = (\n        alt.Chart(common_data, height=HEIGHT_SMALL, width=STANDARD, title=\"Line\")\n        .mark_line()\n        .encode(\n            x=alt.X(\"Position:O\").axis(grid=False),\n            y=alt.Y(\"Value:Q\").axis(grid=False),\n            color=alt.Color(\"Category:N\").legend(None),\n            tooltip=[\"Index:O\", \"Value:Q\", \"Position:O\", \"Category:N\"],\n        )\n    )\n    point_shape = (\n        alt.Chart(\n            common_data, height=HEIGHT_SMALL, width=STANDARD, title=\"Point (Shape)\"\n        )\n        .mark_point()\n        .encode(\n            x=alt.X(\"Position:O\").axis(grid=False),\n            y=alt.Y(\"Value:Q\").axis(grid=False),\n            shape=alt.Shape(\"Category:N\").legend(None),\n            color=alt.Color(\"Category:N\").legend(None),\n            tooltip=[\"Index:O\", \"Value:Q\", \"Position:O\", \"Category:N\"],\n        )\n    )\n    point = (\n        alt.Chart(movies, height=STANDARD, width=STANDARD, title=\"Point\")\n        .mark_point(tooltip=True)\n        .transform_filter(alt.datum[\"IMDB Rating\"] != None)\n        .transform_filter(\n            alt.FieldRangePredicate(\"Release Date\", [None, alt.DateTime(year=2019)])\n        )\n        .transform_joinaggregate(Average_Rating=\"mean(IMDB Rating)\")\n        .transform_calculate(\n            Rating_Delta=alt.datum[\"IMDB Rating\"] - alt.datum.Average_Rating\n        )\n        .encode(\n            x=alt.X(\"Release Date:T\").title(\"Release Date\"),\n            y=alt.Y(\"Rating_Delta:Q\").title(\"Rating Delta\"),\n            color=alt.Color(\"Rating_Delta:Q\").title(\"Rating Delta\").scale(domainMid=0),\n        )\n    )\n    bar_stack = (\n        alt.Chart(barley, height=STANDARD, width=STANDARD, title=\"Bar (Stacked)\")\n        .mark_bar(tooltip=True)\n        .encode(\n            x=\"sum(yield):Q\",\n            y=alt.Y(\"variety:N\"),\n            color=alt.Color(\"site:N\").legend(orient=\"bottom\", columns=2),\n        )\n    )\n    area = (\n        alt.Chart(iowa_electricity, height=STANDARD, width=STANDARD, title=\"Area\")\n        .mark_area(tooltip=True)\n        .encode(\n            x=alt.X(\"year:T\").title(\"Year\"),\n            y=alt.Y(\"net_generation:Q\")\n            .title(\"Share of net generation\")\n            .stack(\"normalize\")\n            .axis(format=\".0%\"),\n            color=alt.Color(\"source:N\")\n            .title(\"Electricity source\")\n            .legend(orient=\"bottom\", columns=2),\n        )\n    )\n    geoshape = (\n        alt.Chart(\n            alt.topo_feature(us_10m, \"counties\"),\n            height=STANDARD,\n            width=WIDTH_GEO,\n            title=alt.Title(\"Geoshape\", subtitle=\"Unemployment rate per county\"),\n        )\n        .mark_geoshape(tooltip=True)\n        .encode(color=\"rate:Q\")\n        .transform_lookup(\n            \"id\", alt.LookupData(alt.UrlData(unemployment), \"id\", [\"rate\"])\n        )\n        .project(type=\"albersUsa\")\n    )\n\n    compound_chart = (\n        (bar | line | point_shape) & (point | bar_stack) & (area | geoshape)\n    ).properties(\n        title=alt.Title(\n            \"Vega-Altair Theme Test\",\n            fontSize=20,\n            subtitle=\"Adapted from https://vega.github.io/vega-themes/\",\n        )\n    )\n    return compound_chart\n"
  },
  {
    "path": "tests/examples_arguments_syntax/__init__.py",
    "content": "import os\nfrom typing import Set\n\n# Set of the names of examples that should have SVG static images.\n# This is for examples that VlConvert's PNG export does not support.\nSVG_EXAMPLES: Set[str] = {\"isotype_emoji\"}\n\n\ndef iter_examples_arguments_syntax():\n    \"\"\"Iterate over the examples in this directory.\n\n    Each item is a dict with the following keys:\n    - \"name\" : the unique name of the example\n    - \"filename\" : the full file path to the example\n    - \"use_svg\": Flag indicating whether the static image for the\n        example should be an SVG instead of a PNG\n    \"\"\"\n    examples_arguments_syntax_dir = os.path.abspath(os.path.dirname(__file__))\n    for filename in os.listdir(examples_arguments_syntax_dir):\n        name, ext = os.path.splitext(filename)\n        if name.startswith(\"_\") or ext != \".py\":\n            continue\n        yield {\n            \"name\": name,\n            \"filename\": os.path.join(examples_arguments_syntax_dir, filename),\n            \"use_svg\": name in SVG_EXAMPLES,\n        }\n"
  },
  {
    "path": "tests/examples_arguments_syntax/airport_connections.py",
    "content": "\"\"\"\nConnections Among U.S. Airports Interactive\n-------------------------------------------\nThis example shows all the connections between major U.S. airports. Lookup transformations \nare used to find the coordinates of each airport and connecting airports. Connections \nare displayed on pointerover via a single selection.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\n# Since these data are each more than 5,000 rows we'll import from the URLs\nairports = data.airports.url\nflights_airport = data.flights_airport.url\n\nstates = alt.topo_feature(data.us_10m.url, feature=\"states\")\n\n# Create pointerover selection\nselect_city = alt.selection_point(\n    on=\"pointerover\", nearest=True, fields=[\"origin\"], empty=False\n)\n\n# Define which attributes to lookup from airports.csv\nlookup_data = alt.LookupData(\n    airports, key=\"iata\", fields=[\"state\", \"latitude\", \"longitude\"]\n)\n\nbackground = alt.Chart(states).mark_geoshape(\n    fill=\"lightgray\", \n    stroke=\"white\"\n).properties(\n    width=750, \n    height=500\n).project(\"albersUsa\")\n\nconnections = alt.Chart(flights_airport).mark_rule(opacity=0.35).encode(\n    latitude=\"latitude:Q\",\n    longitude=\"longitude:Q\",\n    latitude2=\"lat2:Q\",\n    longitude2=\"lon2:Q\"\n).transform_lookup(\n    lookup=\"origin\", \n    from_=lookup_data\n).transform_lookup(\n    lookup=\"destination\", \n    from_=lookup_data, \n    as_=[\"state\", \"lat2\", \"lon2\"]\n).transform_filter(\n    select_city\n)\n\npoints = alt.Chart(flights_airport).mark_circle().encode(\n    latitude=\"latitude:Q\",\n    longitude=\"longitude:Q\",\n    size=alt.Size(\"routes:Q\", scale=alt.Scale(range=[0, 1000]), legend=None),\n    order=alt.Order(\"routes:Q\", sort=\"descending\"),\n    tooltip=[\"origin:N\", \"routes:Q\"]\n).transform_aggregate(\n    routes=\"count()\", \n    groupby=[\"origin\"]\n).transform_lookup(\n    lookup=\"origin\", \n    from_=lookup_data\n).transform_filter(\n    (alt.datum.state != \"PR\") & (alt.datum.state != \"VI\")\n).add_params(\n    select_city\n)\n\n(background + connections + points).configure_view(stroke=None)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/annual_weather_heatmap.py",
    "content": "\"\"\"\nAnnual Weather Heatmap\n----------------------\n\"\"\"\n# category: tables\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather()\n\nalt.Chart(source, title=\"Daily Max Temperatures (C) in Seattle, WA\").mark_rect().encode(\n    x=alt.X(\"date(date):O\", title=\"Day\", axis=alt.Axis(format=\"%e\", labelAngle=0)),\n    y=alt.Y(\"month(date):O\", title=\"Month\"),\n    color=alt.Color(\"max(temp_max)\", legend=alt.Legend(title=None)),\n    tooltip=[\n        alt.Tooltip(\"monthdate(date)\", title=\"Date\"),\n        alt.Tooltip(\"max(temp_max)\", title=\"Max Temp\"),\n    ],\n).configure_view(step=13, strokeWidth=0).configure_axis(domain=False)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/anscombe_plot.py",
    "content": "\"\"\"\nAnscombe's Quartet\n------------------\n\n`Anscombe's Quartet <https://en.wikipedia.org/wiki/Anscombe%27s_quartet>`_\nis a famous dataset constructed by Francis Anscombe.\nIt is made of 4 different subsets of data.\nEach subset has very different characteristics, even though common summary\nstatistics such as mean and variance are identical.\n\nThis example shows how to make a faceted plot, with each facet\nshowing a different subset of the data.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.anscombe()\n\nalt.Chart(source).mark_circle().encode(\n    alt.X(\"X\", scale=alt.Scale(zero=False)),\n    alt.Y(\"Y\", scale=alt.Scale(zero=False)),\n    alt.Facet(\"Series\", columns=2),\n).properties(\n    width=180,\n    height=180,\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/area_chart_gradient.py",
    "content": "\"\"\"\nArea Chart with Gradient\n------------------------\nThis example shows how to make an area chart with a gradient fill. \nFor more information about gradient options see the Vega-Lite `Gradient documentation <https://vega.github.io/vega-lite/docs/types.html#gradient>`_.\n\"\"\"\n# category: area charts\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.stocks()\n\nalt.Chart(source).transform_filter(\n    'datum.symbol===\"GOOG\"'\n).mark_area(\n    line={'color':'darkgreen'},\n    color=alt.Gradient(\n        gradient='linear', \n        stops=[alt.GradientStop(color='white', offset=0), \n               alt.GradientStop(color='darkgreen', offset=1)], \n        x1=1, \n        x2=1, \n        y1=1, \n        y2=0\n    )\n).encode(\n    alt.X('date:T'), \n    alt.Y('price:Q')\n)"
  },
  {
    "path": "tests/examples_arguments_syntax/area_faceted.py",
    "content": "\"\"\"\nFaceted Area Chart\n------------------\nMultiple area subcharts, one for each company.\nWe also show filtering out one of the companies,\nand sorting the companies in a custom order.\n\"\"\"\n# category: area charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.stocks()\n\nalt.Chart(source).transform_filter(\n    alt.datum.symbol != \"GOOG\",\n).mark_area().encode(\n    x=\"date:T\",\n    y=\"price:Q\",\n    color=\"symbol:N\",\n    row=alt.Row(\"symbol:N\", sort=[\"MSFT\", \"AAPL\", \"IBM\", \"AMZN\"]),\n).properties(height=50, width=400)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/bar_and_line_with_dual_axis.py",
    "content": "\"\"\"\nBar Chart with Line on Dual Axis\n--------------------------------\nThis example shows how to combine two plots and keep their axes.\n\nFor a more polished version of this chart, see :ref:`gallery_wheat_wages`.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.wheat()\n\nbase = alt.Chart(source).encode(x='year:O')\n\nbar = base.mark_bar().encode(y='wheat:Q')\n\nline =  base.mark_line(color='red').encode(\n    y='wages:Q'\n)\n\n(bar + line).properties(width=600)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/bar_chart_faceted_compact.py",
    "content": "\"\"\"\nCompact Faceted Grid of Bar Charts\n==================================\nA simple grid of bar charts to compare performance data,\none subchart for each subset of the data.\n\"\"\"\n# category: bar charts\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame(\n    [\n        {\"a\": \"a1\", \"b\": \"b1\", \"c\": \"x\", \"p\": \"0.14\"},\n        {\"a\": \"a1\", \"b\": \"b1\", \"c\": \"y\", \"p\": \"0.60\"},\n        {\"a\": \"a1\", \"b\": \"b1\", \"c\": \"z\", \"p\": \"0.03\"},\n        {\"a\": \"a1\", \"b\": \"b2\", \"c\": \"x\", \"p\": \"0.80\"},\n        {\"a\": \"a1\", \"b\": \"b2\", \"c\": \"y\", \"p\": \"0.38\"},\n        {\"a\": \"a1\", \"b\": \"b2\", \"c\": \"z\", \"p\": \"0.55\"},\n        {\"a\": \"a1\", \"b\": \"b3\", \"c\": \"x\", \"p\": \"0.11\"},\n        {\"a\": \"a1\", \"b\": \"b3\", \"c\": \"y\", \"p\": \"0.58\"},\n        {\"a\": \"a1\", \"b\": \"b3\", \"c\": \"z\", \"p\": \"0.79\"},\n        {\"a\": \"a2\", \"b\": \"b1\", \"c\": \"x\", \"p\": \"0.83\"},\n        {\"a\": \"a2\", \"b\": \"b1\", \"c\": \"y\", \"p\": \"0.87\"},\n        {\"a\": \"a2\", \"b\": \"b1\", \"c\": \"z\", \"p\": \"0.67\"},\n        {\"a\": \"a2\", \"b\": \"b2\", \"c\": \"x\", \"p\": \"0.97\"},\n        {\"a\": \"a2\", \"b\": \"b2\", \"c\": \"y\", \"p\": \"0.84\"},\n        {\"a\": \"a2\", \"b\": \"b2\", \"c\": \"z\", \"p\": \"0.90\"},\n        {\"a\": \"a2\", \"b\": \"b3\", \"c\": \"x\", \"p\": \"0.74\"},\n        {\"a\": \"a2\", \"b\": \"b3\", \"c\": \"y\", \"p\": \"0.64\"},\n        {\"a\": \"a2\", \"b\": \"b3\", \"c\": \"z\", \"p\": \"0.19\"},\n        {\"a\": \"a3\", \"b\": \"b1\", \"c\": \"x\", \"p\": \"0.57\"},\n        {\"a\": \"a3\", \"b\": \"b1\", \"c\": \"y\", \"p\": \"0.35\"},\n        {\"a\": \"a3\", \"b\": \"b1\", \"c\": \"z\", \"p\": \"0.49\"},\n        {\"a\": \"a3\", \"b\": \"b2\", \"c\": \"x\", \"p\": \"0.91\"},\n        {\"a\": \"a3\", \"b\": \"b2\", \"c\": \"y\", \"p\": \"0.38\"},\n        {\"a\": \"a3\", \"b\": \"b2\", \"c\": \"z\", \"p\": \"0.91\"},\n        {\"a\": \"a3\", \"b\": \"b3\", \"c\": \"x\", \"p\": \"0.99\"},\n        {\"a\": \"a3\", \"b\": \"b3\", \"c\": \"y\", \"p\": \"0.80\"},\n        {\"a\": \"a3\", \"b\": \"b3\", \"c\": \"z\", \"p\": \"0.37\"},\n    ]\n)\n\nalt.Chart(source, width=60, height=alt.Step(8)).mark_bar().encode(\n    y=alt.Y(\"c:N\", axis=None),\n    x=alt.X(\"p:Q\", title=None, axis=alt.Axis(format=\"%\")),\n    color=alt.Color(\n        \"c:N\", title=\"settings\", legend=alt.Legend(orient=\"bottom\", titleOrient=\"left\")\n    ),\n    row=alt.Row(\"a:N\", title=\"Factor A\", header=alt.Header(labelAngle=0)),\n    column=alt.Column(\"b:N\", title=\"Factor B\"),\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/bar_chart_horizontal.py",
    "content": "\"\"\"\nHorizontal Bar Chart\n--------------------\nThis example is a bar chart drawn horizontally by putting the quantitative value on the x axis.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.wheat()\n\nalt.Chart(source).mark_bar().encode(\n    x='wheat:Q',\n    y=\"year:O\"\n).properties(height=700)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/bar_chart_sorted.py",
    "content": "\"\"\"\nSorted Bar Chart\n================\nThis example shows a bar chart sorted by a calculated value.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nalt.Chart(source).mark_bar().encode(\n    x='sum(yield):Q',\n    y=alt.Y('site:N', sort='-x')\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/bar_chart_with_highlighted_bar.py",
    "content": "\"\"\"\nBar Chart with Highlighted Bar\n------------------------------\nThis example shows a basic bar chart with a single bar highlighted.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.wheat()\n\n# If the `year` column equals `1810`\n# then, set the bar color to `\"orange\"`\n# otherwise, use `\"steelblue\"`\ncolor = alt.when(year=1810).then(alt.value(\"orange\")).otherwise(alt.value(\"steelblue\"))\n\nalt.Chart(source).mark_bar().encode(\n    x=\"year:O\",\n    y=\"wheat:Q\",\n    color=color\n).properties(width=600)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/bar_chart_with_highlighted_segment.py",
    "content": "\"\"\"\nBar Chart with Highlighted Segment\n----------------------------------\nThis example shows a bar chart that highlights values beyond a threshold.\n\"\"\"\n# category: bar charts\nimport altair as alt\nimport pandas as pd\nfrom altair.datasets import data\n\nsource = data.wheat()\nthreshold = pd.DataFrame([{\"threshold\": 90}])\n\nbars = alt.Chart(source).mark_bar().encode(\n    x=\"year:O\",\n    y=\"wheat:Q\",\n)\n\nhighlight = alt.Chart(source).mark_bar(color=\"#e45755\").encode(\n    x='year:O',\n    y='baseline:Q',\n    y2='wheat:Q'\n).transform_filter(\n    alt.datum.wheat > 90\n).transform_calculate(\"baseline\", \"90\")\n\nrule = alt.Chart(threshold).mark_rule().encode(\n    y='threshold:Q'\n)\n\n(bars + highlight + rule).properties(width=600)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/bar_chart_with_labels.py",
    "content": "\"\"\"\nBar Chart with Labels\n=====================\nThis example shows a basic horizontal bar chart with labels created with Altair.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\n\nsource = data.wheat()\n\nbase = alt.Chart(source).encode(\n    x='wheat',\n    y=\"year:O\",\n    text='wheat'\n)\nbase.mark_bar() + base.mark_text(align='left', dx=2)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/bar_chart_with_labels_measured_luminance.py",
    "content": "\"\"\"\nBar Chart with Labels based on Measured Luminance\n=================================================\nThis example shows a basic horizontal bar chart with labels where the measured luminance to decides if the text overlay is be colored ``black`` or ``white``.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nbase = alt.Chart(source).encode(\n    x=alt.X('sum(yield):Q', stack='zero'),\n    y=alt.Y('site:O', sort='-x'),\n    text=alt.Text('sum(yield):Q', format='.0f')\n)\n\nbars = base.mark_bar(\n    tooltip=alt.expr(\"luminance(scale('color', datum.sum_yield))\")\n).encode(\n    color='sum(yield):Q'\n)\n\ntext = base.mark_text(\n    align='right',\n    dx=-3,\n    color=alt.expr(\"luminance(scale('color', datum.sum_yield)) > 0.5 ? 'black' : 'white'\")\n)\n\nbars + text\n"
  },
  {
    "path": "tests/examples_arguments_syntax/bar_chart_with_mean_line.py",
    "content": "\"\"\"\nBar Chart with Line at Mean\n---------------------------\nThis example shows the mean value overlaid on a bar chart.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.wheat()\n\nbar = alt.Chart(source).mark_bar().encode(\n    x='year:O',\n    y='wheat:Q'\n)\n\nrule = alt.Chart(source).mark_rule(color='red').encode(\n    y='mean(wheat):Q'\n)\n\n(bar + rule).properties(width=600)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/bar_chart_with_negatives.py",
    "content": "\"\"\"\nBar Chart with Negative Values\n==============================\nThis example shows a bar chart with both positive and negative values.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.us_employment()\n\npredicate = alt.datum.nonfarm_change > 0\ncolor = alt.when(predicate).then(alt.value(\"steelblue\")).otherwise(alt.value(\"orange\"))\n\nalt.Chart(source).mark_bar().encode(\n    x=\"month:T\",\n    y=\"nonfarm_change:Q\",\n    color=color\n).properties(width=600)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/bar_chart_with_range.py",
    "content": "\"\"\"\nBar Chart with Range\n====================\nThis example shows a range bar chart where each bar displays information of a low and high value.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather()\n\nbar = alt.Chart(source).mark_bar(cornerRadius=10, height=10).encode(\n    x=alt.X('min(temp_min):Q', scale=alt.Scale(domain=[-15, 45]), title='Temperature (°C)'),\n    x2='max(temp_max):Q',\n    y=alt.Y('month(date):O', title=None) \n)\n\ntext_min = alt.Chart(source).mark_text(align='right', dx=-5).encode(\n    x='min(temp_min):Q',\n    y=alt.Y('month(date):O'),\n    text='min(temp_min):Q'\n)\n\ntext_max = alt.Chart(source).mark_text(align='left', dx=5).encode(\n    x='max(temp_max):Q',\n    y=alt.Y('month(date):O'),\n    text='max(temp_max):Q'\n)\n\n(bar + text_min + text_max).properties(\n    title=alt.Title(text='Temperature variation by month', subtitle='Seatle weather, 2012-2015')\n)"
  },
  {
    "path": "tests/examples_arguments_syntax/bar_chart_with_single_threshold.py",
    "content": "\"\"\"\nBar Chart Highlighting Values beyond a Threshold\n------------------------------------------------\nThis example shows a bar chart highlighting values beyond a threshold.\n\"\"\"\n# category: bar charts\nimport pandas as pd\nimport altair as alt\n\nsource = pd.DataFrame({\n    \"Day\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], \n    \"Value\": [55, 112, 65, 38, 80, 138, 120, 103, 395, 200, 72, 51, 112, 175, 131]\n})\nthreshold = 300\n\nbars = alt.Chart(source).mark_bar(color=\"steelblue\").encode(\n    x=\"Day:O\",\n    y=\"Value:Q\",\n)\n\nhighlight = bars.mark_bar(color=\"#e45755\").encode(\n    y2=alt.Y2(datum=threshold)\n).transform_filter(\n    alt.datum.Value > threshold\n)\n\nrule = alt.Chart().mark_rule().encode(\n    y=alt.Y(datum=threshold)\n)\n\nlabel = rule.mark_text(\n    x=\"width\",\n    dx=-2,\n    align=\"right\",\n    baseline=\"bottom\",\n    text=\"hazardous\"\n)\n\n(bars + highlight + rule + label)"
  },
  {
    "path": "tests/examples_arguments_syntax/bar_faceted_stacked.py",
    "content": "\"\"\"\nFaceted Stacked Bar Chart\n=========================\nA horizontal stacked bar chart using barley crop yield data.\nThe chart is horizontally faceted based on the year,\nand vertically faceted based on variety.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nalt.Chart(source).mark_bar().encode(\n    column=\"year:O\",\n    x=\"yield\",\n    y=\"variety\",\n    color=\"site\",\n).properties(width=220)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/bar_rounded.py",
    "content": "\"\"\"\nBar Chart with Rounded Edges\n----------------------------\nThis example shows how to create a bar chart with rounded edges.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather()\n\nalt.Chart(source).mark_bar(\n    cornerRadiusTopLeft=3,\n    cornerRadiusTopRight=3\n).encode(\n    x='month(date):O',\n    y='count():Q',\n    color='weather:N'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/bar_with_rolling_mean.py",
    "content": "\"\"\"\nBar Chart with Rolling Mean\n---------------------------\nA bar chart overlaid with a rolling mean. In this example the average of values over the previous decade is displayed as a line.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.wheat()\n\nbar = alt.Chart(source).mark_bar().encode(\n    x='year:O',\n    y='wheat:Q'\n)\n\nline = alt.Chart(source).mark_line(color='red').transform_window(\n    # The field to average\n    rolling_mean='mean(wheat)',\n    # The number of values before and after the current value to include.\n    frame=[-9, 0]\n).encode(\n    x='year:O',\n    y='rolling_mean:Q'\n)\n\n(bar + line).properties(width=600)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/beckers_barley_facet.py",
    "content": "\"\"\"\nBecker's Barley Faceted Plot\n----------------------------\nThe example demonstrates the faceted charts created by Richard Becker,\nWilliam Cleveland and others in the 1990s. Using the visualization technique\nwhere each row is a different site (i.e. the chart is faceted by site),\nthey identified an anomaly in a widely used agriculatural dataset,\nwhere the \"Morris\" site accidentally had the years 1931 and 1932 swapped.\nThey named this\n`\"The Morris Mistake.\" <http://ml.stat.purdue.edu/stat695t/writings/Trellis.User.pdf>`_.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nalt.Chart(source, title=\"The Morris Mistake\").mark_point().encode(\n    alt.X(\n        'yield:Q',\n        title=\"Barley Yield (bushels/acre)\",\n        scale=alt.Scale(zero=False),\n        axis=alt.Axis(grid=False)\n    ),\n    alt.Y(\n        'variety:N',\n        title=\"\",\n        sort='-x',\n        axis=alt.Axis(grid=True)\n    ),\n    color=alt.Color('year:N', legend=alt.Legend(title=\"Year\")),\n    row=alt.Row(\n        'site:N',\n        title=\"\",\n        sort=alt.EncodingSortField(field='yield', op='sum', order='descending'),\n    )\n).properties(\n    height=alt.Step(20)\n).configure_view(stroke=\"transparent\")\n"
  },
  {
    "path": "tests/examples_arguments_syntax/beckers_barley_wrapped_facet.py",
    "content": "\"\"\"\nBecker's Barley Wrapped Facet Plot\n----------------------------------\nThe example demonstrates the faceted charts created by Richard Becker,\nWilliam Cleveland and others in the 1990s. Using the visualization technique\nwhere each row is a different site (i.e. the chart is faceted by site),\nthey identified an anomaly in a widely used agriculatural dataset,\nwhere the \"Morris\" site accidentally had the years 1931 and 1932 swapped.\nThey named this\n`\"The Morris Mistake.\" <http://ml.stat.purdue.edu/stat695t/writings/Trellis.User.pdf>`_.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley.url\n\nalt.Chart(source).mark_point().encode(\n    alt.X(\"median(yield):Q\", scale=alt.Scale(zero=False)),\n    y=\"variety:O\",\n    color=\"year:N\",\n    facet=alt.Facet(\"site:O\", columns=2),\n).properties(\n    width=200,\n    height=100,\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/boxplot.py",
    "content": "\"\"\"\nBoxplot with Min/Max Whiskers\n------------------------------\nThis example shows how to make a boxplot using US Population data from 2000.  \nNote that the default value of the `extent` property is 1.5,\nwhich represents the convention of extending the whiskers\nto the furthest points within 1.5 * IQR from the first and third quartile.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.population.url\n\nalt.Chart(source).mark_boxplot(extent='min-max').encode(\n    x='age:O',\n    y='people:Q'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/bubble_plot.py",
    "content": "\"\"\"\nBubble Plot\n-----------------\nThis example shows how to make a bubble plot.\n\"\"\"\n# category: scatter plots\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\nalt.Chart(source).mark_point().encode(\n    x='Horsepower',\n    y='Miles_per_Gallon',\n    size='Acceleration'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/bump_chart.py",
    "content": "\"\"\"\nBump Chart\n----------\nThis example shows a bump chart.  The data is first grouped into six-month\nintervals using pandas. The ranks are computed by Altair using a \nwindow transform.\n\"\"\"\n# category: line charts\n\nimport altair as alt\nfrom altair.datasets import data\nimport pandas as pd\n\nstocks = data.stocks()\nsource = stocks.groupby([pd.Grouper(key=\"date\", freq=\"6MS\"),\"symbol\"]).mean().reset_index()\n\nalt.Chart(source).mark_line(point = True).encode(\n    x = alt.X(\"date:O\", timeUnit=\"yearmonth\", title=\"date\"),\n    y=\"rank:O\",\n    color=alt.Color(\"symbol:N\")\n).transform_window(\n    rank=\"rank()\",\n    sort=[alt.SortField(\"price\", order=\"descending\")],\n    groupby=[\"date\"]\n).properties(\n    title=\"Bump Chart for Stock Prices\",\n    width=600,\n    height=150,\n)"
  },
  {
    "path": "tests/examples_arguments_syntax/calculate_residuals.py",
    "content": "\"\"\"\nCalculate Residuals\n-------------------\nA dot plot showing each movie in the database, and the difference from the average movie rating.\nThe display is sorted by year to visualize everything in sequential order. \nThe graph is for all Movies before 2019.\n\nAdapted from `Calculate Residuals <https://vega.github.io/vega-lite/examples/joinaggregate_residual_graph.html>`_.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nfrom altair.datasets import data\n\nimdb_rating = alt.datum[\"IMDB Rating\"]\nsource = data.movies.url\n\nchart = (\n    alt.Chart(source)\n    .mark_point()\n    .transform_filter(imdb_rating != None)\n    .transform_filter(\n        alt.FieldRangePredicate(\"Release Date\", [None, 2019], timeUnit=\"year\")\n    )\n    .transform_joinaggregate(Average_Rating=\"mean(IMDB Rating)\")\n    .transform_calculate(Rating_Delta=imdb_rating - alt.datum.Average_Rating)\n    .encode(\n        x=alt.X(\"Release Date:T\", title=\"Release Date\"),\n        y=alt.Y(\"Rating_Delta:Q\", title=\"Rating Delta\"),\n        color=alt.Color(\n            \"Rating_Delta:Q\",\n            title=\"Rating Delta\",\n            scale=alt.Scale(domainMid=0),\n        ),\n    )\n)\nchart"
  },
  {
    "path": "tests/examples_arguments_syntax/candlestick_chart.py",
    "content": "\"\"\"\nCandlestick Chart\n=================\nA candlestick chart inspired from `Protovis <http://mbostock.github.io/protovis/ex/candlestick.html>`_. \nThis example shows the performance of the Chicago Board Options Exchange `Volatility Index <https://en.wikipedia.org/wiki/VIX>`_ (VIX) \nin the summer of 2009. The thick bar represents the opening and closing prices, \nwhile the thin bar shows intraday high and low prices; if the index closed higher on a given day, the bars are colored green rather than red.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.ohlc()\n\nopen_close_color = (\n    alt.when(\"datum.open <= datum.close\")\n    .then(alt.value(\"#06982d\"))\n    .otherwise(alt.value(\"#ae1325\"))\n)\n\nbase = alt.Chart(source).encode(\n    alt.X('date:T',\n          axis=alt.Axis(\n              format='%m/%d', \n              labelAngle=-45, \n              title='Date in 2009'\n          )\n    ),\n    color=open_close_color\n)\n\nrule = base.mark_rule().encode(\n    alt.Y(\n        'low:Q',\n        title='Price',\n        scale=alt.Scale(zero=False),\n    ),\n    alt.Y2('high:Q')\n)\n\nbar = base.mark_bar().encode(\n    alt.Y('open:Q'),\n    alt.Y2('close:Q')\n)\n\nrule + bar"
  },
  {
    "path": "tests/examples_arguments_syntax/choropleth.py",
    "content": "\"\"\"\nChoropleth Map\n==============\nA choropleth map of unemployment rate per county in the US\n\"\"\"\n# category: maps\nimport altair as alt\nfrom altair.datasets import data\n\ncounties = alt.topo_feature(data.us_10m.url, 'counties')\nsource = data.unemployment.url\n\nalt.Chart(counties).mark_geoshape().encode(\n    color='rate:Q'\n).transform_lookup(\n    lookup='id',\n    from_=alt.LookupData(source, 'id', ['rate'])\n).project(\n    type='albersUsa'\n).properties(\n    width=500,\n    height=300\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/choropleth_repeat.py",
    "content": "\"\"\"\nRepeated Choropleth Map\n=======================\nThree choropleths representing disjoint data from the same table.\n\"\"\"\n# category: maps\nimport altair as alt\nfrom altair.datasets import data\n\nstates = alt.topo_feature(data.us_10m.url, 'states')\nsource = data.population_engineers_hurricanes.url\nvariable_list = ['population', 'engineers', 'hurricanes']\n\nalt.Chart(states).mark_geoshape().encode(\n    alt.Color(alt.repeat('row'), type='quantitative')\n).transform_lookup(\n    lookup='id',\n    from_=alt.LookupData(source, 'id', variable_list)\n).properties(\n    width=500,\n    height=300\n).project(\n    type='albersUsa'\n).repeat(\n    row=variable_list\n).resolve_scale(\n    color='independent'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/co2_concentration.py",
    "content": "\"\"\"\nAtmospheric CO2 Concentration\n-----------------------------\nThis example is a fully developed line chart that uses a window transformation.\nIt was inspired by `Gregor Aisch's work at datawrapper\n<https://www.datawrapper.de/_/OHgEm/>`_.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.co2_concentration.url\n\nbase = alt.Chart(\n    source,\n    title=\"Carbon Dioxide in the Atmosphere\"\n).transform_calculate(\n    year=\"year(datum.Date)\"\n).transform_calculate(\n    decade=\"floor(datum.year / 10)\"\n).transform_calculate(\n    scaled_date=\"(datum.year % 10) + (month(datum.Date)/12)\"\n).transform_window(\n    first_date='first_value(scaled_date)',\n    last_date='last_value(scaled_date)',\n    sort=[{\"field\": \"scaled_date\", \"order\": \"ascending\"}],\n    groupby=['decade'],\n    frame=[None, None]\n).transform_calculate(\n  end=\"datum.first_date === datum.scaled_date ? 'first' : datum.last_date === datum.scaled_date ? 'last' : null\"\n).encode(\n    x=alt.X(\n        \"scaled_date:Q\",\n        axis=alt.Axis(title=\"Year into Decade\", tickCount=11)\n    ),\n    y=alt.Y(\n        \"CO2:Q\",\n        title=\"CO2 concentration in ppm\",\n        scale=alt.Scale(zero=False)\n    )\n)\n\nline = base.mark_line().encode(\n    color=alt.Color(\n        \"decade:O\",\n        scale=alt.Scale(scheme=\"magma\"),\n        legend=None\n    )\n)\n\ntext = base.encode(text=\"year:N\")\n\nstart_year = text.transform_filter(\n  alt.datum.end == 'first'\n).mark_text(baseline=\"top\")\n\nend_year = text.transform_filter(\n  alt.datum.end == 'last'\n).mark_text(baseline=\"bottom\")\n\n(line + start_year + end_year).configure_text(\n    align=\"left\",\n    dx=1,\n    dy=3\n).properties(width=600, height=375)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/comet_chart.py",
    "content": "\"\"\"\nComet Chart\n-----------\nInspired by `Zan Armstrong's comet chart <https://www.zanarmstrong.com/infovisresearch>`_\nthis plot uses ``mark_trail`` to visualize change of grouped data over time.\nA more elaborate example and explanation of creating comet charts in Altair\nis shown in `this blogpost <https://medium.com/de-dataverbinders/comet-charts-in-python-visualizing-statistical-mix-effects-and-simpsons-paradox-with-altair-6cd51fb58b7c>`_.\n\"\"\"\n# category: advanced calculations\n\nimport altair as alt\nfrom altair.datasets import data\n\n(\n    alt.Chart(data.barley.url)\n    .transform_pivot(\"year\", value=\"yield\", groupby=[\"variety\", \"site\"])\n    .transform_fold([\"1931\", \"1932\"], as_=[\"year\", \"yield\"])\n    .transform_calculate(calculate=\"datum['1932'] - datum['1931']\", as_=\"delta\")\n    .mark_trail()\n    .encode(\n        x=alt.X('year:O', title=None), \n        y=alt.Y('variety:N', title='Variety'),\n        size=alt.Size('yield:Q', scale=alt.Scale(range=[0, 12]), legend=alt.Legend(values=[20, 60], title='Barley Yield (bushels/acre)')),\n        color=alt.Color('delta:Q', scale=alt.Scale(domainMid=0), legend=alt.Legend(title='Yield Delta (%)')),\n        tooltip=alt.Tooltip(['year:O', 'yield:Q']),\n        column=alt.Column('site:N', title='Site')\n\n    )\n    .configure_view(stroke=None)\n    .configure_legend(orient='bottom', direction='horizontal')\n    .properties(title='Barley Yield comparison between 1932 and 1931')\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/cumulative_count_chart.py",
    "content": "\"\"\"\nCumulative Count Chart\n----------------------\nThis example shows an area chart with cumulative count.\nAdapted from https://vega.github.io/vega-lite/examples/area_cumulative_freq.html\n\n\"\"\"\n# category: distributions\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\nalt.Chart(source).transform_window(\n    cumulative_count=\"count()\",\n    sort=[{\"field\": \"IMDB Rating\"}],\n).mark_area().encode(\n    x=\"IMDB Rating:Q\",\n    y=alt.Y(\"cumulative_count:Q\", stack=False)\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/dendrogram.py",
    "content": "\"\"\"\nDendrogram of Hierarchical Clustering\n-------------------------------------\nThis is a dendrogram from the result of a hierarchical clustering. It's based on the example from\nhttps://scikit-learn.org/stable/auto_examples/cluster/plot_agglomerative_dendrogram.html\n\"\"\"\n# category: case studies\n\nimport pandas as pd\nimport altair as alt\nimport numpy as np\n\n# the variable `den` shown below is an exemplary output of `scipy.cluster.hierarchy.dendrogram` \n# (https://docs.scipy.org/doc/scipy/reference/generated/scipy.cluster.hierarchy.dendrogram.html#scipy.cluster.hierarchy.dendrogram)\n# where the dendrogram itself is truncated such that no more than 3 levels of the dendrogram tree are shown.\nden = {\n    'dcoord': [[0.0, 0.8187388676087964, 0.8187388676087964, 0.0],\n  [0.0, 1.105139508538779, 1.105139508538779, 0.0],\n  [0.8187388676087964,\n   1.3712698320830048,\n   1.3712698320830048,\n   1.105139508538779],\n  [0.0, 0.9099819926189507, 0.9099819926189507, 0.0],\n  [0.0, 1.2539936203984452, 1.2539936203984452, 0.0],\n  [0.9099819926189507,\n   1.9187528699821954,\n   1.9187528699821954,\n   1.2539936203984452],\n  [1.3712698320830048,\n   3.828052620290243,\n   3.828052620290243,\n   1.9187528699821954],\n  [0.0, 1.7604450194955439, 1.7604450194955439, 0.0],\n  [0.0, 1.845844754344974, 1.845844754344974, 0.0],\n  [1.7604450194955439,\n   4.847708507921838,\n   4.847708507921838,\n   1.845844754344974],\n  [0.0, 2.8139388316471536, 2.8139388316471536, 0.0],\n  [0.0, 2.8694176394568705, 2.8694176394568705, 0.0],\n  [2.8139388316471536,\n   6.399406819518539,\n   6.399406819518539,\n   2.8694176394568705],\n  [4.847708507921838,\n   12.300396052792589,\n   12.300396052792589,\n   6.399406819518539],\n  [3.828052620290243,\n   32.44760699959244,\n   32.44760699959244,\n   12.300396052792589]],\n 'icoord': [[5.0, 5.0, 15.0, 15.0],\n  [25.0, 25.0, 35.0, 35.0],\n  [10.0, 10.0, 30.0, 30.0],\n  [45.0, 45.0, 55.0, 55.0],\n  [65.0, 65.0, 75.0, 75.0],\n  [50.0, 50.0, 70.0, 70.0],\n  [20.0, 20.0, 60.0, 60.0],\n  [85.0, 85.0, 95.0, 95.0],\n  [105.0, 105.0, 115.0, 115.0],\n  [90.0, 90.0, 110.0, 110.0],\n  [125.0, 125.0, 135.0, 135.0],\n  [145.0, 145.0, 155.0, 155.0],\n  [130.0, 130.0, 150.0, 150.0],\n  [100.0, 100.0, 140.0, 140.0],\n  [40.0, 40.0, 120.0, 120.0]],\n 'ivl': [\n     '(7)', '(8)', '41', '(5)', '(10)', '(7)', '(4)', '(8)', '(9)', '(15)', '(5)', '(7)', '(4)', '(22)', '(15)', '(23)'\n     ],\n}\n\ndef get_leaf_loc(den):\n    \"\"\"\n    Get the location of the leaves\n    \"\"\"\n    _from = int(np.array(den[\"icoord\"]).min())\n    _to = int(np.array(den[\"icoord\"]).max() + 1)\n    return range(_from, _to, 10)\n\ndef get_df_coord(den):\n    \"\"\"\n    Get coordinate dataframe.\n    \"\"\"\n    # if you view the dendrogram as a collection of upside-down \"U\" shapes, then\n    # we can regard the 4 corners of the upside-down \"U\" as points 1, 2, 3 and 4.\n    cols_xk = [\"xk1\", \"xk2\", \"xk3\", \"xk4\"]\n    cols_yk = [\"yk1\", \"yk2\", \"yk3\", \"yk4\"]\n\n    df_coord = pd.merge(\n        pd.DataFrame(den[\"icoord\"], columns=cols_xk),\n        pd.DataFrame(den[\"dcoord\"], columns=cols_yk),\n        left_index=True,\n        right_index=True\n    )\n    return df_coord\n\nsource = get_df_coord(den)\nbase = alt.Chart(source)\n\n# the U shape is composed of a shoulder plus two arms\nshoulder = base.mark_rule().encode(\n    alt.X(\"xk2:Q\", title=\"\"),\n    alt.X2(\"xk3:Q\"),\n    alt.Y(\"yk2:Q\", title=\"\")\n)\narm1 = base.mark_rule().encode(\n    alt.X(\"xk1:Q\"), \n    alt.Y(\"yk1:Q\"), \n    alt.Y2(\"yk2:Q\")\n)\narm2 = base.mark_rule().encode(\n    alt.X(\"xk3:Q\"), \n    alt.Y(\"yk3:Q\"), \n    alt.Y2(\"yk4:Q\")\n)\n\nchart_den = shoulder + arm1 + arm2\n\ndf_text = pd.DataFrame(dict(labels=den[\"ivl\"], x=get_leaf_loc(den)))\n\nchart_text = alt.Chart(\n    df_text\n).mark_text(\n    dy=0, angle=0, align=\"center\"\n).encode(\n    x = alt.X(\"x:Q\", axis={\"grid\":False, \"title\":\"Number of points in nodes\"}),\n    text = alt.Text(\"labels:N\")\n)\n\n(chart_den & chart_text).resolve_scale(\n    x=\"shared\"\n).configure(\n    padding={\"top\":10,\"left\":10}\n).configure_concat(\n    spacing=0\n).configure_axis(\n    labels=False,\n    ticks=False,\n    grid=False\n).properties(\n    title=\"Hierarchical Clustering Dendrogram\"\n)"
  },
  {
    "path": "tests/examples_arguments_syntax/density_repeat.py",
    "content": "\"\"\"\nRepeated Density Estimates\n--------------------------\nDensity estimates for each measurement of penguins.\nThis is what we call a \"repeated\" plot, with one subplot\nfor each measurement type. All measurements are in millimeters,\nmaking them directly comparable on a shared x-axis.\n\"\"\"\n# category: distributions\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.penguins()\n\nalt.Chart(source).transform_fold(\n    [\n        \"Beak Length (mm)\",\n        \"Beak Depth (mm)\",\n        \"Flipper Length (mm)\",\n    ],\n    as_=[\"Measurement Type\", \"value\"],\n).transform_density(\n    density=\"value\",\n    groupby=[\"Measurement Type\"]\n).mark_area().encode(\n    alt.X(\"value:Q\"),\n    alt.Y(\"density:Q\"),\n    alt.Row(\"Measurement Type:N\", header=alt.Header(labelAngle=0, labelAlign=\"left\"))\n).properties(\n    width=300,\n    height=50\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/density_stack.py",
    "content": "\"\"\"\nStacked Density Estimates\n-------------------------\nTo plot a stacked graph of estimates, use a shared ``extent`` and a fixed\nnumber of subdivision ``steps`` to ensure that the points for each area align\nwell.  Density estimates of body mass for each penguin species are plotted\nin a stacked method.  In addition, setting ``counts`` to true multiplies the\ndensities by the number of data points in each group, preserving proportional\ndifferences.\n\"\"\"\n# category: distributions\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.penguins()\n\nalt.Chart(source).transform_density(\n    density='Body Mass (g)',\n    groupby=['Species'], \n    extent= [2500, 6500],\n    counts = True,\n    steps=200    \n).mark_area().encode(\n    alt.X('value:Q').title('Body Mass (g)'), \n    alt.Y('density:Q', stack='zero'),\n    alt.Color('Species:N')\n).properties(\n    width=400,\n    height=80,\n    title='Distribution of Body Mass of Penguins'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/deviation_ellipses.py",
    "content": "\"\"\"\nConfidence Interval Ellipses\n----------------------------\nThis example shows bivariate deviation ellipses of flipper length and body mass of three penguin species.\n\nInspired by `ggplot2.stat_ellipse`_ and directly based on `Deviation ellipses example`_ by `@essicolo`_\n\n.. _ggplot2.stat_ellipse:\n    https://ggplot2.tidyverse.org/reference/stat_ellipse.html#ref-examples\n.. _Deviation ellipses example:\n    https://github.com/vega/altair/pull/514\n.. _@essicolo:\n    https://github.com/essicolo\n\"\"\"\n\n# category: case studies\nimport numpy as np\nimport pandas as pd\nfrom scipy.stats import f as F\n\nimport altair as alt\nfrom altair.datasets import data\n\n\ndef confidence_region_2d(arr, conf_level=0.95, segments=50):\n    \"\"\"\n    Calculate confidence interval ellipse.\n\n    Parameters\n    ----------\n    arr\n        numpy array with 2 columns\n    conf_level\n        lower tail probability\n    segments\n        number of points describing the ellipse.\n    \"\"\"\n    n_elements = len(arr)\n    # Degrees of freedom of the chi-squared distribution in the **numerator**\n    dfn = 2\n    # Degrees of freedom of the chi-squared distribution in the **denominator**\n    dfd = n_elements - 1\n    # Percent point function at `conf_level` of an F continuous random variable\n    quantile = F.ppf(conf_level, dfn=dfn, dfd=dfd)\n    radius = np.sqrt(2 * quantile)\n    angles = np.arange(0, segments) * 2 * np.pi / segments\n    circle = np.column_stack((np.cos(angles), np.sin(angles)))\n    center = np.mean(arr, axis=0)\n    cov_mat = np.cov(arr, rowvar=False)\n    return center + radius * (circle @ np.linalg.cholesky(cov_mat).T)\n\n\ndef grouped_confidence_regions(df, col_x, col_y, col_group):\n    cols = [col_x, col_y]\n    ellipses = []\n    ser: pd.Series[float] = df[col_group]\n    for group in ser.drop_duplicates():\n        arr = df.loc[ser == group, cols].to_numpy(dtype=np.float64)\n        ellipse = pd.DataFrame(confidence_region_2d(arr), columns=cols)\n        ellipse[col_group] = group\n        ellipses.append(ellipse)\n    return pd.concat(ellipses).reset_index(names=\"order\")\n\n\ncol_x = \"Flipper Length (mm)\"\ncol_y = \"Body Mass (g)\"\ncol_group = \"Species\"\n\nx = alt.X(col_x, scale=alt.Scale(zero=False))\ny = alt.Y(col_y, scale=alt.Scale(zero=False))\ncolor = alt.Color(col_group)\n\nsource = data.penguins().dropna(subset=[col_x, col_y, col_group])\nellipse = grouped_confidence_regions(source, col_x=col_x, col_y=col_y, col_group=col_group)\npoints = alt.Chart(source).mark_circle(size=50, tooltip=True).encode(\n    x=x,\n    y=y,\n    color=color\n)\nlines = alt.Chart(ellipse).mark_line(filled=True, fillOpacity=0.2).encode(\n    x=x,\n    y=y,\n    color=color,\n    order=\"order\"\n)\n\nchart = (lines + points).properties(height=500, width=500)\nchart\n"
  },
  {
    "path": "tests/examples_arguments_syntax/distributions_and_medians_of_likert_scale_ratings.py",
    "content": "\"\"\"\nDistributions and Medians of Likert Scale Ratings\n-------------------------------------------------\nDistributions and Medians of Likert Scale Ratings. (Figure 9 from @jhoffswell and @zcliu’s ‘Interactive Repair of Tables Extracted from PDF Documents on Mobile Devices’ – http://idl.cs.washington.edu/files/2019-InteractiveTableRepair-CHI.pdf).\n\nAdapted from `Distributions and Medians of Likert Scale Ratings <https://vega.github.io/vega-lite/examples/layer_likert.html>`_.\n\"\"\"\n# category: distributions\nimport altair as alt\nimport pandas as pd\n\nmedians = pd.DataFrame(\n    [\n        {\"name\": \"Identify Errors:\", \"median\": 1.999976, \"lo\": \"Easy\", \"hi\": \"Hard\"},\n        {\"name\": \"Fix Errors:\", \"median\": 2, \"lo\": \"Easy\", \"hi\": \"Hard\"},\n        {\n            \"name\": \"Easier to Fix:\",\n            \"median\": 1.999969,\n            \"lo\": \"Toolbar\",\n            \"hi\": \"Gesture\",\n        },\n        {\n            \"name\": \"Faster to Fix:\",\n            \"median\": 2.500045,\n            \"lo\": \"Toolbar\",\n            \"hi\": \"Gesture\",\n        },\n        {\n            \"name\": \"Easier on Phone:\",\n            \"median\": 1.500022,\n            \"lo\": \"Toolbar\",\n            \"hi\": \"Gesture\",\n        },\n        {\n            \"name\": \"Easier on Tablet:\",\n            \"median\": 2.99998,\n            \"lo\": \"Toolbar\",\n            \"hi\": \"Gesture\",\n        },\n        {\n            \"name\": \"Device Preference:\",\n            \"median\": 4.500007,\n            \"lo\": \"Phone\",\n            \"hi\": \"Tablet\",\n        },\n    ]\n)\n\nvalues = pd.DataFrame(\n    [\n        {\"value\": \"P1\", \"name\": \"Participant ID\", \"id\": \"P1\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P1\"},\n        {\"value\": 2, \"name\": \"Fix Errors:\", \"id\": \"P1\"},\n        {\"value\": 3, \"name\": \"Easier to Fix:\", \"id\": \"P1\"},\n        {\"value\": 4, \"name\": \"Faster to Fix:\", \"id\": \"P1\"},\n        {\"value\": 2, \"name\": \"Easier on Phone:\", \"id\": \"P1\"},\n        {\"value\": 5, \"name\": \"Easier on Tablet:\", \"id\": \"P1\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P1\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P1\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P1\"},\n        {\"value\": \"P2\", \"name\": \"Participant ID\", \"id\": \"P2\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P2\"},\n        {\"value\": 3, \"name\": \"Fix Errors:\", \"id\": \"P2\"},\n        {\"value\": 4, \"name\": \"Easier to Fix:\", \"id\": \"P2\"},\n        {\"value\": 5, \"name\": \"Faster to Fix:\", \"id\": \"P2\"},\n        {\"value\": 5, \"name\": \"Easier on Phone:\", \"id\": \"P2\"},\n        {\"value\": 5, \"name\": \"Easier on Tablet:\", \"id\": \"P2\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P2\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P2\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P2\"},\n        {\"value\": \"P3\", \"name\": \"Participant ID\", \"id\": \"P3\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P3\"},\n        {\"value\": 2, \"name\": \"Fix Errors:\", \"id\": \"P3\"},\n        {\"value\": 2, \"name\": \"Easier to Fix:\", \"id\": \"P3\"},\n        {\"value\": 1, \"name\": \"Faster to Fix:\", \"id\": \"P3\"},\n        {\"value\": 2, \"name\": \"Easier on Phone:\", \"id\": \"P3\"},\n        {\"value\": 1, \"name\": \"Easier on Tablet:\", \"id\": \"P3\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P3\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P3\"},\n        {\"value\": 0, \"name\": \"Toolbar_First\", \"id\": \"P3\"},\n        {\"value\": \"P4\", \"name\": \"Participant ID\", \"id\": \"P4\"},\n        {\"value\": 3, \"name\": \"Identify Errors:\", \"id\": \"P4\"},\n        {\"value\": 3, \"name\": \"Fix Errors:\", \"id\": \"P4\"},\n        {\"value\": 2, \"name\": \"Easier to Fix:\", \"id\": \"P4\"},\n        {\"value\": 2, \"name\": \"Faster to Fix:\", \"id\": \"P4\"},\n        {\"value\": 4, \"name\": \"Easier on Phone:\", \"id\": \"P4\"},\n        {\"value\": 1, \"name\": \"Easier on Tablet:\", \"id\": \"P4\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P4\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P4\"},\n        {\"value\": 0, \"name\": \"Toolbar_First\", \"id\": \"P4\"},\n        {\"value\": \"P5\", \"name\": \"Participant ID\", \"id\": \"P5\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P5\"},\n        {\"value\": 2, \"name\": \"Fix Errors:\", \"id\": \"P5\"},\n        {\"value\": 4, \"name\": \"Easier to Fix:\", \"id\": \"P5\"},\n        {\"value\": 4, \"name\": \"Faster to Fix:\", \"id\": \"P5\"},\n        {\"value\": 4, \"name\": \"Easier on Phone:\", \"id\": \"P5\"},\n        {\"value\": 5, \"name\": \"Easier on Tablet:\", \"id\": \"P5\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P5\"},\n        {\"value\": 0, \"name\": \"Tablet_First\", \"id\": \"P5\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P5\"},\n        {\"value\": \"P6\", \"name\": \"Participant ID\", \"id\": \"P6\"},\n        {\"value\": 1, \"name\": \"Identify Errors:\", \"id\": \"P6\"},\n        {\"value\": 3, \"name\": \"Fix Errors:\", \"id\": \"P6\"},\n        {\"value\": 3, \"name\": \"Easier to Fix:\", \"id\": \"P6\"},\n        {\"value\": 4, \"name\": \"Faster to Fix:\", \"id\": \"P6\"},\n        {\"value\": 4, \"name\": \"Easier on Phone:\", \"id\": \"P6\"},\n        {\"value\": 4, \"name\": \"Easier on Tablet:\", \"id\": \"P6\"},\n        {\"value\": 4, \"name\": \"Device Preference:\", \"id\": \"P6\"},\n        {\"value\": 0, \"name\": \"Tablet_First\", \"id\": \"P6\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P6\"},\n        {\"value\": \"P7\", \"name\": \"Participant ID\", \"id\": \"P7\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P7\"},\n        {\"value\": 3, \"name\": \"Fix Errors:\", \"id\": \"P7\"},\n        {\"value\": 4, \"name\": \"Easier to Fix:\", \"id\": \"P7\"},\n        {\"value\": 5, \"name\": \"Faster to Fix:\", \"id\": \"P7\"},\n        {\"value\": 3, \"name\": \"Easier on Phone:\", \"id\": \"P7\"},\n        {\"value\": 2, \"name\": \"Easier on Tablet:\", \"id\": \"P7\"},\n        {\"value\": 4, \"name\": \"Device Preference:\", \"id\": \"P7\"},\n        {\"value\": 0, \"name\": \"Tablet_First\", \"id\": \"P7\"},\n        {\"value\": 0, \"name\": \"Toolbar_First\", \"id\": \"P7\"},\n        {\"value\": \"P8\", \"name\": \"Participant ID\", \"id\": \"P8\"},\n        {\"value\": 3, \"name\": \"Identify Errors:\", \"id\": \"P8\"},\n        {\"value\": 1, \"name\": \"Fix Errors:\", \"id\": \"P8\"},\n        {\"value\": 2, \"name\": \"Easier to Fix:\", \"id\": \"P8\"},\n        {\"value\": 4, \"name\": \"Faster to Fix:\", \"id\": \"P8\"},\n        {\"value\": 2, \"name\": \"Easier on Phone:\", \"id\": \"P8\"},\n        {\"value\": 5, \"name\": \"Easier on Tablet:\", \"id\": \"P8\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P8\"},\n        {\"value\": 0, \"name\": \"Tablet_First\", \"id\": \"P8\"},\n        {\"value\": 0, \"name\": \"Toolbar_First\", \"id\": \"P8\"},\n        {\"value\": \"P9\", \"name\": \"Participant ID\", \"id\": \"P9\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P9\"},\n        {\"value\": 3, \"name\": \"Fix Errors:\", \"id\": \"P9\"},\n        {\"value\": 2, \"name\": \"Easier to Fix:\", \"id\": \"P9\"},\n        {\"value\": 4, \"name\": \"Faster to Fix:\", \"id\": \"P9\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P9\"},\n        {\"value\": 4, \"name\": \"Easier on Tablet:\", \"id\": \"P9\"},\n        {\"value\": 4, \"name\": \"Device Preference:\", \"id\": \"P9\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P9\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P9\"},\n        {\"value\": \"P10\", \"name\": \"Participant ID\", \"id\": \"P10\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P10\"},\n        {\"value\": 2, \"name\": \"Fix Errors:\", \"id\": \"P10\"},\n        {\"value\": 1, \"name\": \"Easier to Fix:\", \"id\": \"P10\"},\n        {\"value\": 1, \"name\": \"Faster to Fix:\", \"id\": \"P10\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P10\"},\n        {\"value\": 1, \"name\": \"Easier on Tablet:\", \"id\": \"P10\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P10\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P10\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P10\"},\n        {\"value\": \"P11\", \"name\": \"Participant ID\", \"id\": \"P11\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P11\"},\n        {\"value\": 2, \"name\": \"Fix Errors:\", \"id\": \"P11\"},\n        {\"value\": 1, \"name\": \"Easier to Fix:\", \"id\": \"P11\"},\n        {\"value\": 1, \"name\": \"Faster to Fix:\", \"id\": \"P11\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P11\"},\n        {\"value\": 1, \"name\": \"Easier on Tablet:\", \"id\": \"P11\"},\n        {\"value\": 4, \"name\": \"Device Preference:\", \"id\": \"P11\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P11\"},\n        {\"value\": 0, \"name\": \"Toolbar_First\", \"id\": \"P11\"},\n        {\"value\": \"P12\", \"name\": \"Participant ID\", \"id\": \"P12\"},\n        {\"value\": 1, \"name\": \"Identify Errors:\", \"id\": \"P12\"},\n        {\"value\": 3, \"name\": \"Fix Errors:\", \"id\": \"P12\"},\n        {\"value\": 2, \"name\": \"Easier to Fix:\", \"id\": \"P12\"},\n        {\"value\": 3, \"name\": \"Faster to Fix:\", \"id\": \"P12\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P12\"},\n        {\"value\": 3, \"name\": \"Easier on Tablet:\", \"id\": \"P12\"},\n        {\"value\": 3, \"name\": \"Device Preference:\", \"id\": \"P12\"},\n        {\"value\": 0, \"name\": \"Tablet_First\", \"id\": \"P12\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P12\"},\n        {\"value\": \"P13\", \"name\": \"Participant ID\", \"id\": \"P13\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P13\"},\n        {\"value\": 2, \"name\": \"Fix Errors:\", \"id\": \"P13\"},\n        {\"value\": 1, \"name\": \"Easier to Fix:\", \"id\": \"P13\"},\n        {\"value\": 1, \"name\": \"Faster to Fix:\", \"id\": \"P13\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P13\"},\n        {\"value\": 1, \"name\": \"Easier on Tablet:\", \"id\": \"P13\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P13\"},\n        {\"value\": 0, \"name\": \"Tablet_First\", \"id\": \"P13\"},\n        {\"value\": 0, \"name\": \"Toolbar_First\", \"id\": \"P13\"},\n        {\"value\": \"P14\", \"name\": \"Participant ID\", \"id\": \"P14\"},\n        {\"value\": 3, \"name\": \"Identify Errors:\", \"id\": \"P14\"},\n        {\"value\": 3, \"name\": \"Fix Errors:\", \"id\": \"P14\"},\n        {\"value\": 2, \"name\": \"Easier to Fix:\", \"id\": \"P14\"},\n        {\"value\": 2, \"name\": \"Faster to Fix:\", \"id\": \"P14\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P14\"},\n        {\"value\": 1, \"name\": \"Easier on Tablet:\", \"id\": \"P14\"},\n        {\"value\": 1, \"name\": \"Device Preference:\", \"id\": \"P14\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P14\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P14\"},\n        {\"value\": \"P15\", \"name\": \"Participant ID\", \"id\": \"P15\"},\n        {\"value\": 4, \"name\": \"Identify Errors:\", \"id\": \"P15\"},\n        {\"value\": 5, \"name\": \"Fix Errors:\", \"id\": \"P15\"},\n        {\"value\": 1, \"name\": \"Easier to Fix:\", \"id\": \"P15\"},\n        {\"value\": 1, \"name\": \"Faster to Fix:\", \"id\": \"P15\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P15\"},\n        {\"value\": 1, \"name\": \"Easier on Tablet:\", \"id\": \"P15\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P15\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P15\"},\n        {\"value\": 0, \"name\": \"Toolbar_First\", \"id\": \"P15\"},\n        {\"value\": \"P16\", \"name\": \"Participant ID\", \"id\": \"P16\"},\n        {\"value\": 1, \"name\": \"Identify Errors:\", \"id\": \"P16\"},\n        {\"value\": 3, \"name\": \"Fix Errors:\", \"id\": \"P16\"},\n        {\"value\": 2, \"name\": \"Easier to Fix:\", \"id\": \"P16\"},\n        {\"value\": 2, \"name\": \"Faster to Fix:\", \"id\": \"P16\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P16\"},\n        {\"value\": 4, \"name\": \"Easier on Tablet:\", \"id\": \"P16\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P16\"},\n        {\"value\": 0, \"name\": \"Tablet_First\", \"id\": \"P16\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P16\"},\n        {\"value\": \"P17\", \"name\": \"Participant ID\", \"id\": \"P17\"},\n        {\"value\": 3, \"name\": \"Identify Errors:\", \"id\": \"P17\"},\n        {\"value\": 2, \"name\": \"Fix Errors:\", \"id\": \"P17\"},\n        {\"value\": 2, \"name\": \"Easier to Fix:\", \"id\": \"P17\"},\n        {\"value\": 2, \"name\": \"Faster to Fix:\", \"id\": \"P17\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P17\"},\n        {\"value\": 3, \"name\": \"Easier on Tablet:\", \"id\": \"P17\"},\n        {\"value\": 2, \"name\": \"Device Preference:\", \"id\": \"P17\"},\n        {\"value\": 0, \"name\": \"Tablet_First\", \"id\": \"P17\"},\n        {\"value\": 0, \"name\": \"Toolbar_First\", \"id\": \"P17\"},\n    ]\n)\n\ny_axis = alt.Y(\n    \"name\",\n    axis=alt.Axis(\n        title=None,\n        offset=50,\n        labelFontWeight=\"bold\",\n        ticks=False,\n        grid=True,\n        domain=False,\n    ),\n)\n\nbase = alt.Chart(\n    medians,\n).encode(y_axis)\n\nbubbles = (\n    alt.Chart(values)\n    .transform_filter(\n        (alt.datum.name != \"Toolbar_First\")\n        & (alt.datum.name != \"Tablet_First\")\n        & (alt.datum.name != \"Participant ID\")\n    )\n    .mark_circle(color=\"#6EB4FD\")\n    .encode(\n        alt.X(\n            \"value:Q\",\n            title=None,\n        ),\n        y_axis,\n        alt.Size(\n            \"count()\",\n            legend=alt.Legend(offset=75, title=\"Number of ratings\"),\n        ),\n        tooltip=[alt.Tooltip(\"count()\", title=\"Number of ratings\")],\n    )\n)\n\nticks = base.mark_tick(color=\"black\").encode(\n    alt.X(\n        \"median:Q\",\n        axis=alt.Axis(grid=False, values=[1, 2, 3, 4, 5], format=\".0f\"),\n        scale=alt.Scale(domain=[0, 6]),\n    )\n)\n\n\ntexts_lo = base.mark_text(align=\"right\", x=-5).encode(text=\"lo\")\n\ntexts_hi = base.mark_text(align=\"left\", x=255).encode(text=\"hi\")\n\n(bubbles + ticks + texts_lo + texts_hi).properties(\n    title=\"Questionnaire Ratings\", width=250, height=175\n).configure_view(stroke=None)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/distributions_faceted_histogram.py",
    "content": "\"\"\"\nFaceted Histogram\n-----------------\nThis example shows how to make a basic faceted histogram,\nwith one histogram subplot for different subsets of the data.\n\nBased off the vega-lite example:\nhttps://vega.github.io/vega-lite/examples/trellis_bar_histogram.html\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\nalt.Chart(source).mark_bar().encode(\n    alt.X(\"Horsepower:Q\", bin=True),\n    y=\"count()\",\n    row=\"Origin\",\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/diverging_stacked_bar_chart.py",
    "content": "\"\"\"\nDiverging Stacked Bar Chart\n---------------------------\nThis example shows a diverging stacked bar chart for sentiments towards a set of eight questions, displayed as percentages with neutral responses straddling the 0% mark.\n\"\"\"\n# category: bar charts\nimport altair as alt\nimport pandas as pd\n\n\nsource = pd.DataFrame(\n    [\n        {\n            \"question\": \"Question 1\",\n            \"type\": \"Strongly disagree\",\n            \"value\": 24,\n        },\n        {\n            \"question\": \"Question 1\",\n            \"type\": \"Disagree\",\n            \"value\": 294,\n        },\n        {\n            \"question\": \"Question 1\",\n            \"type\": \"Neither agree nor disagree\",\n            \"value\": 594,\n        },\n        {\n            \"question\": \"Question 1\",\n            \"type\": \"Agree\",\n            \"value\": 1927,\n        },\n        {\n            \"question\": \"Question 1\",\n            \"type\": \"Strongly agree\",\n            \"value\": 376,\n        },\n        {\n            \"question\": \"Question 2\",\n            \"type\": \"Strongly disagree\",\n            \"value\": 2,\n        },\n        {\n            \"question\": \"Question 2\",\n            \"type\": \"Disagree\",\n            \"value\": 2,\n        },\n        {\n            \"question\": \"Question 2\",\n            \"type\": \"Neither agree nor disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 2\",\n            \"type\": \"Agree\",\n            \"value\": 7,\n        },\n        {\n            \"question\": \"Question 2\",\n            \"type\": \"Strongly agree\",\n            \"value\": 11,\n        },\n        {\n            \"question\": \"Question 3\",\n            \"type\": \"Strongly disagree\",\n            \"value\": 2,\n        },\n        {\n            \"question\": \"Question 3\",\n            \"type\": \"Disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 3\",\n            \"type\": \"Neither agree nor disagree\",\n            \"value\": 2,\n        },\n        {\n            \"question\": \"Question 3\",\n            \"type\": \"Agree\",\n            \"value\": 4,\n        },\n        {\n            \"question\": \"Question 3\",\n            \"type\": \"Strongly agree\",\n            \"value\": 2,\n        },\n        {\n            \"question\": \"Question 4\",\n            \"type\": \"Strongly disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 4\",\n            \"type\": \"Disagree\",\n            \"value\": 2,\n        },\n        {\n            \"question\": \"Question 4\",\n            \"type\": \"Neither agree nor disagree\",\n            \"value\": 1,\n        },\n        {\n            \"question\": \"Question 4\",\n            \"type\": \"Agree\",\n            \"value\": 7,\n        },\n        {\n            \"question\": \"Question 4\",\n            \"type\": \"Strongly agree\",\n            \"value\": 6,\n        },\n        {\n            \"question\": \"Question 5\",\n            \"type\": \"Strongly disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 5\",\n            \"type\": \"Disagree\",\n            \"value\": 1,\n        },\n        {\n            \"question\": \"Question 5\",\n            \"type\": \"Neither agree nor disagree\",\n            \"value\": 3,\n        },\n        {\n            \"question\": \"Question 5\",\n            \"type\": \"Agree\",\n            \"value\": 16,\n        },\n        {\n            \"question\": \"Question 5\",\n            \"type\": \"Strongly agree\",\n            \"value\": 4,\n        },\n        {\n            \"question\": \"Question 6\",\n            \"type\": \"Strongly disagree\",\n            \"value\": 1,\n        },\n        {\n            \"question\": \"Question 6\",\n            \"type\": \"Disagree\",\n            \"value\": 1,\n        },\n        {\n            \"question\": \"Question 6\",\n            \"type\": \"Neither agree nor disagree\",\n            \"value\": 2,\n        },\n        {\n            \"question\": \"Question 6\",\n            \"type\": \"Agree\",\n            \"value\": 9,\n        },\n        {\n            \"question\": \"Question 6\",\n            \"type\": \"Strongly agree\",\n            \"value\": 3,\n        },\n        {\n            \"question\": \"Question 7\",\n            \"type\": \"Strongly disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 7\",\n            \"type\": \"Disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 7\",\n            \"type\": \"Neither agree nor disagree\",\n            \"value\": 1,\n        },\n        {\n            \"question\": \"Question 7\",\n            \"type\": \"Agree\",\n            \"value\": 4,\n        },\n        {\n            \"question\": \"Question 7\",\n            \"type\": \"Strongly agree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 8\",\n            \"type\": \"Strongly disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 8\",\n            \"type\": \"Disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 8\",\n            \"type\": \"Neither agree nor disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 8\",\n            \"type\": \"Agree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 8\",\n            \"type\": \"Strongly agree\",\n            \"value\": 2,\n        },\n    ]\n)\n\n\n# Add type_code that we can sort by\nsource[\"type_code\"] = source[\"type\"].map(\n    {\n        \"Strongly disagree\": -2,\n        \"Disagree\": -1,\n        \"Neither agree nor disagree\": 0,\n        \"Agree\": 1,\n        \"Strongly agree\": 2,\n    }\n)\n\n\ndef compute_percentages(\n    group,\n):\n    # Set type_code as index and sort\n    group = group.set_index(\"type_code\").sort_index()\n\n    # Compute percentage of value with question group\n    perc = (group[\"value\"] / group[\"value\"].sum()) * 100\n    group[\"percentage\"] = perc\n\n    # Compute percentage end, centered on \"Neither agree nor disagree\" (type_code 0)\n    # Note that we access the perc series via index which is based on 'type_code'.\n    group[\"percentage_end\"] = perc.cumsum() - (perc[-2] + perc[-1] + perc[0] / 2)\n\n    # Compute percentage start by subtracting percent\n    group[\"percentage_start\"] = group[\"percentage_end\"] - perc\n\n    return group\n\n\nsource = source.groupby(\"question\").apply(compute_percentages).reset_index(drop=True)\n\ncolor_scale = alt.Scale(\n    domain=[\n        \"Strongly disagree\",\n        \"Disagree\",\n        \"Neither agree nor disagree\",\n        \"Agree\",\n        \"Strongly agree\",\n    ],\n    range=[\"#c30d24\", \"#f3a583\", \"#cccccc\", \"#94c6da\", \"#1770ab\"],\n)\n\ny_axis = alt.Axis(title=\"Question\", offset=5, ticks=False, minExtent=60, domain=False)\n\nalt.Chart(source).mark_bar().encode(\n    x=\"percentage_start:Q\",\n    x2=\"percentage_end:Q\",\n    y=alt.Y(\"question:N\", axis=y_axis),\n    color=alt.Color(\n        \"type:N\",\n        legend=alt.Legend(title=\"Response\"),\n        scale=color_scale,\n    ),\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/donut_chart.py",
    "content": "\"\"\"\nDonut Chart\n-----------\nThis example shows how to make a Donut Chart using ``mark_arc``.\nThis is adapted from a corresponding Vega-Lite Example:\n`Donut Chart <https://vega.github.io/vega-lite/examples/arc_donut.html>`_.\n\"\"\"\n# category: circular plots\n\nimport pandas as pd\nimport altair as alt\n\nsource = pd.DataFrame({\"category\": [1, 2, 3, 4, 5, 6], \"value\": [4, 6, 10, 3, 7, 8]})\n\nalt.Chart(source).mark_arc(innerRadius=50).encode(\n    theta=alt.Theta(field=\"value\", type=\"quantitative\"),\n    color=alt.Color(field=\"category\", type=\"nominal\"),\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/dot_dash_plot.py",
    "content": "\"\"\"\nDot Dash Plot\n=============\nHow to make the dot-dash plot presented in Edward Tufte's `Visual Display of Quantitative Information <https://www.edwardtufte.com/tufte/books_vdqi>`_. Based\non a JavaScript implementation by `g3o2 <https://bl.ocks.org/g3o2/bd4362574137061c243a2994ba648fb8>`_.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\n# Configure the options common to all layers\nbrush = alt.selection_interval()\nbrush_origin = alt.when(brush).then(\"Origin\")\nbase = alt.Chart(source).add_params(brush)\n\n# Configure the points\npoints = base.mark_point().encode(\n    x=alt.X('Miles_per_Gallon', title=''),\n    y=alt.Y('Horsepower', title=''),\n    color=brush_origin.otherwise(alt.value(\"grey\")),\n)\n\n# Configure the ticks\ntick_axis = alt.Axis(labels=False, domain=False, ticks=False)\ntick_color = brush_origin.otherwise(alt.value(\"lightgrey\"))\n\nx_ticks = base.mark_tick().encode(\n    alt.X('Miles_per_Gallon', axis=tick_axis),\n    alt.Y('Origin', title='', axis=tick_axis),\n    color=tick_color\n)\n\ny_ticks = base.mark_tick().encode(\n    alt.X('Origin', title='', axis=tick_axis),\n    alt.Y('Horsepower', axis=tick_axis),\n    color=tick_color\n)\n\n# Build the chart\ny_ticks | (points & x_ticks)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/empirical_cumulative_distribution_function.py",
    "content": "\"\"\"\nEmpirical Cumulative Distribution Function\n------------------------------------------\nThis example shows an empirical cumulative distribution function.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\nalt.Chart(source).transform_window(\n    ecdf=\"cume_dist()\",\n    sort=[{\"field\": \"IMDB Rating\"}],\n).mark_line(\n    interpolate=\"step-after\"\n).encode(\n    x=\"IMDB Rating:Q\",\n    y=\"ecdf:Q\"\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/errorbars_with_ci.py",
    "content": "\"\"\"\nError Bars with Confidence Interval\n======================================\nThis example shows how to show error bars using confidence intervals.\nThe confidence intervals are computed internally in vega by a non-parametric\n`bootstrap of the mean <https://github.com/vega/vega-statistics/blob/master/src/bootstrapCI.js>`_.\n\"\"\"\n# category: uncertainties and trends\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nerror_bars = alt.Chart(source).mark_errorbar(extent='ci').encode(\n  x=alt.X('yield:Q', scale=alt.Scale(zero=False)),\n  y=alt.Y('variety:N')\n)\n\npoints = alt.Chart(source).mark_point(filled=True, color='black').encode(\n  x=alt.X('yield:Q', aggregate='mean'),\n  y=alt.Y('variety:N'),\n)\n\nerror_bars + points\n"
  },
  {
    "path": "tests/examples_arguments_syntax/errorbars_with_std.py",
    "content": "\"\"\"\nError Bars with Standard Deviation\n----------------------------------\nThis example shows how to show error bars with standard deviation using crop yields data of different\nin the years of 1930s.\n\"\"\"\n# category: uncertainties and trends\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nerror_bars = alt.Chart(source).mark_errorbar(extent='stdev').encode(\n  x=alt.X('yield:Q', scale=alt.Scale(zero=False)),\n  y=alt.Y('variety:N')\n)\n\npoints = alt.Chart(source).mark_point(filled=True, color='black').encode(\n  x=alt.X('yield:Q', aggregate='mean'),\n  y=alt.Y('variety:N'),\n)\n\nerror_bars + points\n"
  },
  {
    "path": "tests/examples_arguments_syntax/falkensee.py",
    "content": "\"\"\"\nPopulation of Falkensee from 1875 to 2014\n-----------------------------------------\nThis example is a reproduction of the Falkensee plot found in the Vega-Lite examples.\n\"\"\"\n# category: case studies\nimport altair as alt\nimport pandas as pd\n\nsource = [\n    {\"year\": \"1875\", \"population\": 1309},\n    {\"year\": \"1890\", \"population\": 1558},\n    {\"year\": \"1910\", \"population\": 4512},\n    {\"year\": \"1925\", \"population\": 8180},\n    {\"year\": \"1933\", \"population\": 15915},\n    {\"year\": \"1939\", \"population\": 24824},\n    {\"year\": \"1946\", \"population\": 28275},\n    {\"year\": \"1950\", \"population\": 29189},\n    {\"year\": \"1964\", \"population\": 29881},\n    {\"year\": \"1971\", \"population\": 26007},\n    {\"year\": \"1981\", \"population\": 24029},\n    {\"year\": \"1985\", \"population\": 23340},\n    {\"year\": \"1989\", \"population\": 22307},\n    {\"year\": \"1990\", \"population\": 22087},\n    {\"year\": \"1991\", \"population\": 22139},\n    {\"year\": \"1992\", \"population\": 22105},\n    {\"year\": \"1993\", \"population\": 22242},\n    {\"year\": \"1994\", \"population\": 22801},\n    {\"year\": \"1995\", \"population\": 24273},\n    {\"year\": \"1996\", \"population\": 25640},\n    {\"year\": \"1997\", \"population\": 27393},\n    {\"year\": \"1998\", \"population\": 29505},\n    {\"year\": \"1999\", \"population\": 32124},\n    {\"year\": \"2000\", \"population\": 33791},\n    {\"year\": \"2001\", \"population\": 35297},\n    {\"year\": \"2002\", \"population\": 36179},\n    {\"year\": \"2003\", \"population\": 36829},\n    {\"year\": \"2004\", \"population\": 37493},\n    {\"year\": \"2005\", \"population\": 38376},\n    {\"year\": \"2006\", \"population\": 39008},\n    {\"year\": \"2007\", \"population\": 39366},\n    {\"year\": \"2008\", \"population\": 39821},\n    {\"year\": \"2009\", \"population\": 40179},\n    {\"year\": \"2010\", \"population\": 40511},\n    {\"year\": \"2011\", \"population\": 40465},\n    {\"year\": \"2012\", \"population\": 40905},\n    {\"year\": \"2013\", \"population\": 41258},\n    {\"year\": \"2014\", \"population\": 41777},\n]\n\nsource2 = [\n    {\"start\": \"1933\", \"end\": \"1945\", \"event\": \"Nazi Rule\"},\n    {\"start\": \"1948\", \"end\": \"1989\", \"event\": \"GDR (East Germany)\"},\n]\n\n\nsource_df = pd.DataFrame(source)\nsource2_df = pd.DataFrame(source2)\n\n\nline = alt.Chart(source_df).mark_line(color=\"#333\").encode(\n    x=alt.X(\"year:T\", axis=alt.Axis(format=\"%Y\"), title=\"Year\"),\n    y=alt.Y(\"population\", title=\"Population\"),\n)\n\npoint = line.mark_point(color=\"#333\")\n\nrect = alt.Chart(source2_df).mark_rect().encode(\n    x=\"start:T\",\n    x2=\"end:T\",\n    color=alt.Color(\"event:N\", title=\"Event\")\n)\n\n(rect + line + point).properties(\n    title=\"Population of Falkensee from 1875 to 2014\",\n    width=500,\n    height=300\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/filled_step_chart.py",
    "content": "\"\"\"\nFilled Step Chart\n-----------------\nThis example shows Google's stock price over time as a step chart with its area filled in and its line emphasized.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.stocks()\n\nalt.Chart(source).mark_area(\n    color=\"lightblue\",\n    interpolate='step-after',\n    line=True\n).encode(\n    x='date',\n    y='price'\n).transform_filter(alt.datum.symbol == 'GOOG')\n"
  },
  {
    "path": "tests/examples_arguments_syntax/gantt_chart.py",
    "content": "\"\"\"\nGantt Chart\n-----------------\nThis example shows how to make a simple Gantt chart.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame([\n    {\"task\": \"A\", \"start\": 1, \"end\": 3},\n    {\"task\": \"B\", \"start\": 3, \"end\": 8},\n    {\"task\": \"C\", \"start\": 8, \"end\": 10}\n])\n\nalt.Chart(source).mark_bar().encode(\n    x='start',\n    x2='end',\n    y='task'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/gapminder_bubble_plot.py",
    "content": "\"\"\"\nGapminder Bubble Plot\n=====================\nThis example shows how to make a bubble plot showing the correlation between\nhealth and income for 187 countries in the world (modified from an example\nin Lisa Charlotte Rost's blog post `'One Chart, Twelve Charting Libraries' <http://lisacharlotterost.github.io/2016/05/17/one-chart-code/>`_.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.gapminder_health_income.url\n\nalt.Chart(source).mark_circle().encode(\n    alt.X('income:Q', scale=alt.Scale(type='log')),\n    alt.Y('health:Q', scale=alt.Scale(zero=False)),\n    size='population:Q'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/groupby-map.py",
    "content": "\"\"\"\nGrouped Points with Proportional Symbols Map\n============================================\nThis is a layered geographic visualization that groups points by state.\n\"\"\"\n# category: maps\nimport altair as alt\nfrom altair.datasets import data\n\nairports = data.airports.url\nstates = alt.topo_feature(data.us_10m.url, feature='states')\n\n# US states background\nbackground = alt.Chart(states).mark_geoshape(\n    fill='lightgray',\n    stroke='white'\n).properties(\n    width=500,\n    height=300\n).project('albersUsa')\n\n# Airports grouped by state\npoints = alt.Chart(airports).transform_aggregate(\n    latitude='mean(latitude)',\n    longitude='mean(longitude)',\n    count='count()',\n    groupby=['state']\n).mark_circle().encode(\n    longitude='longitude:Q',\n    latitude='latitude:Q',\n    size=alt.Size('count:Q', title='Number of Airports'),\n    color=alt.value('steelblue'),\n    tooltip=['state:N','count:Q']\n).properties(\n    title='Number of airports in US'\n)\n\nbackground + points\n"
  },
  {
    "path": "tests/examples_arguments_syntax/grouped_bar_chart.py",
    "content": "\"\"\"\nGrouped Bar Chart\n-----------------\nThis example shows a grouped bar chart.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nalt.Chart(source).mark_bar().encode(\n    x='year:O',\n    y='sum(yield):Q',\n    color='year:N',\n    column='site:N'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/grouped_bar_chart2.py",
    "content": "\"\"\"\nGrouped Bar Chart with xOffset\n------------------------------\nLike :ref:`gallery_grouped_bar_chart`, this example shows a grouped bar chart.  Whereas :ref:`gallery_grouped_bar_chart` used the ``column`` encoding channel, this example uses the ``xOffset`` encoding channel.  This is adapted from a corresponding Vega-Lite Example:\n`Grouped Bar Chart <https://vega.github.io/vega-lite/examples/bar_grouped.html>`_.\n\"\"\"\n# category: bar charts\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame({\"Category\":list(\"AAABBBCCC\"),\n                     \"Group\":list(\"xyzxyzxyz\"),\n                     \"Value\":[0.1, 0.6, 0.9, 0.7, 0.2, 1.1, 0.6, 0.1, 0.2]})\n\nalt.Chart(source).mark_bar().encode(\n    x=\"Category:N\",\n    y=\"Value:Q\",\n    xOffset=\"Group:N\",\n    color=\"Group:N\"\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/grouped_bar_chart_horizontal.py",
    "content": "\"\"\"\nHorizontal Grouped Bar Chart\n----------------------------\nThis example shows a horizontal grouped bar chart.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nalt.Chart(source).mark_bar().encode(\n    x='sum(yield):Q',\n    y='year:O',\n    color='year:N',\n    row='site:N'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/grouped_bar_chart_overlapping_bars.py",
    "content": "\"\"\"\nGrouped Bar Chart with xOffset and overlapping bars\n---------------------------------------------------\nLike :ref:`gallery_grouped_bar_chart2`, this example shows a grouped bar chart using the ``xOffset`` encoding channel, but in this example the bars are partly overlapping within each group.\n\"\"\"\n# category: bar charts\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame(\n    {\n        \"category\": list(\"AABBCC\"),\n        \"group\": list(\"xyxyxy\"),\n        \"value\": [0.1, 0.6, 0.7, 0.2, 0.6, 0.1],\n    }\n)\n\nbase = alt.Chart(source, width=alt.Step(12)).encode(\n    x=\"category:N\",\n    y=\"value:Q\",\n    xOffset=alt.XOffset(\"group:N\", scale=alt.Scale(paddingOuter=0.5)),\n)\n\nalt.layer(\n    base.mark_bar(size=20, stroke=\"white\", fillOpacity=0.9).encode(fill=\"group:N\"),\n    base.mark_text(dy=-5).encode(text=\"value:Q\"),\n)"
  },
  {
    "path": "tests/examples_arguments_syntax/grouped_bar_chart_with_error_bars.py",
    "content": "\"\"\"\nGrouped Bar Chart with Error Bars\n---------------------------------\nThis example shows a grouped bar chart with error bars.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nbars = alt.Chart().mark_bar().encode(\n    x='year:O',\n    y=alt.Y('mean(yield):Q', title='Mean Yield'),\n    color='year:N',\n)\n\nerror_bars = alt.Chart().mark_errorbar(extent='ci').encode(\n    x='year:O',\n    y='yield:Q'\n)\n\nalt.layer(bars, error_bars, data=source).facet(\n    column='site:N'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/heat_lane.py",
    "content": "\"\"\"\nHeat Lane Chart\n---------------\nThis example shows how to make an alternative form of a histogram `designed at Google <https://www.smashingmagazine.com/2022/07/accessibility-first-approach-chart-visual-design/>`_ with the goal of increasing accessibility.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars.url\n\nchart = alt.Chart(source, title=\"Car horsepower\", height=100, width=300).encode(\n    x=alt.X(\n        \"bin_Horsepower_start:Q\",\n        title=\"Horsepower\",\n        axis=alt.Axis(grid=False)\n    ),\n    x2=\"bin_Horsepower_end:Q\",\n    y=alt.Y(\"y:O\", axis=None),\n    y2=\"y2\",\n).transform_bin(\n    [\"bin_Horsepower_start\", \"bin_Horsepower_end\"],\n    field='Horsepower'\n).transform_aggregate(\n    count='count()',\n    groupby=[\"bin_Horsepower_start\", \"bin_Horsepower_end\"]\n).transform_bin(\n    [\"bin_count_start\", \"bin_count_end\"],\n    field='count'\n).transform_calculate(\n    y=\"datum.bin_count_end/2\",\n    y2=\"-datum.bin_count_end/2\",\n).transform_joinaggregate(\n    max_bin_count_end=\"max(bin_count_end)\",\n)\n\nlayer1 = chart.mark_bar(xOffset=1, x2Offset=-1, cornerRadius=3).encode(\n    color=alt.Color(\"max_bin_count_end:O\", scale=alt.Scale(scheme=\"lighttealblue\"), title=\"Number of models\")\n)\nlayer2 = chart.mark_bar(xOffset=1, x2Offset=-1, yOffset=-3, y2Offset=3).encode(\n    color=alt.Color(\"bin_count_end:O\", title=\"Number of models\")\n)\n\nlayer1 + layer2\n"
  },
  {
    "path": "tests/examples_arguments_syntax/hexbins.py",
    "content": "\"\"\"\nHexbin Chart\n------------\nThis example shows a hexbin chart.\n\"\"\"\n# category: tables\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather()\n\n# Size of the hexbins\nsize = 15\n# Count of distinct x features\nxFeaturesCount = 12\n# Count of distinct y features\nyFeaturesCount = 7\n# Name of the x field\nxField = 'date'\n# Name of the y field\nyField = 'date'\n\n# the shape of a hexagon\nhexagon = \"M0,-2.3094010768L2,-1.1547005384 2,1.1547005384 0,2.3094010768 -2,1.1547005384 -2,-1.1547005384Z\"\n\nalt.Chart(source).mark_point(size=size**2, shape=hexagon).encode(\n    x=alt.X('xFeaturePos:Q', axis=alt.Axis(title='Month',\n                                           grid=False, tickOpacity=0, domainOpacity=0)),\n    y=alt.Y('day(' + yField + '):O', axis=alt.Axis(title='Weekday',\n                                                   labelPadding=20, tickOpacity=0, domainOpacity=0)),\n    stroke=alt.value('black'),\n    strokeWidth=alt.value(0.2),\n    fill=alt.Fill('mean(temp_max):Q', scale=alt.Scale(scheme='darkblue')),\n    tooltip=['month(' + xField + '):O', 'day(' + yField + '):O', 'mean(temp_max):Q']\n).transform_calculate(\n    # This field is required for the hexagonal X-Offset\n    xFeaturePos='(day(datum.' + yField + ') % 2) / 2 + month(datum.' + xField + ')'\n).properties(\n    # Exact scaling factors to make the hexbins fit\n    width=size * xFeaturesCount * 2,\n    height=size * yFeaturesCount * 1.7320508076,  # 1.7320508076 is approx. sin(60°)*2\n).configure_view(\n    strokeWidth=0\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/histogram_gradient_color.py",
    "content": "\"\"\"\nHistogram with Gradient Color\n-----------------------------\nThis example shows how to make a histogram with gradient color. \nThe low-high IMDB rating is represented with the color scheme `pinkyellowgreen`.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\nalt.Chart(source).mark_bar().encode(\n    alt.X(\"IMDB Rating:Q\", \n        bin=alt.Bin(maxbins=20), \n        scale=alt.Scale(domain=[1, 10])\n    ),\n    alt.Y('count()'),\n    alt.Color(\"IMDB Rating:Q\", \n        bin=alt.Bin(maxbins=20), \n        scale=alt.Scale(scheme='pinkyellowgreen')\n    )\n)"
  },
  {
    "path": "tests/examples_arguments_syntax/histogram_heatmap.py",
    "content": "\"\"\"\n2D Histogram Heatmap\n--------------------\nThis example shows how to make a heatmap from binned quantitative data.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\nalt.Chart(source).mark_rect().encode(\n    alt.X('IMDB Rating:Q', bin=alt.Bin(maxbins=60)),\n    alt.Y('Rotten Tomatoes Rating:Q', bin=alt.Bin(maxbins=40)),\n    alt.Color('count():Q', scale=alt.Scale(scheme='greenblue'))\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/histogram_responsive.py",
    "content": "\"\"\"\nHistogram with Responsive Bins\n------------------------------\nThis shows an example of a histogram with bins that are responsive to a\nselection domain. Click and drag on the bottom panel to see the bins\nchange on the top panel.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.flights_5k.url\n\nbrush = alt.selection_interval(encodings=['x'])\n\nbase = alt.Chart(source).transform_calculate(\n    time=\"hours(datum.date) + minutes(datum.date) / 60\"\n).mark_bar().encode(\n    y='count():Q'\n).properties(\n    width=600,\n    height=100\n)\n\nalt.vconcat(\n  base.encode(\n    alt.X('time:Q',\n      bin=alt.Bin(maxbins=30, extent=brush),\n      scale=alt.Scale(domain=brush)\n    )\n  ),\n  base.encode(\n    alt.X('time:Q', bin=alt.Bin(maxbins=30)),\n  ).add_params(brush)\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/histogram_scatterplot.py",
    "content": "\"\"\"\n2D Histogram Scatter Plot\n-------------------------\nThis example shows how to make a 2d histogram scatter plot.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\nalt.Chart(source).mark_circle().encode(\n    alt.X('IMDB Rating:Q', bin=True),\n    alt.Y('Rotten Tomatoes Rating:Q', bin=True),\n    size='count()'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/histogram_with_a_global_mean_overlay.py",
    "content": "\"\"\"\nHistogram with a Global Mean Overlay\n------------------------------------\nThis example shows a histogram with a global mean overlay.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\nbase = alt.Chart(source)\n\nbar = base.mark_bar().encode(\n    x=alt.X('IMDB Rating:Q', bin=True, axis=None),\n    y='count()'\n)\n\nrule = base.mark_rule(color='red').encode(\n    x='mean(IMDB Rating):Q',\n    size=alt.value(5)\n)\n\nbar + rule\n"
  },
  {
    "path": "tests/examples_arguments_syntax/horizon_graph.py",
    "content": "\"\"\"\nHorizon Graph\n-------------\nThis example shows how to make a Horizon Graph with 2 layers. (See https://idl.cs.washington.edu/papers/horizon/ for more details on Horizon Graphs.)\n\"\"\"\n# category: area charts\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame([\n    {\"x\": 1,  \"y\": 28}, {\"x\": 2,  \"y\": 55},\n    {\"x\": 3,  \"y\": 43}, {\"x\": 4,  \"y\": 91},\n    {\"x\": 5,  \"y\": 81}, {\"x\": 6,  \"y\": 53},\n    {\"x\": 7,  \"y\": 19}, {\"x\": 8,  \"y\": 87},\n    {\"x\": 9,  \"y\": 52}, {\"x\": 10, \"y\": 48},\n    {\"x\": 11, \"y\": 24}, {\"x\": 12, \"y\": 49},\n    {\"x\": 13, \"y\": 87}, {\"x\": 14, \"y\": 66},\n    {\"x\": 15, \"y\": 17}, {\"x\": 16, \"y\": 27},\n    {\"x\": 17, \"y\": 68}, {\"x\": 18, \"y\": 16},\n    {\"x\": 19, \"y\": 49}, {\"x\": 20, \"y\": 15}\n])\n\narea1 = alt.Chart(source).mark_area(\n    clip=True,\n    interpolate='monotone'\n).encode(\n    alt.X('x', scale=alt.Scale(zero=False, nice=False)),\n    alt.Y('y', scale=alt.Scale(domain=[0, 50]), title='y'),\n    opacity=alt.value(0.6)\n).properties(\n    width=500,\n    height=75\n)\n\narea2 = area1.encode(\n    alt.Y('ny:Q', scale=alt.Scale(domain=[0, 50]))\n).transform_calculate(\n    \"ny\", alt.datum.y - 50\n)\n\narea1 + area2\n"
  },
  {
    "path": "tests/examples_arguments_syntax/horizontal_stacked_bar_chart.py",
    "content": "\"\"\"\nHorizontal Stacked Bar Chart\n============================\nThis is an example of a horizontal stacked bar chart using data which contains crop yields over different regions and different years in the 1930s.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nalt.Chart(source).mark_bar().encode(\n    x='sum(yield)',\n    y='variety',\n    color='site'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/interactive_aggregation.py",
    "content": "\"\"\"\nInteractive Chart with Aggregation\n==================================\nThis example shows an interactive chart where the range binder controls a\nthreshold as rule where the datapoints on the left-side are aggregated and on the\nright-side are drawn as is. \nThe ability to slide back and fourth may help you understand how the visualization\nrepresents the aggregation. Adapted from an example by @dwootton.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\nslider = alt.binding_range(min=0, max=10, step=0.1)\nthreshold = alt.param(name=\"threshold\", value=5, bind=slider)\n\nalt.layer(\n    alt.Chart(source).mark_circle().encode(\n        x=alt.X(\"IMDB Rating:Q\", title=\"IMDB Rating\"),\n        y=alt.Y(\"Rotten Tomatoes Rating:Q\", title=\"Rotten Tomatoes Rating\")\n    ).transform_filter(\n        alt.datum[\"IMDB Rating\"] >= threshold\n    ),\n\n    alt.Chart(source).mark_circle().encode(\n        x=alt.X(\"IMDB Rating:Q\", bin=alt.Bin(maxbins=10)),\n        y=alt.Y(\"Rotten Tomatoes Rating:Q\", bin=alt.Bin(maxbins=10)),\n        size=alt.Size(\"count():Q\", scale=alt.Scale(domain=[0,160]))\n    ).transform_filter(\n        alt.datum[\"IMDB Rating\"] < threshold\n    ),\n\n    alt.Chart().mark_rule(color=\"gray\").encode(\n        strokeWidth=alt.StrokeWidth(value=6),\n        x=alt.X(datum=alt.expr(threshold.name), type=\"quantitative\")\n    )\n).add_params(threshold)"
  },
  {
    "path": "tests/examples_arguments_syntax/interactive_bar_select_highlight.py",
    "content": "\"\"\"\nBar Chart with Highlighting on Hover and Selection on Click\n-----------------------------------------------------------\nThis example shows a bar chart with highlighting on hover and selecting on click. (Inspired by Tableau's interaction style.)\n\nBased on https://vega.github.io/vega-lite/examples/interactive_bar_select_highlight.html\n\"\"\"\n\n# category: interactive charts\nimport altair as alt\n\nsource = {\n    \"values\": [\n        {\"a\": \"A\", \"b\": 28},\n        {\"a\": \"B\", \"b\": 55},\n        {\"a\": \"C\", \"b\": 43},\n        {\"a\": \"D\", \"b\": 91},\n        {\"a\": \"E\", \"b\": 81},\n        {\"a\": \"F\", \"b\": 53},\n        {\"a\": \"G\", \"b\": 19},\n        {\"a\": \"H\", \"b\": 87},\n        {\"a\": \"I\", \"b\": 52},\n    ]\n}\n\nselect = alt.selection_point(name=\"select\", on=\"click\")\nhighlight = alt.selection_point(name=\"highlight\", on=\"pointerover\", empty=False)\n\nstroke_width = (\n    alt.when(select).then(alt.value(2, empty=False))\n    .when(highlight).then(alt.value(1))\n    .otherwise(alt.value(0))\n)\n\n\nalt.Chart(\n    source,\n    height=200,\n    config=alt.Config(scale=alt.ScaleConfig(bandPaddingInner=0.2)),\n).mark_bar(fill=\"#4C78A8\", stroke=\"black\", cursor=\"pointer\").encode(\n    x=\"a:O\",\n    y=\"b:Q\",\n    fillOpacity=alt.when(select).then(alt.value(1)).otherwise(alt.value(0.3)),\n    strokeWidth=stroke_width,\n).add_params(select, highlight)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/interactive_brush.py",
    "content": "\"\"\"\nInteractive Rectangular Brush\n=============================\nThis example shows how to add a simple rectangular brush to a scatter plot.\nBy clicking and dragging on the plot, you can highlight points within the\nrange.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\nbrush = alt.selection_interval()\n\nalt.Chart(source).mark_point().encode(\n    x='Horsepower:Q',\n    y='Miles_per_Gallon:Q',\n    color=alt.when(brush).then(\"Cylinders:O\").otherwise(alt.value(\"grey\")),\n).add_params(brush)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/interactive_column_selection.py",
    "content": "\"\"\"\nInteractive Selection of Columns\n================================\nThis example shows how columns can be selected interactively\nby accessing the values from selector widgets,\nand then compute the difference of the selected columns.\nIt also illustrates how to use `indexof` to filter\ncolumns based on active selection values.\n\"\"\"\n# category: interactive charts\n\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\n\n# Create timeseries data\nrng = np.random.default_rng(905)\nex_ts = pd.DataFrame(\n    rng.random((10, 4)),\n    columns=['a', 'b', 'c', 'd'],\n).assign(\n    date=pd.date_range(\n        start=pd.to_datetime('2022-02-22')-pd.Timedelta(9, unit='D'),\n        end=pd.to_datetime('2022-02-22')).strftime('%Y-%m-%d'),\n)\n\n# Create heatmap with selection\nselect_x = alt.selection_point(fields=['level_0'], name='select_x', value='b')\nselect_y = alt.selection_point(fields=['level_1'], name='select_y', value='d')\nheatmap = alt.Chart(\n    ex_ts.drop(columns='date').corr().stack().reset_index().rename(columns={0: 'correlation'}),\n    title='Click a tile to compare timeseries',\n    height=250,\n    width=250,\n).mark_rect().encode(\n    alt.X('level_0', title=None),\n    alt.Y('level_1', title=None),\n    alt.Color('correlation', scale=alt.Scale(domain=[-1, 1], scheme='blueorange')),\n    opacity=alt.when(select_x, select_y).then(alt.value(1)).otherwise(alt.value(0.4)),\n).add_params(\n    select_x, select_y\n)\n\n# Create chart with individual lines/timeseries\nbase = alt.Chart(\n    ex_ts.melt(\n        id_vars='date',\n        var_name='category',\n        value_name='value',\n    ),\n    height=100,\n    width=300,\n    title='Individual timeseries',\n)\nlines = base.transform_filter(\n    # If the category is not in the selected values, the returned index is -1\n    'indexof(datum.category, select_x.level_0) !== -1'\n   '| indexof(datum.category, select_y.level_1) !== -1'\n).mark_line().encode(\n    alt.X('date:T', axis=alt.Axis(labels=False), title=None),\n    alt.Y('value', scale=alt.Scale(domain=(0, 1))),\n    alt.Color('category', legend=alt.Legend(orient='top', offset=-20), title=None)\n)\n\n# Create chart with difference between lines/timeseries\ndynamic_title = alt.Title(alt.expr(f'\"Difference \" + {select_x.name}.level_0 + \" - \" + {select_y.name}.level_1'))\n# We pivot transform to get each category as a column\nlines_diff = base.transform_pivot(\n    'category', 'value', groupby=['date']\n# In the calculate transform we use the values from the selection to subset the columns to subtract\n).transform_calculate(\n    difference = f'datum[{select_x.name}.level_0] - datum[{select_y.name}.level_1]'\n).mark_line(color='grey').encode(\n    alt.X('date:T', axis=alt.Axis(format='%Y-%m-%d'), title=None),\n    alt.Y('difference:Q', scale=alt.Scale(domain=(-1, 1))),\n).properties(\n    title=dynamic_title\n)\n\n# Layout the charts\n(lines & lines_diff) | heatmap\n"
  },
  {
    "path": "tests/examples_arguments_syntax/interactive_cross_highlight.py",
    "content": "\"\"\"\nInteractive Chart with Cross-Highlight\n======================================\nThis example shows an interactive chart where selections in one portion of\nthe chart affect what is shown in other panels. Click on the bar chart to\nsee a detail of the distribution in the upper panel.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\npts = alt.selection_point(encodings=['x'])\n\nrect = alt.Chart(data.movies.url).mark_rect().encode(\n    alt.X('IMDB Rating:Q', bin=True),\n    alt.Y('Rotten Tomatoes Rating:Q', bin=True),\n    alt.Color('count()',\n        scale=alt.Scale(scheme='greenblue'),\n        legend=alt.Legend(title='Total Records')\n    )\n)\n\ncirc = rect.mark_point().encode(\n    alt.ColorValue('grey'),\n    alt.Size('count()',\n        legend=alt.Legend(title='Records in Selection')\n    )\n).transform_filter(\n    pts\n)\n\nbar = alt.Chart(source).mark_bar().encode(\n    x='Major Genre:N',\n    y='count()',\n    color=alt.when(pts).then(alt.ColorValue(\"steelblue\")).otherwise(alt.ColorValue(\"grey\"))\n).properties(\n    width=550,\n    height=200\n).add_params(pts)\n\nalt.vconcat(\n    rect + circ,\n    bar\n).resolve_legend(\n    color=\"independent\",\n    size=\"independent\"\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/interactive_layered_crossfilter.py",
    "content": "\"\"\"\nInteractive Crossfilter\n=======================\nThis example shows a multi-panel view of the same data, where you can interactively\nselect a portion of the data in any of the panels to highlight that portion in any\nof the other panels.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = alt.UrlData(\n    data.flights_2k.url,\n    format={'parse': {'date': 'date'}}\n)\n\nbrush = alt.selection_interval(encodings=['x'])\n\n# Define the base chart, with the common parts of the\n# background and highlights\nbase = alt.Chart().mark_bar().encode(\n    x=alt.X(alt.repeat('column'), type='quantitative', bin=alt.Bin(maxbins=20)),\n    y='count()'\n).properties(\n    width=160,\n    height=130\n)\n\n# gray background with selection\nbackground = base.encode(\n    color=alt.value('#ddd')\n).add_params(brush)\n\n# blue highlights on the transformed data\nhighlight = base.transform_filter(brush)\n\n# layer the two charts & repeat\nalt.layer(\n    background,\n    highlight,\n    data=source\n).transform_calculate(\n    \"time\",\n    \"hours(datum.date)\"\n).repeat(column=[\"distance\", \"delay\", \"time\"])\n"
  },
  {
    "path": "tests/examples_arguments_syntax/interactive_legend.py",
    "content": "\"\"\"\nInteractive Legend\n------------------\nThe following shows how to create a chart with an interactive legend, by\nbinding the selection to ``\"legend\"``. Such a binding only works with\n``selection_point`` when projected over a single field or encoding.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.unemployment_across_industries.url\n\nselection = alt.selection_point(fields=['series'], bind='legend')\n\nalt.Chart(source).mark_area().encode(\n    alt.X('yearmonth(date):T', axis=alt.Axis(domain=False, format='%Y', tickSize=0)),\n    alt.Y('sum(count):Q', stack='center', axis=None),\n    alt.Color('series:N', scale=alt.Scale(scheme='category20b')),\n    opacity=alt.when(selection).then(alt.value(1)).otherwise(alt.value(0.2))\n).add_params(\n    selection\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/interactive_reorder_stacked_bars.py",
    "content": "\"\"\"\nReorder stacked bar segments\n============================\nThis example uses a calculate transform\nto check the values of the \"site\" column\nvs the clicked values in the legend,\nand assigns a lower order (0)\nif there is a match.\nThe use of \"indexOf\" checks for equality in an array,\nwhich here allows for multiple segments to be reordered\nby holding down the shift key while clicking the legend.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nselection = alt.selection_point(fields=['site'], bind='legend')\n\nsource = data.barley.url\n\nalt.Chart(source).mark_bar().transform_calculate(\n    site_order=f\"if({selection.name}.site && indexof({selection.name}.site, datum.site) !== -1, 0, 1)\"\n).encode(\n    x='sum(yield):Q',\n    y='variety:N',\n    color='site:N',\n    order='site_order:N',\n    opacity=alt.when(selection).then(alt.value(0.9)).otherwise(alt.value(0.2))\n).add_params(\n    selection\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/interactive_scatter_plot.py",
    "content": "\"\"\"\nSimple Interactive Colored Scatter Plot\n---------------------------------------\nThis example shows how to make an interactive scatter plot.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\nalt.Chart(source).mark_circle().encode(\n    x='Horsepower',\n    y='Miles_per_Gallon',\n    color='Origin',\n).interactive()\n"
  },
  {
    "path": "tests/examples_arguments_syntax/interval_selection.py",
    "content": "\"\"\"\nInterval Selection with Initial Date Range\n==========================================\n\nThis is an example of creating a stacked chart for which the domain of the\ntop chart can be selected by interacting with the bottom chart. The initial\nselection range is set using Python's native datetime objects.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\nimport datetime as dt\n\nsource = data.sp500.url\n\ndate_range = (dt.date(2007, 6, 30), dt.date(2009, 6, 30))\n\nbrush = alt.selection_interval(encodings=['x'],\n                               value={'x': date_range})\n\nbase = alt.Chart(source).mark_area().encode(\n    x = 'date:T',\n    y = 'price:Q'\n).properties(\n    width=600,\n    height=200\n)\n\nupper = base.encode(\n    alt.X('date:T', scale=alt.Scale(domain=brush))\n)\n\nlower = base.properties(\n    height=60\n).add_params(brush)\n\nupper & lower\n"
  },
  {
    "path": "tests/examples_arguments_syntax/interval_selection_map_quakes.py",
    "content": "\"\"\"\nInterval Selection on a Map\n===========================\n\nThis is an example of a binned bar chart on the right where the filtered overlay\nis adjusted by interacting with the map on the left.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\n# load data\ngdf_quakies = data.earthquakes()\ngdf_world = data.world_110m(layer=\"countries\")\n\n# definition for interactive brush\nbrush = alt.selection_interval(\n    encodings=[\"longitude\"], \n    empty=False, \n    value={\"longitude\": [-50, -110]}\n)\n\n# world disk\nsphere = alt.Chart(alt.sphere()).mark_geoshape(\n    fill=\"transparent\", stroke=\"lightgray\", strokeWidth=1\n)\n\n# countries as shapes\nworld = alt.Chart(gdf_world).mark_geoshape(\n    fill=\"lightgray\", stroke=\"white\", strokeWidth=0.1\n)\n\n# earthquakes as dots on map\nquakes = alt.Chart(gdf_quakies).transform_calculate(\n    lon=\"datum.geometry.coordinates[0]\",\n    lat=\"datum.geometry.coordinates[1]\",\n).mark_circle(opacity=0.35, tooltip=True).encode(\n    longitude=\"lon:Q\",\n    latitude=\"lat:Q\",\n    color=alt.when(brush).then(alt.value(\"goldenrod\")).otherwise(alt.value(\"steelblue\")),\n    size=alt.Size(\"mag:Q\", scale=alt.Scale(type=\"pow\", range=[1, 1000], domain=[0, 7], exponent=4)),\n).add_params(brush)\n\n# combine layers for the map\nleft_map = alt.layer(sphere, world, quakes).project(type=\"mercator\") \n\n# histogram of binned earthquakes\nbars = alt.Chart(gdf_quakies).mark_bar().encode(\n    x=alt.X(\"mag:Q\").bin(extent=[0,7]),\n    y=\"count(mag):Q\",\n    color=alt.value(\"steelblue\")\n)\n\n# filtered earthquakes\nbars_overlay = bars.encode(color=alt.value(\"goldenrod\")).transform_filter(brush)\n\n# combine layers for histogram\nright_bars = alt.layer(bars, bars_overlay)\n\n# vertical concatenate map and bars\nleft_map | right_bars"
  },
  {
    "path": "tests/examples_arguments_syntax/iowa_electricity.py",
    "content": "\"\"\"\nIowa's Renewable Energy Boom\n----------------------------\nThis example is a fully developed stacked chart using the sample dataset of Iowa's electricity sources.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.iowa_electricity()\n\nalt.Chart(source, title=\"Iowa's renewable energy boom\").mark_area().encode(\n    x=alt.X(\n        \"year:T\",\n        title=\"Year\"\n    ),\n    y=alt.Y(\n        \"net_generation:Q\",\n        stack=\"normalize\",\n        title=\"Share of net generation\",\n        axis=alt.Axis(format=\".0%\"),\n    ),\n    color=alt.Color(\n        \"source:N\",\n        legend=alt.Legend(title=\"Electricity source\"),\n    )\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/isotype.py",
    "content": "'''\nIsotype Visualization\n=====================\nIsotype Visualization shows the distribution of animals across UK and US.\nInspired by `Only An Ocean Between, 1943 <http://www.thomwhite.co.uk/?p=1303>`_. Population Live Stock, p.13.\nThis is adapted from Vega-Lite example https://vega.github.io/editor/#/examples/vega-lite/isotype_bar_chart\n'''\n# category: advanced calculations\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame([\n      {'country': 'Great Britain', 'animal': 'cattle'},\n      {'country': 'Great Britain', 'animal': 'cattle'},\n      {'country': 'Great Britain', 'animal': 'cattle'},\n      {'country': 'Great Britain', 'animal': 'pigs'},\n      {'country': 'Great Britain', 'animal': 'pigs'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'}\n    ])\n\ndomains = ['person', 'cattle', 'pigs', 'sheep']\n\nshape_scale = alt.Scale(\n    domain=domains,\n    range=[\n        'M1.7 -1.7h-0.8c0.3 -0.2 0.6 -0.5 0.6 -0.9c0 -0.6 -0.4 -1 -1 -1c-0.6 0 -1 0.4 -1 1c0 0.4 0.2 0.7 0.6 0.9h-0.8c-0.4 0 -0.7 0.3 -0.7 0.6v1.9c0 0.3 0.3 0.6 0.6 0.6h0.2c0 0 0 0.1 0 0.1v1.9c0 0.3 0.2 0.6 0.3 0.6h1.3c0.2 0 0.3 -0.3 0.3 -0.6v-1.8c0 0 0 -0.1 0 -0.1h0.2c0.3 0 0.6 -0.3 0.6 -0.6v-2c0.2 -0.3 -0.1 -0.6 -0.4 -0.6z',\n        'M4 -2c0 0 0.9 -0.7 1.1 -0.8c0.1 -0.1 -0.1 0.5 -0.3 0.7c-0.2 0.2 1.1 1.1 1.1 1.2c0 0.2 -0.2 0.8 -0.4 0.7c-0.1 0 -0.8 -0.3 -1.3 -0.2c-0.5 0.1 -1.3 1.6 -1.5 2c-0.3 0.4 -0.6 0.4 -0.6 0.4c0 0.1 0.3 1.7 0.4 1.8c0.1 0.1 -0.4 0.1 -0.5 0c0 0 -0.6 -1.9 -0.6 -1.9c-0.1 0 -0.3 -0.1 -0.3 -0.1c0 0.1 -0.5 1.4 -0.4 1.6c0.1 0.2 0.1 0.3 0.1 0.3c0 0 -0.4 0 -0.4 0c0 0 -0.2 -0.1 -0.1 -0.3c0 -0.2 0.3 -1.7 0.3 -1.7c0 0 -2.8 -0.9 -2.9 -0.8c-0.2 0.1 -0.4 0.6 -0.4 1c0 0.4 0.5 1.9 0.5 1.9l-0.5 0l-0.6 -2l0 -0.6c0 0 -1 0.8 -1 1c0 0.2 -0.2 1.3 -0.2 1.3c0 0 0.3 0.3 0.2 0.3c0 0 -0.5 0 -0.5 0c0 0 -0.2 -0.2 -0.1 -0.4c0 -0.1 0.2 -1.6 0.2 -1.6c0 0 0.5 -0.4 0.5 -0.5c0 -0.1 0 -2.7 -0.2 -2.7c-0.1 0 -0.4 2 -0.4 2c0 0 0 0.2 -0.2 0.5c-0.1 0.4 -0.2 1.1 -0.2 1.1c0 0 -0.2 -0.1 -0.2 -0.2c0 -0.1 -0.1 -0.7 0 -0.7c0.1 -0.1 0.3 -0.8 0.4 -1.4c0 -0.6 0.2 -1.3 0.4 -1.5c0.1 -0.2 0.6 -0.4 0.6 -0.4z',\n        'M1.2 -2c0 0 0.7 0 1.2 0.5c0.5 0.5 0.4 0.6 0.5 0.6c0.1 0 0.7 0 0.8 0.1c0.1 0 0.2 0.2 0.2 0.2c0 0 -0.6 0.2 -0.6 0.3c0 0.1 0.4 0.9 0.6 0.9c0.1 0 0.6 0 0.6 0.1c0 0.1 0 0.7 -0.1 0.7c-0.1 0 -1.2 0.4 -1.5 0.5c-0.3 0.1 -1.1 0.5 -1.1 0.7c-0.1 0.2 0.4 1.2 0.4 1.2l-0.4 0c0 0 -0.4 -0.8 -0.4 -0.9c0 -0.1 -0.1 -0.3 -0.1 -0.3l-0.2 0l-0.5 1.3l-0.4 0c0 0 -0.1 -0.4 0 -0.6c0.1 -0.1 0.3 -0.6 0.3 -0.7c0 0 -0.8 0 -1.5 -0.1c-0.7 -0.1 -1.2 -0.3 -1.2 -0.2c0 0.1 -0.4 0.6 -0.5 0.6c0 0 0.3 0.9 0.3 0.9l-0.4 0c0 0 -0.4 -0.5 -0.4 -0.6c0 -0.1 -0.2 -0.6 -0.2 -0.5c0 0 -0.4 0.4 -0.6 0.4c-0.2 0.1 -0.4 0.1 -0.4 0.1c0 0 -0.1 0.6 -0.1 0.6l-0.5 0l0 -1c0 0 0.5 -0.4 0.5 -0.5c0 -0.1 -0.7 -1.2 -0.6 -1.4c0.1 -0.1 0.1 -1.1 0.1 -1.1c0 0 -0.2 0.1 -0.2 0.1c0 0 0 0.9 0 1c0 0.1 -0.2 0.3 -0.3 0.3c-0.1 0 0 -0.5 0 -0.9c0 -0.4 0 -0.4 0.2 -0.6c0.2 -0.2 0.6 -0.3 0.8 -0.8c0.3 -0.5 1 -0.6 1 -0.6z',\n        'M-4.1 -0.5c0.2 0 0.2 0.2 0.5 0.2c0.3 0 0.3 -0.2 0.5 -0.2c0.2 0 0.2 0.2 0.4 0.2c0.2 0 0.2 -0.2 0.5 -0.2c0.2 0 0.2 0.2 0.4 0.2c0.2 0 0.2 -0.2 0.4 -0.2c0.1 0 0.2 0.2 0.4 0.1c0.2 0 0.2 -0.2 0.4 -0.3c0.1 0 0.1 -0.1 0.4 0c0.3 0 0.3 -0.4 0.6 -0.4c0.3 0 0.6 -0.3 0.7 -0.2c0.1 0.1 1.4 1 1.3 1.4c-0.1 0.4 -0.3 0.3 -0.4 0.3c-0.1 0 -0.5 -0.4 -0.7 -0.2c-0.3 0.2 -0.1 0.4 -0.2 0.6c-0.1 0.1 -0.2 0.2 -0.3 0.4c0 0.2 0.1 0.3 0 0.5c-0.1 0.2 -0.3 0.2 -0.3 0.5c0 0.3 -0.2 0.3 -0.3 0.6c-0.1 0.2 0 0.3 -0.1 0.5c-0.1 0.2 -0.1 0.2 -0.2 0.3c-0.1 0.1 0.3 1.1 0.3 1.1l-0.3 0c0 0 -0.3 -0.9 -0.3 -1c0 -0.1 -0.1 -0.2 -0.3 -0.2c-0.2 0 -0.3 0.1 -0.4 0.4c0 0.3 -0.2 0.8 -0.2 0.8l-0.3 0l0.3 -1c0 0 0.1 -0.6 -0.2 -0.5c-0.3 0.1 -0.2 -0.1 -0.4 -0.1c-0.2 -0.1 -0.3 0.1 -0.4 0c-0.2 -0.1 -0.3 0.1 -0.5 0c-0.2 -0.1 -0.1 0 -0.3 0.3c-0.2 0.3 -0.4 0.3 -0.4 0.3l0.2 1.1l-0.3 0l-0.2 -1.1c0 0 -0.4 -0.6 -0.5 -0.4c-0.1 0.3 -0.1 0.4 -0.3 0.4c-0.1 -0.1 -0.2 1.1 -0.2 1.1l-0.3 0l0.2 -1.1c0 0 -0.3 -0.1 -0.3 -0.5c0 -0.3 0.1 -0.5 0.1 -0.7c0.1 -0.2 -0.1 -1 -0.2 -1.1c-0.1 -0.2 -0.2 -0.8 -0.2 -0.8c0 0 -0.1 -0.5 0.4 -0.8z'\n    ]\n)\n\ncolor_scale = alt.Scale(\n    domain=domains,\n    range=['rgb(162,160,152)', 'rgb(194,81,64)', 'rgb(93,93,93)', 'rgb(91,131,149)']\n)\n\nalt.Chart(source).mark_point(filled=True, opacity=1, size=100).encode(\n    alt.X('x:O', axis=None),\n    alt.Y('animal:O', axis=None),\n    alt.Row('country:N', header=alt.Header(title='')),\n    alt.Shape('animal:N', legend=None, scale=shape_scale),\n    alt.Color('animal:N', legend=None, scale=color_scale),\n).transform_window(\n    x='rank()',\n    groupby=['country', 'animal']\n).properties(width=550, height=140)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/isotype_emoji.py",
    "content": "'''\nIsotype Visualization with Emoji\n================================\nIsotype Visualization shows the distribution of animals across UK and US, using unicode emoji\nmarks rather than custom SVG paths (see https://altair-viz.github.io/gallery/isotype.html).\nThis is adapted from Vega-Lite example https://vega.github.io/vega-lite/examples/isotype_bar_chart_emoji.html.\n'''\n# category:advanced calculations\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame([\n      {'country': 'Great Britain', 'animal': 'cattle'},\n      {'country': 'Great Britain', 'animal': 'cattle'},\n      {'country': 'Great Britain', 'animal': 'cattle'},\n      {'country': 'Great Britain', 'animal': 'pigs'},\n      {'country': 'Great Britain', 'animal': 'pigs'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'}\n    ])\n\n\nalt.Chart(source).mark_text(size=45, baseline='middle').encode(\n    alt.X('x:O', axis=None),\n    alt.Y('animal:O', axis=None),\n    alt.Row('country:N', header=alt.Header(title='')),\n    alt.Text('emoji:N')\n).transform_calculate(\n    emoji=\"{'cattle': '🐄', 'pigs': '🐖', 'sheep': '🐏'}[datum.animal]\"\n).transform_window(\n    x='rank()',\n    groupby=['country', 'animal']\n).properties(width=550, height=140)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/isotype_grid.py",
    "content": "\"\"\"\nIsotype Grid\n------------\nThis example is a grid of isotype figures.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nimport pandas as pd\n\ndata = pd.DataFrame([dict(id=i) for i in range(1, 101)])\n\nperson = (\n    \"M1.7 -1.7h-0.8c0.3 -0.2 0.6 -0.5 0.6 -0.9c0 -0.6 \"\n    \"-0.4 -1 -1 -1c-0.6 0 -1 0.4 -1 1c0 0.4 0.2 0.7 0.6 \"\n    \"0.9h-0.8c-0.4 0 -0.7 0.3 -0.7 0.6v1.9c0 0.3 0.3 0.6 \"\n    \"0.6 0.6h0.2c0 0 0 0.1 0 0.1v1.9c0 0.3 0.2 0.6 0.3 \"\n    \"0.6h1.3c0.2 0 0.3 -0.3 0.3 -0.6v-1.8c0 0 0 -0.1 0 \"\n    \"-0.1h0.2c0.3 0 0.6 -0.3 0.6 -0.6v-2c0.2 -0.3 -0.1 \"\n    \"-0.6 -0.4 -0.6z\"\n)\n\nalt.Chart(data).transform_calculate(\n    row=\"ceil(datum.id/10)\"\n).transform_calculate(\n    col=\"datum.id - datum.row*10\"\n).mark_point(\n    filled=True,\n    size=50\n).encode(\n    x=alt.X(\"col:O\", axis=None),\n    y=alt.Y(\"row:O\", axis=None),\n    shape=alt.ShapeValue(person)\n).properties(\n    width=400,\n    height=400\n).configure_view(\n    strokeWidth=0\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/lasagna_plot.py",
    "content": "\"\"\"\nLasagna Plot (Dense Time-Series Heatmap)\n----------------------------------------\n\"\"\"\n# category: tables\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.stocks()\n\ncolor_condition = (\n    alt.when(alt.expr.month(\"datum.value\") == 1, alt.expr.date(\"datum.value\") == 1)\n    .then(alt.value(\"black\"))\n    .otherwise(alt.value(None))\n)\n\nalt.Chart(source, width=300, height=100).transform_filter(\n    alt.datum.symbol != \"GOOG\"\n).mark_rect().encode(\n    x=alt.X(\n        \"yearmonthdate(date):O\",\n        axis=alt.Axis(\n            format=\"%Y\",\n            labelAngle=0,\n            labelOverlap=False,\n            labelColor=color_condition,\n            tickColor=color_condition,\n        ),\n        title=\"Time\",\n    ),\n    y=alt.Y(\"symbol:N\", title=None),\n    color=alt.Color(\"sum(price)\", title=\"Price\"),\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/layer_line_color_rule.py",
    "content": "\"\"\"\nLine Chart with Layered Aggregates\n----------------------------------\nThis example shows how to make a multi-series line chart of the daily closing\nstock prices for AAPL, AMZN, GOOG, IBM, and MSFT between 2000 and 2010, along\nwith a layered rule showing the average values.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.stocks()\n\nbase = alt.Chart(source).properties(width=550)\n\nline = base.mark_line().encode(\n    x='date',\n    y='price',\n    color='symbol'\n)\n\nrule = base.mark_rule().encode(\n    y='average(price)',\n    color='symbol',\n    size=alt.value(2)\n)\n\nline + rule\n"
  },
  {
    "path": "tests/examples_arguments_syntax/layered_area_chart.py",
    "content": "\"\"\"\nLayered Area Chart\n------------------\nThis example shows a layered area chart.\n\"\"\"\n# category: area charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.iowa_electricity()\n\nalt.Chart(source).mark_area(opacity=0.3).encode(\n    x=\"year:T\",\n    y=alt.Y(\"net_generation:Q\", stack=None),\n    color=\"source:N\"\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/layered_bar_chart.py",
    "content": "\"\"\"\nLayered Bar Chart\n-----------------\nThis example shows a segmented bar chart that is layered rather than stacked.  \n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.iowa_electricity()\n\nalt.Chart(source).mark_bar(opacity=0.7).encode(\n    x='year:O',\n    y=alt.Y('net_generation:Q', stack=None),\n    color=\"source\",\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/layered_chart_bar_mark.py",
    "content": "\"\"\"\nBar and Tick Chart\n------------------\nHow to layer a tick chart on top of a bar chart.\n\"\"\"\n# category: bar charts\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame({\n    'project': ['a', 'b', 'c', 'd', 'e', 'f', 'g'],\n    'score': [25, 57, 23, 19, 8, 47, 8],\n    'goal': [25, 47, 30, 27, 38, 19, 4]\n})\n\nbar = alt.Chart(source).mark_bar().encode(\n    x='project',\n    y='score'\n).properties(\n    width=alt.Step(40)  # controls width of bar.\n)\n\ntick = alt.Chart(source).mark_tick(\n    color='red',\n    thickness=2,\n    size=40 * 0.9,  # controls width of tick.\n).encode(\n    x='project',\n    y='goal'\n)\n\nbar + tick\n"
  },
  {
    "path": "tests/examples_arguments_syntax/layered_chart_with_dual_axis.py",
    "content": "\"\"\"\nLayered chart with Dual-Axis\n----------------------------\nThis example shows how to create a second independent y axis.\n\"\"\"\n# category: advanced calculations\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather()\n\nbase = alt.Chart(source).encode(\n    alt.X('month(date):T', axis=alt.Axis(title=None))\n)\n\narea = base.mark_area(opacity=0.3, color='#57A44C').encode(\n    alt.Y('average(temp_max)',\n          axis=alt.Axis(title='Avg. Temperature (°C)', titleColor='#57A44C')),\n    alt.Y2('average(temp_min)')\n)\n\nline = base.mark_line(stroke='#5276A7', interpolate='monotone').encode(\n    alt.Y('average(precipitation)',\n          axis=alt.Axis(title='Precipitation (inches)', titleColor='#5276A7'))\n)\n\nalt.layer(area, line).resolve_scale(\n    y = 'independent'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/layered_heatmap_text.py",
    "content": "\"\"\"\nText over a Heatmap\n-------------------\n\nAn example of a layered chart of text over a heatmap using the cars dataset.\n\"\"\"\n# category: tables\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\n# Configure common options. We specify the aggregation\n# as a transform here so we can reuse it in both layers.\nbase = alt.Chart(source).transform_aggregate(\n    mean_horsepower='mean(Horsepower)',\n    groupby=['Origin', 'Cylinders']\n).encode(\n    alt.X('Cylinders:O'),\n    alt.Y('Origin:O'),\n)\n\n# Configure heatmap\nheatmap = base.mark_rect().encode(\n    color=alt.Color('mean_horsepower:Q',\n        scale=alt.Scale(scheme='viridis'),\n        legend=alt.Legend(title=\"Mean of Horsepower\"),\n    )\n)\n\ncolor = (\n    alt.when(alt.datum.mean_horsepower > 150)\n    .then(alt.value(\"black\"))\n    .otherwise(alt.value(\"white\"))\n)\n# Configure text\ntext = base.mark_text(baseline='middle').encode(\n    text=alt.Text('mean_horsepower:Q', format=\".0f\"), color=color\n)\n\n# Draw the chart\nheatmap + text\n"
  },
  {
    "path": "tests/examples_arguments_syntax/layered_histogram.py",
    "content": "\"\"\"\nLayered Histogram\n=================\nThis example shows how to use opacity to make a layered histogram in Altair.\n\"\"\"\n# category: distributions\nimport pandas as pd\nimport altair as alt\nimport numpy as np\nnp.random.seed(42)\n\n# Generating Data\nsource = pd.DataFrame({\n    'Trial A': np.random.normal(0, 0.8, 1000),\n    'Trial B': np.random.normal(-2, 1, 1000),\n    'Trial C': np.random.normal(3, 2, 1000)\n})\n\nalt.Chart(source).transform_fold(\n    ['Trial A', 'Trial B', 'Trial C'],\n    as_=['Experiment', 'Measurement']\n).mark_bar(\n    opacity=0.3,\n    binSpacing=0\n).encode(\n    alt.X('Measurement:Q', bin=alt.Bin(maxbins=100)),\n    alt.Y('count()', stack=None),\n    alt.Color('Experiment:N')\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/line_chart_with_arrows.py",
    "content": "\"\"\"\nLine Chart with Arrows\n----------------------\nThis example shows a simple line chart with two types of arrow annotations.\nThe Unicode character approach is simpler, \nwhile the line plus triangle :ref:`point mark <user-guide-point-marks>` allows for greater flexibility,\nsuch as customizable arrowheads.\n\"\"\"\n# category: line charts\nimport altair as alt\nimport numpy as np\nimport pandas as pd\n\n\nx = np.linspace(1,7)\ndata = pd.DataFrame({\n    \"x\": x,\n    \"y\": np.sin(x),\n})\n\nunicode_arrow_with_text = alt.layer(\n    # Arrow\n    alt.Chart().mark_text(size=60, align=\"left\", baseline=\"bottom\", fontWeight=100, angle=340).encode(\n        x=alt.datum(2.8),\n        y=alt.datum(-0.3),\n        text=alt.datum(\"🠃\")  # Any unicode symbol could be used instead\n    ),\n    # Text\n    alt.Chart().mark_text(size=14, align=\"center\", baseline=\"bottom\").encode(\n        x=alt.datum(1.8),\n        y=alt.datum(-0.1),\n        text=alt.datum(\"decreasing\")\n    )\n)\n\nmark_arrow_with_text = alt.layer(\n    # Arrow line\n    alt.Chart().mark_line(size=2).encode(\n        x=alt.datum(5.4),\n        y=alt.datum(-0.4),\n        x2=alt.datum(5.9),\n        y2=alt.datum(0)\n    ),\n    # Arrow head\n    alt.Chart().mark_point(shape=\"triangle\", filled=True, fillOpacity=1).encode(\n        x=alt.datum(5.9),\n        y=alt.datum(0),\n        angle=alt.AngleValue(23),\n        size=alt.SizeValue(100),\n        color=alt.ColorValue(\"#000000\")\n    ),\n    # Text\n    alt.Chart().mark_text(size=14, align=\"center\", baseline=\"bottom\").encode(\n        x=alt.datum(4.7),\n        y=alt.datum(-0.3),\n        text=alt.datum(\"increasing\")\n    ),\n)\n\nline_with_points = alt.Chart(data).mark_line(point=True).encode(\n    x=alt.X(\"x\"),\n    y=alt.Y(\"y\"),\n)\n\nline_with_points + unicode_arrow_with_text + mark_arrow_with_text\n"
  },
  {
    "path": "tests/examples_arguments_syntax/line_chart_with_color_datum.py",
    "content": "\"\"\"\nLine Chart with Datum for Color\n-------------------------------\nAn example of using ``datum`` and ``repeat`` to color a multi-series line chart.\nThis is adapted from this corresponding Vega-Lite Example:\n`Repeat and Layer to Show Different Movie Measures <https://vega.github.io/vega-lite/examples/repeat_layer.html>`_.\n\"\"\"\n# category: line charts\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies()\n\nalt.Chart(source).mark_line().encode(\n    x=alt.X(\"IMDB Rating\", bin=True),\n    y=alt.Y(\n        alt.repeat(\"layer\"), aggregate=\"mean\", title=\"Mean of US and Worldwide Gross\"\n    ),\n    color=alt.datum(alt.repeat(\"layer\")),\n).repeat(layer=[\"US Gross\", \"Worldwide Gross\"])\n"
  },
  {
    "path": "tests/examples_arguments_syntax/line_chart_with_cumsum.py",
    "content": "\"\"\"\nLine Chart with Cumulative Sum\n------------------------------\nThis chart creates a simple line chart from the cumulative sum of a fields.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.wheat()\n\nalt.Chart(source).mark_line().transform_window(\n    # Sort the data chronologically\n    sort=[{'field': 'year'}],\n    # Include all previous records before the current record and none after\n    # (This is the default value so you could skip it and it would still work.)\n    frame=[None, 0],\n    # What to add up as you go\n    cumulative_wheat='sum(wheat)'\n).encode(\n    x='year:O',\n    # Plot the calculated field created by the transformation\n    y='cumulative_wheat:Q'\n).properties(width=600)"
  },
  {
    "path": "tests/examples_arguments_syntax/line_chart_with_cumsum_faceted.py",
    "content": "\"\"\"\nFaceted Line Chart with Cumulative Sum\n--------------------------------------\nThis chart creates one facet per natural disaster and shows the cumulative number of deaths for that category.\nNote the use of different predicates to filter based on both a list and a range.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.disasters()\ncolumns_sorted = ['Drought', 'Epidemic', 'Earthquake', 'Flood']\n\nalt.Chart(source).transform_filter(\n    alt.FieldOneOfPredicate(field='Entity', oneOf=columns_sorted), \n    alt.FieldRangePredicate(field='Year', range=[1900, 2000])\n).transform_window(\n    cumulative_deaths='sum(Deaths)', groupby=['Entity'] # Calculate cumulative sum of Deaths by Entity\n).mark_line().encode( \n    alt.X('Year:Q', title=None, axis=alt.Axis(format='d')),\n    alt.Y('cumulative_deaths:Q', title=None),\n    alt.Color('Entity:N', legend=None)\n).properties(\n    width=300,\n    height=150\n).facet(\n    facet=alt.Facet(\n        'Entity:N',\n        title=None,\n        sort=columns_sorted,\n        header=alt.Header(labelAnchor='start', labelFontStyle='italic')\n    ),\n    title=alt.Title(\n        text=['Cumulative casualties by type of disaster', 'in the 20th century'],\n        anchor='middle'\n    ),\n    columns=2\n).resolve_axis(y='independent', x='independent')"
  },
  {
    "path": "tests/examples_arguments_syntax/line_chart_with_custom_legend.py",
    "content": "\"\"\"\nLine Chart with Custom Legend\n-----------------------------\nThis example uses the argmax aggregation function in order to create a custom\nlegend for a line chart.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\n\nsource = data.stocks()\n\nbase = alt.Chart(source).encode(\n    color=alt.Color(\"symbol\", legend=None)\n).transform_filter(\n    \"datum.symbol !== 'IBM'\"\n).properties(\n    width=500\n)\n\nline = base.mark_line().encode(x=\"date\", y=\"price\")\n\n\nlast_price = base.mark_circle().encode(\n    x=alt.X(\"last_date['date']:T\"),\n    y=alt.Y(\"last_date['price']:Q\")\n).transform_aggregate(\n    last_date=\"argmax(date)\",\n    groupby=[\"symbol\"]\n)\n\ncompany_name = last_price.mark_text(align=\"left\", dx=4).encode(text=\"symbol\")\n\nchart = (line + last_price + company_name).encode(\n    x=alt.X(title=\"date\"),\n    y=alt.Y(title=\"price\")\n)\n\nchart\n"
  },
  {
    "path": "tests/examples_arguments_syntax/line_chart_with_datum.py",
    "content": "\"\"\"\nLine Chart with Datum\n---------------------------------\nAn example of using ``datum`` to highlight certain values, including a ``DateTime`` value.\nThis is adapted from two corresponding Vega-Lite Examples:\n`Highlight a Specific Value <https://vega.github.io/vega-lite/docs/datum.html#highlight-a-specific-data-value>`_.\n\"\"\"\n# category: line charts\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.stocks()\n\nlines = (\n    alt.Chart(source)\n    .mark_line()\n    .encode(x=\"date\", y=\"price\", color=\"symbol\")\n)\n\nxrule = (\n    alt.Chart()\n    .mark_rule(color=\"cyan\", strokeWidth=2)\n    .encode(x=alt.datum(alt.DateTime(year=2006, month=\"November\")))\n)\n\nyrule = (\n    alt.Chart().mark_rule(strokeDash=[12, 6], size=2).encode(y=alt.datum(350))\n)\n\n\nlines + yrule + xrule\n"
  },
  {
    "path": "tests/examples_arguments_syntax/line_chart_with_generator.py",
    "content": "\"\"\"\nLine Chart with Sequence Generator\n----------------------------------\nThis examples shows how to create multiple lines using the sequence generator.\n\"\"\"\n# category: line charts\n\nimport altair as alt\n\nsource = alt.sequence(start=0, stop=12.7, step=0.1, as_='x')\n\nalt.Chart(source).mark_line().transform_calculate(\n    sin='sin(datum.x)',\n    cos='cos(datum.x)'\n).transform_fold(\n    ['sin', 'cos']\n).encode(\n    x='x:Q', \n    y='value:Q', \n    color='key:N'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/line_chart_with_interpolation.py",
    "content": "\"\"\"\nLine Chart with Interpolation\n-----------------------------\nThis chart shows a line chart with the path interpolated. A full list of interpolation methods is available `in the documentation <https://altair-viz.github.io/user_guide/generated/core/altair.LineConfig.html?highlight=interpolate#altair-lineconfig>`_.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.stocks()\n\nalt.Chart(source).mark_line(interpolate=\"monotone\").encode(\n    x=\"date:T\",\n    y=\"price:Q\",\n    color=\"symbol:N\"\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/line_chart_with_points.py",
    "content": "\"\"\"\nLine Chart with Point Markers\n-----------------------------\nThis chart shows a simple line chart with points marking each value.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.stocks()\n\nalt.Chart(source).mark_line(point=True).encode(\n    x='date:T',\n    y='price:Q',\n    color='symbol:N'\n)"
  },
  {
    "path": "tests/examples_arguments_syntax/line_chart_with_points_stroked.py",
    "content": "\"\"\"\nLine Chart with Stroked Point Markers\n-------------------------------------\nThis example shows a simple line chart with points in a different color.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.stocks()\n\nalt.Chart(source).mark_line(\n    point=alt.OverlayMarkDef(filled=False, fill=\"white\")\n).encode(\n    x='date:T',\n    y='price:Q',\n    color='symbol:N'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/line_custom_order.py",
    "content": "\"\"\"\nLine Chart with Custom Order\n----------------------------\nBy default, the line's path (order of points in the line) is\ndetermined by data values on the temporal/ordinal field.\nHowever, a field can be mapped to the order channel for a custom path.\n\nFor example, to show a pattern of data change over time between\ngasoline price and average miles driven per capita we use\norder channel to sort the points in the line by time field (year).\nThe earliest year (1956) is one endpoint and the latest year (2010)\nis the other endpoint.\n\nThis is based on Hannah Fairfield's article 'Driving Shifts Into Reverse'.\nSee https://archive.nytimes.com/www.nytimes.com/imagepages/2010/05/02/business/02metrics.html.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.driving()\n\nalt.Chart(source).mark_line(point=True).encode(\n    alt.X(\"miles\", scale=alt.Scale(zero=False)),\n    alt.Y(\"gas\", scale=alt.Scale(zero=False)),\n    order=\"year\",\n    tooltip=[\"miles\", \"gas\", \"year\"],\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/line_percent.py",
    "content": "\"\"\"\nLine Chart with Percent axis\n----------------------------\nThis example shows how to format the tick labels of the y-axis of a chart as percentages.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.jobs.url\n\nalt.Chart(source).mark_line().encode(\n    alt.X('year:O'),\n    alt.Y('perc:Q', axis=alt.Axis(format='%')),\n    color='sex:N'\n).transform_filter(\n    alt.datum.job == 'Welder'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/line_with_ci.py",
    "content": "\"\"\"\nLine Chart with Confidence Interval Band\n----------------------------------------\nHow to make a line chart with a bootstrapped 95% confidence interval band.\n\"\"\"\n# category: uncertainties and trends\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\nline = alt.Chart(source).mark_line().encode(\n    x='Year',\n    y='mean(Miles_per_Gallon)'\n)\n\nband = alt.Chart(source).mark_errorband(extent='ci').encode(\n    x='Year',\n    y=alt.Y('Miles_per_Gallon', title='Miles/Gallon'),\n)\n\nband + line\n"
  },
  {
    "path": "tests/examples_arguments_syntax/line_with_last_value_labeled.py",
    "content": "\"\"\"\nLine Chart with Last Value Labeled\n----------------------------------\nThis chart shows a line chart with a label annotating the final value \n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\n# Import example data\nsource = data.stocks()\n\n# Create a common chart object\n# Use `transform_filter` to reduce the dataset to clarify our example. Not required.\nchart = (\n    alt.Chart(source)\n    .transform_filter(alt.datum.symbol != \"IBM\")\n    .encode(color=alt.Color(\"symbol\", legend=None))\n)\n\n# Draw the line\nline = chart.mark_line().encode(x=\"date:T\", y=\"price:Q\")\n\n# Use the `argmax` aggregate to limit the dataset to the final value\nlabel = chart.encode(\n    x=alt.X(\"max(date):T\"),\n    y=alt.Y(\"price:Q\", aggregate=alt.ArgmaxDef(argmax=\"date\")),\n    text=\"symbol\",\n)\n\n# Create a text label\ntext = label.mark_text(align=\"left\", dx=4)\n\n# Create a circle annotation\ncircle = label.mark_circle()\n\n# Draw the chart with all the layers combined\nline + circle + text\n"
  },
  {
    "path": "tests/examples_arguments_syntax/line_with_log_scale.py",
    "content": "\"\"\"\nLine Chart with Logarithmic Scale\n---------------------------------\nHow to make a line chart on a `Logarithmic scale <https://en.wikipedia.org/wiki/Logarithmic_scale>`_.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.population()\n\nalt.Chart(source).mark_line().encode(\n    x='year:O',\n    y=alt.Y(\n        'sum(people)',\n        scale=alt.Scale(type=\"log\")  # Here the scale is applied\n    )\n)"
  },
  {
    "path": "tests/examples_arguments_syntax/london_tube.py",
    "content": "\"\"\"\nLondon Tube Lines\n=================\nThis example shows the London tube lines against the background of the\nborough boundaries. It is based on the vega-lite example at\nhttps://vega.github.io/vega-lite/examples/geo_layer_line_london.html.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nboroughs = alt.topo_feature(data.london_boroughs.url, 'boroughs')\ntubelines = alt.topo_feature(data.london_tube_lines.url, 'line')\ncentroids = data.london_centroids.url\n\nbackground = alt.Chart(boroughs).mark_geoshape(\n    stroke='white',\n    strokeWidth=2\n).encode(\n    color=alt.value('#eee'),\n).properties(\n    width=700,\n    height=500\n)\n\nlabels = alt.Chart(centroids).mark_text().encode(\n    longitude='cx:Q',\n    latitude='cy:Q',\n    text='bLabel:N',\n    size=alt.value(8),\n    opacity=alt.value(0.6)\n).transform_calculate(\n    \"bLabel\", \"indexof (datum.name,' ') > 0  ? substring(datum.name,0,indexof(datum.name, ' ')) : datum.name\"\n)\n\nline_scale = alt.Scale(domain=[\"Bakerloo\", \"Central\", \"Circle\", \"District\", \"DLR\",\n                               \"Hammersmith & City\", \"Jubilee\", \"Metropolitan\", \"Northern\",\n                               \"Piccadilly\", \"Victoria\", \"Waterloo & City\"],\n                       range=[\"rgb(137,78,36)\", \"rgb(220,36,30)\", \"rgb(255,206,0)\",\n                              \"rgb(1,114,41)\", \"rgb(0,175,173)\", \"rgb(215,153,175)\",\n                              \"rgb(106,114,120)\", \"rgb(114,17,84)\", \"rgb(0,0,0)\",\n                              \"rgb(0,24,168)\", \"rgb(0,160,226)\", \"rgb(106,187,170)\"])\n\nlines = alt.Chart(tubelines).mark_geoshape(\n    filled=False,\n    strokeWidth=2\n).encode(\n    alt.Color(\n        'id:N',\n        legend=alt.Legend(\n            title=None,\n            orient='bottom-right',\n            offset=0\n        ),\n        scale=line_scale\n    )\n)\n\nbackground + labels + lines\n"
  },
  {
    "path": "tests/examples_arguments_syntax/maps_faceted_species.py",
    "content": "\"\"\"\nFaceted County-Level Choropleth Maps\n------------------------------------\nA set of maps arranged in a grid, each showing the distribution of a species' projected habitat across US counties. \n\nEach choropleth map uses color intensity to represent the percentage values within county boundaries.\n\"\"\"\n# category: maps\n\nimport altair as alt\nfrom altair.datasets import data\n\n# Load species data with county_id as number\ncsv_data = alt.UrlData(data.species.url, format=alt.CsvDataFormat(parse={'county_id': 'number'}))\n\n# Load US counties topology\ncounties = alt.topo_feature(data.us_10m.url, 'counties')\n\nchart = alt.Chart(csv_data).mark_geoshape().encode(\n    shape='geo:G',  # Geographic shape encoding for map rendering\n    color=alt.Color(\n        'habitat_yearround_pct:Q', \n        scale=alt.Scale(domain=[0, 1], scheme='viridis', zero=True, nice=False), \n        title=['Suitable Habitat', '% of County'], \n        legend=alt.Legend(format='.0%')\n    ),\n    tooltip=[\n        alt.Tooltip('county_id:N', title='County ID'),\n        alt.Tooltip('habitat_yearround_pct:Q', title='Habitat %', format='.2%')\n    ],\n    facet=alt.Facet('common_name:N', columns=2, title=None),\n).transform_lookup(\n    lookup='county_id',\n    from_=alt.LookupData(data=counties, key='id'),\n    as_='geo'  # Join county geometry data\n).project(type='albers').properties(width=300, height=200)\n\n# Display the chart\nchart\n"
  },
  {
    "path": "tests/examples_arguments_syntax/mosaic_with_labels.py",
    "content": "\"\"\"\nMosaic Chart with Labels\n------------------------\n\"\"\"\n# category: tables\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\nbase = (\n    alt.Chart(source)\n    .transform_aggregate(count_=\"count()\", groupby=[\"Origin\", \"Cylinders\"])\n    .transform_stack(\n        stack=\"count_\",\n        as_=[\"stack_count_Origin1\", \"stack_count_Origin2\"],\n        offset=\"normalize\",\n        sort=[alt.SortField(\"Origin\", \"ascending\")],\n        groupby=[],\n    )\n    .transform_window(\n        x=\"min(stack_count_Origin1)\",\n        x2=\"max(stack_count_Origin2)\",\n        rank_Cylinders=\"dense_rank()\",\n        distinct_Cylinders=\"distinct(Cylinders)\",\n        groupby=[\"Origin\"],\n        frame=[None, None],\n        sort=[alt.SortField(\"Cylinders\", \"ascending\")],\n    )\n    .transform_window(\n        rank_Origin=\"dense_rank()\",\n        frame=[None, None],\n        sort=[alt.SortField(\"Origin\", \"ascending\")],\n    )\n    .transform_stack(\n        stack=\"count_\",\n        groupby=[\"Origin\"],\n        as_=[\"y\", \"y2\"],\n        offset=\"normalize\",\n        sort=[alt.SortField(\"Cylinders\", \"ascending\")],\n    )\n    .transform_calculate(\n        ny=\"datum.y + (datum.rank_Cylinders - 1) * datum.distinct_Cylinders * 0.01 / 3\",\n        ny2=\"datum.y2 + (datum.rank_Cylinders - 1) * datum.distinct_Cylinders * 0.01 / 3\",\n        nx=\"datum.x + (datum.rank_Origin - 1) * 0.01\",\n        nx2=\"datum.x2 + (datum.rank_Origin - 1) * 0.01\",\n        xc=\"(datum.nx+datum.nx2)/2\",\n        yc=\"(datum.ny+datum.ny2)/2\",\n    )\n)\n\n\nrect = base.mark_rect().encode(\n    x=alt.X(\"nx:Q\", axis=None),\n    x2=\"nx2\",\n    y=\"ny:Q\",\n    y2=\"ny2\",\n    color=alt.Color(\"Origin:N\", legend=None),\n    opacity=alt.Opacity(\"Cylinders:Q\", legend=None),\n    tooltip=[\"Origin:N\", \"Cylinders:Q\"],\n)\n\n\ntext = base.mark_text(baseline=\"middle\").encode(\n    x=alt.X(\"xc:Q\", axis=None), y=alt.Y(\"yc:Q\", title=\"Cylinders\"), text=\"Cylinders:N\"\n)\n\n\nmosaic = rect + text\n\norigin_labels = base.mark_text(baseline=\"middle\", align=\"center\").encode(\n    x=alt.X(\n        \"min(xc):Q\",\n        axis=alt.Axis(title=\"Origin\", orient=\"top\"),\n    ),\n    color=alt.Color(\"Origin\", legend=None),\n    text=\"Origin\",\n)\n\n(\n    (origin_labels & mosaic)\n    .resolve_scale(x=\"shared\")\n    .configure_view(stroke=\"\")\n    .configure_concat(spacing=10)\n    .configure_axis(domain=False, ticks=False, labels=False, grid=False)\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/multi_series_line.py",
    "content": "\"\"\"\nMultiple Series Line Chart\n--------------------------\n\nThis example shows how to make a line chart with multiple series of data.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.stocks()\n\nalt.Chart(source).mark_line().encode(\n    x='date:T',\n    y='price:Q',\n    color='symbol:N',\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/multifeature_scatter_plot.py",
    "content": "\"\"\"\nMultifeature Scatter Plot\n=========================\nThis example shows how to make a scatter plot with multiple feature encodings.\n\"\"\"\n# category: scatter plots\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.penguins()\n\nalt.Chart(source).mark_circle().encode(\n    alt.X('Flipper Length (mm)', scale=alt.Scale(zero=False)),\n    alt.Y('Body Mass (g)', scale=alt.Scale(zero=False, padding=1)),\n    alt.Size('Beak Depth (mm)', scale=alt.Scale(zero=False)),\n    color='Species'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/multiline_highlight.py",
    "content": "\"\"\"\nMulti-Line Highlight\n====================\nThis multi-line chart uses an invisible Voronoi tessellation to handle pointerover to\nidentify the nearest point and then highlight the line on which the point falls.\nIt is adapted from the Vega-Lite example found at\nhttps://bl.ocks.org/amitkaps/fe4238e716db53930b2f1a70d3401701\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.stocks()\n\nhighlight = alt.selection_point(on='pointerover',\n                          fields=['symbol'], nearest=True)\n\nbase = alt.Chart(source).encode(\n    x='date:T',\n    y='price:Q',\n    color='symbol:N'\n)\n\npoints = base.mark_circle().encode(\n    opacity=alt.value(0)\n).add_params(\n    highlight\n).properties(\n    width=600\n)\n\nlines = base.mark_line().encode(\n    size=alt.when(~highlight).then(alt.value(1)).otherwise(alt.value(3))\n)\n\npoints + lines\n"
  },
  {
    "path": "tests/examples_arguments_syntax/multiline_tooltip.py",
    "content": "\"\"\"\nMulti-Line Tooltip\n==================\nThis example shows how you can use selections and layers to create a\ntooltip-like behavior tied to the x position of the cursor.\nIf you are looking for more standard tooltips, see the :ref:`gallery_multiline_tooltip_standard` example.\n\nIn this example, we'll employ a little trick to isolate the x-position of the\ncursor: we add some transparent points with only an x encoding (no y encoding)\nand tie a *nearest* selection to these, tied to the \"x\" field.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nimport pandas as pd\nimport numpy as np\n\nnp.random.seed(42)\ncolumns = [\"A\", \"B\", \"C\"]\nsource = pd.DataFrame(\n    np.cumsum(np.random.randn(100, 3), 0).round(2),\n    columns=columns, index=pd.RangeIndex(100, name=\"x\")\n)\nsource = source.reset_index().melt(\"x\", var_name=\"category\", value_name=\"y\")\n\n# Create a selection that chooses the nearest point & selects based on x-value\nnearest = alt.selection_point(nearest=True, on=\"pointerover\",\n                              fields=[\"x\"], empty=False)\n\n# The basic line\nline = alt.Chart(source).mark_line(interpolate=\"basis\").encode(\n    x=\"x:Q\",\n    y=\"y:Q\",\n    color=\"category:N\"\n)\n\n# Transparent selectors across the chart. This is what tells us\n# the x-value of the cursor\nselectors = alt.Chart(source).mark_point().encode(\n    x=\"x:Q\",\n    opacity=alt.value(0),\n).add_params(\n    nearest\n)\nwhen_near = alt.when(nearest)\n\n# Draw points on the line, and highlight based on selection\npoints = line.mark_point().encode(\n    opacity=when_near.then(alt.value(1)).otherwise(alt.value(0))\n)\n\n# Draw text labels near the points, and highlight based on selection\ntext = line.mark_text(align=\"left\", dx=5, dy=-5).encode(\n    text=when_near.then(\"y:Q\").otherwise(alt.value(\" \"))\n)\n\n# Draw a rule at the location of the selection\nrules = alt.Chart(source).mark_rule(color=\"gray\").encode(\n    x=\"x:Q\",\n).transform_filter(\n    nearest\n)\n\n# Put the five layers into a chart and bind the data\nalt.layer(\n    line, selectors, points, rules, text\n).properties(\n    width=600, height=300\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/multiline_tooltip_standard.py",
    "content": "\"\"\"\nMulti-Line Tooltip (Standard)\n=============================\nThis example shows how to add a standard tooltip to the same chart \nas in :ref:`gallery_multiline_tooltip`. You can find another example\nusing this approach in the documentation on the :ref:`user-guide-pivot-transform` transformation.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nimport pandas as pd\nimport numpy as np\n\nnp.random.seed(42)\ncolumns = [\"A\", \"B\", \"C\"]\nsource = pd.DataFrame(\n    np.cumsum(np.random.randn(100, 3), 0).round(2),\n    columns=columns, index=pd.RangeIndex(100, name=\"x\"),\n)\nsource = source.reset_index().melt(\"x\", var_name=\"category\", value_name=\"y\")\n\n# Create a selection that chooses the nearest point & selects based on x-value\nnearest = alt.selection_point(nearest=True, on=\"pointerover\", \n                              fields=[\"x\"], empty=False)\n\n# The basic line\nline = alt.Chart(source).mark_line(interpolate=\"basis\").encode(\n    x=\"x:Q\",\n    y=\"y:Q\",\n    color=\"category:N\"\n)\nwhen_near = alt.when(nearest)\n\n# Draw points on the line, and highlight based on selection\npoints = line.mark_point().encode(\n    opacity=when_near.then(alt.value(1)).otherwise(alt.value(0))\n)\n\n# Draw a rule at the location of the selection\nrules = alt.Chart(source).transform_pivot(\n    \"category\",\n    value=\"y\",\n    groupby=[\"x\"]\n).mark_rule(color=\"gray\").encode(\n    x=\"x:Q\",\n    opacity=when_near.then(alt.value(0.3)).otherwise(alt.value(0)),\n    tooltip=[alt.Tooltip(c, type=\"quantitative\") for c in columns],\n).add_params(nearest)\n\n\n# Put the five layers into a chart and bind the data\nalt.layer(\n    line, points, rules\n).properties(\n    width=600, height=300\n)"
  },
  {
    "path": "tests/examples_arguments_syntax/multiple_interactions.py",
    "content": "\"\"\"\nMultiple Interactions\n=====================\nThis example shows how multiple user inputs can be layered onto a chart. The four inputs have functionality as follows:\n\n* Dropdown: Filters the movies by genre\n* Radio Buttons: Highlights certain films by Worldwide Gross\n* Mouse Drag and Scroll: Zooms the x and y scales to allow for panning.\n\n\n\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nmovies = alt.UrlData(\n    data.movies.url,\n    format=alt.DataFormat(parse={'Release Date':'date'})\n)\nratings = ['G', 'NC-17', 'PG', 'PG-13', 'R']\ngenres = ['Action', 'Adventure', 'Black Comedy', 'Comedy',\n       'Concert/Performance', 'Documentary', 'Drama', 'Horror', 'Musical',\n       'Romantic Comedy', 'Thriller/Suspense', 'Western']\n\nbase = alt.Chart(movies, width=200, height=200).mark_point(filled=True).transform_calculate(\n    Hundred_Million_Production = \"datum['Production Budget'] > 100000000.0 ? 100 : 10\",\n    Release_Year = \"year(datum['Release Date'])\"\n).transform_filter(\n    alt.datum['IMDB Rating'] > 0\n).transform_filter(\n    alt.FieldOneOfPredicate(field='MPAA Rating', oneOf=ratings)\n).encode(\n    x=alt.X('Worldwide Gross:Q', scale=alt.Scale(domain=(100000,10**9), clamp=True)),\n    y='IMDB Rating:Q',\n    tooltip='Title:N'\n)\n\n# A slider filter\nyear_slider = alt.binding_range(min=1969, max=2018, step=1, name='Release Year')\nslider_selection = alt.selection_point(bind=year_slider, fields=['Release_Year'])\n\nfilter_year = base.add_params(\n    slider_selection\n).transform_filter(\n    slider_selection\n).properties(title='Slider Filtering')\n\n# A dropdown filter\ngenre_dropdown = alt.binding_select(options=genres, name='Genre')\ngenre_select = alt.selection_point(fields=['Major Genre'], bind=genre_dropdown)\n\nfilter_genres = base.add_params(\n    genre_select\n).transform_filter(\n    genre_select\n).properties(title='Dropdown Filtering')\n\n#color changing marks\nrating_radio = alt.binding_radio(options=ratings, name='Rating')\nrating_select = alt.selection_point(fields=['MPAA Rating'], bind=rating_radio)\n\nrating_color = (\n    alt.when(rating_select)\n    .then(alt.Color('MPAA Rating:N', legend=None))\n    .otherwise(alt.value('lightgray'))\n)\n\nhighlight_ratings = base.add_params(\n    rating_select\n).encode(\n    color=rating_color\n).properties(title='Radio Button Highlighting')\n\n# Boolean selection for format changes\ninput_checkbox = alt.binding_checkbox(name='Big Budget Films ')\ncheckbox_selection = alt.param(bind=input_checkbox)\n\nsize_checkbox = (\n    alt.when(checkbox_selection)\n    .then(alt.Size('Big Budget Film:N', scale=alt.Scale(range=[25, 150])))\n    .otherwise(alt.value(25))\n)\n\nbudget_sizing = base.add_params(\n    checkbox_selection\n).encode(\n    size=size_checkbox\n).properties(title='Checkbox Formatting')\n\n(filter_year | budget_sizing) & (highlight_ratings | filter_genres)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/natural_disasters.py",
    "content": "\"\"\"\nGlobal Deaths from Natural Disasters\n------------------------------------\nThis example shows a proportional symbols visualization of deaths from natural disasters by year and type.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.disasters.url\n\nalt.Chart(source).transform_filter(\n    alt.datum.Entity != 'All natural disasters'\n).mark_circle(\n    opacity=0.8,\n    stroke='black',\n    strokeWidth=1,\n    strokeOpacity=0.4\n).encode(\n    x=alt.X('Year:T', title=None, scale=alt.Scale(domain=['1899','2018'])),\n    y=alt.Y(\n        'Entity:N',\n        sort=alt.EncodingSortField(field=\"Deaths\", op=\"sum\", order='descending'),\n        title=None\n    ),\n    size=alt.Size('Deaths:Q',\n        scale=alt.Scale(range=[0, 2500]),\n        legend=alt.Legend(title='Deaths', clipHeight=30, format='s')\n    ),\n    color=alt.Color('Entity:N', legend=None),\n    tooltip=[\n        \"Entity:N\", \n        alt.Tooltip(\"Year:T\", format='%Y'), \n        alt.Tooltip(\"Deaths:Q\", format='~s')\n    ],\n).properties(\n    width=450,\n    height=320,\n    title=alt.Title(\n        text=\"Global Deaths from Natural Disasters (1900-2017)\",\n        subtitle=\"The size of the bubble represents the total death count per year, by type of disaster\",\n        anchor='start'\n    )\n).configure_axisY(\n    domain=False,\n    ticks=False,\n    offset=10\n).configure_axisX(\n    grid=False,\n).configure_view(\n    stroke=None\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/normalized_stacked_area_chart.py",
    "content": "\"\"\"\nNormalized Stacked Area Chart\n-----------------------------\nThis example shows how to make a normalized stacked area chart.\n\"\"\"\n# category: area charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.iowa_electricity()\n\nalt.Chart(source).mark_area().encode(\n    x=\"year:T\",\n    y=alt.Y(\"net_generation:Q\", stack=\"normalize\"),\n    color=\"source:N\"\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/normalized_stacked_bar_chart.py",
    "content": "\"\"\"\nNormalized Stacked Bar Chart\n----------------------------\nThis is an example of a normalized stacked bar chart using data which contains crop yields over different regions and different years in the 1930s.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nalt.Chart(source).mark_bar().encode(\n    x=alt.X('sum(yield)', stack=\"normalize\"),\n    y='variety',\n    color='site'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/normed_parallel_coordinates.py",
    "content": "\"\"\"\nNormalized Parallel Coordinates\n-------------------------------\nA `Parallel Coordinates <https://en.wikipedia.org/wiki/Parallel_coordinates>`_\nchart is a chart that lets you visualize the individual data points by drawing\na single line for each of them.\n\nSuch a chart can be created in Altair by first transforming the data into a\nsuitable representation.\n\nThis example shows a modified parallel coordinates chart with the Penguins dataset,\nwhere the y-axis shows the value after min-max rather than the raw value. It's a\nsimplified Altair version of `the VegaLite version <https://vega.github.io/vega-lite/examples/parallel_coordinate.html>`_\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nfrom altair.datasets import data\nfrom altair import datum\n\nsource = data.penguins()\n\nalt.Chart(source).transform_window(\n    index='count()'\n).transform_fold(\n    ['Beak Length (mm)', 'Beak Depth (mm)', 'Flipper Length (mm)']\n).transform_joinaggregate(\n     min='min(value)', \n     max='max(value)',\n     groupby=['key']\n).transform_calculate(\n    minmax_value=(datum.value-datum.min)/(datum.max-datum.min), \n    mid=(datum.min+datum.max)/2\n).mark_line().encode(\n    x='key:N',\n    y='minmax_value:Q',\n    color='Species:N',\n    detail='index:N',\n    opacity=alt.value(0.5)\n).properties(width=500)\n\n\n"
  },
  {
    "path": "tests/examples_arguments_syntax/one_dot_per_zipcode.py",
    "content": "\"\"\"\nOne Dot Per Zipcode\n-----------------------\nThis example shows a geographical plot with one dot per zipcode.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\n# Since the data is more than 5,000 rows we'll import it from a URL\nsource = data.zipcodes.url\n\nalt.Chart(source).transform_calculate(\n    \"leading digit\", alt.expr.substring(alt.datum.zip_code, 0, 1)\n).mark_circle(size=3).encode(\n    longitude='longitude:Q',\n    latitude='latitude:Q',\n    color='leading digit:N',\n    tooltip='zip_code:N'\n).project(\n    type='albersUsa'\n).properties(\n    width=650,\n    height=400\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/pacman_chart.py",
    "content": "\"\"\"\nPacman Chart\n------------\nChart made using ``mark_arc`` and constant values.\nThis could also be made using \n``alt.Chart(source).mark_arc(color = \"gold\", theta = (5/8)*np.pi, theta2 = (19/8)*np.pi,radius=100)``.\n\"\"\"\n# category: circular plots\n\nimport numpy as np\nimport altair as alt\n\nalt.Chart().mark_arc(color=\"gold\").encode(\n    theta=alt.datum((5 / 8) * np.pi, scale=None),\n    theta2=alt.datum((19 / 8) * np.pi),\n    radius=alt.datum(100, scale=None),\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/parallel_coordinates.py",
    "content": "\"\"\"\nParallel Coordinates\n--------------------\nA `Parallel Coordinates <https://en.wikipedia.org/wiki/Parallel_coordinates>`_\nchart is a chart that lets you visualize the individual data points by drawing\na single line for each of them.\nSuch a chart can be created in Altair by first transforming the data into a\nsuitable representation.\nThis example shows a parallel coordinates chart with the Penguins dataset.\n\"\"\"\n# category: advanced calculations\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.penguins()\n\nalt.Chart(source).transform_window(\n    index='count()'  \n).transform_fold(\n    ['Beak Length (mm)', 'Beak Depth (mm)', 'Flipper Length (mm)']\n).mark_line().encode(\n    x='key:N',\n    y='value:Q',\n    color='Species:N',\n    detail='index:N',\n    opacity=alt.value(0.5)\n).properties(width=500)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/percentage_of_total.py",
    "content": "\"\"\"\nCalculating Percentage of Total\n-------------------------------\nThis chart demonstrates how to use a joinaggregate transform to display\ndata values as a percentage of total.\n\"\"\"\n# category: bar charts\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame({'Activity': ['Sleeping', 'Eating', 'TV', 'Work', 'Exercise'],\n                           'Time': [8, 2, 4, 8, 2]})\n\nalt.Chart(source).transform_joinaggregate(\n    TotalTime='sum(Time)',\n).transform_calculate(\n    PercentOfTotal=\"datum.Time / datum.TotalTime\"\n).mark_bar().encode(\n    alt.X('PercentOfTotal:Q', axis=alt.Axis(format='.0%')),\n    y='Activity:N'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/pie_chart.py",
    "content": "\"\"\"\nPie Chart\n---------\nThis example shows how to make a Pie Chart using ``mark_arc``.\nThis is adapted from a corresponding Vega-Lite Example:\n`Pie Chart <https://vega.github.io/vega-lite/examples/arc_pie.html>`_.\n\"\"\"\n# category: circular plots\n\nimport pandas as pd\nimport altair as alt\n\nsource = pd.DataFrame({\"category\": [1, 2, 3, 4, 5, 6], \"value\": [4, 6, 10, 3, 7, 8]})\n\nalt.Chart(source).mark_arc().encode(\n    theta=alt.Theta(field=\"value\", type=\"quantitative\"),\n    color=alt.Color(field=\"category\", type=\"nominal\"),\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/pie_chart_with_labels.py",
    "content": "\"\"\"\nPie Chart with Labels\n---------------------\nThis example shows how to layer text over arc marks (``mark_arc``) to label pie charts.\nThis is adapted from a corresponding Vega-Lite Example:\n`Pie Chart with Labels <https://vega.github.io/vega-lite/examples/layer_arc_label.html>`_.\n\"\"\"\n# category: circular plots\n\nimport pandas as pd\nimport altair as alt\n\nsource = pd.DataFrame(\n    {\"category\": [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"], \"value\": [4, 6, 10, 3, 7, 8]}\n)\n\nbase = alt.Chart(source).encode(\n    theta=alt.Theta(\"value:Q\", stack=True), color=alt.Color(\"category:N\", legend=None)\n)\n\npie = base.mark_arc(outerRadius=120)\ntext = base.mark_text(radius=140, size=20).encode(text=\"category:N\")\n\npie + text\n"
  },
  {
    "path": "tests/examples_arguments_syntax/point_map.py",
    "content": "\"\"\"\nPoint map\n=========\nThis is a layered map that shows the positions of airports on a background of U.S. states.\n\"\"\"\n# category: maps\nimport altair as alt\nfrom altair.datasets import data\n\n# Read in points\nairports = data.airports()\n\n# Read in polygons from topojson\nstates = alt.topo_feature(data.us_10m.url, feature='states')\n\n# US states background\nbackground = alt.Chart(states).mark_geoshape(\n    fill='lightgray',\n    stroke='white'\n).properties(\n    width=500,\n    height=300\n).project('albersUsa')\n\n# airport positions on background\npoints = alt.Chart(airports).mark_circle(\n    size=10,\n    color='steelblue'\n).encode(\n    longitude='longitude:Q',\n    latitude='latitude:Q',\n    tooltip=['name', 'city', 'state']\n)\n\nbackground + points\n"
  },
  {
    "path": "tests/examples_arguments_syntax/polar_bar_chart.py",
    "content": "\"\"\"\nPolar Bar Chart\n---------------\nThis example shows how to make a polar bar chart using ``mark_arc``.\nThis could also have been called a \"pie chart with axis labels\",\nbut is more commonly referred to as a polar bar chart.\nThe axis lines are created using pie charts with only the stroke visible.\n\"\"\"\n# category: circular plots\n\nimport math\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame({\n    \"hour\": range(24),\n    \"observations\": [2, 2, 2, 2, 2, 3, 4, 4, 8, 8, 9, 7, 5, 6, 8, 8, 7, 7, 4, 3, 3, 2, 2, 2]\n})\n\npolar_bars = alt.Chart(source).mark_arc(stroke='white', tooltip=True).encode(\n    theta=alt.Theta(\"hour:O\"),\n    radius=alt.Radius('observations', scale=alt.Scale(type='linear')),\n    radius2=alt.datum(1),\n)\n\n# Create the circular axis lines for the number of observations\naxis_rings = alt.Chart(pd.DataFrame({\"ring\": range(2, 11, 2)})).mark_arc(stroke='lightgrey', fill=None).encode(\n    theta=alt.value(2 * math.pi),\n    radius=alt.Radius('ring', stack=False)\n)\naxis_rings_labels = axis_rings.mark_text(color='grey', radiusOffset=5, align='left').encode(\n    text=\"ring\",\n    theta=alt.value(math.pi / 4)\n)\n\n# Create the straight axis lines for the time of the day\naxis_lines = alt.Chart(pd.DataFrame({\n    \"radius\": 10,\n    \"theta\": math.pi / 2,\n    'hour': ['00:00', '06:00', '12:00', '18:00']\n})).mark_arc(stroke='lightgrey', fill=None).encode(\n    theta=alt.Theta('theta', stack=True),\n    radius=alt.Radius('radius'),\n    radius2=alt.datum(1),\n)\naxis_lines_labels = axis_lines.mark_text(\n        color='grey',\n        radiusOffset=5,\n        thetaOffset=-math.pi / 4,\n        # These adjustments could be left out with a larger radius offset, but they make the label positioning a bit cleaner\n        align=alt.expr('datum.hour == \"18:00\" ? \"right\" : datum.hour == \"06:00\" ? \"left\" : \"center\"'),\n        baseline=alt.expr('datum.hour == \"00:00\" ? \"bottom\" : datum.hour == \"12:00\" ? \"top\" : \"middle\"'),\n    ).encode(text=\"hour\")\n\nalt.layer(\n    axis_rings,\n    polar_bars,\n    axis_rings_labels,\n    axis_lines,\n    axis_lines_labels,\n    title=['Observations throughout the day', '']\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/poly_fit_regression.py",
    "content": "\"\"\"\nPolynomial Fit Plot with Regression Transform\n=============================================\nThis example shows how to overlay data with multiple fitted polynomials using\nthe regression transform.\n\"\"\"\n# category: uncertainties and trends\n\nimport numpy as np\nimport pandas as pd\nimport altair as alt\n\n# Generate some random data\nrng = np.random.RandomState(1)\nx = rng.rand(40) ** 2\ny = 10 - 1.0 / (x + 0.1) + rng.randn(40)\nsource = pd.DataFrame({\"x\": x, \"y\": y})\n\n# Define the degree of the polynomial fits\ndegree_list = [1, 3, 5]\n\nbase = alt.Chart(source).mark_circle(color=\"black\").encode(\n        alt.X(\"x\"), alt.Y(\"y\")\n)\n\npolynomial_fit = [\n    base.transform_regression(\n        \"x\", \"y\", method=\"poly\", order=order, as_=[\"x\", str(order)]\n    )\n    .mark_line()\n    .transform_fold([str(order)], as_=[\"degree\", \"y\"])\n    .encode(alt.Color(\"degree:N\"))\n    for order in degree_list\n]\n\nalt.layer(base, *polynomial_fit)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/pyramid.py",
    "content": "\"\"\"\nPyramid Pie Chart\n-----------------\nAltair reproduction of http://robslink.com/SAS/democd91/pyramid_pie.htm\n\"\"\"\n# category: case studies\nimport altair as alt\nimport pandas as pd\n\ncategory = ['Sky', 'Shady side of a pyramid', 'Sunny side of a pyramid']\ncolor = [\"#416D9D\", \"#674028\", \"#DEAC58\"]\ndf = pd.DataFrame({'category': category, 'value': [75, 10, 15]})\n\nalt.Chart(df).mark_arc(outerRadius=80).encode(\n    alt.Theta('value:Q', scale=alt.Scale(range=[2.356, 8.639])),\n    alt.Color('category:N',\n        scale=alt.Scale(domain=category, range=color),\n        legend=alt.Legend(title=None, orient='none', legendX=160, legendY=50)),\n    order='value:Q'\n).properties(width=150, height=150).configure_view(strokeOpacity=0)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/radial_chart.py",
    "content": "\"\"\"\nRadial Chart\n------------\nThis radial plot uses both angular and radial extent to convey multiple dimensions of data.\nThis is adapted from a corresponding Vega-Lite Example:\n`Radial Plot <https://vega.github.io/vega-lite/examples/arc_radial.html>`_.\n\"\"\"\n# category: circular plots\n\nimport pandas as pd\nimport altair as alt\n\nsource = pd.DataFrame({\"values\": [12, 23, 47, 6, 52, 19]})\n\nbase = alt.Chart(source).encode(\n    theta=alt.Theta(\"values:Q\", stack=True),\n    radius=alt.Radius(\"values\", scale=alt.Scale(type=\"sqrt\", zero=True, rangeMin=20)),\n    color=\"values:N\",\n)\n\nc1 = base.mark_arc(innerRadius=20, stroke=\"#fff\")\n\nc2 = base.mark_text(radiusOffset=10).encode(text=\"values:Q\")\n\nc1 + c2\n"
  },
  {
    "path": "tests/examples_arguments_syntax/ranged_dot_plot.py",
    "content": "\"\"\"\nRanged Dot Plot\n---------------\nThis example shows a ranged dot plot to convey changing life expectancy for the five most populous countries (between 1955 and 2000).\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.countries.url\n\nchart = (\n    alt.Chart(source)\n    .encode(x=\"life_expect:Q\", y=\"country:N\")\n    .transform_filter(\n        alt.FieldOneOfPredicate(\n            field=\"country\",\n            oneOf=[\"China\", \"India\", \"United States\", \"Indonesia\", \"Brazil\"],\n        )\n    )\n    .transform_filter(alt.FieldOneOfPredicate(field=\"year\", oneOf=[1955, 2000]))\n)\n\nline = chart.mark_line(color=\"#db646f\").encode(detail=\"country:N\")\n\n# Add points for life expectancy in 1955 & 2000\ncolor = alt.Color(\n    \"year:O\", scale=alt.Scale(domain=[1955, 2000], range=[\"#e6959c\", \"#911a24\"])\n)\npoints = (\n    chart.mark_point(\n        size=100,\n        opacity=1,\n        filled=True,\n    )\n    .encode(color=color)\n    .interactive()\n)\n\n(line + points)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/ridgeline_plot.py",
    "content": "\"\"\"\nRidgeline plot\n--------------\nA `Ridgeline plot <https://serialmentor.com/blog/2017/9/15/goodbye-joyplots>`_\nlets you visualize distribution of a numeric value for different\nsubsets of data (what we call \"facets\" in Altair).\n\nSuch a chart can be created in Altair by first transforming the data into a\nsuitable representation.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather.url\n\nstep = 20\noverlap = 1\n\nalt.Chart(source, height=step).transform_timeunit(\n    Month='month(date)'\n).transform_joinaggregate(\n    mean_temp='mean(temp_max)', groupby=['Month']\n).transform_bin(\n    ['bin_max', 'bin_min'], 'temp_max'\n).transform_aggregate(\n    value='count()', groupby=['Month', 'mean_temp', 'bin_min', 'bin_max']\n).transform_impute(\n    impute='value', groupby=['Month', 'mean_temp'], key='bin_min', value=0\n).mark_area(\n    interpolate='monotone',\n    fillOpacity=0.8,\n    stroke='lightgray',\n    strokeWidth=0.5\n).encode(\n    alt.X('bin_min:Q', bin='binned', title='Maximum Daily Temperature (C)'),\n    alt.Y(\n        'value:Q',\n        scale=alt.Scale(range=[step, -step * overlap]),\n        axis=None\n    ),\n    alt.Fill(\n        'mean_temp:Q',\n        legend=None,\n        scale=alt.Scale(domain=[30, 5], scheme='redyellowblue')\n    )\n).facet(\n    row=alt.Row(\n        'Month:T',\n        title=None,\n        header=alt.Header(labelAngle=0, labelAlign='left', format='%B')\n    )\n).properties(\n    title='Seattle Weather',\n    bounds='flush'\n).configure_facet(\n    spacing=0\n).configure_view(\n    stroke=None\n).configure_title(\n    anchor='end'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/scatter_faceted.py",
    "content": "\"\"\"\nFaceted Scatter Plot\n--------------------\nA series of scatter plots, one for each country/area of origin.\n\"\"\"\n# category: scatter plots\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\nalt.Chart(source, width=100, height=100).mark_point().encode(\n    x=\"Horsepower:Q\",\n    y=\"Miles_per_Gallon:Q\",\n    row=\"Origin:N\",\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/scatter_href.py",
    "content": "\"\"\"\nScatter Plot with Href\n----------------------\nThis example shows a scatter plot with an ``href`` encoding constructed from\nthe car name. With this encoding, you can click on any of the points to open\na google search for the car name.\n\"\"\"\n# category: scatter plots\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\nalt.Chart(source).transform_calculate(\n    url='https://www.google.com/search?q=' + alt.datum.Name\n).mark_point().encode(\n    x='Horsepower:Q',\n    y='Miles_per_Gallon:Q',\n    color='Origin:N',\n    href='url:N',\n    tooltip=['Name:N', 'url:N']\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/scatter_linked_brush.py",
    "content": "\"\"\"\nMulti-panel Scatter Plot with Linked Brushing\n---------------------------------------------\nThis is an example of using an interval selection to control the color of\npoints across multiple panels.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\nbrush = alt.selection_interval(resolve='global')\n\nbase = alt.Chart(source).mark_point().encode(\n    y='Miles_per_Gallon',\n    color=alt.when(brush).then(\"Origin\").otherwise(alt.ColorValue(\"gray\")),\n).add_params(\n    brush\n).properties(\n    width=250,\n    height=250\n)\n\nbase.encode(x='Horsepower') | base.encode(x='Acceleration')\n"
  },
  {
    "path": "tests/examples_arguments_syntax/scatter_linked_table.py",
    "content": "\"\"\"\nBrushing Scatter Plot to Show Data on a Table\n---------------------------------------------\nA scatter plot of the cars dataset, with data tables for horsepower, MPG, and origin.\nThe tables update to reflect the selection on the scatter plot.\n\"\"\"\n# category: scatter plots\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\n# Brush for selection\nbrush = alt.selection_interval()\n\n# Scatter Plot\npoints = alt.Chart(source).mark_point().encode(\n    x='Horsepower:Q',\n    y='Miles_per_Gallon:Q',\n    color=alt.when(brush).then(alt.value(\"steelblue\")).otherwise(alt.value(\"grey\"))\n).add_params(brush)\n\n# Base chart for data tables\nranked_text = alt.Chart(source).mark_text(align='right').encode(\n    y=alt.Y('row_number:O', axis=None)\n).transform_filter(\n    brush\n).transform_window(\n    row_number='row_number()'\n).transform_filter(\n    alt.datum.row_number < 15\n)\n\n# Data Tables\nhorsepower = ranked_text.encode(text='Horsepower:N').properties(\n    title=alt.Title(text='Horsepower', align='right')\n)\nmpg = ranked_text.encode(text='Miles_per_Gallon:N').properties(\n    title=alt.Title(text='MPG', align='right')\n)\norigin = ranked_text.encode(text='Origin:N').properties(\n    title=alt.Title(text='Origin', align='right')\n)\ntext = alt.hconcat(horsepower, mpg, origin) # Combine data tables\n\n# Build chart\nalt.hconcat(\n    points,\n    text\n).resolve_legend(\n    color=\"independent\"\n).configure_view(\n    stroke=None\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/scatter_marginal_hist.py",
    "content": "\"\"\"\nScatter Plot with Faceted Marginal Histograms\n---------------------------------------------\nThis example demonstrates how to generate a scatter plot,\nwith faceted marginal histograms that share their respective x- and y-limits.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.penguins()\n\nbase = alt.Chart(source)\nbase_bar = base.mark_bar(opacity=0.3, binSpacing=0)\n\nxscale = alt.Scale(domain=(170, 235))\nyscale = alt.Scale(domain=(2500, 6500))\n\npoints = base.mark_circle().encode(\n    alt.X(\"Flipper Length (mm)\", scale=xscale),\n    alt.Y(\"Body Mass (g)\", scale=yscale),\n    color=\"Species\",\n)\n\ntop_hist = (\n    base_bar\n    .encode(\n        alt.X(\n            \"Flipper Length (mm):Q\",\n            # when using bins, the axis scale is set through\n            # the bin extent, so we do not specify the scale here\n            # (which would be ignored anyway)\n            bin=alt.Bin(maxbins=20, extent=xscale.domain),\n            stack=None,\n            title=\"\",\n        ),\n        alt.Y(\"count()\", stack=None, title=\"\"),\n        alt.Color(\"Species:N\"),\n    )\n    .properties(height=60)\n)\n\nright_hist = (\n    base_bar\n    .encode(\n        alt.Y(\n            \"Body Mass (g):Q\",\n            bin=alt.Bin(maxbins=20, extent=yscale.domain),\n            stack=None,\n            title=\"\",\n        ),\n        alt.X(\"count()\", stack=None, title=\"\"),\n        alt.Color(\"Species:N\"),\n    )\n    .properties(width=60)\n)\n\ntop_hist & (points | right_hist)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/scatter_matrix.py",
    "content": "\"\"\"\nScatter Matrix\n--------------\nAn example of using a RepeatChart to construct a multi-panel scatter plot\nwith linked panning and zooming.\n\"\"\"\n# category: scatter plots\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\nalt.Chart(source).mark_circle().encode(\n    alt.X(alt.repeat(\"column\"), type='quantitative'),\n    alt.Y(alt.repeat(\"row\"), type='quantitative'),\n    color='Origin:N'\n).properties(\n    width=150,\n    height=150\n).repeat(\n    row=['Horsepower', 'Acceleration', 'Miles_per_Gallon'],\n    column=['Miles_per_Gallon', 'Acceleration', 'Horsepower']\n).interactive()\n"
  },
  {
    "path": "tests/examples_arguments_syntax/scatter_point_paths_hover.py",
    "content": "\"\"\"\nScatter plot with point paths on hover with search box\n======================================================\nThis example combines cross-sectional analysis (comparing countries at a single point in time) \nwith longitudinal analysis (tracking changes in individual countries over time), using\nan interactive visualization technique inspired by [this Vega example](https://vega.github.io/vega/examples/global-development/).\n\nKey features:\n1. Point Paths. On hover, shows data trajectories using a trail mark that\nthickens from past to present, clearly indicating the direction of time.\n2. Search Box. Implements a case-insensitive regex filter for country names,\nenabling dynamic, flexible data point selection to enhance exploratory analysis.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\n# Data source\nsource = data.gapminder.url\n\n# X-value slider\nx_slider = alt.binding_range(min=1955, max=2005, step=5, name='Year ')\nx_select = alt.selection_point(name=\"x_select\", fields=['year'], bind=x_slider, value=1980)\n\n# Hover selection\nhover = alt.selection_point(on='mouseover', fields=['country'], empty=False)\n# A separate hover for the points since these need empty=True  \nhover_point_opacity = alt.selection_point(on='mouseover', fields=['country'])  \n\n# Search box for country name\nsearch_box = alt.param(\n    value='',\n    bind=alt.binding(input='search', placeholder=\"Country\", name='Search ')\n)\n\n# Base chart\nbase = alt.Chart(source).encode(\n    x=alt.X('fertility:Q', scale=alt.Scale(zero=False), title='Babies per woman (total fertility rate)'),\n    y=alt.Y('life_expect:Q', scale=alt.Scale(zero=False), title='Life expectancy'),\n    color=alt.Color('region:N', title='Region', legend=alt.Legend(orient='bottom-left', titleFontSize=14, labelFontSize=12), scale=alt.Scale(scheme='dark2')),\n    detail='country:N'\n).transform_calculate(\n    region=\"\"\"{\n        '0': 'South Asia',\n        '1': 'Europe & Central Asia',\n        '2': 'Sub-Saharan Africa',\n        '3': 'The Americas',\n        '4': 'East Asia & Pacific',\n        '5': 'Middle East & North Africa'\n    }[datum.cluster]\"\"\"\n).transform_filter(\n    # Exclude North Korea and South Korea due to source data error\n    \"datum.country !== 'North Korea' && datum.country !== 'South Korea'\"\n)\n\nsearch_matches = alt.expr.test(alt.expr.regexp(search_box, \"i\"), alt.datum.country)\nopacity = (\n    alt.when(hover_point_opacity, search_matches)\n    .then(alt.value(0.8))\n    .otherwise(alt.value(0.1))\n)\n# Points that are always visible (filtered by slider and search)\nvisible_points = base.mark_circle(size=100).encode(\n    opacity=opacity\n    ).transform_filter(\n        x_select\n    ).add_params(\n        hover,\n        hover_point_opacity,\n        x_select\n)\n\nwhen_hover = alt.when(hover)\nhover_line = alt.layer(\n    # Line layer\n    base.mark_trail().encode(\n        order=alt.Order(\n            'year:Q',\n            sort='ascending'\n        ),\n        size=alt.Size(\n            'year:Q',\n            scale=alt.Scale(domain=[1955, 2005], range=[1, 12]),\n            legend=None\n        ),\n        opacity=when_hover.then(alt.value(0.3)).otherwise(alt.value(0)),\n        color=alt.value('#222222')\n    ),\n    # Point layer\n    base.mark_point(size=50).encode(\n        opacity=when_hover.then(alt.value(0.8)).otherwise(alt.value(0)),\n    )\n)\n\n# Year labels\nyear_labels = base.mark_text(align='left', dx=5, dy=-5, fontSize=14).encode(\n    text='year:O', \n    color=alt.value('#222222')\n).transform_filter(hover)\n\n# Country labels\ncountry_labels = alt.Chart(source).mark_text(\n    align='left',\n    dx=-15,\n    dy=-25,\n    fontSize=18,\n    fontWeight='bold'\n).encode(\n    x='fertility:Q',\n    y='life_expect:Q',\n    text='country:N',\n    color=alt.value('black'),\n    opacity=when_hover.then(alt.value(1)).otherwise(alt.value(0))\n).transform_window(\n    rank='rank(life_expect)',\n    sort=[alt.SortField('life_expect', order='descending')], \n    groupby=['country'] # places label atop highest point on y-axis on hover\n).transform_filter(\n    alt.datum.rank == 1\n).transform_aggregate(\n    life_expect='max(life_expect)',\n    fertility='max(fertility)',\n    groupby=['country']\n)\n\nbackground_year = alt.Chart(source).mark_text(\n    baseline='middle',\n    fontSize=96,\n    opacity=0.2\n).encode(\n    text='year:O'\n).transform_filter(\n    x_select\n).transform_aggregate(\n    year='max(year)'\n)\n\n# Combine all layers\nchart = alt.layer(\n    visible_points, year_labels, country_labels, hover_line, background_year\n).properties(\n    width=500,\n    height=500,\n    padding=10  # Padding ensures labels fit\n).configure_axis(\n    labelFontSize=12,\n    titleFontSize=12\n).add_params(search_box)\n\nchart"
  },
  {
    "path": "tests/examples_arguments_syntax/scatter_qq.py",
    "content": "\"\"\"\nQuantile-Quantile Plot\n----------------------\nA quantile-quantile plot comparing input data to theoretical distributions.\n\"\"\"\n# category: distributions\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.normal_2d.url\n\nbase = alt.Chart(source).transform_quantile(\n    'u',\n    step=0.01,\n    as_ = ['p', 'v']\n).transform_calculate(\n    uniform = 'quantileUniform(datum.p)',\n    normal = 'quantileNormal(datum.p)'\n).mark_point().encode(\n    alt.Y('v:Q')\n)\n\nbase.encode(x='uniform:Q') | base.encode(x='normal:Q')\n"
  },
  {
    "path": "tests/examples_arguments_syntax/scatter_tooltips.py",
    "content": "\"\"\"\nSimple Scatter Plot with Tooltips\n---------------------------------\nA scatter plot of the cars dataset, with tooltips showing selected column\nvalues when you hover over points. We make the points larger so that it is\neasier to hover over them.\n\"\"\"\n# category: simple charts\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\nalt.Chart(source).mark_circle(size=60).encode(\n    x='Horsepower',\n    y='Miles_per_Gallon',\n    color='Origin',\n    tooltip=['Name', 'Origin', 'Horsepower', 'Miles_per_Gallon']\n).interactive()\n"
  },
  {
    "path": "tests/examples_arguments_syntax/scatter_with_histogram.py",
    "content": "\"\"\"\nScatter Plot and Histogram with Interval Selection\n==================================================\n\nThis example shows how to link a scatter plot and a histogram\ntogether such that an interval selection in the histogram will\nplot the selected values in the scatter plot.\n\nNote that both subplots need to know about the `mbin` field created\nby the `transform_bin` method. In order to achieve this, the data is\nnot passed to the `Chart()` instances creating the subplots, but\ndirectly in the `hconcat()` function, which joins the two plots together.\n\"\"\"\n# category: interactive charts\n\nimport altair as alt\nimport pandas as pd\nimport numpy as np\n\nx = np.random.normal(size=100)\ny = np.random.normal(size=100)\n\nm = np.random.normal(15, 1, size=100)\n\nsource = pd.DataFrame({\"x\": x, \"y\":y, \"m\":m})\n\n# interval selection in the scatter plot\npts = alt.selection_interval(encodings=[\"x\"])\n\n# left panel: scatter plot\npoints = alt.Chart().mark_point(filled=True, color=\"black\").encode(\n    x='x',\n    y='y'\n).transform_filter(\n    pts\n).properties(\n    width=300,\n    height=300\n)\n\n# right panel: histogram\nmag = alt.Chart().mark_bar().encode(\n    x='mbin:N',\n    y=\"count()\",\n    color=alt.when(pts).then(alt.value(\"black\")).otherwise(alt.value(\"lightgray\"))\n).properties(\n    width=300,\n    height=300\n).add_params(pts)\n\n# build the chart:\nalt.hconcat(\n    points,\n    mag,\n    data=source\n).transform_bin(\n    \"mbin\",\n    field=\"m\",\n    bin=alt.Bin(maxbins=20)\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/scatter_with_labels.py",
    "content": "\"\"\"\nSimple Scatter Plot with Labels\n===============================\nThis example shows a basic scatter plot with labels created with Altair.\n\"\"\"\n# category: scatter plots\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame({\n    'x': [1, 3, 5, 7, 9],\n    'y': [1, 3, 5, 7, 9],\n    'label': ['A', 'B', 'C', 'D', 'E']\n})\n\npoints = alt.Chart(source).mark_point().encode(\n    x='x:Q',\n    y='y:Q'\n)\n\ntext = points.mark_text(\n    align='left',\n    baseline='middle',\n    dx=7\n).encode(\n    text='label'\n)\n\npoints + text\n"
  },
  {
    "path": "tests/examples_arguments_syntax/scatter_with_layered_histogram.py",
    "content": "\"\"\"\nInteractive Scatter Plot and Linked Layered Histogram\n=====================================================\n\nThis example shows how to link a scatter plot and a histogram\ntogether such that clicking on a point in the scatter plot will\nisolate the distribution corresponding to that point, and vice versa.\n\"\"\"\n# category: interactive charts\n\nimport altair as alt\nimport pandas as pd\nimport numpy as np\n\n# generate fake data\nsource = pd.DataFrame({\n    'gender': ['M']*1000 + ['F']*1000,\n    'height':np.concatenate((\n        np.random.normal(69, 7, 1000), np.random.normal(64, 6, 1000)\n    )),\n    'weight': np.concatenate((\n        np.random.normal(195.8, 144, 1000), np.random.normal(167, 100, 1000)\n    )),\n    'age': np.concatenate((\n        np.random.normal(45, 8, 1000), np.random.normal(51, 6, 1000)\n        ))\n    })\n\nselector = alt.selection_point(fields=['gender'])\n\ncolor_scale = alt.Scale(domain=['M', 'F'],\n                        range=['#1FC3AA', '#8624F5'])\ncolor = (\n    alt.when(selector)\n    .then(alt.Color(\"gender:N\", scale=color_scale))\n    .otherwise(alt.value(\"lightgray\"))\n)\nbase = alt.Chart(source).properties(\n    width=250,\n    height=250\n).add_params(selector)\n\npoints = base.mark_point(filled=True, size=200).encode(\n    x=alt.X('mean(height):Q', scale=alt.Scale(domain=[0,84])),\n    y=alt.Y('mean(weight):Q', scale=alt.Scale(domain=[0,250])),\n    color=color,\n)\n\nhists = base.mark_bar(opacity=0.5, thickness=100).encode(\n    x=alt.X('age',\n            bin=alt.Bin(step=5), # step keeps bin size the same\n            scale=alt.Scale(domain=[0,100])),\n    y=alt.Y('count()',\n            stack=None,\n            scale=alt.Scale(domain=[0,350])),\n    color=alt.Color('gender:N',\n                    scale=color_scale)\n).transform_filter(\n    selector\n)\n\n\npoints | hists\n"
  },
  {
    "path": "tests/examples_arguments_syntax/scatter_with_loess.py",
    "content": "\"\"\"\nScatter Plot with LOESS Lines\n-----------------------------\nThis example shows how to add a trend line to a scatter plot using \nthe LOESS transform (LOcally Estimated Scatter Plot Smoothing).\n\"\"\"\n# category: uncertainties and trends\n\nimport altair as alt\nimport pandas as pd\nimport numpy as np\n\nnp.random.seed(1)\n\nsource = pd.DataFrame({\n    'x': np.arange(100),\n    'A': np.random.randn(100).cumsum(),\n    'B': np.random.randn(100).cumsum(),\n    'C': np.random.randn(100).cumsum(),\n})\n\nbase = alt.Chart(source).mark_circle(opacity=0.5).transform_fold(\n    fold=['A', 'B', 'C'], \n    as_=['category', 'y']\n).encode(\n    alt.X('x:Q'), \n    alt.Y('y:Q'), \n    alt.Color('category:N')\n)\n\nbase + base.transform_loess('x', 'y', groupby=['category']).mark_line(size=4)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/scatter_with_minimap.py",
    "content": "\"\"\"\nScatter Plot with Minimap\n-------------------------\nThis example shows how to create a miniature version of a plot\nsuch that creating a selection in the miniature version\nadjusts the axis limits in another, more detailed view.\n\"\"\"\n# category: scatter plots\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather()\n\nzoom = alt.selection_interval(encodings=[\"x\", \"y\"])\n\nminimap = (\n    alt.Chart(source)\n    .mark_point()\n    .add_params(zoom)\n    .encode(\n        x=\"date:T\",\n        y=\"temp_max:Q\",\n        color=alt.when(zoom).then(\"weather\").otherwise(alt.value(\"lightgray\")),\n    )\n    .properties(\n        width=200,\n        height=200,\n        title=\"Minimap -- click and drag to zoom in the detail view\",\n    )\n)\n\ndetail = (\n    alt.Chart(source)\n    .mark_point()\n    .encode(\n        x=alt.X(\n            \"date:T\", scale=alt.Scale(domain={\"param\": zoom.name, \"encoding\": \"x\"})\n        ),\n        y=alt.Y(\n            \"temp_max:Q\",\n            scale=alt.Scale(domain={\"param\": zoom.name, \"encoding\": \"y\"}),\n        ),\n        color=\"weather\",\n    )\n    .properties(width=600, height=400, title=\"Seattle weather -- detail view\")\n)\n\ndetail | minimap\n"
  },
  {
    "path": "tests/examples_arguments_syntax/scatter_with_rolling_mean.py",
    "content": "\"\"\"\nScatter Plot with Rolling Mean\n------------------------------\nA scatter plot with a rolling mean overlay. In this example a 30 day window\nis used to calculate the mean of the maximum temperature around each date.\n\"\"\"\n# category: scatter plots\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather()\n\nline = alt.Chart(source).mark_line(\n    color='red', \n    size=3\n).transform_window(\n    rolling_mean='mean(temp_max)',\n    frame=[-15, 15]\n).encode(\n    x='date:T',\n    y='rolling_mean:Q'\n)\n\npoints = alt.Chart(source).mark_point().encode(\n    x='date:T', \n    y=alt.Y('temp_max:Q', \n            axis=alt.Axis(title='Max Temp'))\n)\n\npoints + line\n"
  },
  {
    "path": "tests/examples_arguments_syntax/scatter_with_shaded_area.py",
    "content": "\"\"\"\nScatter Plot with Shaded Area\n-----------------------------\nThis example shows a scatter plot with shaded area, \nconstructed using :ref:`area mark <user-guide-area-marks>` and :ref:`rect mark <user-guide-rect-marks>`.\n\"\"\"\n# category: scatter plots\n\nimport altair as alt\nimport pandas as pd\nimport numpy as np\n\ndata = pd.DataFrame({\n    \"x\": np.random.uniform(-4, 5, size=50),\n    \"y\": np.random.uniform(2, 5, size=50),\n})\n\nrect_data = pd.DataFrame({\n    \"x1\": [-2],\n    \"x2\": [-1]\n})\n\n# define this interval between y = -x and y = -x \ndf = pd.DataFrame({ \n    \"x\": range(7),\n    \"ymin\": range(7),\n    \"ymax\": range(1,8)\n})\n\npoints = alt.Chart(data).mark_point().encode(\n    x=\"x\",\n    y=\"y\"\n)\n\ninterval = alt.Chart(df).mark_area(opacity=0.3).encode(\n    x=\"x:Q\",\n    y=\"ymin:Q\",\n    y2=\"ymax:Q\"\n)\n\n\nrect = alt.Chart(rect_data).mark_rect(opacity=0.3).encode(\n    x=\"x1\",\n    x2=\"x2\",\n    color=alt.ColorValue(\"#FF0000\")\n)\n\npoints + interval + rect"
  },
  {
    "path": "tests/examples_arguments_syntax/seattle_weather_interactive.py",
    "content": "\"\"\"\nSeattle Weather Interactive\n===========================\nThis chart provides an interactive exploration of Seattle weather over the\ncourse of the year. It includes a one-axis brush selection to easily\nsee the distribution of weather types in a particular date range.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather()\n\nscale = alt.Scale(domain=['sun', 'fog', 'drizzle', 'rain', 'snow'],\n                  range=['#e7ba52', '#a7a7a7', '#aec7e8', '#1f77b4', '#9467bd'])\ncolor = alt.Color('weather:N', scale=scale)\n\n# We create two selections:\n# - a brush that is active on the top panel\n# - a multi-click that is active on the bottom panel\nbrush = alt.selection_interval(encodings=['x'])\nclick = alt.selection_point(encodings=['color'])\n\n# Top panel is scatter plot of temperature vs time\npoints = alt.Chart().mark_point().encode(\n    alt.X('monthdate(date):T', title='Date'),\n    alt.Y('temp_max:Q',\n        title='Maximum Daily Temperature (C)',\n        scale=alt.Scale(domain=[-5, 40])\n    ),\n    color=alt.when(brush).then(color).otherwise(alt.value(\"lightgray\")),\n    size=alt.Size('precipitation:Q', scale=alt.Scale(range=[5, 200]))\n).properties(\n    width=550,\n    height=300\n).add_params(\n    brush\n).transform_filter(\n    click\n)\n\n# Bottom panel is a bar chart of weather type\nbars = alt.Chart().mark_bar().encode(\n    x='count()',\n    y='weather:N',\n    color=alt.when(click).then(color).otherwise(alt.value(\"lightgray\")),\n).transform_filter(\n    brush\n).properties(\n    width=550,\n).add_params(\n    click\n)\n\nalt.vconcat(\n    points,\n    bars,\n    data=source,\n    title=\"Seattle Weather: 2012-2015\"\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/select_detail.py",
    "content": "\"\"\"\nSelection Detail\n================\nThis example shows a selection that links two views of data: the left panel\ncontains one point per object, and the right panel contains one line per\nobject. Clicking on either the points or lines will select the corresponding\nobjects in both views of the data.\n\nThe challenge lies in expressing such hierarchical data in a way that Altair\ncan handle. We do this by merging the data into a \"long form\" dataframe, and\naggregating identical metadata for the final plot.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nimport pandas as pd\nimport numpy as np\n\nnp.random.seed(0)\n\nn_objects = 20\nn_times = 50\n\n# Create one (x, y) pair of metadata per object\nlocations = pd.DataFrame({\n    'id': range(n_objects),\n    'x': np.random.randn(n_objects),\n    'y': np.random.randn(n_objects)\n})\n\n# Create a 50-element time-series for each object\ntimeseries = pd.DataFrame(np.random.randn(n_times, n_objects).cumsum(0),\n                          columns=locations['id'],\n                          index=pd.RangeIndex(0, n_times, name='time'))\n\n# Melt the wide-form timeseries into a long-form view\ntimeseries = timeseries.reset_index().melt('time')\n\n# Merge the (x, y) metadata into the long-form view\ntimeseries['id'] = timeseries['id'].astype(int)  # make merge not complain\ndata = pd.merge(timeseries, locations, on='id')\n\n# Data is prepared, now make a chart\n\nselector = alt.selection_point(fields=['id'])\ncolor = (\n    alt.when(selector)\n    .then(alt.Color(\"id:O\", legend=None))\n    .otherwise(alt.value(\"lightgray\"))\n)\n\nbase = alt.Chart(data).properties(\n    width=250,\n    height=250\n).add_params(selector)\n\npoints = base.mark_point(filled=True, size=200).encode(\n    x='mean(x)',\n    y='mean(y)',\n    color=color,\n)\n\nline = base.mark_line().encode(\n    x='time',\n    y=alt.Y('value', scale=alt.Scale(domain=(-15, 15))),\n    color=alt.Color('id:O', legend=None)\n).transform_filter(\n    selector\n)\n\npoints | line\n"
  },
  {
    "path": "tests/examples_arguments_syntax/select_mark_area.py",
    "content": "\"\"\"\nUsing Selection Interval with mark_area\n=========================================\n\nBecause area is considered one object, just using the plain \nselector will select the entire area instead of just one part of it.\n\nThis example shows how to use two areas, one on top of the other, and a\n`transform_filter` to fake out this effect.\n\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.unemployment_across_industries.url\n\nbase = alt.Chart(source).mark_area(\n    color='goldenrod',\n    opacity=0.3\n).encode(\n    x='yearmonth(date):T',\n    y='sum(count):Q',\n)\n\nbrush = alt.selection_interval(encodings=['x'])\nbackground = base.add_params(brush)\nselected = base.transform_filter(brush).mark_area(color='goldenrod')\n\nbackground + selected\n"
  },
  {
    "path": "tests/examples_arguments_syntax/selection_histogram.py",
    "content": "\"\"\"\nSelection Histogram\n===================\nThis chart shows an example of using an interval selection to filter the\ncontents of an attached histogram, allowing the user to see the proportion\nof items in each category within the selection.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\nbrush = alt.selection_interval()\n\npoints = alt.Chart(source).mark_point().encode(\n    x='Horsepower:Q',\n    y='Miles_per_Gallon:Q',\n    color=alt.when(brush).then(\"Origin:N\").otherwise(alt.value(\"lightgray\"))\n).add_params(\n    brush\n)\n\nbars = alt.Chart(source).mark_bar().encode(\n    y='Origin:N',\n    color='Origin:N',\n    x='count(Origin):Q'\n).transform_filter(\n    brush\n)\n\npoints & bars\n"
  },
  {
    "path": "tests/examples_arguments_syntax/selection_layer_bar_month.py",
    "content": "\"\"\"\nInteractive Average\n===================\nThe plot below uses an interval selection, which causes the chart to include an interactive brush\n(shown in grey). The brush selection parameterizes the red guideline, which visualizes the average\nvalue within the selected interval.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather()\nbrush = alt.selection_interval(encodings=['x'])\n\nbars = alt.Chart().mark_bar().encode(\n    x='month(date):O',\n    y='mean(precipitation):Q',\n    opacity = alt.when(brush).then(alt.value(1)).otherwise(alt.value(0.7)),\n).add_params(\n    brush\n)\n\nline = alt.Chart().mark_rule(color='firebrick').encode(\n    y='mean(precipitation):Q',\n    size=alt.SizeValue(3)\n).transform_filter(\n    brush\n)\n\nalt.layer(bars, line, data=source)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/selection_zorder.py",
    "content": "\"\"\"\nSelection zorder\n================\nThis example shows how to bring selected points to the front/foreground\nby using a condition to change the point's (z)order\nas it is hovered over with the pointer.\nThis prevents that the selected points are obscured\nby those that are not selected.\n\"\"\"\n# category: interactive charts\n\nimport altair as alt\nfrom altair.datasets import data\n\n\ncars = data.cars.url\n\nhover = alt.selection_point(on='pointerover', nearest=True, empty=False)\nwhen_hover = alt.when(hover)\n\nchart = alt.Chart(cars, title='Selection obscured by other points').mark_circle(opacity=1).encode(\n    x='Horsepower:Q',\n    y='Miles_per_Gallon:Q',\n    color=when_hover.then(alt.value(\"coral\")).otherwise(alt.value(\"lightgray\")),\n    size=when_hover.then(alt.value(300)).otherwise(alt.value(30))\n).add_params(\n    hover\n)\n\nchart | chart.encode(\n    order=when_hover.then(alt.value(1)).otherwise(alt.value(0))\n).properties(\n    title='Selection brought to front'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/simple_bar_chart.py",
    "content": "\"\"\"\nSimple Bar Chart\n================\nThis example shows a basic bar chart created with Altair.\n\"\"\"\n# category: simple charts\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame({\n    'a': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],\n    'b': [28, 55, 43, 91, 81, 53, 19, 87, 52]\n})\n\nalt.Chart(source).mark_bar().encode(\n    x='a',\n    y='b'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/simple_heatmap.py",
    "content": "\"\"\"\nSimple Heatmap\n--------------\nThis example shows a simple heatmap for showing gridded data.\n\"\"\"\n# category: simple charts\nimport altair as alt\nimport numpy as np\nimport pandas as pd\n\n# Compute x^2 + y^2 across a 2D grid\nx, y = np.meshgrid(range(-5, 5), range(-5, 5))\nz = x ** 2 + y ** 2\n\n# Convert this grid to columnar data expected by Altair\nsource = pd.DataFrame({'x': x.ravel(),\n                     'y': y.ravel(),\n                     'z': z.ravel()})\n\nalt.Chart(source).mark_rect().encode(\n    x='x:O',\n    y='y:O',\n    color='z:Q'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/simple_histogram.py",
    "content": "\"\"\"\nSimple Histogram\n----------------\nThis example shows how to make a basic histogram, based on the vega-lite docs\nhttps://vega.github.io/vega-lite/examples/histogram.html\n\"\"\"\n# category: simple charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\nalt.Chart(source).mark_bar().encode(\n    alt.X(\"IMDB Rating:Q\", bin=True),\n    y='count()',\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/simple_line_chart.py",
    "content": "\"\"\"\nSimple Line Chart\n-----------------\nThis chart shows the most basic line chart, made from a dataframe with two\ncolumns.\n\"\"\"\n# category: simple charts\n\nimport altair as alt\nimport numpy as np\nimport pandas as pd\n\nx = np.arange(100)\nsource = pd.DataFrame({\n  'x': x,\n  'f(x)': np.sin(x / 5)\n})\n\nalt.Chart(source).mark_line().encode(\n    x='x',\n    y='f(x)'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/simple_scatter_with_errorbars.py",
    "content": "\"\"\"\nSimple Scatter Plot with Errorbars\n----------------------------------\nA simple scatter plot of a data set with errorbars.\n\"\"\"\n# category: uncertainties and trends\nimport altair as alt\nimport pandas as pd\nimport numpy as np\n\n# generate some data points with uncertainties\nnp.random.seed(0)\nx = [1, 2, 3, 4, 5]\ny = np.random.normal(10, 0.5, size=len(x))\nyerr = 0.2\n\n# set up data frame\nsource = pd.DataFrame({\"x\": x, \"y\": y, \"yerr\": yerr})\n\n# the base chart\nbase = alt.Chart(source).transform_calculate(\n    ymin=\"datum.y-datum.yerr\",\n    ymax=\"datum.y+datum.yerr\"\n)\n\n# generate the points\npoints = base.mark_point(\n    filled=True,\n    size=50,\n    color='black'\n).encode(\n    x=alt.X('x', scale=alt.Scale(domain=(0, 6))),\n    y=alt.Y('y', scale=alt.Scale(zero=False))\n)\n\n# generate the error bars\nerrorbars = base.mark_errorbar().encode(\n    x=\"x\",\n    y=\"ymin:Q\",\n    y2=\"ymax:Q\"\n)\n\npoints + errorbars\n"
  },
  {
    "path": "tests/examples_arguments_syntax/simple_stacked_area_chart.py",
    "content": "\"\"\"\nSimple Stacked Area Chart\n-------------------------\nThis example shows how to make a simple stacked area chart.\n\"\"\"\n# category: simple charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.iowa_electricity()\n\nalt.Chart(source).mark_area().encode(\n    x=\"year:T\",\n    y=\"net_generation:Q\",\n    color=\"source:N\"\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/slider_cutoff.py",
    "content": "\"\"\"\nSlider Cutoff\n=============\nThis example shows how to bind a variable parameter to a slider, and how to use the corresponding bound value to color data points.  This example is based on an example from the Altair 4 documentation for Interactions, in which the  interactivity was accomplished using a selection.  The version below has been simplified significantly through the use of a variable parameter.  Variable parameters were added in Altair 5.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nimport pandas as pd\nimport numpy as np\n\nrand = np.random.RandomState(42)\n\ndf = pd.DataFrame({\n    'xval': range(100),\n    'yval': rand.randn(100).cumsum()\n})\n\nslider = alt.binding_range(min=0, max=100, step=1)\ncutoff = alt.param(bind=slider, value=50)\npredicate = alt.datum.xval < cutoff\n\nalt.Chart(df).mark_point().encode(\n    x='xval',\n    y='yval',\n    color=alt.when(predicate).then(alt.value(\"red\")).otherwise(alt.value(\"blue\")),\n).add_params(\n    cutoff\n)"
  },
  {
    "path": "tests/examples_arguments_syntax/slope_graph.py",
    "content": "\"\"\"\nSlope Graph\n-----------------------\nThis example shows how to make Slope Graph.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nalt.Chart(source).mark_line().encode(\n    x='year:O',\n    y='median(yield)',\n    color='site'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/sorted_error_bars_with_ci.py",
    "content": "\"\"\"\nSorted Error Bars showing Confidence Interval\n=============================================\nThis example shows how to show error bars using confidence intervals, while also sorting the y-axis based on x-axis values. \n\"\"\"\n# category: advanced calculations\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\npoints = alt.Chart(source).mark_point(\n    filled=True,\n    color='black'\n).encode(\n    x=alt.X('mean(yield)', title='Barley Yield'),\n    y=alt.Y(\n        'variety',\n         sort=alt.EncodingSortField(\n             field='yield',\n             op='mean',\n             order='descending'\n         )\n    )\n).properties(\n    width=400,\n    height=250\n)\n\nerror_bars = points.mark_rule().encode(\n    x='ci0(yield)',\n    x2='ci1(yield)',\n)\n\npoints + error_bars\n"
  },
  {
    "path": "tests/examples_arguments_syntax/stacked_bar_chart.py",
    "content": "\"\"\"\nStacked Bar Chart\n-----------------\n\nThis is an example of a stacked bar chart using data which contains crop yields over different regions and different years in the 1930s.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nalt.Chart(source).mark_bar().encode(\n    x='variety',\n    y='sum(yield)',\n    color='site'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/stacked_bar_chart_sorted_segments.py",
    "content": "\"\"\"\nStacked Bar Chart with Sorted Segments\n--------------------------------------\nThis is an example of a stacked-bar chart with the segments of each bar resorted.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nalt.Chart(source).mark_bar().encode(\n    x='sum(yield)',\n    y='variety',\n    color='site',\n    order=alt.Order(\n      # Sort the segments of the bars by this field\n      'site',\n      sort='ascending'\n    )\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/stacked_bar_chart_with_text.py",
    "content": "\"\"\"\nStacked Bar Chart with Text Overlay\n===================================\nThis example shows how to overlay text on a stacked bar chart. For both the\nbar and text marks, we use the ``stack`` argument in the ``x`` encoding to\ncause the values to be stacked horizontally.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource=data.barley()\n\nbars = alt.Chart(source).mark_bar().encode(\n    x=alt.X('sum(yield):Q', stack='zero'),\n    y=alt.Y('variety:N'),\n    color=alt.Color('site')\n)\n\ntext = alt.Chart(source).mark_text(dx=-15, dy=3, color='white').encode(\n    x=alt.X('sum(yield):Q', stack='zero'),\n    y=alt.Y('variety:N'),\n    detail='site:N',\n    text=alt.Text('sum(yield):Q', format='.1f')\n)\n\nbars + text\n"
  },
  {
    "path": "tests/examples_arguments_syntax/stem_and_leaf.py",
    "content": "\"\"\"\nStem and Leaf Plot\n------------------\nThis example shows how to make a stem and leaf plot.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nimport pandas as pd\nimport numpy as np\nnp.random.seed(42)\n\n# Generating random data\nsource = pd.DataFrame({'samples': np.random.normal(50, 15, 100).astype(int).astype(str)})\n\n# Splitting stem and leaf\nsource['stem'] = source['samples'].str[:-1]\nsource['leaf'] = source['samples'].str[-1]\n\nsource = source.sort_values(by=['stem', 'leaf'])\n\n# Determining leaf position\nsource['position'] = source.groupby('stem').cumcount().add(1)\n\n# Creating stem and leaf plot\nalt.Chart(source).mark_text(\n    align='left',\n    baseline='middle',\n    dx=-5\n).encode(\n    alt.X('position:Q', title='',\n        axis=alt.Axis(ticks=False, labels=False, grid=False)\n    ),\n    alt.Y('stem:N', title='', axis=alt.Axis(tickSize=0)),\n    text='leaf:N',\n).configure_axis(\n    labelFontSize=20\n).configure_text(\n    fontSize=20\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/step_chart.py",
    "content": "\"\"\"\nStep Chart\n----------\nThis example shows Google's stock price over time.\nThis uses the \"step-after\" interpolation scheme.\nThe full list of interpolation options includes 'linear',\n'linear-closed', 'step', 'step-before', 'step-after', 'basis',\n'basis-open', 'basis-closed', 'cardinal', 'cardinal-open',\n'cardinal-closed', 'bundle', and 'monotone'.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.stocks()\n\nalt.Chart(source).mark_line(interpolate='step-after').encode(\n    x='date',\n    y='price'\n).transform_filter(\n    alt.datum.symbol == 'GOOG'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/streamgraph.py",
    "content": "\"\"\"\nStreamgraph\n-----------------\nThis example shows the streamgraph from vega-lite examples.\n\"\"\"\n# category: area charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.unemployment_across_industries.url\n\nalt.Chart(source).mark_area().encode(\n    alt.X('yearmonth(date):T',\n        axis=alt.Axis(format='%Y', domain=False, tickSize=0)\n    ),\n    alt.Y('sum(count):Q', stack='center', axis=None),\n    alt.Color('series:N',\n        scale=alt.Scale(scheme='category20b')\n    )\n).interactive()\n"
  },
  {
    "path": "tests/examples_arguments_syntax/strip_plot.py",
    "content": "\"\"\"\nSimple Strip Plot\n-----------------\nA simple example of how to make a strip plot. \n\"\"\"\n# category: simple charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\nalt.Chart(source).mark_tick().encode(\n    x='Horsepower:Q',\n    y='Cylinders:O'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/strip_plot_jitter.py",
    "content": "\"\"\"\nStrip Plot with Jitter\n----------------------\nIn this chart, we encode the ``Major_Genre`` column from the ``movies`` dataset\nin the ``y``-channel. In the default presentation of this data, it would be\ndifficult to gauge the relative frequencies with which different values occur\nbecause there would be so much overlap. To address this, we use the ``yOffset``\nchannel to incorporate a random offset (jittering). The example is shown twice,\non the left side using normally distributed and on the right side using\nuniformally distributed jitter.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\ngaussian_jitter = alt.Chart(source, title='Normally distributed jitter').mark_circle(size=8).encode(\n    y=\"Major Genre:N\",\n    x=\"IMDB Rating:Q\",\n    yOffset=\"jitter:Q\",\n    color=alt.Color('Major Genre:N', legend=None)\n).transform_calculate(\n    # Generate Gaussian jitter with a Box-Muller transform\n    jitter=\"sqrt(-2*log(random()))*cos(2*PI*random())\"\n)\n\nuniform_jitter = gaussian_jitter.transform_calculate(\n    # Generate uniform jitter\n    jitter='random()'\n).encode(\n    y=alt.Y('Major Genre:N', axis=None)\n).properties(\n    title='Uniformly distributed jitter'\n)\n\n(gaussian_jitter | uniform_jitter).resolve_scale(yOffset='independent')\n"
  },
  {
    "path": "tests/examples_arguments_syntax/table_bubble_plot_github.py",
    "content": "\"\"\"\nTable Bubble Plot (Github Punch Card)\n-------------------------------------\nThis example shows github contributions by the day of week and hour of the day.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.github.url\n\nalt.Chart(source).mark_circle().encode(\n    x='hours(time):O',\n    y='day(time):O',\n    size='sum(count):Q'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/top_k_items.py",
    "content": "\"\"\"\nTop K Items\n-----------\nThis example shows how to use the window and transformation filter to display\nthe Top items of a long list of items in decreasing order.\nHere we sort the top 10 highest ranking movies of IMDB.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\n# Top 10 movies by IMBD rating\nalt.Chart(\n    source,\n).mark_bar().encode(\n    x=alt.X('Title:N', sort='-y'),\n    y=alt.Y('IMDB Rating:Q'),\ncolor=alt.Color('IMDB Rating:Q')\n    \n).transform_window(\n    rank='rank(IMDB Rating)',\nsort=[alt.SortField('IMDB Rating', order='descending')]\n).transform_filter(\n    (alt.datum.rank < 10)\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/top_k_letters.py",
    "content": "\"\"\"\nTop K Letters\n-------------\nThis example shows how to use a window transform in order to display only the\ntop K categories by number of entries. In this case, we rank the characters in\nthe first paragraph of Dickens' *A Tale of Two Cities* by number of occurrences.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nimport pandas as pd\nimport numpy as np\n\n# Excerpt from A Tale of Two Cities; public domain text\ntext = \"\"\"\nIt was the best of times, it was the worst of times, it was the age of wisdom,\nit was the age of foolishness, it was the epoch of belief, it was the epoch of\nincredulity, it was the season of Light, it was the season of Darkness, it was\nthe spring of hope, it was the winter of despair, we had everything before us,\nwe had nothing before us, we were all going direct to Heaven, we were all going\ndirect the other way - in short, the period was so far like the present period,\nthat some of its noisiest authorities insisted on its being received, for good\nor for evil, in the superlative degree of comparison only.\n\"\"\"\n\nsource = pd.DataFrame(\n    {'letters': np.array([c for c in text if c.isalpha()])}\n)\n\nalt.Chart(source).transform_aggregate(\n    count='count()',\n    groupby=['letters']\n).transform_window(\n    rank='rank(count)',\n    sort=[alt.SortField('count', order='descending')]\n).transform_filter(\n    alt.datum.rank < 10\n).mark_bar().encode(\n    y=alt.Y('letters:N', sort='-x'),\n    x='count:Q',\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/top_k_with_others.py",
    "content": "\"\"\"\nTop-K Plot with Others\n----------------------\nThis example shows how to use aggregate, window, and calculate transformations\nto display the top-k directors by average worldwide gross while grouping the \nremaining directors as 'All Others'.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\nalt.Chart(source).mark_bar().encode(\n    x=alt.X(\"aggregate_gross:Q\", aggregate=\"mean\", title=None),\n    y=alt.Y(\n        \"ranked_director:N\",\n        sort=alt.Sort(op=\"mean\", field=\"aggregate_gross\", order=\"descending\"),\n        title=None,\n    ),\n).transform_aggregate(\n    aggregate_gross='mean(Worldwide Gross)',\n    groupby=[\"Director\"],\n).transform_window(\n    rank='row_number()',\n    sort=[alt.SortField(\"aggregate_gross\", order=\"descending\")],\n).transform_calculate(\n    ranked_director=\"datum.rank < 10 ? datum.Director : 'All Others'\"\n).properties(\n    title=\"Top Directors by Average Worldwide Gross\",\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/trail_marker.py",
    "content": "\"\"\"\nLine Chart with Varying Size\n----------------------------\nThis is example of using the ``trail`` marker to vary the size of a line.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.wheat()\n\nalt.Chart(source).mark_trail().encode(\n    x='year:T',\n    y='wheat:Q',\n    size='wheat:Q'\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/us_employment.py",
    "content": "\"\"\"\nThe U.S. Employment Crash During the Great Recession\n----------------------------------------------------\nThis example is a fully developed bar chart with negative values using the sample dataset of U.S. employment changes during the Great Recession.\n\"\"\"\n# category: case studies\nimport altair as alt\nimport pandas as pd\nfrom altair.datasets import data\n\nsource = data.us_employment()\npresidents = pd.DataFrame([\n    {\n        \"start\": \"2006-01-01\",\n        \"end\": \"2009-01-19\",\n        \"president\": \"Bush\"\n    },\n    {\n        \"start\": \"2009-01-20\",\n        \"end\": \"2015-12-31\",\n        \"president\": \"Obama\"\n    }\n])\npredicate = alt.datum.nonfarm_change > 0\n\nbars = alt.Chart(\n    source,\n    title=\"The U.S. employment crash during the Great Recession\"\n).mark_bar().encode(\n    x=alt.X(\"month:T\", title=\"\"),\n    y=alt.Y(\"nonfarm_change:Q\", title=\"Change in non-farm employment (in thousands)\"),\n    color=alt.when(predicate).then(alt.value(\"steelblue\")).otherwise(alt.value(\"orange\")),\n)\n\nrule = alt.Chart(presidents).mark_rule(\n    color=\"black\",\n    strokeWidth=2\n).encode(\n    x='end:T'\n).transform_filter(alt.datum.president == \"Bush\")\n\ntext = alt.Chart(presidents).mark_text(\n    align='left',\n    baseline='middle',\n    dx=7,\n    dy=-135,\n    size=11\n).encode(\n    x='start:T',\n    text='president',\n    color=alt.value('#000000')\n)\n\n(bars + rule + text).properties(width=600)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/us_incomebrackets_by_state_facet.py",
    "content": "\"\"\"\nUS Income by State: Wrapped Facet\n---------------------------------\nThis example shows how to create a map of income in the US by state,\nfaceted over income brackets \n\"\"\"\n# category: maps\n\nimport altair as alt\nfrom altair.datasets import data\n\nstates = alt.topo_feature(data.us_10m.url, 'states')\nsource = data.income.url\n\nalt.Chart(source).mark_geoshape().encode(\n    shape='geo:G',\n    color='pct:Q',\n    tooltip=['name:N', 'pct:Q'],\n    facet=alt.Facet('group:N', columns=2),\n).transform_lookup(\n    lookup='id',\n    from_=alt.LookupData(data=states, key='id'),\n    as_='geo'\n).properties(\n    width=300,\n    height=175,\n).project(\n    type='albersUsa'\n)"
  },
  {
    "path": "tests/examples_arguments_syntax/us_population_over_time.py",
    "content": "\"\"\"\nUS Population by Age and Sex\n============================\nThis chart visualizes the age distribution of the US population over time.\nIt uses a slider widget that is bound to the year to visualize the age\ndistribution over time.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.population.url\n\nselect_year = alt.selection_point(\n    name=\"Year\",\n    fields=[\"year\"],\n    bind=alt.binding_range(min=1900, max=2000, step=10, name=\"Year\"),\n    value=2000,\n)\n\nalt.Chart(source).mark_bar().encode(\n    x=alt.X(\"sex:N\", axis=alt.Axis(labels=False, title=None, ticks=False)),\n    y=alt.Y(\"people:Q\", scale=alt.Scale(domain=(0, 12000000)), title=\"Population\"),\n    color=alt.Color(\n        \"sex:N\",\n        scale=alt.Scale(domain=(\"Male\", \"Female\"), range=[\"steelblue\", \"salmon\"]),\n        title=\"Sex\",\n    ),\n    column=alt.Column(\"age:O\", title=\"Age\"),\n).properties(\n    width=20,\n    title=\"U.S. Population by Age and Sex\"\n).add_params(\n    select_year\n).transform_calculate(\n    \"sex\", alt.expr.if_(alt.datum.sex == 1, \"Male\", \"Female\")\n).transform_filter(\n    select_year\n).configure_facet(\n    spacing=8\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/us_population_over_time_facet.py",
    "content": "\"\"\"\nUS Population: Wrapped Facet\n============================\nThis chart visualizes the age distribution of the US population over time,\nusing a wrapped faceting of the data by decade.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.population.url\n\nalt.Chart(source).mark_area().encode(\n    x='age:O',\n    y=alt.Y(\n        'sum(people):Q',\n        title='Population',\n        axis=alt.Axis(format='~s')\n    ),\n    facet=alt.Facet('year:O', columns=5),\n).properties(\n    title='US Age Distribution By Year',\n    width=90,\n    height=80\n)"
  },
  {
    "path": "tests/examples_arguments_syntax/us_population_pyramid_over_time.py",
    "content": "'''\nUS Population Pyramid Over Time\n===============================\nA population pyramid shows the distribution of age groups within a population.\nIt uses a slider widget that is bound to the year to visualize the age\ndistribution over time.\n'''\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.population.url\n\nslider = alt.binding_range(min=1850, max=2000, step=10)\nselect_year = alt.selection_point(name='year', fields=['year'],\n                                   bind=slider, value=2000)\n\nbase = alt.Chart(source).add_params(\n    select_year\n).transform_filter(\n    select_year\n).transform_calculate(\n    gender=alt.expr.if_(alt.datum.sex == 1, 'Male', 'Female')\n).properties(\n    width=250\n)\n\n\ncolor_scale = alt.Scale(domain=['Male', 'Female'],\n                        range=['#1f77b4', '#e377c2'])\n\nleft = base.transform_filter(\n    alt.datum.gender == 'Female'\n).encode(\n    y=alt.Y('age:O', axis=None),\n    x=alt.X('sum(people):Q',\n            title='population',\n            sort=alt.SortOrder('descending')),\n    color=alt.Color('gender:N', scale=color_scale, legend=None)\n).mark_bar().properties(title='Female')\n\nmiddle = base.encode(\n    y=alt.Y('age:O', axis=None),\n    text=alt.Text('age:Q'),\n).mark_text().properties(width=20)\n\nright = base.transform_filter(\n    alt.datum.gender == 'Male'\n).encode(\n    y=alt.Y('age:O', axis=None),\n    x=alt.X('sum(people):Q', title='population'),\n    color=alt.Color('gender:N', scale=color_scale, legend=None)\n).mark_bar().properties(title='Male')\n\nalt.concat(left, middle, right, spacing=5)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/us_state_capitals.py",
    "content": "\"\"\"\nU.S. State Capitals Overlaid on a Map of the U.S\n-------------------------------------------------\nThis is a layered geographic visualization that shows US capitals\noverlaid on a map.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nstates = alt.topo_feature(data.us_10m.url, 'states')\ncapitals = data.us_state_capitals.url\n\n# US states background\nbackground = alt.Chart(states).mark_geoshape(\n    fill='lightgray',\n    stroke='white'\n).properties(\n    title='US State Capitols',\n    width=650,\n    height=400\n).project('albersUsa')\n\n# Points and text\nhover = alt.selection_point(on='pointerover', nearest=True,\n                      fields=['lat', 'lon'])\n\nbase = alt.Chart(capitals).encode(\n    longitude='lon:Q',\n    latitude='lat:Q',\n)\n\ntext = base.mark_text(dy=-5, align='right').encode( \n    alt.Text('city', type='nominal'),\n    opacity=alt.when(~hover).then(alt.value(0)).otherwise(alt.value(1))\n)\n\npoints = base.mark_point().encode(\n    color=alt.value('black'),\n    size=alt.when(~hover).then(alt.value(30)).otherwise(alt.value(100))\n).add_params(hover)\n\nbackground + points + text\n"
  },
  {
    "path": "tests/examples_arguments_syntax/violin_plot.py",
    "content": "\"\"\"\nViolin Plot\n-----------\nThis example shows how to make a Violin Plot using Altair's density transform.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nalt.Chart(data.cars()).transform_density(\n    'Miles_per_Gallon',\n    as_=['Miles_per_Gallon', 'density'],\n    extent=[5, 50],\n    groupby=['Origin']\n).mark_area(orient='horizontal').encode(\n    y='Miles_per_Gallon:Q',\n    color='Origin:N',\n    x=alt.X(\n        'density:Q',\n        stack='center',\n        impute=None,\n        title=None,\n        axis=alt.Axis(labels=False, values=[0],grid=False, ticks=True),\n    ),\n    column=alt.Column(\n        'Origin:N',\n        header=alt.Header(\n            titleOrient='bottom',\n            labelOrient='bottom',\n            labelPadding=0,\n        ),\n    )\n).properties(\n    width=100\n).configure_facet(\n    spacing=0\n).configure_view(\n    stroke=None\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/waterfall_chart.py",
    "content": "\"\"\"\nWaterfall Chart\n---------------\nThis example shows how to recreate a Vega-Lite implementation of a waterfall chart.\nOriginal inspiration is from https://vega.github.io/vega-lite/examples/waterfall_chart.html\n\"\"\"\n# category: advanced calculations\n\nimport altair as alt\nimport pandas as pd\n\ndata = [\n    {\"label\": \"Begin\", \"amount\": 4000},\n    {\"label\": \"Jan\", \"amount\": 1707},\n    {\"label\": \"Feb\", \"amount\": -1425},\n    {\"label\": \"Mar\", \"amount\": -1030},\n    {\"label\": \"Apr\", \"amount\": 1812},\n    {\"label\": \"May\", \"amount\": -1067},\n    {\"label\": \"Jun\", \"amount\": -1481},\n    {\"label\": \"Jul\", \"amount\": 1228},\n    {\"label\": \"Aug\", \"amount\": 1176},\n    {\"label\": \"Sep\", \"amount\": 1146},\n    {\"label\": \"Oct\", \"amount\": 1205},\n    {\"label\": \"Nov\", \"amount\": -1388},\n    {\"label\": \"Dec\", \"amount\": 1492},\n    {\"label\": \"End\", \"amount\": 0},\n]\nsource = pd.DataFrame(data)\n\n# Define frequently referenced fields\namount = alt.datum.amount\nlabel = alt.datum.label\nwindow_lead_label = alt.datum.window_lead_label\nwindow_sum_amount = alt.datum.window_sum_amount\n\n# Define frequently referenced/long expressions\ncalc_prev_sum = alt.expr.if_(label == \"End\", 0, window_sum_amount - amount)\ncalc_amount = alt.expr.if_(label == \"End\", window_sum_amount, amount)\ncalc_text_amount = (\n    alt.expr.if_((label != \"Begin\") & (label != \"End\") & calc_amount > 0, \"+\", \"\")\n    + calc_amount\n)\n\n# The \"base_chart\" defines the transform_window, transform_calculate, and X axis\nbase_chart = alt.Chart(source).transform_window(\n    window_sum_amount=\"sum(amount)\",\n    window_lead_label=\"lead(label)\",\n).transform_calculate(\n    calc_lead=alt.expr.if_((window_lead_label == None), label, window_lead_label),\n    calc_prev_sum=calc_prev_sum,\n    calc_amount=calc_amount,\n    calc_text_amount=calc_text_amount,\n    calc_center=(window_sum_amount + calc_prev_sum) / 2,\n    calc_sum_dec=alt.expr.if_(window_sum_amount < calc_prev_sum, window_sum_amount, \"\"),\n    calc_sum_inc=alt.expr.if_(window_sum_amount > calc_prev_sum, window_sum_amount, \"\"),\n).encode(\n    x=alt.X(\"label:O\", axis=alt.Axis(title=\"Months\", labelAngle=0), sort=None)\n)\n\ncolor_coding = (\n    alt.when((label == \"Begin\") | (label == \"End\"))\n    .then(alt.value(\"#878d96\"))\n    .when(calc_amount < 0)\n    .then(alt.value(\"#fa4d56\"))\n    .otherwise(alt.value(\"#24a148\"))\n)\n\nbar = base_chart.mark_bar(size=45).encode(\n    y=alt.Y(\"calc_prev_sum:Q\", title=\"Amount\"),\n    y2=alt.Y2(\"window_sum_amount:Q\"),\n    color=color_coding,\n)\n\n# The \"rule\" chart is for the horizontal lines that connect the bars\nrule = base_chart.mark_rule(xOffset=-22.5, x2Offset=22.5).encode(\n    y=\"window_sum_amount:Q\",\n    x2=\"calc_lead\",\n)\n\n# Add values as text\ntext_pos_values_top_of_bar = base_chart.mark_text(baseline=\"bottom\", dy=-4).encode(\n    text=alt.Text(\"calc_sum_inc:N\"),\n    y=\"calc_sum_inc:Q\",\n)\ntext_neg_values_bot_of_bar = base_chart.mark_text(baseline=\"top\", dy=4).encode(\n    text=alt.Text(\"calc_sum_dec:N\"),\n    y=\"calc_sum_dec:Q\",\n)\ntext_bar_values_mid_of_bar = base_chart.mark_text(baseline=\"middle\").encode(\n    text=alt.Text(\"calc_text_amount:N\"),\n    y=\"calc_center:Q\",\n    color=alt.value(\"white\"),\n)\n\nalt.layer(\n    bar,\n    rule,\n    text_pos_values_top_of_bar,\n    text_neg_values_bot_of_bar,\n    text_bar_values_mid_of_bar\n).properties(\n    width=800,\n    height=450\n)"
  },
  {
    "path": "tests/examples_arguments_syntax/wheat_wages.py",
    "content": "\"\"\"\nWheat and Wages\n---------------\nA recreation of William Playfair's classic chart visualizing\nthe price of wheat, the wages of a mechanic, and the reigning British monarch.\n\nThis is a more polished version of the simpler chart in :ref:`gallery_bar_and_line_with_dual_axis`.\n\"\"\"\n# category: case studies\nimport altair as alt\nimport pandas as pd\nfrom altair.datasets import data\n\n\nbase_wheat = alt.Chart(data.wheat.url).transform_calculate(year_end=\"+datum.year + 5\")\n\nbase_monarchs = alt.Chart(data.monarchs.url).transform_calculate(\n    offset=\"((!datum.commonwealth && datum.index % 2) ? -1: 1) * 2 + 95\",\n    off2=\"((!datum.commonwealth && datum.index % 2) ? -1: 1) + 95\",\n    y=\"95\",\n    x=\"+datum.start + (+datum.end - +datum.start)/2\",\n)\n\nbars = base_wheat.mark_bar(fill=\"#aaa\", stroke=\"#999\").encode(\n    x=alt.X(\"year:Q\", bin=\"binned\", axis=alt.Axis(format=\"d\", tickCount=5)).scale(\n        zero=False\n    ),\n    y=alt.Y(\"wheat:Q\", axis=alt.Axis(zindex=1)),\n    x2=alt.X2(\"year_end\"),\n)\n\nsection_data = pd.DataFrame(\n    [\n        {\"year\": 1600},\n        {\"year\": 1650},\n        {\"year\": 1700},\n        {\"year\": 1750},\n        {\"year\": 1800},\n    ]\n)\n\nsection_line = (\n    alt.Chart(section_data)\n    .mark_rule(stroke=\"#000\", strokeWidth=0.6, opacity=0.7)\n    .encode(x=alt.X(\"year\"))\n)\n\narea = base_wheat.mark_area(color=\"#a4cedb\", opacity=0.7).encode(\n    x=alt.X(\"year:Q\"), y=alt.Y(\"wages:Q\")\n)\n\narea_line_1 = area.mark_line(color=\"#000\", opacity=0.7)\narea_line_2 = area.mark_line(yOffset=-2, color=\"#EE8182\")\n\ntop_bars = base_monarchs.mark_bar(stroke=\"#000\").encode(\n    x=alt.X(\"start:Q\"),\n    x2=alt.X2(\"end\"),\n    y=alt.Y(\"y:Q\"),\n    y2=alt.Y2(\"offset\"),\n    fill=alt.Fill(\n        \"commonwealth:N\", legend=None, scale=alt.Scale(range=[\"black\", \"white\"])\n    ),\n)\n\ntop_text = base_monarchs.mark_text(yOffset=14, fontSize=9, fontStyle=\"italic\").encode(\n    x=alt.X(\"x:Q\"), y=alt.Y(\"off2:Q\"), text=alt.Text(\"name:N\")\n)\n\n(\n    (bars + section_line + area + area_line_1 + area_line_2 + top_bars + top_text)\n    .properties(width=900, height=400)\n    .configure_axis(title=None, gridColor=\"white\", gridOpacity=0.25, domain=False)\n    .configure_view(stroke=\"transparent\")\n)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/wilkinson-dot-plot.py",
    "content": "\"\"\"\nWilkinson Dot Plot\n------------------\nAn example of a `Wilkinson Dot Plot <https://en.wikipedia.org/wiki/Dot_plot_(statistics)>`_\n\"\"\"\n# category: advanced calculations\n\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame(\n    {\"data\":[1,1,1,1,1,1,1,1,1,1,\n             2,2,2,\n             3,3,\n             4,4,4,4,4,4]\n    }\n)\n\nalt.Chart(source).mark_circle(opacity=1).transform_window(\n    id='rank()', \n    groupby=['data']\n).encode(\n    alt.X('data:O'), \n    alt.Y('id:O', \n          axis=None, \n          sort='descending')\n).properties(height=100)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/wind_vector_map.py",
    "content": "\"\"\"\nWind Vector Map\n---------------\nAn example showing a vector array map showing wind speed and direction using ``wedge``\nas shape for ``mark_point`` and ``angle`` encoding for the wind direction.\nThis is adapted from this corresponding Vega-Lite Example:\n`Wind Vector Map <https://vega.github.io/vega-lite/examples/point_angle_windvector.html>`_\nwith an added base map.\n\"\"\"\n# category: maps\nimport altair as alt\nfrom altair.datasets import data\n\ndf_wind = data.windvectors()\ndata_world = alt.topo_feature(data.world_110m.url, \"countries\")\n\nwedge = (\n    alt.Chart(df_wind)\n    .mark_point(shape=\"wedge\", filled=True)\n    .encode(\n        latitude=\"latitude\",\n        longitude=\"longitude\",\n        color=alt.Color(\n            \"dir\", scale=alt.Scale(domain=[0, 360], scheme=\"rainbow\"), legend=None\n        ),\n        angle=alt.Angle(\"dir\", scale=alt.Scale(domain=[0, 360], range=[180, 540])),\n        size=alt.Size(\"speed\", scale=alt.Scale(rangeMax=500)),\n    )\n    .project(\"equalEarth\")\n)\n\nxmin, xmax, ymin, ymax = (\n    df_wind.longitude.min(),\n    df_wind.longitude.max(),\n    df_wind.latitude.min(),\n    df_wind.latitude.max(),\n)\n\n# extent as feature or featurecollection\nextent = {\n    \"type\": \"Feature\", \n    \"geometry\": {\"type\": \"Polygon\", \n                 \"coordinates\": [[\n                     [xmax, ymax],\n                     [xmax, ymin],\n                     [xmin, ymin],\n                     [xmin, ymax],\n                     [xmax, ymax]]]\n                },\n    \"properties\": {}\n}\n\n# use fit combined with clip=True\nbase = (\n    alt.Chart(data_world)\n    .mark_geoshape(clip=True, fill=\"lightgray\", stroke=\"black\", strokeWidth=0.5)\n    .project(type=\"equalEarth\", fit=extent)\n)\n\nbase + wedge"
  },
  {
    "path": "tests/examples_arguments_syntax/window_rank.py",
    "content": "\"\"\"\nWindow Rank Line Chart\n----------------------\nThis example shows the Group F rankings in the 2018 World Cup after each matchday. \nA window transformation is used to rank each after each match day, sorting by points and difference.\n\"\"\"\n# category: line charts\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame(\n    [\n        {\"team\": \"Germany\", \"matchday\": 1, \"point\": 0, \"diff\": -1},\n        {\"team\": \"Germany\", \"matchday\": 2, \"point\": 3, \"diff\": 0},\n        {\"team\": \"Germany\", \"matchday\": 3, \"point\": 3, \"diff\": -2},\n        {\"team\": \"Mexico\", \"matchday\": 1, \"point\": 3, \"diff\": 1},\n        {\"team\": \"Mexico\", \"matchday\": 2, \"point\": 6, \"diff\": 2},\n        {\"team\": \"Mexico\", \"matchday\": 3, \"point\": 6, \"diff\": -1},\n        {\"team\": \"South Korea\", \"matchday\": 1, \"point\": 0, \"diff\": -1},\n        {\"team\": \"South Korea\", \"matchday\": 2, \"point\": 0, \"diff\": -2},\n        {\"team\": \"South Korea\", \"matchday\": 3, \"point\": 3, \"diff\": 0},\n        {\"team\": \"Sweden\", \"matchday\": 1, \"point\": 3, \"diff\": 1},\n        {\"team\": \"Sweden\", \"matchday\": 2, \"point\": 3, \"diff\": 0},\n        {\"team\": \"Sweden\", \"matchday\": 3, \"point\": 6, \"diff\": 3},\n    ]\n)\n\ncolor_scale = alt.Scale(\n    domain=[\"Germany\", \"Mexico\", \"South Korea\", \"Sweden\"],\n    range=[\"#000000\", \"#127153\", \"#C91A3C\", \"#0C71AB\"],\n)\n\nalt.Chart(source).mark_line().encode(\n    x=\"matchday:O\", y=\"rank:O\", color=alt.Color(\"team:N\", scale=color_scale)\n).transform_window(\n    rank=\"rank()\",\n    sort=[\n        alt.SortField(\"point\", order=\"descending\"),\n        alt.SortField(\"diff\", order=\"descending\"),\n    ],\n    groupby=[\"matchday\"],\n).properties(title=\"World Cup 2018: Group F Rankings\")\n"
  },
  {
    "path": "tests/examples_arguments_syntax/world_map.py",
    "content": "\"\"\"\nWorld Map\n---------\n\nThis example shows how to create a world map using data generators for\ndifferent background layers.\n\"\"\"\n# category: maps\n\nimport altair as alt\nfrom altair.datasets import data\n\n# Data generators for the background\nsphere = alt.sphere()\ngraticule = alt.graticule()\n\n# Source of land data\nsource = alt.topo_feature(data.world_110m.url, 'countries')\n\n# Layering and configuring the components \nalt.layer(\n    alt.Chart(sphere).mark_geoshape(fill='lightblue'), \n    alt.Chart(graticule).mark_geoshape(stroke='white', strokeWidth=0.5), \n    alt.Chart(source).mark_geoshape(fill='ForestGreen', stroke='black')\n).project(\n    'naturalEarth1'\n).properties(width=600, height=400).configure_view(stroke=None)\n"
  },
  {
    "path": "tests/examples_arguments_syntax/world_projections.py",
    "content": "\"\"\"\nWorld Projections\n-----------------\nThis example shows a map of the countries of the world. \nUse the dropdown menu to compare projections. For more details on the `project` arguments, see the API of `altair.Projection <https://altair-viz.github.io/user_guide/generated/core/altair.Projection.html>`_.\n\"\"\"\n# category: maps\nimport altair as alt\nfrom altair.datasets import data\n\nsource = alt.topo_feature(data.world_110m.url, 'countries')\n\ninput_dropdown = alt.binding_select(options=[\n    \"albers\",\n    \"albersUsa\",\n    \"azimuthalEqualArea\",\n    \"azimuthalEquidistant\",\n    \"conicEqualArea\",\n    \"conicEquidistant\",\n    \"equalEarth\",\n    \"equirectangular\",\n    \"gnomonic\",\n    \"mercator\",\n    \"naturalEarth1\",\n    \"orthographic\",\n    \"stereographic\",\n    \"transverseMercator\"\n], name='Projection ')\nparam_projection = alt.param(value=\"equalEarth\", bind=input_dropdown)\n\nalt.Chart(source, width=500, height=300).mark_geoshape(\n    fill='lightgray',\n    stroke='gray'\n).project(\n    type=alt.expr(param_projection.name)\n).add_params(param_projection)\n"
  },
  {
    "path": "tests/examples_methods_syntax/__init__.py",
    "content": "import os\nfrom typing import Set\n\n# Set of the names of examples that should have SVG static images.\n# This is for examples that VlConvert's PNG export does not support.\nSVG_EXAMPLES: Set[str] = {\"isotype_emoji\"}\n\n\ndef iter_examples_methods_syntax():\n    \"\"\"Iterate over the examples in this directory.\n\n    Each item is a dict with the following keys:\n    - \"name\" : the unique name of the example\n    - \"filename\" : the full file path to the example\n    \"\"\"\n    examples_methods_syntax_dir = os.path.abspath(os.path.dirname(__file__))\n    for filename in os.listdir(examples_methods_syntax_dir):\n        name, ext = os.path.splitext(filename)\n        if name.startswith(\"_\") or ext != \".py\":\n            continue\n        yield {\n            \"name\": name,\n            \"filename\": os.path.join(examples_methods_syntax_dir, filename),\n            \"use_svg\": name in SVG_EXAMPLES,\n        }\n"
  },
  {
    "path": "tests/examples_methods_syntax/airport_connections.py",
    "content": "\"\"\"\nConnections Among U.S. Airports Interactive\n-------------------------------------------\nThis example shows all the connections between major U.S. airports. Lookup transformations\nare used to find the coordinates of each airport and connecting airports. Connections\nare displayed on pointerover via a single selection.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\n# Since these data are each more than 5,000 rows we'll import from the URLs\nairports = data.airports.url\nflights_airport = data.flights_airport.url\n\nstates = alt.topo_feature(data.us_10m.url, feature=\"states\")\n\n# Create pointerover selection\nselect_city = alt.selection_point(\n    on=\"pointerover\", nearest=True, fields=[\"origin\"], empty=False\n)\n\n# Define which attributes to lookup from airports.csv\nlookup_data = alt.LookupData(\n    airports, key=\"iata\", fields=[\"state\", \"latitude\", \"longitude\"]\n)\n\nbackground = alt.Chart(states).mark_geoshape(\n    fill=\"lightgray\",\n    stroke=\"white\"\n).properties(\n    width=750,\n    height=500\n).project(\"albersUsa\")\n\nconnections = alt.Chart(flights_airport).mark_rule(opacity=0.35).encode(\n    latitude=\"latitude:Q\",\n    longitude=\"longitude:Q\",\n    latitude2=\"lat2:Q\",\n    longitude2=\"lon2:Q\"\n).transform_lookup(\n    lookup=\"origin\",\n    from_=lookup_data\n).transform_lookup(\n    lookup=\"destination\",\n    from_=lookup_data,\n    as_=[\"state\", \"lat2\", \"lon2\"]\n).transform_filter(\n    select_city\n)\n\npoints = alt.Chart(flights_airport).mark_circle().encode(\n    latitude=\"latitude:Q\",\n    longitude=\"longitude:Q\",\n    size=alt.Size(\"routes:Q\").legend(None).scale(range=[0, 1000]),\n    order=alt.Order(\"routes:Q\").sort(\"descending\"),\n    tooltip=[\"origin:N\", \"routes:Q\"]\n).transform_aggregate(\n    routes=\"count()\",\n    groupby=[\"origin\"]\n).transform_lookup(\n    lookup=\"origin\",\n    from_=lookup_data\n).transform_filter(\n    (alt.datum.state != \"PR\") & (alt.datum.state != \"VI\")\n).add_params(\n    select_city\n)\n\n(background + connections + points).configure_view(stroke=None)\n"
  },
  {
    "path": "tests/examples_methods_syntax/annual_weather_heatmap.py",
    "content": "\"\"\"\nAnnual Weather Heatmap\n----------------------\n\"\"\"\n# category: tables\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather()\n\nalt.Chart(source, title=\"Daily Max Temperatures (C) in Seattle, WA\").mark_rect().encode(\n    alt.X(\"date(date):O\").title(\"Day\").axis(format=\"%e\", labelAngle=0),\n    alt.Y(\"month(date):O\").title(\"Month\"),\n    alt.Color(\"max(temp_max)\").title(None),\n    tooltip=[\n        alt.Tooltip(\"monthdate(date)\", title=\"Date\"),\n        alt.Tooltip(\"max(temp_max)\", title=\"Max Temp\"),\n    ],\n).configure_view(\n    step=13,\n    strokeWidth=0\n).configure_axis(\n    domain=False\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/anscombe_plot.py",
    "content": "\"\"\"\nAnscombe's Quartet\n------------------\n\n`Anscombe's Quartet <https://en.wikipedia.org/wiki/Anscombe%27s_quartet>`_\nis a famous dataset constructed by Francis Anscombe.\nIt is made of 4 different subsets of data.\nEach subset has very different characteristics, even though common summary\nstatistics such as mean and variance are identical.\n\nThis example shows how to make a faceted plot, with each facet\nshowing a different subset of the data.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.anscombe()\n\nalt.Chart(source).mark_circle().encode(\n    alt.X(\"X\").scale(zero=False),\n    alt.Y(\"Y\").scale(zero=False),\n    alt.Facet(\"Series\", columns=2),\n).properties(\n    width=180,\n    height=180,\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/area_faceted.py",
    "content": "\"\"\"\nFaceted Area Chart\n------------------\nMultiple area subcharts, one for each company.\nWe also show filtering out one of the companies,\nand sorting the companies in a custom order.\n\"\"\"\n# category: area charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.stocks()\n\nalt.Chart(source).transform_filter(alt.datum.symbol != \"GOOG\").mark_area().encode(\n    x=\"date:T\",\n    y=\"price:Q\",\n    color=\"symbol:N\",\n    row=alt.Row(\"symbol:N\").sort([\"MSFT\", \"AAPL\", \"IBM\", \"AMZN\"]),\n).properties(height=50, width=400)\n"
  },
  {
    "path": "tests/examples_methods_syntax/bar_chart_faceted_compact.py",
    "content": "\"\"\"\nCompact Faceted Grid of Bar Charts\n==================================\nA simple grid of bar charts to compare performance data,\none subchart for each subset of the data.\n\"\"\"\n# category: bar charts\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame(\n    [\n        {\"a\": \"a1\", \"b\": \"b1\", \"c\": \"x\", \"p\": \"0.14\"},\n        {\"a\": \"a1\", \"b\": \"b1\", \"c\": \"y\", \"p\": \"0.60\"},\n        {\"a\": \"a1\", \"b\": \"b1\", \"c\": \"z\", \"p\": \"0.03\"},\n        {\"a\": \"a1\", \"b\": \"b2\", \"c\": \"x\", \"p\": \"0.80\"},\n        {\"a\": \"a1\", \"b\": \"b2\", \"c\": \"y\", \"p\": \"0.38\"},\n        {\"a\": \"a1\", \"b\": \"b2\", \"c\": \"z\", \"p\": \"0.55\"},\n        {\"a\": \"a1\", \"b\": \"b3\", \"c\": \"x\", \"p\": \"0.11\"},\n        {\"a\": \"a1\", \"b\": \"b3\", \"c\": \"y\", \"p\": \"0.58\"},\n        {\"a\": \"a1\", \"b\": \"b3\", \"c\": \"z\", \"p\": \"0.79\"},\n        {\"a\": \"a2\", \"b\": \"b1\", \"c\": \"x\", \"p\": \"0.83\"},\n        {\"a\": \"a2\", \"b\": \"b1\", \"c\": \"y\", \"p\": \"0.87\"},\n        {\"a\": \"a2\", \"b\": \"b1\", \"c\": \"z\", \"p\": \"0.67\"},\n        {\"a\": \"a2\", \"b\": \"b2\", \"c\": \"x\", \"p\": \"0.97\"},\n        {\"a\": \"a2\", \"b\": \"b2\", \"c\": \"y\", \"p\": \"0.84\"},\n        {\"a\": \"a2\", \"b\": \"b2\", \"c\": \"z\", \"p\": \"0.90\"},\n        {\"a\": \"a2\", \"b\": \"b3\", \"c\": \"x\", \"p\": \"0.74\"},\n        {\"a\": \"a2\", \"b\": \"b3\", \"c\": \"y\", \"p\": \"0.64\"},\n        {\"a\": \"a2\", \"b\": \"b3\", \"c\": \"z\", \"p\": \"0.19\"},\n        {\"a\": \"a3\", \"b\": \"b1\", \"c\": \"x\", \"p\": \"0.57\"},\n        {\"a\": \"a3\", \"b\": \"b1\", \"c\": \"y\", \"p\": \"0.35\"},\n        {\"a\": \"a3\", \"b\": \"b1\", \"c\": \"z\", \"p\": \"0.49\"},\n        {\"a\": \"a3\", \"b\": \"b2\", \"c\": \"x\", \"p\": \"0.91\"},\n        {\"a\": \"a3\", \"b\": \"b2\", \"c\": \"y\", \"p\": \"0.38\"},\n        {\"a\": \"a3\", \"b\": \"b2\", \"c\": \"z\", \"p\": \"0.91\"},\n        {\"a\": \"a3\", \"b\": \"b3\", \"c\": \"x\", \"p\": \"0.99\"},\n        {\"a\": \"a3\", \"b\": \"b3\", \"c\": \"y\", \"p\": \"0.80\"},\n        {\"a\": \"a3\", \"b\": \"b3\", \"c\": \"z\", \"p\": \"0.37\"},\n    ]\n)\n\nalt.Chart(source, width=60, height=alt.Step(8)).mark_bar().encode(\n    alt.Y(\"c:N\").axis(None),\n    alt.X(\"p:Q\").title(None).axis(format=\"%\"),\n    alt.Color(\"c:N\").title(\"settings\").legend(orient=\"bottom\", titleOrient=\"left\"),\n    alt.Row(\"a:N\").title(\"Factor A\").header(labelAngle=0),\n    alt.Column(\"b:N\").title(\"Factor B\"),\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/bar_chart_sorted.py",
    "content": "\"\"\"\nSorted Bar Chart\n================\nThis example shows a bar chart sorted by a calculated value.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nalt.Chart(source).mark_bar().encode(\n    x='sum(yield):Q',\n    y=alt.Y('site:N').sort('-x')\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/bar_chart_with_labels_measured_luminance.py",
    "content": "\"\"\"\nBar Chart with Labels based on Measured Luminance\n=================================================\nThis example shows a basic horizontal bar chart with labels where the measured luminance to decides if the text overlay is be colored ``black`` or ``white``.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nbase = alt.Chart(source).encode(\n    x=alt.X('sum(yield):Q').stack('zero'),\n    y=alt.Y('site:O').sort('-x'),\n    text=alt.Text('sum(yield):Q', format='.0f')\n)\n\nbars = base.mark_bar(\n    tooltip=alt.expr(\"luminance(scale('color', datum.sum_yield))\")\n).encode(\n    color='sum(yield):Q'\n)\n\ntext = base.mark_text(\n    align='right',\n    dx=-3,\n    color=alt.expr(\"luminance(scale('color', datum.sum_yield)) > 0.5 ? 'black' : 'white'\")\n)\n\nbars + text\n"
  },
  {
    "path": "tests/examples_methods_syntax/bar_chart_with_range.py",
    "content": "\"\"\"\nBar Chart with Range\n====================\nThis example shows a range bar chart where each bar displays information of a low and high value.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather()\n\nbar = alt.Chart(source).mark_bar(cornerRadius=10, height=10).encode(\n    x=alt.X('min(temp_min):Q').scale(domain=[-15, 45]).title('Temperature (°C)'),\n    x2='max(temp_max):Q',\n    y=alt.Y('month(date):O').title(None) \n)\n\ntext_min = alt.Chart(source).mark_text(align='right', dx=-5).encode(\n    x='min(temp_min):Q',\n    y=alt.Y('month(date):O'),\n    text='min(temp_min):Q'\n)\n\ntext_max = alt.Chart(source).mark_text(align='left', dx=5).encode(\n    x='max(temp_max):Q',\n    y=alt.Y('month(date):O'),\n    text='max(temp_max):Q'\n)\n\n(bar + text_min + text_max).properties(\n    title=alt.Title(text='Temperature variation by month', subtitle='Seatle weather, 2012-2015')\n)"
  },
  {
    "path": "tests/examples_methods_syntax/bar_chart_with_single_threshold.py",
    "content": "\"\"\"\nBar Chart Highlighting Values beyond a Threshold\n------------------------------------------------\nThis example shows a bar chart highlighting values beyond a threshold.\n\"\"\"\n# category: bar charts\nimport pandas as pd\nimport altair as alt\n\nsource = pd.DataFrame({\n    \"Day\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], \n    \"Value\": [55, 112, 65, 38, 80, 138, 120, 103, 395, 200, 72, 51, 112, 175, 131]\n})\nthreshold = 300\n\nbars = alt.Chart(source).mark_bar(color=\"steelblue\").encode(\n    x=\"Day:O\",\n    y=\"Value:Q\",\n)\n\nhighlight = bars.mark_bar(color=\"#e45755\").encode(\n    y2=alt.Y2(datum=threshold)\n).transform_filter(\n    alt.datum.Value > threshold\n)\n\nrule = alt.Chart().mark_rule().encode(\n    y=alt.Y(datum=threshold)\n)\n\nlabel = rule.mark_text(\n    x=\"width\",\n    dx=-2,\n    align=\"right\",\n    baseline=\"bottom\",\n    text=\"hazardous\"\n)\n\n(bars + highlight + rule + label)"
  },
  {
    "path": "tests/examples_methods_syntax/beckers_barley_facet.py",
    "content": "\"\"\"\nBecker's Barley Faceted Plot\n----------------------------\nThe example demonstrates the faceted charts created by Richard Becker,\nWilliam Cleveland and others in the 1990s. Using the visualization technique\nwhere each row is a different site (i.e. the chart is faceted by site),\nthey identified an anomaly in a widely used agriculatural dataset,\nwhere the \"Morris\" site accidentally had the years 1931 and 1932 swapped.\nThey named this\n`\"The Morris Mistake.\" <https://www.stat.auckland.ac.nz/~ihaka/courses/120/trellis.user.pdf>`_.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nalt.Chart(source, title=\"The Morris Mistake\").mark_point().encode(\n    alt.X('yield:Q')\n        .title(\"Barley Yield (bushels/acre)\")\n        .scale(zero=False)\n        .axis(grid=False),\n    alt.Y('variety:N')\n        .title(\"\")\n        .sort('-x')\n        .axis(grid=True),\n    alt.Color('year:N')\n        .title(\"Year\"),\n    alt.Row('site:N')\n        .title(\"\")\n        .sort(field='yield', op='sum', order='descending')\n).properties(\n    height=alt.Step(20)\n).configure_view(stroke=\"transparent\")\n"
  },
  {
    "path": "tests/examples_methods_syntax/beckers_barley_wrapped_facet.py",
    "content": "\"\"\"\nBecker's Barley Wrapped Facet Plot\n----------------------------------\nThe example demonstrates the faceted charts created by Richard Becker,\nWilliam Cleveland and others in the 1990s. Using the visualization technique\nwhere each row is a different site (i.e. the chart is faceted by site),\nthey identified an anomaly in a widely used agriculatural dataset,\nwhere the \"Morris\" site accidentally had the years 1931 and 1932 swapped.\nThey named this\n`\"The Morris Mistake.\" <https://www.stat.auckland.ac.nz/~ihaka/courses/120/trellis.user.pdf>`_.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley.url\n\nalt.Chart(source).mark_point().encode(\n    alt.X(\"median(yield):Q\").scale(zero=False),\n    y=\"variety:O\",\n    color=\"year:N\",\n    facet=alt.Facet(\"site:O\", columns=2),\n).properties(\n    width=200,\n    height=100,\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/bump_chart.py",
    "content": "\"\"\"\nBump Chart\n----------\nThis example shows a bump chart.  The data is first grouped into six-month\nintervals using pandas. The ranks are computed by Altair using a \nwindow transform.\n\"\"\"\n# category: line charts\n\nimport altair as alt\nfrom altair.datasets import data\nimport pandas as pd\n\nstocks = data.stocks()\nsource = stocks.groupby([pd.Grouper(key=\"date\", freq=\"6MS\"),\"symbol\"]).mean().reset_index()\n\nalt.Chart(source).mark_line(point=True).encode(\n    x=alt.X(\"date:O\").timeUnit(\"yearmonth\").title(\"date\"),\n    y=\"rank:O\",\n    color=alt.Color(\"symbol:N\")\n).transform_window(\n    rank=\"rank()\",\n    sort=[alt.SortField(\"price\", order=\"descending\")],\n    groupby=[\"date\"]\n).properties(\n    title=\"Bump Chart for Stock Prices\",\n    width=600,\n    height=150,\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/calculate_residuals.py",
    "content": "\"\"\"\nCalculate Residuals\n-------------------\nA dot plot showing each movie in the database, and the difference from the average movie rating.\nThe display is sorted by year to visualize everything in sequential order. \nThe graph is for all Movies before 2019.\n\nAdapted from `Calculate Residuals <https://vega.github.io/vega-lite/examples/joinaggregate_residual_graph.html>`_.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nfrom altair.datasets import data\n\nimdb_rating = alt.datum[\"IMDB Rating\"]\nsource = data.movies.url\n\nchart = (\n    alt.Chart(source)\n    .mark_point()\n    .transform_filter(imdb_rating != None)\n    .transform_filter(\n        alt.FieldRangePredicate(\"Release Date\", [None, 2019], timeUnit=\"year\")\n    )\n    .transform_joinaggregate(Average_Rating=\"mean(IMDB Rating)\")\n    .transform_calculate(Rating_Delta=imdb_rating - alt.datum.Average_Rating)\n    .encode(\n        x=alt.X(\"Release Date:T\").title(\"Release Date\"),\n        y=alt.Y(\"Rating_Delta:Q\").title(\"Rating Delta\"),\n        color=alt.Color(\"Rating_Delta:Q\").title(\"Rating Delta\").scale(domainMid=0),\n    )\n)\nchart"
  },
  {
    "path": "tests/examples_methods_syntax/candlestick_chart.py",
    "content": "\"\"\"\nCandlestick Chart\n=================\nA candlestick chart inspired from `Protovis <http://mbostock.github.io/protovis/ex/candlestick.html>`_. \nThis example shows the performance of the Chicago Board Options Exchange `Volatility Index <https://en.wikipedia.org/wiki/VIX>`_ (VIX) \nin the summer of 2009. The thick bar represents the opening and closing prices, \nwhile the thin bar shows intraday high and low prices; if the index closed higher on a given day, the bars are colored green rather than red.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.ohlc()\n\nopen_close_color = (\n    alt.when(\"datum.open <= datum.close\")\n    .then(alt.value(\"#06982d\"))\n    .otherwise(alt.value(\"#ae1325\"))\n)\nbase = alt.Chart(source).encode(\n    alt.X('date:T')\n        .axis(format='%m/%d', labelAngle=-45)\n        .title('Date in 2009'),\n    color=open_close_color\n)\n\nrule = base.mark_rule().encode(\n    alt.Y('low:Q')\n        .title('Price')\n        .scale(zero=False),\n    alt.Y2('high:Q')\n)\n\nbar = base.mark_bar().encode(\n    alt.Y('open:Q'),\n    alt.Y2('close:Q')\n)\n\nrule + bar\n"
  },
  {
    "path": "tests/examples_methods_syntax/co2_concentration.py",
    "content": "\"\"\"\nAtmospheric CO2 Concentration\n-----------------------------\nThis example is a fully developed line chart that uses a window transformation.\nIt was inspired by `Gregor Aisch's work at datawrapper\n<https://www.datawrapper.de/_/OHgEm/>`_.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.co2_concentration.url\n\nbase = alt.Chart(\n    source,\n    title=\"Carbon Dioxide in the Atmosphere\"\n).transform_calculate(\n    year=\"year(datum.Date)\"\n).transform_calculate(\n    decade=\"floor(datum.year / 10)\"\n).transform_calculate(\n    scaled_date=\"(datum.year % 10) + (month(datum.Date)/12)\"\n).transform_window(\n    first_date='first_value(scaled_date)',\n    last_date='last_value(scaled_date)',\n    sort=[{\"field\": \"scaled_date\", \"order\": \"ascending\"}],\n    groupby=['decade'],\n    frame=[None, None]\n).transform_calculate(\n  end=(\n      \"datum.first_date === datum.scaled_date ? 'first'\"\n      \": datum.last_date === datum.scaled_date ? 'last'\"\n      \": null\"\n  )\n).encode(\n    alt.X(\"scaled_date:Q\")\n        .title(\"Year into Decade\")\n        .axis(tickCount=11),\n    alt.Y(\"CO2:Q\")\n        .title(\"CO2 concentration in ppm\")\n        .scale(zero=False)\n)\n\nline = base.mark_line().encode(\n    alt.Color(\"decade:O\")\n        .scale(scheme=\"magma\")\n        .legend(None)\n)\n\ntext = base.encode(text=\"year:N\")\n\nstart_year = text.transform_filter(\n  alt.datum.end == 'first'\n).mark_text(baseline=\"top\")\n\nend_year = text.transform_filter(\n  alt.datum.end == 'last'\n).mark_text(baseline=\"bottom\")\n\n(line + start_year + end_year).configure_text(\n    align=\"left\",\n    dx=1,\n    dy=3\n).properties(width=600, height=375)\n"
  },
  {
    "path": "tests/examples_methods_syntax/comet_chart.py",
    "content": "\"\"\"\nComet Chart\n-----------\nInspired by `Zan Armstrong's comet chart <https://www.zanarmstrong.com/>`_\nthis plot uses ``mark_trail`` to visualize change of grouped data over time.\nA more elaborate example and explanation of creating comet charts in Altair\nis shown in `this blogpost <https://medium.com/de-dataverbinders/comet-charts-in-python-visualizing-statistical-mix-effects-and-simpsons-paradox-with-altair-6cd51fb58b7c>`_.\n\"\"\"\n# category: advanced calculations\n\nimport altair as alt\nfrom altair.datasets import data\n\nalt.Chart(\n    data.barley.url,\n    title='Barley Yield comparison between 1932 and 1931'\n).mark_trail().encode(\n    alt.X('year:O').title(None),\n    alt.Y('variety:N').title('Variety'),\n    alt.Size('yield:Q')\n        .scale(range=[0, 12])\n        .legend(values=[20, 60])\n        .title('Barley Yield (bushels/acre)'),\n    alt.Color('delta:Q')\n        .scale(domainMid=0)\n        .title('Yield Delta (%)'),\n    alt.Tooltip(['year:O', 'yield:Q']),\n    alt.Column('site:N').title('Site')\n).transform_pivot(\n    \"year\",\n    value=\"yield\",\n    groupby=[\"variety\", \"site\"]\n).transform_fold(\n    [\"1931\", \"1932\"],\n    as_=[\"year\", \"yield\"]\n).transform_calculate(\n    calculate=\"datum['1932'] - datum['1931']\",\n    as_=\"delta\"\n).configure_legend(\n    orient='bottom',\n    direction='horizontal'\n).configure_view(\n    stroke=None\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/cumulative_count_chart.py",
    "content": "\"\"\"\nCumulative Count Chart\n----------------------\nThis example shows an area chart with cumulative count.\nAdapted from https://vega.github.io/vega-lite/examples/area_cumulative_freq.html\n\n\"\"\"\n# category: distributions\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\nalt.Chart(source).transform_window(\n    cumulative_count=\"count()\",\n    sort=[{\"field\": \"IMDB Rating\"}],\n).mark_area().encode(\n    x=\"IMDB Rating:Q\",\n    y=alt.Y(\"cumulative_count:Q\").stack(False)\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/density_repeat.py",
    "content": "\"\"\"\nRepeated Density Estimates\n--------------------------\nDensity estimates for each measurement of penguins.\nThis is what we call a \"repeated\" plot, with one subplot\nfor each measurement type. All measurements are in millimeters,\nmaking them directly comparable on a shared x-axis.\n\"\"\"\n# category: distributions\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.penguins()\n\nalt.Chart(source).transform_fold(\n    [\n        \"Beak Length (mm)\",\n        \"Beak Depth (mm)\",\n        \"Flipper Length (mm)\",\n    ],\n    as_=[\"Measurement Type\", \"value\"],\n).transform_density(\n    density=\"value\",\n    groupby=[\"Measurement Type\"]\n).mark_area().encode(\n    alt.X(\"value:Q\"),\n    alt.Y(\"density:Q\"),\n    alt.Row(\"Measurement Type:N\").header(labelAngle=0, labelAlign=\"left\")\n).properties(\n    width=300,\n    height=50\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/density_stack.py",
    "content": "\"\"\"\nStacked Density Estimates\n-------------------------\nTo plot a stacked graph of estimates, use a shared ``extent`` and a fixed\nnumber of subdivision ``steps`` to ensure that the points for each area align\nwell.  Density estimates of body mass for each penguin species are plotted\nin a stacked method.  In addition, setting ``counts`` to true multiplies the\ndensities by the number of data points in each group, preserving proportional\ndifferences.\n\"\"\"\n# category: distributions\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.penguins()\n\nalt.Chart(source).transform_density(\n    density='Body Mass (g)',\n    groupby=['Species'], \n    extent= [2500, 6500],\n    counts = True,\n    steps=200\n).mark_area().encode(\n    alt.X('value:Q').title('Body Mass (g)'), \n    alt.Y('density:Q', stack='zero'),\n    alt.Color('Species:N')\n).properties(\n    width=400,\n    height=80,\n    title='Distribution of Body Mass of Penguins'\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/deviation_ellipses.py",
    "content": "\"\"\"\nConfidence Interval Ellipses\n----------------------------\nThis example shows bivariate deviation ellipses of flipper length and body mass of three penguin species.\n\nInspired by `ggplot2.stat_ellipse`_ and directly based on `Deviation ellipses example`_ by `@essicolo`_\n\n.. _ggplot2.stat_ellipse:\n    https://ggplot2.tidyverse.org/reference/stat_ellipse.html#ref-examples\n.. _Deviation ellipses example:\n    https://github.com/vega/altair/pull/514\n.. _@essicolo:\n    https://github.com/essicolo\n\"\"\"\n\n# category: case studies\nimport numpy as np\nimport pandas as pd\nfrom scipy.stats import f as F\n\nimport altair as alt\nfrom altair.datasets import data\n\n\ndef confidence_region_2d(arr, conf_level=0.95, segments=50):\n    \"\"\"\n    Calculate confidence interval ellipse.\n\n    Parameters\n    ----------\n    arr\n        numpy array with 2 columns\n    conf_level\n        lower tail probability\n    segments\n        number of points describing the ellipse.\n    \"\"\"\n    n_elements = len(arr)\n    # Degrees of freedom of the chi-squared distribution in the **numerator**\n    dfn = 2\n    # Degrees of freedom of the chi-squared distribution in the **denominator**\n    dfd = n_elements - 1\n    # Percent point function at `conf_level` of an F continuous random variable\n    quantile = F.ppf(conf_level, dfn=dfn, dfd=dfd)\n    radius = np.sqrt(2 * quantile)\n    angles = np.arange(0, segments) * 2 * np.pi / segments\n    circle = np.column_stack((np.cos(angles), np.sin(angles)))\n    center = np.mean(arr, axis=0)\n    cov_mat = np.cov(arr, rowvar=False)\n    return center + radius * (circle @ np.linalg.cholesky(cov_mat).T)\n\n\ndef grouped_confidence_regions(df, col_x, col_y, col_group):\n    cols = [col_x, col_y]\n    ellipses = []\n    ser: pd.Series[float] = df[col_group]\n    for group in ser.drop_duplicates():\n        arr = df.loc[ser == group, cols].to_numpy(dtype=np.float64)\n        ellipse = pd.DataFrame(confidence_region_2d(arr), columns=cols)\n        ellipse[col_group] = group\n        ellipses.append(ellipse)\n    return pd.concat(ellipses).reset_index(names=\"order\")\n\n\ncol_x = \"Flipper Length (mm)\"\ncol_y = \"Body Mass (g)\"\ncol_group = \"Species\"\n\nx = alt.X(col_x).scale(zero=False)\ny = alt.Y(col_y).scale(zero=False)\ncolor = alt.Color(col_group)\n\nsource = data.penguins().dropna(subset=[col_x, col_y, col_group])\nellipse = grouped_confidence_regions(source, col_x=col_x, col_y=col_y, col_group=col_group)\npoints = alt.Chart(source).mark_circle(size=50, tooltip=True).encode(\n    x=x,\n    y=y,\n    color=color\n)\nlines = alt.Chart(ellipse).mark_line(filled=True, fillOpacity=0.2).encode(\n    x=x,\n    y=y,\n    color=color,\n    order=\"order\"\n)\n\nchart = (lines + points).properties(height=500, width=500)\nchart\n"
  },
  {
    "path": "tests/examples_methods_syntax/distributions_and_medians_of_likert_scale_ratings.py",
    "content": "\"\"\"\nDistributions and Medians of Likert Scale Ratings\n-------------------------------------------------\nDistributions and Medians of Likert Scale Ratings. (Figure 9 from @jhoffswell and @zcliu’s ‘Interactive Repair of Tables Extracted from PDF Documents on Mobile Devices’ – http://idl.cs.washington.edu/files/2019-InteractiveTableRepair-CHI.pdf).\n\nAdapted from `Distributions and Medians of Likert Scale Ratings <https://vega.github.io/vega-lite/examples/layer_likert.html>`_.\n\"\"\"\n# category: distributions\nimport altair as alt\nimport pandas as pd\n\nmedians = pd.DataFrame(\n    [\n        {\"name\": \"Identify Errors:\", \"median\": 1.999976, \"lo\": \"Easy\", \"hi\": \"Hard\"},\n        {\"name\": \"Fix Errors:\", \"median\": 2, \"lo\": \"Easy\", \"hi\": \"Hard\"},\n        {\n            \"name\": \"Easier to Fix:\",\n            \"median\": 1.999969,\n            \"lo\": \"Toolbar\",\n            \"hi\": \"Gesture\",\n        },\n        {\n            \"name\": \"Faster to Fix:\",\n            \"median\": 2.500045,\n            \"lo\": \"Toolbar\",\n            \"hi\": \"Gesture\",\n        },\n        {\n            \"name\": \"Easier on Phone:\",\n            \"median\": 1.500022,\n            \"lo\": \"Toolbar\",\n            \"hi\": \"Gesture\",\n        },\n        {\n            \"name\": \"Easier on Tablet:\",\n            \"median\": 2.99998,\n            \"lo\": \"Toolbar\",\n            \"hi\": \"Gesture\",\n        },\n        {\n            \"name\": \"Device Preference:\",\n            \"median\": 4.500007,\n            \"lo\": \"Phone\",\n            \"hi\": \"Tablet\",\n        },\n    ]\n)\n\nvalues = pd.DataFrame(\n    [\n        {\"value\": \"P1\", \"name\": \"Participant ID\", \"id\": \"P1\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P1\"},\n        {\"value\": 2, \"name\": \"Fix Errors:\", \"id\": \"P1\"},\n        {\"value\": 3, \"name\": \"Easier to Fix:\", \"id\": \"P1\"},\n        {\"value\": 4, \"name\": \"Faster to Fix:\", \"id\": \"P1\"},\n        {\"value\": 2, \"name\": \"Easier on Phone:\", \"id\": \"P1\"},\n        {\"value\": 5, \"name\": \"Easier on Tablet:\", \"id\": \"P1\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P1\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P1\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P1\"},\n        {\"value\": \"P2\", \"name\": \"Participant ID\", \"id\": \"P2\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P2\"},\n        {\"value\": 3, \"name\": \"Fix Errors:\", \"id\": \"P2\"},\n        {\"value\": 4, \"name\": \"Easier to Fix:\", \"id\": \"P2\"},\n        {\"value\": 5, \"name\": \"Faster to Fix:\", \"id\": \"P2\"},\n        {\"value\": 5, \"name\": \"Easier on Phone:\", \"id\": \"P2\"},\n        {\"value\": 5, \"name\": \"Easier on Tablet:\", \"id\": \"P2\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P2\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P2\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P2\"},\n        {\"value\": \"P3\", \"name\": \"Participant ID\", \"id\": \"P3\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P3\"},\n        {\"value\": 2, \"name\": \"Fix Errors:\", \"id\": \"P3\"},\n        {\"value\": 2, \"name\": \"Easier to Fix:\", \"id\": \"P3\"},\n        {\"value\": 1, \"name\": \"Faster to Fix:\", \"id\": \"P3\"},\n        {\"value\": 2, \"name\": \"Easier on Phone:\", \"id\": \"P3\"},\n        {\"value\": 1, \"name\": \"Easier on Tablet:\", \"id\": \"P3\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P3\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P3\"},\n        {\"value\": 0, \"name\": \"Toolbar_First\", \"id\": \"P3\"},\n        {\"value\": \"P4\", \"name\": \"Participant ID\", \"id\": \"P4\"},\n        {\"value\": 3, \"name\": \"Identify Errors:\", \"id\": \"P4\"},\n        {\"value\": 3, \"name\": \"Fix Errors:\", \"id\": \"P4\"},\n        {\"value\": 2, \"name\": \"Easier to Fix:\", \"id\": \"P4\"},\n        {\"value\": 2, \"name\": \"Faster to Fix:\", \"id\": \"P4\"},\n        {\"value\": 4, \"name\": \"Easier on Phone:\", \"id\": \"P4\"},\n        {\"value\": 1, \"name\": \"Easier on Tablet:\", \"id\": \"P4\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P4\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P4\"},\n        {\"value\": 0, \"name\": \"Toolbar_First\", \"id\": \"P4\"},\n        {\"value\": \"P5\", \"name\": \"Participant ID\", \"id\": \"P5\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P5\"},\n        {\"value\": 2, \"name\": \"Fix Errors:\", \"id\": \"P5\"},\n        {\"value\": 4, \"name\": \"Easier to Fix:\", \"id\": \"P5\"},\n        {\"value\": 4, \"name\": \"Faster to Fix:\", \"id\": \"P5\"},\n        {\"value\": 4, \"name\": \"Easier on Phone:\", \"id\": \"P5\"},\n        {\"value\": 5, \"name\": \"Easier on Tablet:\", \"id\": \"P5\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P5\"},\n        {\"value\": 0, \"name\": \"Tablet_First\", \"id\": \"P5\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P5\"},\n        {\"value\": \"P6\", \"name\": \"Participant ID\", \"id\": \"P6\"},\n        {\"value\": 1, \"name\": \"Identify Errors:\", \"id\": \"P6\"},\n        {\"value\": 3, \"name\": \"Fix Errors:\", \"id\": \"P6\"},\n        {\"value\": 3, \"name\": \"Easier to Fix:\", \"id\": \"P6\"},\n        {\"value\": 4, \"name\": \"Faster to Fix:\", \"id\": \"P6\"},\n        {\"value\": 4, \"name\": \"Easier on Phone:\", \"id\": \"P6\"},\n        {\"value\": 4, \"name\": \"Easier on Tablet:\", \"id\": \"P6\"},\n        {\"value\": 4, \"name\": \"Device Preference:\", \"id\": \"P6\"},\n        {\"value\": 0, \"name\": \"Tablet_First\", \"id\": \"P6\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P6\"},\n        {\"value\": \"P7\", \"name\": \"Participant ID\", \"id\": \"P7\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P7\"},\n        {\"value\": 3, \"name\": \"Fix Errors:\", \"id\": \"P7\"},\n        {\"value\": 4, \"name\": \"Easier to Fix:\", \"id\": \"P7\"},\n        {\"value\": 5, \"name\": \"Faster to Fix:\", \"id\": \"P7\"},\n        {\"value\": 3, \"name\": \"Easier on Phone:\", \"id\": \"P7\"},\n        {\"value\": 2, \"name\": \"Easier on Tablet:\", \"id\": \"P7\"},\n        {\"value\": 4, \"name\": \"Device Preference:\", \"id\": \"P7\"},\n        {\"value\": 0, \"name\": \"Tablet_First\", \"id\": \"P7\"},\n        {\"value\": 0, \"name\": \"Toolbar_First\", \"id\": \"P7\"},\n        {\"value\": \"P8\", \"name\": \"Participant ID\", \"id\": \"P8\"},\n        {\"value\": 3, \"name\": \"Identify Errors:\", \"id\": \"P8\"},\n        {\"value\": 1, \"name\": \"Fix Errors:\", \"id\": \"P8\"},\n        {\"value\": 2, \"name\": \"Easier to Fix:\", \"id\": \"P8\"},\n        {\"value\": 4, \"name\": \"Faster to Fix:\", \"id\": \"P8\"},\n        {\"value\": 2, \"name\": \"Easier on Phone:\", \"id\": \"P8\"},\n        {\"value\": 5, \"name\": \"Easier on Tablet:\", \"id\": \"P8\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P8\"},\n        {\"value\": 0, \"name\": \"Tablet_First\", \"id\": \"P8\"},\n        {\"value\": 0, \"name\": \"Toolbar_First\", \"id\": \"P8\"},\n        {\"value\": \"P9\", \"name\": \"Participant ID\", \"id\": \"P9\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P9\"},\n        {\"value\": 3, \"name\": \"Fix Errors:\", \"id\": \"P9\"},\n        {\"value\": 2, \"name\": \"Easier to Fix:\", \"id\": \"P9\"},\n        {\"value\": 4, \"name\": \"Faster to Fix:\", \"id\": \"P9\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P9\"},\n        {\"value\": 4, \"name\": \"Easier on Tablet:\", \"id\": \"P9\"},\n        {\"value\": 4, \"name\": \"Device Preference:\", \"id\": \"P9\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P9\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P9\"},\n        {\"value\": \"P10\", \"name\": \"Participant ID\", \"id\": \"P10\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P10\"},\n        {\"value\": 2, \"name\": \"Fix Errors:\", \"id\": \"P10\"},\n        {\"value\": 1, \"name\": \"Easier to Fix:\", \"id\": \"P10\"},\n        {\"value\": 1, \"name\": \"Faster to Fix:\", \"id\": \"P10\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P10\"},\n        {\"value\": 1, \"name\": \"Easier on Tablet:\", \"id\": \"P10\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P10\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P10\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P10\"},\n        {\"value\": \"P11\", \"name\": \"Participant ID\", \"id\": \"P11\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P11\"},\n        {\"value\": 2, \"name\": \"Fix Errors:\", \"id\": \"P11\"},\n        {\"value\": 1, \"name\": \"Easier to Fix:\", \"id\": \"P11\"},\n        {\"value\": 1, \"name\": \"Faster to Fix:\", \"id\": \"P11\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P11\"},\n        {\"value\": 1, \"name\": \"Easier on Tablet:\", \"id\": \"P11\"},\n        {\"value\": 4, \"name\": \"Device Preference:\", \"id\": \"P11\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P11\"},\n        {\"value\": 0, \"name\": \"Toolbar_First\", \"id\": \"P11\"},\n        {\"value\": \"P12\", \"name\": \"Participant ID\", \"id\": \"P12\"},\n        {\"value\": 1, \"name\": \"Identify Errors:\", \"id\": \"P12\"},\n        {\"value\": 3, \"name\": \"Fix Errors:\", \"id\": \"P12\"},\n        {\"value\": 2, \"name\": \"Easier to Fix:\", \"id\": \"P12\"},\n        {\"value\": 3, \"name\": \"Faster to Fix:\", \"id\": \"P12\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P12\"},\n        {\"value\": 3, \"name\": \"Easier on Tablet:\", \"id\": \"P12\"},\n        {\"value\": 3, \"name\": \"Device Preference:\", \"id\": \"P12\"},\n        {\"value\": 0, \"name\": \"Tablet_First\", \"id\": \"P12\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P12\"},\n        {\"value\": \"P13\", \"name\": \"Participant ID\", \"id\": \"P13\"},\n        {\"value\": 2, \"name\": \"Identify Errors:\", \"id\": \"P13\"},\n        {\"value\": 2, \"name\": \"Fix Errors:\", \"id\": \"P13\"},\n        {\"value\": 1, \"name\": \"Easier to Fix:\", \"id\": \"P13\"},\n        {\"value\": 1, \"name\": \"Faster to Fix:\", \"id\": \"P13\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P13\"},\n        {\"value\": 1, \"name\": \"Easier on Tablet:\", \"id\": \"P13\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P13\"},\n        {\"value\": 0, \"name\": \"Tablet_First\", \"id\": \"P13\"},\n        {\"value\": 0, \"name\": \"Toolbar_First\", \"id\": \"P13\"},\n        {\"value\": \"P14\", \"name\": \"Participant ID\", \"id\": \"P14\"},\n        {\"value\": 3, \"name\": \"Identify Errors:\", \"id\": \"P14\"},\n        {\"value\": 3, \"name\": \"Fix Errors:\", \"id\": \"P14\"},\n        {\"value\": 2, \"name\": \"Easier to Fix:\", \"id\": \"P14\"},\n        {\"value\": 2, \"name\": \"Faster to Fix:\", \"id\": \"P14\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P14\"},\n        {\"value\": 1, \"name\": \"Easier on Tablet:\", \"id\": \"P14\"},\n        {\"value\": 1, \"name\": \"Device Preference:\", \"id\": \"P14\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P14\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P14\"},\n        {\"value\": \"P15\", \"name\": \"Participant ID\", \"id\": \"P15\"},\n        {\"value\": 4, \"name\": \"Identify Errors:\", \"id\": \"P15\"},\n        {\"value\": 5, \"name\": \"Fix Errors:\", \"id\": \"P15\"},\n        {\"value\": 1, \"name\": \"Easier to Fix:\", \"id\": \"P15\"},\n        {\"value\": 1, \"name\": \"Faster to Fix:\", \"id\": \"P15\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P15\"},\n        {\"value\": 1, \"name\": \"Easier on Tablet:\", \"id\": \"P15\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P15\"},\n        {\"value\": 1, \"name\": \"Tablet_First\", \"id\": \"P15\"},\n        {\"value\": 0, \"name\": \"Toolbar_First\", \"id\": \"P15\"},\n        {\"value\": \"P16\", \"name\": \"Participant ID\", \"id\": \"P16\"},\n        {\"value\": 1, \"name\": \"Identify Errors:\", \"id\": \"P16\"},\n        {\"value\": 3, \"name\": \"Fix Errors:\", \"id\": \"P16\"},\n        {\"value\": 2, \"name\": \"Easier to Fix:\", \"id\": \"P16\"},\n        {\"value\": 2, \"name\": \"Faster to Fix:\", \"id\": \"P16\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P16\"},\n        {\"value\": 4, \"name\": \"Easier on Tablet:\", \"id\": \"P16\"},\n        {\"value\": 5, \"name\": \"Device Preference:\", \"id\": \"P16\"},\n        {\"value\": 0, \"name\": \"Tablet_First\", \"id\": \"P16\"},\n        {\"value\": 1, \"name\": \"Toolbar_First\", \"id\": \"P16\"},\n        {\"value\": \"P17\", \"name\": \"Participant ID\", \"id\": \"P17\"},\n        {\"value\": 3, \"name\": \"Identify Errors:\", \"id\": \"P17\"},\n        {\"value\": 2, \"name\": \"Fix Errors:\", \"id\": \"P17\"},\n        {\"value\": 2, \"name\": \"Easier to Fix:\", \"id\": \"P17\"},\n        {\"value\": 2, \"name\": \"Faster to Fix:\", \"id\": \"P17\"},\n        {\"value\": 1, \"name\": \"Easier on Phone:\", \"id\": \"P17\"},\n        {\"value\": 3, \"name\": \"Easier on Tablet:\", \"id\": \"P17\"},\n        {\"value\": 2, \"name\": \"Device Preference:\", \"id\": \"P17\"},\n        {\"value\": 0, \"name\": \"Tablet_First\", \"id\": \"P17\"},\n        {\"value\": 0, \"name\": \"Toolbar_First\", \"id\": \"P17\"},\n    ]\n)\n\ny_axis = alt.Y(\"name\").axis(\n    title=None,\n    offset=50,\n    labelFontWeight=\"bold\",\n    ticks=False,\n    grid=True,\n    domain=False,\n)\n\nbase = alt.Chart(\n    medians,\n).encode(y_axis)\n\nbubbles = (\n    alt.Chart(values)\n    .transform_filter(\n        (alt.datum.name != \"Toolbar_First\")\n        & (alt.datum.name != \"Tablet_First\")\n        & (alt.datum.name != \"Participant ID\")\n    )\n    .mark_circle(color=\"#6EB4FD\")\n    .encode(\n        alt.X(\n            \"value:Q\",\n        ).title(None),\n        y_axis,\n        alt.Size(\"count()\").legend(offset=75, title=\"Number of ratings\"),\n        tooltip=[alt.Tooltip(\"count()\").title(\"Number of ratings\")],\n    )\n)\n\nticks = base.mark_tick(color=\"black\").encode(\n    alt.X(\"median:Q\")\n    .axis(grid=False, values=[1, 2, 3, 4, 5], format=\".0f\")\n    .scale(domain=[0, 6]),\n)\n\n\ntexts_lo = base.mark_text(align=\"right\", x=-5).encode(text=\"lo\")\n\ntexts_hi = base.mark_text(align=\"left\", x=255).encode(text=\"hi\")\n\n(bubbles + ticks + texts_lo + texts_hi).properties(\n    title=\"Questionnaire Ratings\", width=250, height=175\n).configure_view(stroke=None)\n"
  },
  {
    "path": "tests/examples_methods_syntax/distributions_faceted_histogram.py",
    "content": "\"\"\"\nFaceted Histogram\n-----------------\nThis example shows how to make a basic faceted histogram,\nwith one histogram subplot for different subsets of the data.\n\nBased off the vega-lite example:\nhttps://vega.github.io/vega-lite/examples/trellis_bar_histogram.html\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\nalt.Chart(source).mark_bar().encode(\n    alt.X(\"Horsepower:Q\").bin(),\n    y=\"count()\",\n    row=\"Origin\",\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/diverging_stacked_bar_chart.py",
    "content": "\"\"\"\nDiverging Stacked Bar Chart\n---------------------------\nThis example shows a diverging stacked bar chart for sentiments towards a set of eight questions, displayed as percentages with neutral responses straddling the 0% mark.\n\"\"\"\n# category: bar charts\nimport altair as alt\nimport pandas as pd\n\n\nsource = pd.DataFrame(\n    [\n        {\n            \"question\": \"Question 1\",\n            \"type\": \"Strongly disagree\",\n            \"value\": 24,\n        },\n        {\n            \"question\": \"Question 1\",\n            \"type\": \"Disagree\",\n            \"value\": 294,\n        },\n        {\n            \"question\": \"Question 1\",\n            \"type\": \"Neither agree nor disagree\",\n            \"value\": 594,\n        },\n        {\n            \"question\": \"Question 1\",\n            \"type\": \"Agree\",\n            \"value\": 1927,\n        },\n        {\n            \"question\": \"Question 1\",\n            \"type\": \"Strongly agree\",\n            \"value\": 376,\n        },\n        {\n            \"question\": \"Question 2\",\n            \"type\": \"Strongly disagree\",\n            \"value\": 2,\n        },\n        {\n            \"question\": \"Question 2\",\n            \"type\": \"Disagree\",\n            \"value\": 2,\n        },\n        {\n            \"question\": \"Question 2\",\n            \"type\": \"Neither agree nor disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 2\",\n            \"type\": \"Agree\",\n            \"value\": 7,\n        },\n        {\n            \"question\": \"Question 2\",\n            \"type\": \"Strongly agree\",\n            \"value\": 11,\n        },\n        {\n            \"question\": \"Question 3\",\n            \"type\": \"Strongly disagree\",\n            \"value\": 2,\n        },\n        {\n            \"question\": \"Question 3\",\n            \"type\": \"Disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 3\",\n            \"type\": \"Neither agree nor disagree\",\n            \"value\": 2,\n        },\n        {\n            \"question\": \"Question 3\",\n            \"type\": \"Agree\",\n            \"value\": 4,\n        },\n        {\n            \"question\": \"Question 3\",\n            \"type\": \"Strongly agree\",\n            \"value\": 2,\n        },\n        {\n            \"question\": \"Question 4\",\n            \"type\": \"Strongly disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 4\",\n            \"type\": \"Disagree\",\n            \"value\": 2,\n        },\n        {\n            \"question\": \"Question 4\",\n            \"type\": \"Neither agree nor disagree\",\n            \"value\": 1,\n        },\n        {\n            \"question\": \"Question 4\",\n            \"type\": \"Agree\",\n            \"value\": 7,\n        },\n        {\n            \"question\": \"Question 4\",\n            \"type\": \"Strongly agree\",\n            \"value\": 6,\n        },\n        {\n            \"question\": \"Question 5\",\n            \"type\": \"Strongly disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 5\",\n            \"type\": \"Disagree\",\n            \"value\": 1,\n        },\n        {\n            \"question\": \"Question 5\",\n            \"type\": \"Neither agree nor disagree\",\n            \"value\": 3,\n        },\n        {\n            \"question\": \"Question 5\",\n            \"type\": \"Agree\",\n            \"value\": 16,\n        },\n        {\n            \"question\": \"Question 5\",\n            \"type\": \"Strongly agree\",\n            \"value\": 4,\n        },\n        {\n            \"question\": \"Question 6\",\n            \"type\": \"Strongly disagree\",\n            \"value\": 1,\n        },\n        {\n            \"question\": \"Question 6\",\n            \"type\": \"Disagree\",\n            \"value\": 1,\n        },\n        {\n            \"question\": \"Question 6\",\n            \"type\": \"Neither agree nor disagree\",\n            \"value\": 2,\n        },\n        {\n            \"question\": \"Question 6\",\n            \"type\": \"Agree\",\n            \"value\": 9,\n        },\n        {\n            \"question\": \"Question 6\",\n            \"type\": \"Strongly agree\",\n            \"value\": 3,\n        },\n        {\n            \"question\": \"Question 7\",\n            \"type\": \"Strongly disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 7\",\n            \"type\": \"Disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 7\",\n            \"type\": \"Neither agree nor disagree\",\n            \"value\": 1,\n        },\n        {\n            \"question\": \"Question 7\",\n            \"type\": \"Agree\",\n            \"value\": 4,\n        },\n        {\n            \"question\": \"Question 7\",\n            \"type\": \"Strongly agree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 8\",\n            \"type\": \"Strongly disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 8\",\n            \"type\": \"Disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 8\",\n            \"type\": \"Neither agree nor disagree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 8\",\n            \"type\": \"Agree\",\n            \"value\": 0,\n        },\n        {\n            \"question\": \"Question 8\",\n            \"type\": \"Strongly agree\",\n            \"value\": 2,\n        },\n    ]\n)\n\n\n# Add type_code that we can sort by\nsource[\"type_code\"] = source[\"type\"].map(\n    {\n        \"Strongly disagree\": -2,\n        \"Disagree\": -1,\n        \"Neither agree nor disagree\": 0,\n        \"Agree\": 1,\n        \"Strongly agree\": 2,\n    }\n)\n\n\ndef compute_percentages(\n    group,\n):\n    # Set type_code as index and sort\n    group = group.set_index(\"type_code\").sort_index()\n\n    # Compute percentage of value with question group\n    perc = (group[\"value\"] / group[\"value\"].sum()) * 100\n    group[\"percentage\"] = perc\n\n    # Compute percentage end, centered on \"Neither agree nor disagree\" (type_code 0)\n    # Note that we access the perc series via index which is based on 'type_code'.\n    group[\"percentage_end\"] = perc.cumsum() - (perc[-2] + perc[-1] + perc[0] / 2)\n\n    # Compute percentage start by subtracting percent\n    group[\"percentage_start\"] = group[\"percentage_end\"] - perc\n\n    return group\n\n\nsource = source.groupby(\"question\").apply(compute_percentages).reset_index(drop=True)\n\n\ncolor_scale = alt.Scale(\n    domain=[\n        \"Strongly disagree\",\n        \"Disagree\",\n        \"Neither agree nor disagree\",\n        \"Agree\",\n        \"Strongly agree\",\n    ],\n    range=[\"#c30d24\", \"#f3a583\", \"#cccccc\", \"#94c6da\", \"#1770ab\"],\n)\n\ny_axis = alt.Axis(title=\"Question\", offset=5, ticks=False, minExtent=60, domain=False)\n\nalt.Chart(source).mark_bar().encode(\n    x=\"percentage_start:Q\",\n    x2=\"percentage_end:Q\",\n    y=alt.Y(\"question:N\").axis(y_axis),\n    color=alt.Color(\"type:N\").title(\"Response\").scale(color_scale),\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/donut_chart.py",
    "content": "\"\"\"\nDonut Chart\n-----------\nThis example shows how to make a Donut Chart using ``mark_arc``.\nThis is adapted from a corresponding Vega-Lite Example:\n`Donut Chart <https://vega.github.io/vega-lite/examples/arc_donut.html>`_.\n\"\"\"\n# category: circular plots\n\nimport pandas as pd\nimport altair as alt\n\nsource = pd.DataFrame({\n    \"category\": [1, 2, 3, 4, 5, 6],\n    \"value\": [4, 6, 10, 3, 7, 8]\n})\n\nalt.Chart(source).mark_arc(innerRadius=50).encode(\n    theta=\"value\",\n    color=\"category:N\",\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/errorbars_with_ci.py",
    "content": "\"\"\"\nError Bars with Confidence Interval\n======================================\nThis example shows how to show error bars using confidence intervals.\nThe confidence intervals are computed internally in vega by a non-parametric\n`bootstrap of the mean <https://github.com/vega/vega-statistics/blob/master/src/bootstrapCI.js>`_.\n\"\"\"\n# category: uncertainties and trends\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nerror_bars = alt.Chart(source).mark_errorbar(extent='ci').encode(\n  alt.X('yield').scale(zero=False),\n  alt.Y('variety')\n)\n\npoints = alt.Chart(source).mark_point(filled=True, color='black').encode(\n  x=alt.X('mean(yield)'),\n  y=alt.Y('variety'),\n)\n\nerror_bars + points\n"
  },
  {
    "path": "tests/examples_methods_syntax/errorbars_with_std.py",
    "content": "\"\"\"\nError Bars with Standard Deviation\n----------------------------------\nThis example shows how to show error bars with standard deviation using crop yields data of different\nin the years of 1930s.\n\"\"\"\n# category: uncertainties and trends\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nerror_bars = alt.Chart(source).mark_errorbar(extent='stdev').encode(\n  x=alt.X('yield').scale(zero=False),\n  y=alt.Y('variety')\n)\n\npoints = alt.Chart(source).mark_point(filled=True, color='black').encode(\n  x=alt.X('mean(yield)'),\n  y=alt.Y('variety'),\n)\n\nerror_bars + points\n"
  },
  {
    "path": "tests/examples_methods_syntax/falkensee.py",
    "content": "\"\"\"\nPopulation of Falkensee from 1875 to 2014\n-----------------------------------------\nThis example is a reproduction of the Falkensee plot found in the Vega-Lite examples.\n\"\"\"\n# category: case studies\nimport altair as alt\nimport pandas as pd\n\nsource = [\n    {\"year\": \"1875\", \"population\": 1309},\n    {\"year\": \"1890\", \"population\": 1558},\n    {\"year\": \"1910\", \"population\": 4512},\n    {\"year\": \"1925\", \"population\": 8180},\n    {\"year\": \"1933\", \"population\": 15915},\n    {\"year\": \"1939\", \"population\": 24824},\n    {\"year\": \"1946\", \"population\": 28275},\n    {\"year\": \"1950\", \"population\": 29189},\n    {\"year\": \"1964\", \"population\": 29881},\n    {\"year\": \"1971\", \"population\": 26007},\n    {\"year\": \"1981\", \"population\": 24029},\n    {\"year\": \"1985\", \"population\": 23340},\n    {\"year\": \"1989\", \"population\": 22307},\n    {\"year\": \"1990\", \"population\": 22087},\n    {\"year\": \"1991\", \"population\": 22139},\n    {\"year\": \"1992\", \"population\": 22105},\n    {\"year\": \"1993\", \"population\": 22242},\n    {\"year\": \"1994\", \"population\": 22801},\n    {\"year\": \"1995\", \"population\": 24273},\n    {\"year\": \"1996\", \"population\": 25640},\n    {\"year\": \"1997\", \"population\": 27393},\n    {\"year\": \"1998\", \"population\": 29505},\n    {\"year\": \"1999\", \"population\": 32124},\n    {\"year\": \"2000\", \"population\": 33791},\n    {\"year\": \"2001\", \"population\": 35297},\n    {\"year\": \"2002\", \"population\": 36179},\n    {\"year\": \"2003\", \"population\": 36829},\n    {\"year\": \"2004\", \"population\": 37493},\n    {\"year\": \"2005\", \"population\": 38376},\n    {\"year\": \"2006\", \"population\": 39008},\n    {\"year\": \"2007\", \"population\": 39366},\n    {\"year\": \"2008\", \"population\": 39821},\n    {\"year\": \"2009\", \"population\": 40179},\n    {\"year\": \"2010\", \"population\": 40511},\n    {\"year\": \"2011\", \"population\": 40465},\n    {\"year\": \"2012\", \"population\": 40905},\n    {\"year\": \"2013\", \"population\": 41258},\n    {\"year\": \"2014\", \"population\": 41777},\n]\n\nsource2 = [\n    {\"start\": \"1933\", \"end\": \"1945\", \"event\": \"Nazi Rule\"},\n    {\"start\": \"1948\", \"end\": \"1989\", \"event\": \"GDR (East Germany)\"},\n]\n\n\nsource_df = pd.DataFrame(source)\nsource2_df = pd.DataFrame(source2)\n\n\nline = alt.Chart(source_df).mark_line(color=\"#333\").encode(\n    alt.X(\"year:T\").axis(format=\"%Y\").title(\"Year\"),\n    alt.Y(\"population\").title(\"Population\"),\n)\n\npoint = line.mark_point(color=\"#333\")\n\nrect = alt.Chart(source2_df).mark_rect().encode(\n    x=\"start:T\",\n    x2=\"end:T\",\n    color=alt.Color(\"event:N\").title(\"Event\")\n)\n\n(rect + line + point).properties(\n    title=\"Population of Falkensee from 1875 to 2014\",\n    width=500,\n    height=300\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/gapminder_bubble_plot.py",
    "content": "\"\"\"\nGapminder Bubble Plot\n=====================\nThis example shows how to make a bubble plot showing the correlation between\nhealth and income for 187 countries in the world (modified from an example\nin Lisa Charlotte Rost's blog post `'One Chart, Twelve Charting Libraries' <http://lisacharlotterost.github.io/2016/05/17/one-chart-code/>`_.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.gapminder_health_income.url\n\nalt.Chart(source).mark_circle().encode(\n    alt.X('income:Q').scale(type='log'),\n    alt.Y('health:Q').scale(zero=False),\n    size='population:Q'\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/groupby-map.py",
    "content": "\"\"\"\nGrouped Points with Proportional Symbols Map\n============================================\nThis is a layered geographic visualization that groups points by state.\n\"\"\"\n# category: maps\nimport altair as alt\nfrom altair.datasets import data\n\nairports = data.airports.url\nstates = alt.topo_feature(data.us_10m.url, feature='states')\n\n# US states background\nbackground = alt.Chart(states).mark_geoshape(\n    fill='lightgray',\n    stroke='white'\n).properties(\n    width=500,\n    height=300\n).project('albersUsa')\n\n# Airports grouped by state\npoints = alt.Chart(airports, title='Number of airports in US').transform_aggregate( \n    latitude='mean(latitude)',\n    longitude='mean(longitude)',\n    count='count()',\n    groupby=['state']\n).mark_circle().encode(\n    longitude='longitude:Q',\n    latitude='latitude:Q',\n    size=alt.Size('count:Q').title('Number of Airports'),\n    color=alt.value('steelblue'),\n    tooltip=['state:N','count:Q']\n)\n\nbackground + points\n"
  },
  {
    "path": "tests/examples_methods_syntax/grouped_bar_chart2.py",
    "content": "\"\"\"\nGrouped Bar Chart with xOffset\n------------------------------\nLike :ref:`gallery_grouped_bar_chart`, this example shows a grouped bar chart.  Whereas :ref:`gallery_grouped_bar_chart` used the ``column`` encoding channel, this example uses the ``xOffset`` encoding channel.  This is adapted from a corresponding Vega-Lite Example:\n`Grouped Bar Chart <https://vega.github.io/vega-lite/examples/bar_grouped.html>`_.\n\"\"\"\n# category: bar charts\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame({\n    \"Category\":list(\"AAABBBCCC\"),\n    \"Group\":list(\"xyzxyzxyz\"),\n    \"Value\":[0.1, 0.6, 0.9, 0.7, 0.2, 1.1, 0.6, 0.1, 0.2]\n})\n\nalt.Chart(source).mark_bar().encode(\n    x=\"Category:N\",\n    y=\"Value:Q\",\n    xOffset=\"Group:N\",\n    color=\"Group:N\"\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/grouped_bar_chart_overlapping_bars.py",
    "content": "\"\"\"\nGrouped Bar Chart with xOffset and overlapping bars\n---------------------------------------------------\nLike :ref:`gallery_grouped_bar_chart2`, this example shows a grouped bar chart using the ``xOffset`` encoding channel, but in this example the bars are partly overlapping within each group.\n\"\"\"\n# category: bar charts\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame(\n    {\n        \"category\": list(\"AABBCC\"),\n        \"group\": list(\"xyxyxy\"),\n        \"value\": [0.1, 0.6, 0.7, 0.2, 0.6, 0.1],\n    }\n)\n\nbase = alt.Chart(source, width=alt.Step(12)).encode(\n    x=\"category:N\",\n    y=\"value:Q\",\n    xOffset=alt.XOffset(\"group:N\").scale(paddingOuter=0.5),\n)\n\nalt.layer(\n    base.mark_bar(size=20, stroke=\"white\", fillOpacity=0.9).encode(fill=\"group:N\"),\n    base.mark_text(dy=-5).encode(text=\"value:Q\"),\n)"
  },
  {
    "path": "tests/examples_methods_syntax/grouped_bar_chart_with_error_bars.py",
    "content": "\"\"\"\nGrouped Bar Chart with Error Bars\n---------------------------------\nThis example shows a grouped bar chart with error bars.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nbars = alt.Chart().mark_bar().encode(\n    x='year:O',\n    y=alt.Y('mean(yield):Q').title('Mean Yield'),\n    color='year:N',\n)\n\nerror_bars = alt.Chart().mark_errorbar(extent='ci').encode(\n    x='year:O',\n    y='yield:Q'\n)\n\nalt.layer(bars, error_bars, data=source).facet(\n    column='site:N'\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/heat_lane.py",
    "content": "\"\"\"\nHeat Lane Chart\n---------------\nThis example shows how to make an alternative form of a histogram `designed at Google <https://www.smashingmagazine.com/2022/07/accessibility-first-approach-chart-visual-design/>`_ with the goal of increasing accessibility.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars.url\n\nchart = alt.Chart(source, title=\"Car horsepower\", height=100, width=300).encode(\n    alt.X(\"bin_Horsepower_start:Q\")\n        .title(\"Horsepower\")\n        .axis(grid=False),\n    alt.X2(\"bin_Horsepower_end:Q\"),\n    alt.Y(\"y:O\").axis(None),\n    alt.Y2(\"y2\"),\n).transform_bin(\n    [\"bin_Horsepower_start\", \"bin_Horsepower_end\"],\n    field='Horsepower'\n).transform_aggregate(\n    count='count()',\n    groupby=[\"bin_Horsepower_start\", \"bin_Horsepower_end\"]\n).transform_bin(\n    [\"bin_count_start\", \"bin_count_end\"],\n    field='count'\n).transform_calculate(\n    y=\"datum.bin_count_end/2\",\n    y2=\"-datum.bin_count_end/2\",\n).transform_joinaggregate(\n    max_bin_count_end=\"max(bin_count_end)\",\n)\n\nlayer1 = chart.mark_bar(xOffset=1, x2Offset=-1, cornerRadius=3).encode(\n    alt.Color(\"max_bin_count_end:O\")\n        .title(\"Number of models\")\n        .scale(scheme=\"lighttealblue\")\n)\nlayer2 = chart.mark_bar(xOffset=1, x2Offset=-1, yOffset=-3, y2Offset=3).encode(\n    alt.Color(\"bin_count_end:O\").title(\"Number of models\")\n)\n\nlayer1 + layer2\n"
  },
  {
    "path": "tests/examples_methods_syntax/hexbins.py",
    "content": "\"\"\"\nHexbin Chart\n------------\nThis example shows a hexbin chart.\n\"\"\"\n# category: tables\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather()\n\n# Size of the hexbins\nsize = 15\n# Count of distinct x features\nxFeaturesCount = 12\n# Count of distinct y features\nyFeaturesCount = 7\n# Name of the x field\nxField = 'date'\n# Name of the y field\nyField = 'date'\n\n# the shape of a hexagon\nhexagon = \"M0,-2.3094010768L2,-1.1547005384 2,1.1547005384 0,2.3094010768 -2,1.1547005384 -2,-1.1547005384Z\"\n\nalt.Chart(source).mark_point(size=size**2, shape=hexagon).encode(\n    alt.X('xFeaturePos:Q')\n        .title('Month')\n        .axis(grid=False, tickOpacity=0, domainOpacity=0),\n    alt.Y('day(' + yField + '):O')\n        .title('Weekday')\n        .axis(labelPadding=20, tickOpacity=0, domainOpacity=0),\n    stroke=alt.value('black'),\n    strokeWidth=alt.value(0.2),\n    fill=alt.Fill('mean(temp_max):Q').scale(scheme='darkblue'),\n    tooltip=['month(' + xField + '):O', 'day(' + yField + '):O', 'mean(temp_max):Q']\n).transform_calculate(\n    # This field is required for the hexagonal X-Offset\n    xFeaturePos='(day(datum.' + yField + ') % 2) / 2 + month(datum.' + xField + ')'\n).properties(\n    # Exact scaling factors to make the hexbins fit\n    width=size * xFeaturesCount * 2,\n    height=size * yFeaturesCount * 1.7320508076,  # 1.7320508076 is approx. sin(60°)*2\n).configure_view(\n    strokeWidth=0\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/histogram_gradient_color.py",
    "content": "\"\"\"\nHistogram with Gradient Color\n-----------------------------\nThis example shows how to make a histogram with gradient color.\nThe low-high IMDB rating is represented with the color scheme `pinkyellowgreen`.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\nalt.Chart(source).mark_bar().encode(\n    alt.X(\"IMDB Rating:Q\").bin(maxbins=20).scale(domain=[1, 10]),\n    alt.Y('count()'),\n    alt.Color(\"IMDB Rating:Q\").bin(maxbins=20).scale(scheme='pinkyellowgreen')\n)"
  },
  {
    "path": "tests/examples_methods_syntax/histogram_heatmap.py",
    "content": "\"\"\"\n2D Histogram Heatmap\n--------------------\nThis example shows how to make a heatmap from binned quantitative data.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\nalt.Chart(source).mark_rect().encode(\n    alt.X('IMDB Rating:Q').bin(maxbins=60),\n    alt.Y('Rotten Tomatoes Rating:Q').bin(maxbins=40),\n    alt.Color('count():Q').scale(scheme='greenblue')\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/histogram_responsive.py",
    "content": "\"\"\"\nHistogram with Responsive Bins\n------------------------------\nThis shows an example of a histogram with bins that are responsive to a\nselection domain. Click and drag on the bottom panel to see the bins\nchange on the top panel.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.flights_5k.url\n\nbrush = alt.selection_interval(encodings=['x'])\n\nbase = alt.Chart(source).transform_calculate(\n    time=\"hours(datum.date) + minutes(datum.date) / 60\"\n).mark_bar().encode(\n    y='count():Q'\n).properties(\n    width=600,\n    height=100\n)\n\nalt.vconcat(\n  base.encode(\n    alt.X('time:Q')\n      .bin(maxbins=30, extent=brush)\n      .scale(domain=brush)\n  ),\n  base.encode(\n    alt.X('time:Q').bin(maxbins=30),\n  ).add_params(brush)\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/histogram_scatterplot.py",
    "content": "\"\"\"\n2D Histogram Scatter Plot\n-------------------------\nThis example shows how to make a 2d histogram scatter plot.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\nalt.Chart(source).mark_circle().encode(\n    alt.X('IMDB Rating:Q').bin(),\n    alt.Y('Rotten Tomatoes Rating:Q').bin(),\n    size='count()'\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/histogram_with_a_global_mean_overlay.py",
    "content": "\"\"\"\nHistogram with a Global Mean Overlay\n------------------------------------\nThis example shows a histogram with a global mean overlay.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\nbase = alt.Chart(source)\n\nbar = base.mark_bar().encode(\n    alt.X('IMDB Rating:Q').bin().axis(None),\n    y='count()'\n)\n\nrule = base.mark_rule(color='red').encode(\n    x='mean(IMDB Rating):Q',\n    size=alt.value(5)\n)\n\nbar + rule\n"
  },
  {
    "path": "tests/examples_methods_syntax/horizon_graph.py",
    "content": "\"\"\"\nHorizon Graph\n-------------\nThis example shows how to make a Horizon Graph with 2 layers. (See https://idl.cs.washington.edu/papers/horizon/ for more details on Horizon Graphs.)\n\"\"\"\n# category: area charts\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame([\n    {\"x\": 1,  \"y\": 28}, {\"x\": 2,  \"y\": 55},\n    {\"x\": 3,  \"y\": 43}, {\"x\": 4,  \"y\": 91},\n    {\"x\": 5,  \"y\": 81}, {\"x\": 6,  \"y\": 53},\n    {\"x\": 7,  \"y\": 19}, {\"x\": 8,  \"y\": 87},\n    {\"x\": 9,  \"y\": 52}, {\"x\": 10, \"y\": 48},\n    {\"x\": 11, \"y\": 24}, {\"x\": 12, \"y\": 49},\n    {\"x\": 13, \"y\": 87}, {\"x\": 14, \"y\": 66},\n    {\"x\": 15, \"y\": 17}, {\"x\": 16, \"y\": 27},\n    {\"x\": 17, \"y\": 68}, {\"x\": 18, \"y\": 16},\n    {\"x\": 19, \"y\": 49}, {\"x\": 20, \"y\": 15}\n])\n\narea1 = alt.Chart(source).mark_area(\n    clip=True,\n    interpolate='monotone',\n    opacity=0.6\n).encode(\n    alt.X('x').scale(zero=False, nice=False),\n    alt.Y('y').scale(domain=[0, 50]).title('y'),\n).properties(\n    width=500,\n    height=75\n)\n\narea2 = area1.encode(\n    alt.Y('ny:Q').scale(domain=[0, 50])\n).transform_calculate(\n    \"ny\", alt.datum.y - 50\n)\n\narea1 + area2\n"
  },
  {
    "path": "tests/examples_methods_syntax/interactive_aggregation.py",
    "content": "\"\"\"\nInteractive Chart with Aggregation\n==================================\nThis example shows an interactive chart where the range binder controls a\nthreshold as rule where the datapoints on the left-side are aggregated and on the\nright-side are drawn as is. \nThe ability to slide back and fourth may help you understand how the visualization\nrepresents the aggregation. Adapted from an example by @dwootton.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\nslider = alt.binding_range(min=0, max=10, step=0.1)\nthreshold = alt.param(name=\"threshold\", value=5, bind=slider)\n\nalt.layer(\n    alt.Chart(source).mark_circle().encode(\n        x=alt.X(\"IMDB Rating:Q\").title(\"IMDB Rating\"),\n        y=alt.Y(\"Rotten Tomatoes Rating:Q\").title(\"Rotten Tomatoes Rating\")\n    ).transform_filter(\n        alt.datum[\"IMDB Rating\"] >= threshold\n    ),\n\n    alt.Chart(source).mark_circle().encode(\n        x=alt.X(\"IMDB Rating:Q\").bin(maxbins=10),\n        y=alt.Y(\"Rotten Tomatoes Rating:Q\").bin(maxbins=10),\n        size=alt.Size(\"count():Q\").scale(domain=[0,160])\n    ).transform_filter(\n        alt.datum[\"IMDB Rating\"] < threshold\n    ),\n\n    alt.Chart().mark_rule(color=\"gray\").encode(\n        strokeWidth=alt.StrokeWidth(value=6),\n        x=alt.X(datum=alt.expr(threshold.name), type=\"quantitative\")\n    )\n).add_params(threshold)"
  },
  {
    "path": "tests/examples_methods_syntax/interactive_bar_select_highlight.py",
    "content": "\"\"\"\nBar Chart with Highlighting on Hover and Selection on Click\n-----------------------------------------------------------\nThis example shows a bar chart with highlighting on hover and selecting on click. (Inspired by Tableau's interaction style.)\n\nBased on https://vega.github.io/vega-lite/examples/interactive_bar_select_highlight.html\n\"\"\"\n\n# category: interactive charts\nimport altair as alt\n\nsource = {\n    \"values\": [\n        {\"a\": \"A\", \"b\": 28},\n        {\"a\": \"B\", \"b\": 55},\n        {\"a\": \"C\", \"b\": 43},\n        {\"a\": \"D\", \"b\": 91},\n        {\"a\": \"E\", \"b\": 81},\n        {\"a\": \"F\", \"b\": 53},\n        {\"a\": \"G\", \"b\": 19},\n        {\"a\": \"H\", \"b\": 87},\n        {\"a\": \"I\", \"b\": 52},\n    ]\n}\n\nselect = alt.selection_point(name=\"select\", on=\"click\")\nhighlight = alt.selection_point(name=\"highlight\", on=\"pointerover\", empty=False)\n\nstroke_width = (\n    alt.when(select).then(alt.value(2, empty=False))\n    .when(highlight).then(alt.value(1))\n    .otherwise(alt.value(0))\n)\n\n\nalt.Chart(source, height=200).mark_bar(\n    fill=\"#4C78A8\", stroke=\"black\", cursor=\"pointer\"\n).encode(\n    x=\"a:O\",\n    y=\"b:Q\",\n    fillOpacity=alt.when(select).then(alt.value(1)).otherwise(alt.value(0.3)),\n    strokeWidth=stroke_width,\n).configure_scale(bandPaddingInner=0.2).add_params(select, highlight)\n"
  },
  {
    "path": "tests/examples_methods_syntax/interactive_column_selection.py",
    "content": "\"\"\"\nInteractive Selection of Columns\n================================\nThis example shows how columns can be selected interactively\nby accessing the values from selector widgets,\nand then compute the difference of the selected columns.\nIt also illustrates how to use `indexof` to filter\ncolumns based on active selection values.\n\"\"\"\n# category: interactive charts\n\nimport pandas as pd\nimport numpy as np\nimport altair as alt\n\n\n# Create timeseries data\nrng = np.random.default_rng(905)\nex_ts = pd.DataFrame(\n    rng.random((10, 4)),\n    columns=['a', 'b', 'c', 'd'],\n).assign(\n    date=pd.date_range(\n        start=pd.to_datetime('2022-02-22')-pd.Timedelta(9, unit='D'),\n        end=pd.to_datetime('2022-02-22')).strftime('%Y-%m-%d'),\n)\n\n# Create heatmap with selection\nselect_x = alt.selection_point(fields=['level_0'], name='select_x', value='b')\nselect_y = alt.selection_point(fields=['level_1'], name='select_y', value='d')\nheatmap = alt.Chart(\n    ex_ts.drop(columns='date').corr().stack().reset_index().rename(columns={0: 'correlation'}),\n    title='Click a tile to compare timeseries',\n    height=250,\n    width=250,\n).mark_rect().encode(\n    alt.X('level_0').title(None),\n    alt.Y('level_1').title(None),\n    alt.Color('correlation').scale(domain=[-1, 1], scheme='blueorange'),\n    opacity=alt.when(select_x, select_y).then(alt.value(1)).otherwise(alt.value(0.4)),\n).add_params(\n    select_x, select_y\n)\n\n# Create chart with individual lines/timeseries\nbase = alt.Chart(\n    ex_ts.melt(\n        id_vars='date',\n        var_name='category',\n        value_name='value',\n    ),\n    height=100,\n    width=300,\n    title='Individual timeseries',\n)\nlines = base.transform_filter(\n    # If the category is not in the selected values, the returned index is -1\n    'indexof(datum.category, select_x.level_0) !== -1'\n   '| indexof(datum.category, select_y.level_1) !== -1'\n).mark_line().encode(\n    alt.X('date:T').axis(labels=False).title(None),\n    alt.Y('value').scale(domain=(0, 1)),\n    alt.Color('category').legend(orient='top', offset=-20).title(None)\n)\n\n# Create chart with difference between lines/timeseries\ndynamic_title = alt.Title(alt.expr(f'\"Difference \" + {select_x.name}.level_0 + \" - \" + {select_y.name}.level_1'))\n# We pivot transform to get each category as a column\nlines_diff = base.transform_pivot(\n    'category', 'value', groupby=['date']\n# In the calculate transform we use the values from the selection to subset the columns to subtract\n).transform_calculate(\n    difference = f'datum[{select_x.name}.level_0] - datum[{select_y.name}.level_1]'\n).mark_line(color='grey').encode(\n    alt.X('date:T').axis(format='%Y-%m-%d').title(None),\n    alt.Y('difference:Q').scale(domain=(-1, 1)),\n).properties(\n    title=dynamic_title\n)\n\n# Layout the charts\n(lines & lines_diff) | heatmap\n"
  },
  {
    "path": "tests/examples_methods_syntax/interactive_cross_highlight.py",
    "content": "\"\"\"\nInteractive Chart with Cross-Highlight\n======================================\nThis example shows an interactive chart where selections in one portion of\nthe chart affect what is shown in other panels. Click on the bar chart to\nsee a detail of the distribution in the upper panel.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\npts = alt.selection_point(encodings=['x'])\n\nrect = alt.Chart(data.movies.url).mark_rect().encode(\n    alt.X('IMDB Rating:Q').bin(),\n    alt.Y('Rotten Tomatoes Rating:Q').bin(),\n    alt.Color('count()').scale(scheme='greenblue').title('Total Records')\n)\n\ncirc = rect.mark_point().encode(\n    alt.ColorValue('grey'),\n    alt.Size('count()').title('Records in Selection')\n).transform_filter(\n    pts\n)\n\nbar = alt.Chart(source, width=550, height=200).mark_bar().encode(\n    x='Major Genre:N',\n    y='count()',\n    color=alt.when(pts).then(alt.ColorValue(\"steelblue\")).otherwise(alt.ColorValue(\"grey\"))\n).add_params(pts)\n\nalt.vconcat(\n    rect + circ,\n    bar\n).resolve_legend(\n    color=\"independent\",\n    size=\"independent\"\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/interactive_layered_crossfilter.py",
    "content": "\"\"\"\nInteractive Crossfilter\n=======================\nThis example shows a multi-panel view of the same data, where you can interactively\nselect a portion of the data in any of the panels to highlight that portion in any\nof the other panels.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = alt.UrlData(\n    data.flights_2k.url,\n    format={'parse': {'date': 'date'}}\n)\n\nbrush = alt.selection_interval(encodings=['x'])\n\n# Define the base chart, with the common parts of the\n# background and highlights\nbase = alt.Chart(width=160, height=130).mark_bar().encode(\n    x=alt.X(alt.repeat('column')).bin(maxbins=20),\n    y='count()'\n)\n\n# gray background with selection\nbackground = base.encode(\n    color=alt.value('#ddd')\n).add_params(brush)\n\n# blue highlights on the transformed data\nhighlight = base.transform_filter(brush)\n\n# layer the two charts & repeat\nalt.layer(\n    background,\n    highlight,\n    data=source\n).transform_calculate(\n    \"time\",\n    \"hours(datum.date)\"\n).repeat(column=[\"distance\", \"delay\", \"time\"])\n"
  },
  {
    "path": "tests/examples_methods_syntax/interactive_legend.py",
    "content": "\"\"\"\nInteractive Legend\n------------------\nThe following shows how to create a chart with an interactive legend, by\nbinding the selection to ``\"legend\"``. Such a binding only works with\n``selection_point`` when projected over a single field or encoding.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.unemployment_across_industries.url\n\nselection = alt.selection_point(fields=['series'], bind='legend')\n\nalt.Chart(source).mark_area().encode(\n    alt.X('yearmonth(date):T').axis(domain=False, format='%Y', tickSize=0),\n    alt.Y('sum(count):Q').stack('center').axis(None),\n    alt.Color('series:N').scale(scheme='category20b'),\n    opacity=alt.when(selection).then(alt.value(1)).otherwise(alt.value(0.2))\n).add_params(\n    selection\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/interval_selection.py",
    "content": "\"\"\"\nInterval Selection with Initial Date Range\n==========================================\n\nThis is an example of creating a stacked chart for which the domain of the\ntop chart can be selected by interacting with the bottom chart. The initial\nselection range is set using Python's native datetime objects.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\nimport datetime as dt\n\nsource = data.sp500.url\n\ndate_range = (dt.date(2007, 6, 30), dt.date(2009, 6, 30))\n\nbrush = alt.selection_interval(encodings=['x'],\n                               value={'x': date_range})\n\nbase = alt.Chart(source, width=600, height=200).mark_area().encode(\n    x = 'date:T',\n    y = 'price:Q'\n)\n\nupper = base.encode(\n    alt.X('date:T').scale(domain=brush)\n)\n\nlower = base.properties(\n    height=60\n).add_params(brush)\n\nupper & lower\n"
  },
  {
    "path": "tests/examples_methods_syntax/interval_selection_map_quakes.py",
    "content": "\"\"\"\nInterval Selection on a Map\n===========================\n\nThis is an example of a binned bar chart on the right where the filtered overlay\nis adjusted by interacting with the map on the left.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\n# load data\ngdf_quakies = data.earthquakes()\ngdf_world = data.world_110m(layer=\"countries\")\n\n# definition for interactive brush\nbrush = alt.selection_interval(\n    encodings=[\"longitude\"], \n    empty=False, \n    value={\"longitude\": [-50, -110]}\n)\n\n# world disk\nsphere = alt.Chart(alt.sphere()).mark_geoshape(\n    fill=\"transparent\", stroke=\"lightgray\", strokeWidth=1\n)\n\n# countries as shapes\nworld = alt.Chart(gdf_world).mark_geoshape(\n    fill=\"lightgray\", stroke=\"white\", strokeWidth=0.1\n)\n\n# earthquakes as dots on map\nquakes = alt.Chart(gdf_quakies).transform_calculate(\n    lon=\"datum.geometry.coordinates[0]\",\n    lat=\"datum.geometry.coordinates[1]\",\n).mark_circle(opacity=0.35, tooltip=True).encode(\n    longitude=\"lon:Q\",\n    latitude=\"lat:Q\",\n    color=alt.when(brush).then(alt.value(\"goldenrod\")).otherwise(alt.value(\"steelblue\")),\n    size=alt.Size(\"mag:Q\").scale(type=\"pow\", range=[1, 1000], domain=[0, 7], exponent=4),\n).add_params(brush)\n\n# combine layers for the map\nleft_map = alt.layer(sphere, world, quakes).project(type=\"mercator\") \n\n# histogram of binned earthquakes\nbars = alt.Chart(gdf_quakies).mark_bar().encode(\n    x=alt.X(\"mag:Q\").bin(extent=[0,7]),\n    y=\"count(mag):Q\",\n    color=alt.value(\"steelblue\")\n)\n\n# filtered earthquakes\nbars_overlay = bars.encode(color=alt.value(\"goldenrod\")).transform_filter(brush)\n\n# combine layers for histogram\nright_bars = alt.layer(bars, bars_overlay)\n\n# vertical concatenate map and bars\nleft_map | right_bars"
  },
  {
    "path": "tests/examples_methods_syntax/iowa_electricity.py",
    "content": "\"\"\"\nIowa's Renewable Energy Boom\n----------------------------\nThis example is a fully developed stacked chart using the sample dataset of Iowa's electricity sources.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.iowa_electricity()\n\nalt.Chart(\n    source,\n    title=alt.Title(\n        \"Iowa's green energy boom\",\n        subtitle=\"A growing share of the state's energy has come from renewable sources\"\n    )\n).mark_area().encode(\n    alt.X(\"year:T\").title(\"Year\"),\n    alt.Y(\"net_generation:Q\")\n        .title(\"Share of net generation\")\n        .stack(\"normalize\")\n        .axis(format=\".0%\"),\n    alt.Color(\"source:N\").title(\"Electricity source\")\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/isotype.py",
    "content": "'''\nIsotype Visualization\n=====================\nIsotype Visualization shows the distribution of animals across UK and US.\nInspired by `Only An Ocean Between, 1943 <http://www.thomwhite.co.uk/?p=1303>`_. Population Live Stock, p.13.\nThis is adapted from Vega-Lite example https://vega.github.io/editor/#/examples/vega-lite/isotype_bar_chart\n'''\n# category: advanced calculations\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame([\n      {'country': 'Great Britain', 'animal': 'cattle'},\n      {'country': 'Great Britain', 'animal': 'cattle'},\n      {'country': 'Great Britain', 'animal': 'cattle'},\n      {'country': 'Great Britain', 'animal': 'pigs'},\n      {'country': 'Great Britain', 'animal': 'pigs'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'}\n    ])\n\ndomains = ['person', 'cattle', 'pigs', 'sheep']\n\nshape_scale = alt.Scale(\n    domain=domains,\n    range=[\n        'M1.7 -1.7h-0.8c0.3 -0.2 0.6 -0.5 0.6 -0.9c0 -0.6 -0.4 -1 -1 -1c-0.6 0 -1 0.4 -1 1c0 0.4 0.2 0.7 0.6 0.9h-0.8c-0.4 0 -0.7 0.3 -0.7 0.6v1.9c0 0.3 0.3 0.6 0.6 0.6h0.2c0 0 0 0.1 0 0.1v1.9c0 0.3 0.2 0.6 0.3 0.6h1.3c0.2 0 0.3 -0.3 0.3 -0.6v-1.8c0 0 0 -0.1 0 -0.1h0.2c0.3 0 0.6 -0.3 0.6 -0.6v-2c0.2 -0.3 -0.1 -0.6 -0.4 -0.6z',\n        'M4 -2c0 0 0.9 -0.7 1.1 -0.8c0.1 -0.1 -0.1 0.5 -0.3 0.7c-0.2 0.2 1.1 1.1 1.1 1.2c0 0.2 -0.2 0.8 -0.4 0.7c-0.1 0 -0.8 -0.3 -1.3 -0.2c-0.5 0.1 -1.3 1.6 -1.5 2c-0.3 0.4 -0.6 0.4 -0.6 0.4c0 0.1 0.3 1.7 0.4 1.8c0.1 0.1 -0.4 0.1 -0.5 0c0 0 -0.6 -1.9 -0.6 -1.9c-0.1 0 -0.3 -0.1 -0.3 -0.1c0 0.1 -0.5 1.4 -0.4 1.6c0.1 0.2 0.1 0.3 0.1 0.3c0 0 -0.4 0 -0.4 0c0 0 -0.2 -0.1 -0.1 -0.3c0 -0.2 0.3 -1.7 0.3 -1.7c0 0 -2.8 -0.9 -2.9 -0.8c-0.2 0.1 -0.4 0.6 -0.4 1c0 0.4 0.5 1.9 0.5 1.9l-0.5 0l-0.6 -2l0 -0.6c0 0 -1 0.8 -1 1c0 0.2 -0.2 1.3 -0.2 1.3c0 0 0.3 0.3 0.2 0.3c0 0 -0.5 0 -0.5 0c0 0 -0.2 -0.2 -0.1 -0.4c0 -0.1 0.2 -1.6 0.2 -1.6c0 0 0.5 -0.4 0.5 -0.5c0 -0.1 0 -2.7 -0.2 -2.7c-0.1 0 -0.4 2 -0.4 2c0 0 0 0.2 -0.2 0.5c-0.1 0.4 -0.2 1.1 -0.2 1.1c0 0 -0.2 -0.1 -0.2 -0.2c0 -0.1 -0.1 -0.7 0 -0.7c0.1 -0.1 0.3 -0.8 0.4 -1.4c0 -0.6 0.2 -1.3 0.4 -1.5c0.1 -0.2 0.6 -0.4 0.6 -0.4z',\n        'M1.2 -2c0 0 0.7 0 1.2 0.5c0.5 0.5 0.4 0.6 0.5 0.6c0.1 0 0.7 0 0.8 0.1c0.1 0 0.2 0.2 0.2 0.2c0 0 -0.6 0.2 -0.6 0.3c0 0.1 0.4 0.9 0.6 0.9c0.1 0 0.6 0 0.6 0.1c0 0.1 0 0.7 -0.1 0.7c-0.1 0 -1.2 0.4 -1.5 0.5c-0.3 0.1 -1.1 0.5 -1.1 0.7c-0.1 0.2 0.4 1.2 0.4 1.2l-0.4 0c0 0 -0.4 -0.8 -0.4 -0.9c0 -0.1 -0.1 -0.3 -0.1 -0.3l-0.2 0l-0.5 1.3l-0.4 0c0 0 -0.1 -0.4 0 -0.6c0.1 -0.1 0.3 -0.6 0.3 -0.7c0 0 -0.8 0 -1.5 -0.1c-0.7 -0.1 -1.2 -0.3 -1.2 -0.2c0 0.1 -0.4 0.6 -0.5 0.6c0 0 0.3 0.9 0.3 0.9l-0.4 0c0 0 -0.4 -0.5 -0.4 -0.6c0 -0.1 -0.2 -0.6 -0.2 -0.5c0 0 -0.4 0.4 -0.6 0.4c-0.2 0.1 -0.4 0.1 -0.4 0.1c0 0 -0.1 0.6 -0.1 0.6l-0.5 0l0 -1c0 0 0.5 -0.4 0.5 -0.5c0 -0.1 -0.7 -1.2 -0.6 -1.4c0.1 -0.1 0.1 -1.1 0.1 -1.1c0 0 -0.2 0.1 -0.2 0.1c0 0 0 0.9 0 1c0 0.1 -0.2 0.3 -0.3 0.3c-0.1 0 0 -0.5 0 -0.9c0 -0.4 0 -0.4 0.2 -0.6c0.2 -0.2 0.6 -0.3 0.8 -0.8c0.3 -0.5 1 -0.6 1 -0.6z',\n        'M-4.1 -0.5c0.2 0 0.2 0.2 0.5 0.2c0.3 0 0.3 -0.2 0.5 -0.2c0.2 0 0.2 0.2 0.4 0.2c0.2 0 0.2 -0.2 0.5 -0.2c0.2 0 0.2 0.2 0.4 0.2c0.2 0 0.2 -0.2 0.4 -0.2c0.1 0 0.2 0.2 0.4 0.1c0.2 0 0.2 -0.2 0.4 -0.3c0.1 0 0.1 -0.1 0.4 0c0.3 0 0.3 -0.4 0.6 -0.4c0.3 0 0.6 -0.3 0.7 -0.2c0.1 0.1 1.4 1 1.3 1.4c-0.1 0.4 -0.3 0.3 -0.4 0.3c-0.1 0 -0.5 -0.4 -0.7 -0.2c-0.3 0.2 -0.1 0.4 -0.2 0.6c-0.1 0.1 -0.2 0.2 -0.3 0.4c0 0.2 0.1 0.3 0 0.5c-0.1 0.2 -0.3 0.2 -0.3 0.5c0 0.3 -0.2 0.3 -0.3 0.6c-0.1 0.2 0 0.3 -0.1 0.5c-0.1 0.2 -0.1 0.2 -0.2 0.3c-0.1 0.1 0.3 1.1 0.3 1.1l-0.3 0c0 0 -0.3 -0.9 -0.3 -1c0 -0.1 -0.1 -0.2 -0.3 -0.2c-0.2 0 -0.3 0.1 -0.4 0.4c0 0.3 -0.2 0.8 -0.2 0.8l-0.3 0l0.3 -1c0 0 0.1 -0.6 -0.2 -0.5c-0.3 0.1 -0.2 -0.1 -0.4 -0.1c-0.2 -0.1 -0.3 0.1 -0.4 0c-0.2 -0.1 -0.3 0.1 -0.5 0c-0.2 -0.1 -0.1 0 -0.3 0.3c-0.2 0.3 -0.4 0.3 -0.4 0.3l0.2 1.1l-0.3 0l-0.2 -1.1c0 0 -0.4 -0.6 -0.5 -0.4c-0.1 0.3 -0.1 0.4 -0.3 0.4c-0.1 -0.1 -0.2 1.1 -0.2 1.1l-0.3 0l0.2 -1.1c0 0 -0.3 -0.1 -0.3 -0.5c0 -0.3 0.1 -0.5 0.1 -0.7c0.1 -0.2 -0.1 -1 -0.2 -1.1c-0.1 -0.2 -0.2 -0.8 -0.2 -0.8c0 0 -0.1 -0.5 0.4 -0.8z'\n    ]\n)\n\ncolor_scale = alt.Scale(\n    domain=domains,\n    range=['rgb(162,160,152)', 'rgb(194,81,64)', 'rgb(93,93,93)', 'rgb(91,131,149)']\n)\n\nalt.Chart(source).mark_point(filled=True, opacity=1, size=100).encode(\n    alt.X('x:O').axis(None),\n    alt.Y('animal:O').axis(None),\n    alt.Row('country:N').title(None),\n    alt.Shape('animal:N').legend(None).scale(shape_scale),\n    alt.Color('animal:N').legend(None).scale(color_scale),\n).transform_window(\n    x='rank()',\n    groupby=['country', 'animal']\n).properties(\n    width=550,\n    height=140\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/isotype_emoji.py",
    "content": "'''\nIsotype Visualization with Emoji\n================================\nIsotype Visualization shows the distribution of animals across UK and US, using unicode emoji\nmarks rather than custom SVG paths (see https://altair-viz.github.io/gallery/isotype.html).\nThis is adapted from Vega-Lite example https://vega.github.io/vega-lite/examples/isotype_bar_chart_emoji.html.\n'''\n# category:advanced calculations\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame([\n      {'country': 'Great Britain', 'animal': 'cattle'},\n      {'country': 'Great Britain', 'animal': 'cattle'},\n      {'country': 'Great Britain', 'animal': 'cattle'},\n      {'country': 'Great Britain', 'animal': 'pigs'},\n      {'country': 'Great Britain', 'animal': 'pigs'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'Great Britain', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'cattle'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'pigs'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'},\n      {'country': 'United States', 'animal': 'sheep'}\n    ])\n\n\nalt.Chart(source).mark_text(size=45, baseline='middle').encode(\n    alt.X('x:O').axis(None),\n    alt.Y('animal:O').axis(None),\n    alt.Row('country:N').title(''),\n    alt.Text('emoji:N')\n).transform_calculate(\n    emoji=\"{'cattle': '🐄', 'pigs': '🐖', 'sheep': '🐏'}[datum.animal]\"\n).transform_window(\n    x='rank()',\n    groupby=['country', 'animal']\n).properties(\n    width=550,\n    height=140\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/isotype_grid.py",
    "content": "\"\"\"\nIsotype Grid\n------------\nThis example is a grid of isotype figures.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nimport pandas as pd\n\ndata = pd.DataFrame([dict(id=i) for i in range(1, 101)])\n\nperson = (\n    \"M1.7 -1.7h-0.8c0.3 -0.2 0.6 -0.5 0.6 -0.9c0 -0.6 \"\n    \"-0.4 -1 -1 -1c-0.6 0 -1 0.4 -1 1c0 0.4 0.2 0.7 0.6 \"\n    \"0.9h-0.8c-0.4 0 -0.7 0.3 -0.7 0.6v1.9c0 0.3 0.3 0.6 \"\n    \"0.6 0.6h0.2c0 0 0 0.1 0 0.1v1.9c0 0.3 0.2 0.6 0.3 \"\n    \"0.6h1.3c0.2 0 0.3 -0.3 0.3 -0.6v-1.8c0 0 0 -0.1 0 \"\n    \"-0.1h0.2c0.3 0 0.6 -0.3 0.6 -0.6v-2c0.2 -0.3 -0.1 \"\n    \"-0.6 -0.4 -0.6z\"\n)\n\nalt.Chart(data).transform_calculate(\n    row=\"ceil(datum.id/10)\"\n).transform_calculate(\n    col=\"datum.id - datum.row*10\"\n).mark_point(\n    filled=True,\n    size=50\n).encode(\n    alt.X(\"col:O\").axis(None),\n    alt.Y(\"row:O\").axis(None),\n    alt.ShapeValue(person)\n).properties(\n    width=400,\n    height=400\n).configure_view(\n    strokeWidth=0\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/lasagna_plot.py",
    "content": "\"\"\"\nLasagna Plot (Dense Time-Series Heatmap)\n----------------------------------------\n\"\"\"\n# category: tables\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.stocks()\n\ncolor_condition = (\n    alt.when(alt.expr.month(\"datum.value\") == 1, alt.expr.date(\"datum.value\") == 1)\n    .then(alt.value(\"black\"))\n    .otherwise(alt.value(None))\n)\n\nalt.Chart(source, width=300, height=100).transform_filter(\n    alt.datum.symbol != \"GOOG\"\n).mark_rect().encode(\n    alt.X(\"yearmonthdate(date):O\")\n        .title(\"Time\")\n        .axis(\n            format=\"%Y\",\n            labelAngle=0,\n            labelOverlap=False,\n            labelColor=color_condition,\n            tickColor=color_condition,\n        ),\n    alt.Y(\"symbol:N\").title(None),\n    alt.Color(\"sum(price)\").title(\"Price\")\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/layered_area_chart.py",
    "content": "\"\"\"\nLayered Area Chart\n------------------\nThis example shows a layered area chart.\n\"\"\"\n# category: area charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.iowa_electricity()\n\nalt.Chart(source).mark_area(opacity=0.3).encode(\n    x=\"year:T\",\n    y=alt.Y(\"net_generation:Q\").stack(None),\n    color=\"source:N\"\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/layered_bar_chart.py",
    "content": "\"\"\"\nLayered Bar Chart\n-----------------\nThis example shows a segmented bar chart that is layered rather than stacked.  \n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.iowa_electricity()\n\nalt.Chart(source).mark_bar(opacity=0.7).encode(\n    x='year:O',\n    y=alt.Y('net_generation:Q').stack(None),\n    color=\"source\",\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/layered_chart_with_dual_axis.py",
    "content": "\"\"\"\nLayered chart with Dual-Axis\n----------------------------\nThis example shows how to create a second independent y axis.\n\"\"\"\n# category: advanced calculations\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather()\n\nbase = alt.Chart(source).encode(\n    alt.X('month(date):T').title(None)\n)\n\narea = base.mark_area(opacity=0.3, color='#57A44C').encode(\n    alt.Y('average(temp_max)').axis(title='Avg. Temperature (°C)', titleColor='#57A44C'),\n    alt.Y2('average(temp_min)')\n)\n\nline = base.mark_line(stroke='#5276A7', interpolate='monotone').encode(\n    alt.Y('average(precipitation)').axis(title='Precipitation (inches)', titleColor='#5276A7')\n)\n\nalt.layer(area, line).resolve_scale(\n    y='independent'\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/layered_heatmap_text.py",
    "content": "\"\"\"\nText over a Heatmap\n-------------------\n\nAn example of a layered chart of text over a heatmap using the cars dataset.\n\"\"\"\n# category: tables\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\n# Configure common options. We specify the aggregation\n# as a transform here so we can reuse it in both layers.\nbase = alt.Chart(source).transform_aggregate(\n    mean_horsepower='mean(Horsepower)',\n    groupby=['Origin', 'Cylinders']\n).encode(\n    alt.X('Cylinders:O'),\n    alt.Y('Origin:O'),\n)\n\n# Configure heatmap\nheatmap = base.mark_rect().encode(\n    alt.Color('mean_horsepower:Q')\n        .scale(scheme='viridis')\n        .title(\"Mean of Horsepower\")\n)\n\ncolor = (\n    alt.when(alt.datum.mean_horsepower > 150)\n    .then(alt.value(\"black\"))\n    .otherwise(alt.value(\"white\"))\n)\n\n# Configure text\ntext = base.mark_text(baseline='middle').encode(\n    alt.Text('mean_horsepower:Q', format=\".0f\"), color=color\n)\n\n# Draw the chart\nheatmap + text\n"
  },
  {
    "path": "tests/examples_methods_syntax/layered_histogram.py",
    "content": "\"\"\"\nLayered Histogram\n=================\nThis example shows how to use opacity to make a layered histogram in Altair.\n\"\"\"\n# category: distributions\nimport pandas as pd\nimport altair as alt\nimport numpy as np\nnp.random.seed(42)\n\n# Generating Data\nsource = pd.DataFrame({\n    'Trial A': np.random.normal(0, 0.8, 1000),\n    'Trial B': np.random.normal(-2, 1, 1000),\n    'Trial C': np.random.normal(3, 2, 1000)\n})\n\nalt.Chart(source).transform_fold(\n    ['Trial A', 'Trial B', 'Trial C'],\n    as_=['Experiment', 'Measurement']\n).mark_bar(\n    opacity=0.3,\n    binSpacing=0\n).encode(\n    alt.X('Measurement:Q').bin(maxbins=100),\n    alt.Y('count()').stack(None),\n    alt.Color('Experiment:N')\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/line_chart_with_color_datum.py",
    "content": "\"\"\"\nLine Chart with Datum for Color\n-------------------------------\nAn example of using ``repeat`` inside ``datum`` to color a multi-series line chart.\nThis is adapted from this corresponding Vega-Lite Example:\n`Repeat and Layer to Show Different Movie Measures <https://vega.github.io/vega-lite/examples/repeat_layer.html>`_.\n\"\"\"\n# category: line charts\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies()\n\nalt.Chart(source).mark_line().encode(\n    alt.X(\"IMDB Rating\").bin(True),\n    alt.Y(alt.repeat(\"layer\"))\n        .aggregate(\"mean\")\n        .title(\"Mean of US and Worldwide Gross\"),\n    color=alt.datum(alt.repeat(\"layer\")),\n).repeat(\n    layer=[\"US Gross\", \"Worldwide Gross\"]\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/line_chart_with_cumsum.py",
    "content": "\"\"\"\nLine Chart with Cumulative Sum\n------------------------------\nThis chart creates a simple line chart from the cumulative sum of a fields.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.wheat()\n\nalt.Chart(source, width=600).mark_line().transform_window(\n    # Sort the data chronologically\n    sort=[{'field': 'year'}],\n    # Include all previous records before the current record and none after\n    # (This is the default value so you could skip it and it would still work.)\n    frame=[None, 0],\n    # What to add up as you go\n    cumulative_wheat='sum(wheat)'\n).encode(\n    x='year:O',\n    # Plot the calculated field created by the transformation\n    y='cumulative_wheat:Q'\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/line_chart_with_cumsum_faceted.py",
    "content": "\"\"\"\nFaceted Line Chart with Cumulative Sum\n--------------------------------------\nThis chart creates one facet per natural disaster and shows the cumulative number of deaths for that category.\nNote the use of different predicates to filter based on both a list and a range.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.disasters()\ncolumns_sorted = ['Drought', 'Epidemic', 'Earthquake', 'Flood']\n\nalt.Chart(source).transform_filter(\n    alt.FieldOneOfPredicate(field='Entity', oneOf=columns_sorted), \n    alt.FieldRangePredicate(field='Year', range=[1900, 2000])\n).transform_window(\n    cumulative_deaths='sum(Deaths)', groupby=['Entity'] # Calculate cumulative sum of Deaths by Entity\n).mark_line().encode( \n    alt.X('Year:Q', title=None).axis(format='d'),\n    alt.Y('cumulative_deaths:Q', title=None),\n    alt.Color('Entity:N', legend=None)\n).properties(\n    width=300,\n    height=150\n).facet(\n    facet=alt.Facet(\n        'Entity:N',\n        title=None,\n        sort=columns_sorted,\n        header=alt.Header(labelAnchor='start', labelFontStyle='italic')\n    ),\n    title=alt.Title(\n        text=['Cumulative casualties by type of disaster', 'in the 20th century'],\n        anchor='middle'\n    ),\n    columns=2\n).resolve_axis(y='independent', x='independent')"
  },
  {
    "path": "tests/examples_methods_syntax/line_chart_with_custom_legend.py",
    "content": "\"\"\"\nLine Chart with Custom Legend\n-----------------------------\nThis example uses the argmax aggregation function in order to create a custom\nlegend for a line chart.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\n\nsource = data.stocks()\n\nbase = alt.Chart(source).encode(\n    alt.Color(\"symbol\").legend(None)\n).transform_filter(\n    \"datum.symbol !== 'IBM'\"\n).properties(\n    width=500\n)\n\nline = base.mark_line().encode(x=\"date\", y=\"price\")\n\n\nlast_price = base.mark_circle().encode(\n    alt.X(\"last_date['date']:T\"),\n    alt.Y(\"last_date['price']:Q\")\n).transform_aggregate(\n    last_date=\"argmax(date)\",\n    groupby=[\"symbol\"]\n)\n\ncompany_name = last_price.mark_text(align=\"left\", dx=4).encode(text=\"symbol\")\n\nchart = (line + last_price + company_name).encode(\n    x=alt.X().title(\"date\"),\n    y=alt.Y().title(\"price\")\n)\n\nchart\n"
  },
  {
    "path": "tests/examples_methods_syntax/line_custom_order.py",
    "content": "\"\"\"\nLine Chart with Custom Order\n----------------------------\nBy default, the line's path (order of points in the line) is\ndetermined by data values on the temporal/ordinal field.\nHowever, a field can be mapped to the order channel for a custom path.\n\nFor example, to show a pattern of data change over time between\ngasoline price and average miles driven per capita we use\norder channel to sort the points in the line by time field (year).\nThe earliest year (1956) is one endpoint and the latest year (2010)\nis the other endpoint.\n\nThis is based on Hannah Fairfield's article 'Driving Shifts Into Reverse'.\nSee https://archive.nytimes.com/www.nytimes.com/imagepages/2010/05/02/business/02metrics.html.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.driving()\n\nalt.Chart(source).mark_line(point=True).encode(\n    x=alt.X(\"miles\").scale(zero=False),\n    y=alt.Y(\"gas\").scale(zero=False),\n    order=\"year\",\n    tooltip=[\"miles\", \"gas\", \"year\"],\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/line_percent.py",
    "content": "\"\"\"\nLine Chart with Percent axis\n----------------------------\nThis example shows how to format the tick labels of the y-axis of a chart as percentages.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.jobs.url\n\nalt.Chart(source).mark_line().encode(\n    alt.X('year:O'),\n    alt.Y('perc:Q').axis(format='%'),\n    alt.Color('sex:N')\n).transform_filter(\n    alt.datum.job == 'Welder'\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/line_with_ci.py",
    "content": "\"\"\"\nLine Chart with Confidence Interval Band\n----------------------------------------\nHow to make a line chart with a bootstrapped 95% confidence interval band.\n\"\"\"\n# category: uncertainties and trends\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\nline = alt.Chart(source).mark_line().encode(\n    x='Year',\n    y='mean(Miles_per_Gallon)'\n)\n\nband = alt.Chart(source).mark_errorband(extent='ci').encode(\n    x='Year',\n    y=alt.Y('Miles_per_Gallon').title('Miles/Gallon'),\n)\n\nband + line\n"
  },
  {
    "path": "tests/examples_methods_syntax/line_with_last_value_labeled.py",
    "content": "\"\"\"\nLine Chart with Last Value Labeled\n----------------------------------\nThis chart shows a line chart with a label annotating the final value \n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\n# Import example data\nsource = data.stocks()\n\n# Create a common chart object\nchart = alt.Chart(source).transform_filter(\n    alt.datum.symbol != \"IBM\"  # A reducation of the dataset to clarify our example. Not required.\n).encode(\n    alt.Color(\"symbol\").legend(None)\n)\n\n# Draw the line\nline = chart.mark_line().encode(\n    x=\"date:T\",\n    y=\"price:Q\"\n)\n\n# Use the `argmax` aggregate to limit the dataset to the final value\nlabel = chart.encode(\n    x='max(date):T',\n    y=alt.Y('price:Q').aggregate(argmax='date'),\n    text='symbol'\n)\n\n# Create a text label\ntext = label.mark_text(align='left', dx=4)\n\n# Create a circle annotation\ncircle = label.mark_circle()\n\n# Draw the chart with all the layers combined\nline + circle + text\n"
  },
  {
    "path": "tests/examples_methods_syntax/line_with_log_scale.py",
    "content": "\"\"\"\nLine Chart with Logarithmic Scale\n---------------------------------\nHow to make a line chart on a `Logarithmic scale <https://en.wikipedia.org/wiki/Logarithmic_scale>`_.\n\"\"\"\n# category: line charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.population()\n\nalt.Chart(source).mark_line().encode(\n    x='year:O',\n    y=alt.Y('sum(people)').scale(type=\"log\")\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/london_tube.py",
    "content": "\"\"\"\nLondon Tube Lines\n=================\nThis example shows the London tube lines against the background of the\nborough boundaries. It is based on the vega-lite example at\nhttps://vega.github.io/vega-lite/examples/geo_layer_line_london.html.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nboroughs = alt.topo_feature(data.london_boroughs.url, 'boroughs')\ntubelines = alt.topo_feature(data.london_tube_lines.url, 'line')\ncentroids = data.london_centroids.url\n\nbackground = alt.Chart(boroughs, width=700, height=500).mark_geoshape(\n    stroke='white',\n    strokeWidth=2\n).encode(\n    color=alt.value('#eee'),\n)\n\nlabels = alt.Chart(centroids).mark_text().encode(\n    longitude='cx:Q',\n    latitude='cy:Q',\n    text='bLabel:N',\n    size=alt.value(8),\n    opacity=alt.value(0.6)\n).transform_calculate(\n    \"bLabel\", \"indexof (datum.name,' ') > 0  ? substring(datum.name,0,indexof(datum.name, ' ')) : datum.name\"\n)\n\nline_scale = alt.Scale(domain=[\"Bakerloo\", \"Central\", \"Circle\", \"District\", \"DLR\",\n                               \"Hammersmith & City\", \"Jubilee\", \"Metropolitan\", \"Northern\",\n                               \"Piccadilly\", \"Victoria\", \"Waterloo & City\"],\n                       range=[\"rgb(137,78,36)\", \"rgb(220,36,30)\", \"rgb(255,206,0)\",\n                              \"rgb(1,114,41)\", \"rgb(0,175,173)\", \"rgb(215,153,175)\",\n                              \"rgb(106,114,120)\", \"rgb(114,17,84)\", \"rgb(0,0,0)\",\n                              \"rgb(0,24,168)\", \"rgb(0,160,226)\", \"rgb(106,187,170)\"])\n\nlines = alt.Chart(tubelines).mark_geoshape(\n    filled=False,\n    strokeWidth=2\n).encode(\n    alt.Color('id:N')\n        .title(None)\n        .legend(orient='bottom-right', offset=0)\n        .scale(line_scale)\n)\n\nbackground + labels + lines\n"
  },
  {
    "path": "tests/examples_methods_syntax/maps_faceted_species.py",
    "content": "\"\"\"\nFaceted County-Level Choropleth Maps\n------------------------------------\nA set of maps arranged in a grid, each showing the distribution of a species' projected habitat across US counties. \n\nEach choropleth map uses color intensity to represent the percentage values within county boundaries.\n\"\"\"\n# category: maps\n\nimport altair as alt\nfrom altair.datasets import data\n\n# Load species data with county_id as number\ncsv_data = alt.UrlData(data.species.url, format=alt.CsvDataFormat(parse={'county_id': 'number'}))\n\n# Load US counties topology\ncounties = alt.topo_feature(data.us_10m.url, 'counties')\n\nchart = alt.Chart(csv_data).mark_geoshape().encode(\n    shape='geo:G',  # Geographic shape encoding for map rendering\n    color=alt.Color('habitat_yearround_pct:Q')\n    .scale(domain=[0, 1], scheme='viridis', zero=True, nice=False)\n    .title(['Suitable Habitat', '% of County'])\n    .legend(format='.0%'),\n    tooltip=[\n        alt.Tooltip('county_id:N').title('County ID'),\n        alt.Tooltip('habitat_yearround_pct:Q').title('Habitat %').format('.2%')\n    ],\n    facet=alt.Facet('common_name:N', columns=2).title(None),\n).transform_lookup(\n    lookup='county_id',\n    from_=alt.LookupData(data=counties, key='id'),\n    as_='geo'  # Join county geometry data\n).project(type='albers').properties(width=300, height=200)\n\n# Display the chart\nchart"
  },
  {
    "path": "tests/examples_methods_syntax/mosaic_with_labels.py",
    "content": "\"\"\"\nMosaic Chart with Labels\n------------------------\n\"\"\"\n# category: tables\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\nbase = (\n    alt.Chart(source)\n    .transform_aggregate(count_=\"count()\", groupby=[\"Origin\", \"Cylinders\"])\n    .transform_stack(\n        stack=\"count_\",\n        as_=[\"stack_count_Origin1\", \"stack_count_Origin2\"],\n        offset=\"normalize\",\n        sort=[alt.SortField(\"Origin\", \"ascending\")],\n        groupby=[],\n    )\n    .transform_window(\n        x=\"min(stack_count_Origin1)\",\n        x2=\"max(stack_count_Origin2)\",\n        rank_Cylinders=\"dense_rank()\",\n        distinct_Cylinders=\"distinct(Cylinders)\",\n        groupby=[\"Origin\"],\n        frame=[None, None],\n        sort=[alt.SortField(\"Cylinders\", \"ascending\")],\n    )\n    .transform_window(\n        rank_Origin=\"dense_rank()\",\n        frame=[None, None],\n        sort=[alt.SortField(\"Origin\", \"ascending\")],\n    )\n    .transform_stack(\n        stack=\"count_\",\n        groupby=[\"Origin\"],\n        as_=[\"y\", \"y2\"],\n        offset=\"normalize\",\n        sort=[alt.SortField(\"Cylinders\", \"ascending\")],\n    )\n    .transform_calculate(\n        ny=\"datum.y + (datum.rank_Cylinders - 1) * datum.distinct_Cylinders * 0.01 / 3\",\n        ny2=\"datum.y2 + (datum.rank_Cylinders - 1) * datum.distinct_Cylinders * 0.01 / 3\",\n        nx=\"datum.x + (datum.rank_Origin - 1) * 0.01\",\n        nx2=\"datum.x2 + (datum.rank_Origin - 1) * 0.01\",\n        xc=\"(datum.nx+datum.nx2)/2\",\n        yc=\"(datum.ny+datum.ny2)/2\",\n    )\n)\n\n\nrect = base.mark_rect().encode(\n    x=alt.X(\"nx:Q\").axis(None),\n    x2=\"nx2\",\n    y=\"ny:Q\",\n    y2=\"ny2\",\n    color=alt.Color(\"Origin:N\").legend(None),\n    opacity=alt.Opacity(\"Cylinders:Q\").legend(None),\n    tooltip=[\"Origin:N\", \"Cylinders:Q\"],\n)\n\n\ntext = base.mark_text(baseline=\"middle\").encode(\n    alt.X(\"xc:Q\").axis(None),\n    alt.Y(\"yc:Q\").title(\"Cylinders\"),\n    text=\"Cylinders:N\"\n)\n\nmosaic = rect + text\n\norigin_labels = base.mark_text(baseline=\"middle\", align=\"center\").encode(\n    alt.X(\"min(xc):Q\").title(\"Origin\").axis(orient=\"top\"),\n    alt.Color(\"Origin\").legend(None),\n    text=\"Origin\",\n)\n\n(\n    (origin_labels & mosaic)\n    .resolve_scale(x=\"shared\")\n    .configure_view(stroke=\"\")\n    .configure_concat(spacing=10)\n    .configure_axis(domain=False, ticks=False, labels=False, grid=False)\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/multifeature_scatter_plot.py",
    "content": "\"\"\"\nMultifeature Scatter Plot\n=========================\nThis example shows how to make a scatter plot with multiple feature encodings.\n\"\"\"\n# category: scatter plots\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.penguins()\n\nalt.Chart(source).mark_circle().encode(\n    alt.X('Flipper Length (mm)').scale(zero=False),\n    alt.Y('Body Mass (g)').scale(zero=False, padding=1),\n    alt.Size('Beak Depth (mm)').scale(zero=False),\n    color='Species'\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/multiline_highlight.py",
    "content": "\"\"\"\nMulti-Line Highlight\n====================\nThis multi-line chart uses an invisible Voronoi tessellation to handle pointerover to\nidentify the nearest point and then highlight the line on which the point falls.\nIt is adapted from the Vega-Lite example found at\nhttps://bl.ocks.org/amitkaps/fe4238e716db53930b2f1a70d3401701\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.stocks()\n\nhighlight = alt.selection_point(on='pointerover', fields=['symbol'], nearest=True)\n\nbase = alt.Chart(source).encode(\n    x='date:T',\n    y='price:Q',\n    color='symbol:N'\n)\n\npoints = base.mark_circle().encode(\n    opacity=alt.value(0)\n).add_params(\n    highlight\n).properties(\n    width=600\n)\n\nlines = base.mark_line().encode(\n    size=alt.when(~highlight).then(alt.value(1)).otherwise(alt.value(3))\n)\n\npoints + lines\n"
  },
  {
    "path": "tests/examples_methods_syntax/multiline_tooltip.py",
    "content": "\"\"\"\nMulti-Line Tooltip\n==================\nThis example shows how you can use selections and layers to create a\ntooltip-like behavior tied to the x position of the cursor.\nIf you are looking for more standard tooltips, see the :ref:`gallery_multiline_tooltip_standard` example.\n\nIn this example, we'll employ a little trick to isolate the x-position of the\ncursor: we add some transparent points with only an x encoding (no y encoding)\nand tie a *nearest* selection to these, tied to the \"x\" field.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nimport pandas as pd\nimport numpy as np\n\nnp.random.seed(42)\ncolumns = [\"A\", \"B\", \"C\"]\nsource = pd.DataFrame(\n    np.cumsum(np.random.randn(100, 3), 0).round(2),\n    columns=columns, index=pd.RangeIndex(100, name=\"x\")\n)\nsource = source.reset_index().melt(\"x\", var_name=\"category\", value_name=\"y\")\n\n# Create a selection that chooses the nearest point & selects based on x-value\nnearest = alt.selection_point(nearest=True, on=\"pointerover\",\n                              fields=[\"x\"], empty=False)\n\n# The basic line\nline = alt.Chart(source).mark_line(interpolate=\"basis\").encode(\n    x=\"x:Q\",\n    y=\"y:Q\",\n    color=\"category:N\"\n)\n\n# Transparent selectors across the chart. This is what tells us\n# the x-value of the cursor\nselectors = alt.Chart(source).mark_point().encode(\n    x=\"x:Q\",\n    opacity=alt.value(0),\n).add_params(\n    nearest\n)\nwhen_near = alt.when(nearest)\n\n# Draw points on the line, and highlight based on selection\npoints = line.mark_point().encode(\n    opacity=when_near.then(alt.value(1)).otherwise(alt.value(0))\n)\n\n# Draw text labels near the points, and highlight based on selection\ntext = line.mark_text(align=\"left\", dx=5, dy=-5).encode(\n    text=when_near.then(\"y:Q\").otherwise(alt.value(\" \"))\n)\n\n# Draw a rule at the location of the selection\nrules = alt.Chart(source).mark_rule(color=\"gray\").encode(\n    x=\"x:Q\",\n).transform_filter(\n    nearest\n)\n\n# Put the five layers into a chart and bind the data\nalt.layer(\n    line, selectors, points, rules, text\n).properties(\n    width=600, height=300\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/multiline_tooltip_standard.py",
    "content": "\"\"\"\nMulti-Line Tooltip (Standard)\n=============================\nThis example shows how to add a standard tooltip to the same chart \nas in :ref:`gallery_multiline_tooltip`. You can find another example\nusing this approach in the documentation on the :ref:`user-guide-pivot-transform` transformation.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nimport pandas as pd\nimport numpy as np\n\nnp.random.seed(42)\ncolumns = [\"A\", \"B\", \"C\"]\nsource = pd.DataFrame(\n    np.cumsum(np.random.randn(100, 3), 0).round(2),\n    columns=columns, index=pd.RangeIndex(100, name=\"x\"),\n)\nsource = source.reset_index().melt(\"x\", var_name=\"category\", value_name=\"y\")\n\n# Create a selection that chooses the nearest point & selects based on x-value\nnearest = alt.selection_point(nearest=True, on=\"pointerover\", \n                              fields=[\"x\"], empty=False)\n\n# The basic line\nline = alt.Chart(source).mark_line(interpolate=\"basis\").encode(\n    x=\"x:Q\",\n    y=\"y:Q\",\n    color=\"category:N\"\n)\nwhen_near = alt.when(nearest)\n\n# Draw points on the line, and highlight based on selection\npoints = line.mark_point().encode(\n    opacity=when_near.then(alt.value(1)).otherwise(alt.value(0))\n)\n\n# Draw a rule at the location of the selection\nrules = alt.Chart(source).transform_pivot(\n    \"category\",\n    value=\"y\",\n    groupby=[\"x\"]\n).mark_rule(color=\"gray\").encode(\n    x=\"x:Q\",\n    opacity=when_near.then(alt.value(0.3)).otherwise(alt.value(0)),\n    tooltip=[alt.Tooltip(c, type=\"quantitative\") for c in columns],\n).add_params(nearest)\n\n\n# Put the five layers into a chart and bind the data\nalt.layer(\n    line, points, rules\n).properties(\n    width=600, height=300\n)"
  },
  {
    "path": "tests/examples_methods_syntax/multiple_interactions.py",
    "content": "\"\"\"\nMultiple Interactions\n=====================\nThis example shows how multiple user inputs can be layered onto a chart. The four inputs have functionality as follows:\n\n* Dropdown: Filters the movies by genre\n* Radio Buttons: Highlights certain films by Worldwide Gross\n* Mouse Drag and Scroll: Zooms the x and y scales to allow for panning\n* Checkbox: Scales the marker size of big budget films\n\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\nmovies = alt.UrlData(\n    data.movies.url,\n    format=alt.DataFormat(parse={'Release Date':'date'})\n)\nratings = ['G', 'NC-17', 'PG', 'PG-13', 'R']\ngenres = [\n    'Action', 'Adventure', 'Black Comedy', 'Comedy',\n    'Concert/Performance', 'Documentary', 'Drama', 'Horror', 'Musical',\n    'Romantic Comedy', 'Thriller/Suspense', 'Western'\n]\n\nbase = alt.Chart(movies, width=200, height=200).mark_point(filled=True).transform_calculate(\n    Big_Budget_Film = \"datum['Production Budget'] > 100000000 ? 'Yes' : 'No'\", \n    Release_Year = \"year(datum['Release Date'])\",\n).transform_filter(\n    alt.datum['IMDB Rating'] > 0\n).transform_filter(\n    alt.FieldOneOfPredicate(field='MPAA Rating', oneOf=ratings)\n).encode(\n    x=alt.X('Worldwide Gross:Q').scale(domain=(100000,10**9), clamp=True),\n    y='IMDB Rating:Q',\n    tooltip='Title:N'\n)\n\n# A slider filter\nyear_slider = alt.binding_range(min=1969, max=2018, step=1, name='Release Year')\nslider_selection = alt.selection_point(bind=year_slider, fields=['Release_Year'])\n\nfilter_year = base.add_params(\n    slider_selection\n).transform_filter(\n    slider_selection\n).properties(title='Slider Filtering')\n\n# A dropdown filter\ngenre_dropdown = alt.binding_select(options=genres, name='Genre')\ngenre_select = alt.selection_point(fields=['Major Genre'], bind=genre_dropdown)\n\nfilter_genres = base.add_params(\n    genre_select\n).transform_filter(\n    genre_select\n).properties(title='Dropdown Filtering')\n\n# Color changing marks\nrating_radio = alt.binding_radio(options=ratings, name='Rating')\nrating_select = alt.selection_point(fields=['MPAA Rating'], bind=rating_radio)\n\nrating_color = (\n    alt.when(rating_select)\n    .then(alt.Color('MPAA Rating:N').legend(None))\n    .otherwise(alt.value('lightgray'))\n)\n\nhighlight_ratings = base.add_params(\n    rating_select\n).encode(\n    color=rating_color\n).properties(title='Radio Button Highlighting')\n\n# Boolean selection for format changes\ninput_checkbox = alt.binding_checkbox(name='Big Budget Films ')\ncheckbox_selection = alt.param(bind=input_checkbox)\n\nsize_checkbox = (\n    alt.when(checkbox_selection)\n    .then(alt.Size('Big Budget Film:N').scale(range=[25, 150]))\n    .otherwise(alt.value(25))\n)\n\nbudget_sizing = base.add_params(\n    checkbox_selection\n).encode(\n    size=size_checkbox\n).properties(title='Checkbox Formatting')\n\n(filter_year | budget_sizing) & (highlight_ratings | filter_genres)\n"
  },
  {
    "path": "tests/examples_methods_syntax/natural_disasters.py",
    "content": "\"\"\"\nGlobal Deaths from Natural Disasters\n------------------------------------\nThis example shows a proportional symbols visualization of deaths from natural disasters by year and type.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.disasters.url\n\nalt.Chart(source).transform_filter(\n    alt.datum.Entity != 'All natural disasters'\n).mark_circle(\n    opacity=0.8,\n    stroke='black',\n    strokeWidth=1,\n    strokeOpacity=0.4\n).encode(\n    alt.X('Year:T')\n        .title(None)\n        .scale(domain=['1899','2018']),\n    alt.Y('Entity:N')\n        .title(None)\n        .sort(field=\"Deaths\", op=\"sum\", order='descending'),\n    alt.Size('Deaths:Q')\n        .scale(range=[0, 2500])\n        .title('Deaths')\n        .legend(clipHeight=30, format='s'),\n    alt.Color('Entity:N').legend(None),\n    tooltip=[\n        \"Entity:N\",\n        alt.Tooltip(\"Year:T\", format='%Y'),\n        alt.Tooltip(\"Deaths:Q\", format='~s')\n    ],\n).properties(\n    width=450,\n    height=320,\n    title=alt.Title(\n        text=\"Global Deaths from Natural Disasters (1900-2017)\",\n        subtitle=\"The size of the bubble represents the total death count per year, by type of disaster\",\n        anchor='start'\n    )\n).configure_axisY(\n    domain=False,\n    ticks=False,\n    offset=10\n).configure_axisX(\n    grid=False,\n).configure_view(\n    stroke=None\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/normalized_stacked_area_chart.py",
    "content": "\"\"\"\nNormalized Stacked Area Chart\n-----------------------------\nThis example shows how to make a normalized stacked area chart.\n\"\"\"\n# category: area charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.iowa_electricity()\n\nalt.Chart(source).mark_area().encode(\n    x=\"year:T\",\n    y=alt.Y(\"net_generation:Q\").stack(\"normalize\"),\n    color=\"source:N\"\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/normalized_stacked_bar_chart.py",
    "content": "\"\"\"\nNormalized Stacked Bar Chart\n----------------------------\nThis is an example of a normalized stacked bar chart using data which contains crop yields over different regions and different years in the 1930s.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nalt.Chart(source).mark_bar().encode(\n    x=alt.X('sum(yield)').stack(\"normalize\"),\n    y='variety',\n    color='site'\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/pacman_chart.py",
    "content": "\"\"\"\nPacman Chart\n------------\nChart made using ``mark_arc`` and constant values.\nThis could also be made using \n``alt.Chart(source).mark_arc(color = \"gold\", theta = (5/8)*np.pi, theta2 = (19/8)*np.pi,radius=100)``.\n\"\"\"\n# category: circular plots\n\nimport numpy as np\nimport altair as alt\n\nalt.Chart().mark_arc(color=\"gold\").encode(\n    theta=alt.ThetaDatum((5 / 8) * np.pi).scale(None),\n    theta2=alt.Theta2Datum((19 / 8) * np.pi),\n    radius=alt.RadiusDatum(100).scale(None),\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/parallel_coordinates.py",
    "content": "\"\"\"\nParallel Coordinates\n--------------------\nA `Parallel Coordinates <https://en.wikipedia.org/wiki/Parallel_coordinates>`_\nchart is a chart that lets you visualize the individual data points by drawing\na single line for each of them.\nSuch a chart can be created in Altair by first transforming the data into a\nsuitable representation.\nThis example shows a parallel coordinates chart with the Penguins dataset.\n\"\"\"\n# category: advanced calculations\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.penguins()\n\nalt.Chart(source, width=500).transform_window(\n    index='count()'\n).transform_fold(\n    ['Beak Length (mm)', 'Beak Depth (mm)', 'Flipper Length (mm)']\n).mark_line().encode(\n    x='key:N',\n    y='value:Q',\n    color='Species:N',\n    detail='index:N',\n    opacity=alt.value(0.5)\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/percentage_of_total.py",
    "content": "\"\"\"\nCalculating Percentage of Total\n-------------------------------\nThis chart demonstrates how to use a joinaggregate transform to display\ndata values as a percentage of total.\n\"\"\"\n# category: bar charts\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame({\n    'Activity': ['Sleeping', 'Eating', 'TV', 'Work', 'Exercise'],\n    'Time': [8, 2, 4, 8, 2]\n})\n\nalt.Chart(source).transform_joinaggregate(\n    TotalTime='sum(Time)',\n).transform_calculate(\n    PercentOfTotal=\"datum.Time / datum.TotalTime\"\n).mark_bar().encode(\n    alt.X('PercentOfTotal:Q').axis(format='.0%'),\n    y='Activity:N'\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/pie_chart.py",
    "content": "\"\"\"\nPie Chart\n---------\nThis example shows how to make a Pie Chart using ``mark_arc``.\nThis is adapted from a corresponding Vega-Lite Example:\n`Pie Chart <https://vega.github.io/vega-lite/examples/arc_pie.html>`_.\n\"\"\"\n# category: circular plots\n\nimport pandas as pd\nimport altair as alt\n\nsource = pd.DataFrame({\"category\": [1, 2, 3, 4, 5, 6], \"value\": [4, 6, 10, 3, 7, 8]})\n\nalt.Chart(source).mark_arc().encode(\n    theta=\"value\",\n    color=\"category\"\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/pie_chart_with_labels.py",
    "content": "\"\"\"\nPie Chart with Labels\n---------------------\nThis example shows how to layer text over arc marks (``mark_arc``) to label pie charts.\nThis is adapted from a corresponding Vega-Lite Example:\n`Pie Chart with Labels <https://vega.github.io/vega-lite/examples/layer_arc_label.html>`_.\n\"\"\"\n# category: circular plots\n\nimport pandas as pd\nimport altair as alt\n\nsource = pd.DataFrame(\n    {\"category\": [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"], \"value\": [4, 6, 10, 3, 7, 8]}\n)\n\nbase = alt.Chart(source).encode(\n    alt.Theta(\"value:Q\").stack(True),\n    alt.Color(\"category:N\").legend(None)\n)\n\npie = base.mark_arc(outerRadius=120)\ntext = base.mark_text(radius=140, size=20).encode(text=\"category:N\")\n\npie + text\n"
  },
  {
    "path": "tests/examples_methods_syntax/polar_bar_chart.py",
    "content": "\"\"\"\nPolar Bar Chart\n---------------\nThis example shows how to make a polar bar chart using ``mark_arc``.\nThis could also have been called a \"pie chart with axis labels\",\nbut is more commonly referred to as a polar bar chart.\nThe axis lines are created using pie charts with only the stroke visible.\n\"\"\"\n# category: circular plots\n\nimport math\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame({\n    \"hour\": range(24),\n    \"observations\": [2, 2, 2, 2, 2, 3, 4, 4, 8, 8, 9, 7, 5, 6, 8, 8, 7, 7, 4, 3, 3, 2, 2, 2]\n})\n\npolar_bars = alt.Chart(source).mark_arc(stroke='white', tooltip=True).encode(\n    theta=alt.Theta(\"hour:O\"),\n    radius=alt.Radius('observations').scale(type='linear'),\n    radius2=alt.datum(1),\n)\n\n# Create the circular axis lines for the number of observations\naxis_rings = alt.Chart(pd.DataFrame({\"ring\": range(2, 11, 2)})).mark_arc(stroke='lightgrey', fill=None).encode(\n    theta=alt.value(2 * math.pi),\n    radius=alt.Radius('ring').stack(False)\n)\naxis_rings_labels = axis_rings.mark_text(color='grey', radiusOffset=5, align='left').encode(\n    text=\"ring\",\n    theta=alt.value(math.pi / 4)\n)\n\n# Create the straight axis lines for the time of the day\naxis_lines = alt.Chart(pd.DataFrame({\n    \"radius\": 10,\n    \"theta\": math.pi / 2,\n    'hour': ['00:00', '06:00', '12:00', '18:00']\n})).mark_arc(stroke='lightgrey', fill=None).encode(\n    theta=alt.Theta('theta').stack(True),\n    radius=alt.Radius('radius'),\n    radius2=alt.datum(1),\n)\naxis_lines_labels = axis_lines.mark_text(\n        color='grey',\n        radiusOffset=5,\n        thetaOffset=-math.pi / 4,\n        # These adjustments could be left out with a larger radius offset, but they make the label positioning a bit cleaner\n        align=alt.expr('datum.hour == \"18:00\" ? \"right\" : datum.hour == \"06:00\" ? \"left\" : \"center\"'),\n        baseline=alt.expr('datum.hour == \"00:00\" ? \"bottom\" : datum.hour == \"12:00\" ? \"top\" : \"middle\"'),\n    ).encode(text=\"hour\")\n\nalt.layer(\n    axis_rings,\n    polar_bars,\n    axis_rings_labels,\n    axis_lines,\n    axis_lines_labels,\n    title=['Observations throughout the day', '']\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/poly_fit_regression.py",
    "content": "\"\"\"\nPolynomial Fit Plot with Regression Transform\n=============================================\nThis example shows how to overlay data with multiple fitted polynomials using\nthe regression transform.\n\"\"\"\n# category: uncertainties and trends\n\nimport numpy as np\nimport pandas as pd\nimport altair as alt\n\n# Generate some random data\nrng = np.random.RandomState(1)\nx = rng.rand(40) ** 2\ny = 10 - 1.0 / (x + 0.1) + rng.randn(40)\nsource = pd.DataFrame({\"x\": x, \"y\": y})\n\n# Define the degree of the polynomial fits\ndegree_list = [1, 3, 5]\n\nbase = alt.Chart(source).mark_circle(color=\"black\").encode(\n    alt.X(\"x\"),\n    alt.Y(\"y\")\n)\n\npolynomial_fit = [\n    base.transform_regression(\n        \"x\", \"y\", method=\"poly\", order=order, as_=[\"x\", str(order)]\n    )\n    .mark_line()\n    .transform_fold([str(order)], as_=[\"degree\", \"y\"])\n    .encode(alt.Color(\"degree:N\"))\n    for order in degree_list\n]\n\nalt.layer(base, *polynomial_fit)\n"
  },
  {
    "path": "tests/examples_methods_syntax/pyramid.py",
    "content": "\"\"\"\nPyramid Pie Chart\n-----------------\nAltair reproduction of http://robslink.com/SAS/democd91/pyramid_pie.htm\n\"\"\"\n# category: case studies\nimport altair as alt\nimport pandas as pd\n\ncategory = ['Sky', 'Shady side of a pyramid', 'Sunny side of a pyramid']\ncolor = [\"#416D9D\", \"#674028\", \"#DEAC58\"]\ndf = pd.DataFrame({'category': category, 'value': [75, 10, 15]})\n\nalt.Chart(df, width=150, height=150).mark_arc(outerRadius=80).encode(\n    alt.Theta('value:Q').scale(range=[2.356, 8.639]),\n    alt.Color('category:N')\n        .title(None)\n        .scale(domain=category, range=color)\n        .legend(orient='none', legendX=160, legendY=50),\n    order='value:Q'\n).configure_view(\n    strokeOpacity=0\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/radial_chart.py",
    "content": "\"\"\"\nRadial Chart\n------------\nThis radial plot uses both angular and radial extent to convey multiple dimensions of data.\nThis is adapted from a corresponding Vega-Lite Example:\n`Radial Plot <https://vega.github.io/vega-lite/examples/arc_radial.html>`_.\n\"\"\"\n# category: circular plots\n\nimport pandas as pd\nimport altair as alt\n\nsource = pd.DataFrame({\"values\": [12, 23, 47, 6, 52, 19]})\n\nbase = alt.Chart(source).encode(\n    alt.Theta(\"values:Q\").stack(True),\n    alt.Radius(\"values\").scale(type=\"sqrt\", zero=True, rangeMin=20),\n    color=\"values:N\",\n)\n\nc1 = base.mark_arc(innerRadius=20, stroke=\"#fff\")\n\nc2 = base.mark_text(radiusOffset=10).encode(text=\"values:Q\")\n\nc1 + c2\n"
  },
  {
    "path": "tests/examples_methods_syntax/ranged_dot_plot.py",
    "content": "\"\"\"\nRanged Dot Plot\n---------------\nThis example shows a ranged dot plot to convey changing life expectancy for the five most populous countries (between 1955 and 2000).\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.countries.url\n\nchart = (\n    alt.Chart(source)\n    .encode(x=\"life_expect:Q\", y=\"country:N\")\n    .transform_filter(\n        alt.FieldOneOfPredicate(\n            field=\"country\",\n            oneOf=[\"China\", \"India\", \"United States\", \"Indonesia\", \"Brazil\"],\n        )\n    )\n    .transform_filter(alt.FieldOneOfPredicate(field=\"year\", oneOf=[1955, 2000]))\n)\n\nline = chart.mark_line(color=\"#db646f\").encode(detail=\"country:N\")\n\n# Add points for life expectancy in 1955 & 2000\ncolor = alt.Color(\"year:O\").scale(domain=[1955, 2000], range=[\"#e6959c\", \"#911a24\"])\npoints = (\n    chart.mark_point(\n        size=100,\n        opacity=1,\n        filled=True,\n    )\n    .encode(color=color)\n    .interactive()\n)\n\n(line + points)\n"
  },
  {
    "path": "tests/examples_methods_syntax/ridgeline_plot.py",
    "content": "\"\"\"\nRidgeline plot\n--------------\nA `Ridgeline plot <https://clauswilke.com/blog/2017/09/15/goodbye-joyplots/>`_\nlets you visualize distribution of a numeric value for different\nsubsets of data (what we call \"facets\" in Altair).\n\nSuch a chart can be created in Altair by first transforming the data into a\nsuitable representation.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather.url\n\nstep = 20\noverlap = 1\n\nalt.Chart(source, height=step).transform_timeunit(\n    Month='month(date)'\n).transform_joinaggregate(\n    mean_temp='mean(temp_max)', groupby=['Month']\n).transform_bin(\n    ['bin_max', 'bin_min'], 'temp_max'\n).transform_aggregate(\n    value='count()', groupby=['Month', 'mean_temp', 'bin_min', 'bin_max']\n).transform_impute(\n    impute='value', groupby=['Month', 'mean_temp'], key='bin_min', value=0\n).mark_area(\n    interpolate='monotone',\n    fillOpacity=0.8,\n    stroke='lightgray',\n    strokeWidth=0.5\n).encode(\n    alt.X('bin_min:Q')\n        .bin('binned')\n        .title('Maximum Daily Temperature (C)'),\n    alt.Y('value:Q')\n        .axis(None)\n        .scale(range=[step, -step * overlap]),\n    alt.Fill('mean_temp:Q')\n        .legend(None)\n        .scale(domain=[30, 5], scheme='redyellowblue')\n).facet(\n    row=alt.Row('Month:T')\n        .title(None)\n        .header(labelAngle=0, labelAlign='left', format='%B')\n).properties(\n    title='Seattle Weather',\n    bounds='flush'\n).configure_facet(\n    spacing=0\n).configure_view(\n    stroke=None\n).configure_title(\n    anchor='end'\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/scatter_linked_table.py",
    "content": "\"\"\"\nBrushing Scatter Plot to Show Data on a Table\n---------------------------------------------\nA scatter plot of the cars dataset, with data tables for horsepower, MPG, and origin.\nThe tables update to reflect the selection on the scatter plot.\n\"\"\"\n# category: scatter plots\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.cars()\n\n# Brush for selection\nbrush = alt.selection_interval()\n\n# Scatter Plot\npoints = alt.Chart(source).mark_point().encode(\n    x='Horsepower:Q',\n    y='Miles_per_Gallon:Q',\n    color=alt.when(brush).then(alt.value(\"steelblue\")).otherwise(alt.value(\"grey\"))\n).add_params(brush)\n\n# Base chart for data tables\nranked_text = alt.Chart(source).mark_text(align='right').encode(\n    y=alt.Y('row_number:O').axis(None)\n).transform_filter(\n    brush\n).transform_window(\n    row_number='row_number()'\n).transform_filter(\n    alt.datum.row_number < 15\n)\n\n# Data Tables\nhorsepower = ranked_text.encode(text='Horsepower:N').properties(\n    title=alt.Title(text='Horsepower', align='right')\n)\nmpg = ranked_text.encode(text='Miles_per_Gallon:N').properties(\n    title=alt.Title(text='MPG', align='right')\n)\norigin = ranked_text.encode(text='Origin:N').properties(\n    title=alt.Title(text='Origin', align='right')\n)\ntext = alt.hconcat(horsepower, mpg, origin) # Combine data tables\n\n# Build chart\nalt.hconcat(\n    points,\n    text\n).resolve_legend(\n    color=\"independent\"\n).configure_view(\n    stroke=None\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/scatter_marginal_hist.py",
    "content": "\"\"\"\nScatter Plot with Faceted Marginal Histograms\n---------------------------------------------\nThis example demonstrates how to generate a scatter plot,\nwith faceted marginal histograms that share their respective x- and y-limits.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.penguins()\n\nbase = alt.Chart(source)\nbase_bar = base.mark_bar(opacity=0.3, binSpacing=0)\n\nxscale = alt.Scale(domain=(170, 235))\nyscale = alt.Scale(domain=(2500, 6500))\n\npoints = base.mark_circle().encode(\n    alt.X(\"Flipper Length (mm)\").scale(xscale),\n    alt.Y(\"Body Mass (g)\").scale(yscale),\n    color=\"Species\",\n)\n\ntop_hist = (\n    base_bar\n    .encode(\n        alt.X(\"Flipper Length (mm):Q\")\n            # when using bins, the axis scale is set through\n            # the bin extent, so we do not specify the scale here\n            # (which would be ignored anyway)\n            .bin(maxbins=20, extent=xscale.domain).stack(None).title(\"\"),\n        alt.Y(\"count()\").stack(None).title(\"\"),\n        alt.Color(\"Species:N\"),\n    )\n    .properties(height=60)\n)\n\nright_hist = (\n    base_bar\n    .encode(\n        alt.Y(\"Body Mass (g):Q\")\n            .bin(maxbins=20, extent=yscale.domain)\n            .stack(None)\n            .title(\"\"),\n        alt.X(\"count()\").stack(None).title(\"\"),\n        alt.Color(\"Species:N\"),\n    )\n    .properties(width=60)\n)\n\ntop_hist & (points | right_hist)\n"
  },
  {
    "path": "tests/examples_methods_syntax/scatter_point_paths_hover.py",
    "content": "\"\"\"\nScatter plot with point paths on hover with search box\n======================================================\nThis example combines cross-sectional analysis (comparing countries at a single point in time) \nwith longitudinal analysis (tracking changes in individual countries over time), using\nan interactive visualization technique inspired by [this Vega example](https://vega.github.io/vega/examples/global-development/)\n\nKey features:\n1. Point Paths. On hover, shows data trajectories using a trail mark that\nthickens from past to present, clearly indicating the direction of time.\n2. Search Box. Implements a case-insensitive regex filter for country names,\nenabling dynamic, flexible data point selection to enhance exploratory analysis.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nfrom altair.datasets import data\n\n# Data source\nsource = data.gapminder.url\n\n# X-value slider\nx_slider = alt.binding_range(min=1955, max=2005, step=5, name='Year ')\nx_select = alt.selection_point(name=\"x_select\", fields=['year'], bind=x_slider, value=1980)\n\n# Hover selection\nhover = alt.selection_point(on='mouseover', fields=['country'], empty=False)\n# A separate hover for the points since these need empty=True  \nhover_point_opacity = alt.selection_point(on='mouseover', fields=['country'])  \n\n# Search box for country name\nsearch_box = alt.param(\n    value='',\n    bind=alt.binding(input='search', placeholder=\"Country\", name='Search ')\n)\n\n# Base chart\nbase = alt.Chart(source).encode(\n    alt.X('fertility:Q').scale(zero=False).title('Babies per woman (total fertility rate)'),\n    alt.Y('life_expect:Q').scale(zero=False).title('Life expectancy'),\n    alt.Color('region:N').scale(scheme='dark2').legend(orient='bottom-left', titleFontSize=14, labelFontSize=12).title('Region'),\n    alt.Detail('country:N')\n).transform_calculate(\n    region=\"\"\"{\n        '0': 'South Asia',\n        '1': 'Europe & Central Asia',\n        '2': 'Sub-Saharan Africa',\n        '3': 'The Americas',\n        '4': 'East Asia & Pacific',\n        '5': 'Middle East & North Africa'\n    }[datum.cluster]\"\"\"\n).transform_filter(\n    # Exclude North Korea and South Korea due to source data error\n    \"datum.country !== 'North Korea' && datum.country !== 'South Korea'\"\n)\n\nsearch_matches = alt.expr.test(alt.expr.regexp(search_box, \"i\"), alt.datum.country)\nopacity = (\n    alt.when(hover_point_opacity, search_matches)\n    .then(alt.value(0.8))\n    .otherwise(alt.value(0.1))\n)\n# Points that are always visible (filtered by slider and search)\nvisible_points = base.mark_circle(size=100).encode(\n    opacity=opacity\n    ).transform_filter(\n        x_select\n    ).add_params(\n        hover,\n        hover_point_opacity,\n        x_select\n)\n\nwhen_hover = alt.when(hover)\nhover_line = alt.layer(\n    # Line layer\n    base.mark_trail().encode(\n        alt.Order('year:Q').sort('ascending'),\n        alt.Size('year:Q').scale(domain=[1955, 2005], range=[1, 12]).legend(None),\n        opacity=when_hover.then(alt.value(0.3)).otherwise(alt.value(0)),\n        color=alt.value('#222222')\n    ),\n    # Point layer\n    base.mark_point(size=50).encode(\n        opacity=when_hover.then(alt.value(0.8)).otherwise(alt.value(0)),\n    )\n)\n\n# Year labels\nyear_labels = base.mark_text(align='left', dx=5, dy=-5, fontSize=14).encode(\n    text='year:O', \n    color=alt.value('#222222')\n).transform_filter(hover)\n\n# Country labels\ncountry_labels = alt.Chart(source).mark_text(\n    align='left',\n    dx=-15,\n    dy=-25,\n    fontSize=18,\n    fontWeight='bold'\n).encode(\n    x='fertility:Q',\n    y='life_expect:Q',\n    text='country:N',\n    color=alt.value('black'),\n    opacity=when_hover.then(alt.value(1)).otherwise(alt.value(0))\n).transform_window(\n    rank='rank(life_expect)',\n    sort=[alt.SortField('life_expect', order='descending')], \n    groupby=['country'] # places label atop highest point on y-axis on hover\n).transform_filter(\n    alt.datum.rank == 1\n).transform_aggregate(\n    life_expect='max(life_expect)',\n    fertility='max(fertility)',\n    groupby=['country']\n)\n\nbackground_year = alt.Chart(source).mark_text(\n    baseline='middle',\n    fontSize=96,\n    opacity=0.2\n).encode(\n    text='year:O'\n).transform_filter(\n    x_select\n).transform_aggregate(\n    year='max(year)'\n)\n\n# Combine all layers\nchart = alt.layer(\n    visible_points, year_labels, country_labels, hover_line, background_year\n).properties(\n    width=500,\n    height=500,\n    padding=10  # Padding ensures labels fit\n).configure_axis(\n    labelFontSize=12,\n    titleFontSize=12\n).add_params(search_box)\n\nchart"
  },
  {
    "path": "tests/examples_methods_syntax/scatter_with_layered_histogram.py",
    "content": "\"\"\"\nInteractive Scatter Plot and Linked Layered Histogram\n=====================================================\n\nThis example shows how to link a scatter plot and a histogram\ntogether such that clicking on a point in the scatter plot will\nisolate the distribution corresponding to that point, and vice versa.\n\"\"\"\n# category: interactive charts\n\nimport altair as alt\nimport pandas as pd\nimport numpy as np\n\n# generate fake data\nsource = pd.DataFrame({\n    'gender': ['M']*1000 + ['F']*1000,\n    'height':np.concatenate((\n        np.random.normal(69, 7, 1000), np.random.normal(64, 6, 1000)\n    )),\n    'weight': np.concatenate((\n        np.random.normal(195.8, 144, 1000), np.random.normal(167, 100, 1000)\n    )),\n    'age': np.concatenate((\n        np.random.normal(45, 8, 1000), np.random.normal(51, 6, 1000)\n        ))\n    })\n\nselector = alt.selection_point(fields=['gender'])\n\ncolor_scale = alt.Scale(domain=['M', 'F'],\n                        range=['#1FC3AA', '#8624F5'])\ncolor = (\n    alt.when(selector)\n    .then(alt.Color(\"gender:N\").scale(color_scale))\n    .otherwise(alt.value(\"lightgray\"))\n)\nbase = alt.Chart(source).properties(\n    width=250,\n    height=250\n).add_params(selector)\n\npoints = base.mark_point(filled=True, size=200).encode(\n    alt.X('mean(height):Q').scale(domain=[0,84]),\n    alt.Y('mean(weight):Q').scale(domain=[0,250]),\n    color=color,\n)\n\nhists = base.mark_bar(opacity=0.5, thickness=100).encode(\n    alt.X('age')\n        .bin(step=5) # step keeps bin size the same\n        .scale(domain=[0,100]),\n    alt.Y('count()')\n        .stack(None)\n        .scale(domain=[0,350]),\n    alt.Color('gender:N').scale(color_scale)\n).transform_filter(\n    selector\n)\n\npoints | hists\n"
  },
  {
    "path": "tests/examples_methods_syntax/scatter_with_minimap.py",
    "content": "\"\"\"\nScatter Plot with Minimap\n-------------------------\nThis example shows how to create a miniature version of a plot\nsuch that creating a selection in the miniature version\nadjusts the axis limits in another, more detailed view.\n\"\"\"\n# category: scatter plots\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather()\n\nzoom = alt.selection_interval(encodings=[\"x\", \"y\"])\n\nminimap = (\n    alt.Chart(source)\n    .mark_point()\n    .add_params(zoom)\n    .encode(\n        x=\"date:T\",\n        y=\"temp_max:Q\",\n        color=alt.when(zoom).then(\"weather\").otherwise(alt.value(\"lightgray\")),\n    )\n    .properties(\n        width=200,\n        height=200,\n        title=\"Minimap -- click and drag to zoom in the detail view\",\n    )\n)\n\ndetail = (\n    alt.Chart(source)\n    .mark_point()\n    .encode(\n        alt.X(\"date:T\").scale(domain={\"param\": zoom.name, \"encoding\": \"x\"}),\n        alt.Y(\"temp_max:Q\").scale(domain={\"param\": zoom.name, \"encoding\": \"y\"}),\n        color=\"weather\",\n    )\n    .properties(width=600, height=400, title=\"Seattle weather -- detail view\")\n)\n\ndetail | minimap\n"
  },
  {
    "path": "tests/examples_methods_syntax/scatter_with_rolling_mean.py",
    "content": "\"\"\"\nScatter Plot with Rolling Mean\n------------------------------\nA scatter plot with a rolling mean overlay. In this example a 30 day window\nis used to calculate the mean of the maximum temperature around each date.\n\"\"\"\n# category: scatter plots\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather()\n\nline = alt.Chart(source).mark_line(\n    color='red', \n    size=3\n).transform_window(\n    rolling_mean='mean(temp_max)',\n    frame=[-15, 15]\n).encode(\n    x='date:T',\n    y='rolling_mean:Q'\n)\n\npoints = alt.Chart(source).mark_point().encode(\n    x='date:T',\n    y=alt.Y('temp_max:Q').title('Max Temp')\n)\n\npoints + line\n"
  },
  {
    "path": "tests/examples_methods_syntax/seattle_weather_interactive.py",
    "content": "\"\"\"\nSeattle Weather Interactive\n===========================\nThis chart provides an interactive exploration of Seattle weather over the\ncourse of the year. It includes a one-axis brush selection to easily\nsee the distribution of weather types in a particular date range.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.seattle_weather()\n\ncolor = alt.Color('weather:N').scale(\n    domain=['sun', 'fog', 'drizzle', 'rain', 'snow'],\n    range=['#e7ba52', '#a7a7a7', '#aec7e8', '#1f77b4', '#9467bd']\n)\n\n# We create two selections:\n# - a brush that is active on the top panel\n# - a multi-click that is active on the bottom panel\nbrush = alt.selection_interval(encodings=['x'])\nclick = alt.selection_point(encodings=['color'])\n\n# Top panel is scatter plot of temperature vs time\npoints = alt.Chart().mark_point().encode(\n    alt.X('monthdate(date):T').title('Date'),\n    alt.Y('temp_max:Q')\n        .title('Maximum Daily Temperature (C)')\n        .scale(domain=[-5, 40]),\n    alt.Size('precipitation:Q').scale(range=[5, 200]),\n    color=alt.when(brush).then(color).otherwise(alt.value(\"lightgray\")),\n).properties(\n    width=550,\n    height=300\n).add_params(\n    brush\n).transform_filter(\n    click\n)\n\n# Bottom panel is a bar chart of weather type\nbars = alt.Chart().mark_bar().encode(\n    x='count()',\n    y='weather:N',\n    color=alt.when(click).then(color).otherwise(alt.value(\"lightgray\")),\n).transform_filter(\n    brush\n).properties(\n    width=550,\n).add_params(\n    click\n)\n\nalt.vconcat(\n    points,\n    bars,\n    data=source,\n    title=\"Seattle Weather: 2012-2015\"\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/select_detail.py",
    "content": "\"\"\"\nSelection Detail\n================\nThis example shows a selection that links two views of data: the left panel\ncontains one point per object, and the right panel contains one line per\nobject. Clicking on either the points or lines will select the corresponding\nobjects in both views of the data.\n\nThe challenge lies in expressing such hierarchical data in a way that Altair\ncan handle. We do this by merging the data into a \"long form\" dataframe, and\naggregating identical metadata for the final plot.\n\"\"\"\n# category: interactive charts\nimport altair as alt\nimport pandas as pd\nimport numpy as np\n\nnp.random.seed(0)\n\nn_objects = 20\nn_times = 50\n\n# Create one (x, y) pair of metadata per object\nlocations = pd.DataFrame({\n    'id': range(n_objects),\n    'x': np.random.randn(n_objects),\n    'y': np.random.randn(n_objects)\n})\n\n# Create a 50-element time-series for each object\ntimeseries = pd.DataFrame(np.random.randn(n_times, n_objects).cumsum(0),\n                          columns=locations['id'],\n                          index=pd.RangeIndex(0, n_times, name='time'))\n\n# Melt the wide-form timeseries into a long-form view\ntimeseries = timeseries.reset_index().melt('time')\n\n# Merge the (x, y) metadata into the long-form view\ntimeseries['id'] = timeseries['id'].astype(int)  # make merge not complain\ndata = pd.merge(timeseries, locations, on='id')\n\n# Data is prepared, now make a chart\n\nselector = alt.selection_point(fields=['id'])\ncolor = (\n    alt.when(selector)\n    .then(alt.Color(\"id:O\").legend(None))\n    .otherwise(alt.value(\"lightgray\"))\n)\n\nbase = alt.Chart(data).properties(\n    width=250,\n    height=250\n).add_params(selector)\n\npoints = base.mark_point(filled=True, size=200).encode(\n    x='mean(x)',\n    y='mean(y)',\n    color=color,\n)\n\nline = base.mark_line().encode(\n    x='time',\n    y=alt.Y('value').scale(domain=(-15, 15)),\n    color=alt.Color('id:O').legend(None)\n).transform_filter(\n    selector\n)\n\npoints | line\n"
  },
  {
    "path": "tests/examples_methods_syntax/simple_scatter_with_errorbars.py",
    "content": "\"\"\"\nSimple Scatter Plot with Errorbars\n----------------------------------\nA simple scatter plot of a data set with errorbars.\n\"\"\"\n# category: uncertainties and trends\nimport altair as alt\nimport pandas as pd\nimport numpy as np\n\n# generate some data points with uncertainties\nnp.random.seed(0)\nx = [1, 2, 3, 4, 5]\ny = np.random.normal(10, 0.5, size=len(x))\nyerr = 0.2\n\n# set up data frame\nsource = pd.DataFrame({\"x\": x, \"y\": y, \"yerr\": yerr})\n\n# the base chart\nbase = alt.Chart(source).transform_calculate(\n    ymin=\"datum.y-datum.yerr\",\n    ymax=\"datum.y+datum.yerr\"\n)\n\n# generate the points\npoints = base.mark_point(\n    filled=True,\n    size=50,\n    color='black'\n).encode(\n    alt.X('x').scale(domain=(0, 6)),\n    alt.Y('y').scale(zero=False)\n)\n\n# generate the error bars\nerrorbars = base.mark_errorbar().encode(\n    x=\"x\",\n    y=\"ymin:Q\",\n    y2=\"ymax:Q\"\n)\n\npoints + errorbars\n"
  },
  {
    "path": "tests/examples_methods_syntax/sorted_error_bars_with_ci.py",
    "content": "\"\"\"\nSorted Error Bars showing Confidence Interval\n=============================================\nThis example shows how to show error bars using confidence intervals, while also sorting the y-axis based on x-axis values. \n\"\"\"\n# category: advanced calculations\n\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\npoints = alt.Chart(source).mark_point(\n    filled=True,\n    color='black'\n).encode(\n    x=alt.X('mean(yield)').title('Barley Yield'),\n    y=alt.Y('variety').sort(\n        field='yield',\n        op='mean',\n        order='descending'\n    )\n).properties(\n    width=400,\n    height=250\n)\n\nerror_bars = points.mark_rule().encode(\n    x='ci0(yield)',\n    x2='ci1(yield)',\n)\n\npoints + error_bars\n"
  },
  {
    "path": "tests/examples_methods_syntax/stacked_bar_chart_sorted_segments.py",
    "content": "\"\"\"\nStacked Bar Chart with Sorted Segments\n--------------------------------------\nThis is an example of a stacked-bar chart with the segments of each bar resorted.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.barley()\n\nalt.Chart(source).mark_bar().encode(\n    x='sum(yield)',\n    y='variety',\n    color='site',\n    order=alt.Order(\n      # Sort the segments of the bars by this field\n      'site',\n      sort='ascending'\n    )\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/stacked_bar_chart_with_text.py",
    "content": "\"\"\"\nStacked Bar Chart with Text Overlay\n===================================\nThis example shows how to overlay text on a stacked bar chart. For both the\nbar and text marks, we use the ``stack`` argument in the ``x`` encoding to\ncause the values to be stacked horizontally.\n\"\"\"\n# category: bar charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource=data.barley()\n\nbars = alt.Chart(source).mark_bar().encode(\n    x=alt.X('sum(yield):Q').stack('zero'),\n    y=alt.Y('variety:N'),\n    color=alt.Color('site')\n)\n\ntext = alt.Chart(source).mark_text(dx=-15, dy=3, color='white').encode(\n    x=alt.X('sum(yield):Q').stack('zero'),\n    y=alt.Y('variety:N'),\n    detail='site:N',\n    text=alt.Text('sum(yield):Q', format='.1f')\n)\n\nbars + text\n"
  },
  {
    "path": "tests/examples_methods_syntax/stem_and_leaf.py",
    "content": "\"\"\"\nStem and Leaf Plot\n------------------\nThis example shows how to make a stem and leaf plot.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nimport pandas as pd\nimport numpy as np\nnp.random.seed(42)\n\n# Generating random data\nsource = pd.DataFrame({'samples': np.random.normal(50, 15, 100).astype(int).astype(str)})\n\n# Splitting stem and leaf\nsource['stem'] = source['samples'].str[:-1]\nsource['leaf'] = source['samples'].str[-1]\n\nsource = source.sort_values(by=['stem', 'leaf'])\n\n# Determining leaf position\nsource['position'] = source.groupby('stem').cumcount().add(1)\n\n# Creating stem and leaf plot\nalt.Chart(source).mark_text(\n    align='left',\n    baseline='middle',\n    dx=-5\n).encode(\n    alt.X('position:Q')\n        .title('')\n        .axis(ticks=False, labels=False, grid=False),\n    alt.Y('stem:N')\n        .title('')\n        .axis(tickSize=0),\n    text='leaf:N',\n).configure_axis(\n    labelFontSize=20\n).configure_text(\n    fontSize=20\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/streamgraph.py",
    "content": "\"\"\"\nStreamgraph\n-----------------\nThis example shows the streamgraph from vega-lite examples.\n\"\"\"\n# category: area charts\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.unemployment_across_industries.url\n\nalt.Chart(source).mark_area().encode(\n    alt.X('yearmonth(date):T').axis(format='%Y', domain=False, tickSize=0),\n    alt.Y('sum(count):Q').stack('center').axis(None),\n    alt.Color('series:N').scale(scheme='category20b')\n).interactive()\n"
  },
  {
    "path": "tests/examples_methods_syntax/strip_plot_jitter.py",
    "content": "\"\"\"\nStrip Plot with Jitter\n----------------------\nIn this chart, we encode the ``Major_Genre`` column from the ``movies`` dataset\nin the ``y``-channel. In the default presentation of this data, it would be\ndifficult to gauge the relative frequencies with which different values occur\nbecause there would be so much overlap. To address this, we use the ``yOffset``\nchannel to incorporate a random offset (jittering). The example is shown twice,\non the left side using normally distributed and on the right side using\nuniformally distributed jitter.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\ngaussian_jitter = alt.Chart(source, title='Normally distributed jitter').mark_circle(size=8).encode(\n    y=\"Major Genre:N\",\n    x=\"IMDB Rating:Q\",\n    yOffset=\"jitter:Q\",\n    color=alt.Color('Major Genre:N').legend(None)\n).transform_calculate(\n    # Generate Gaussian jitter with a Box-Muller transform\n    jitter=\"sqrt(-2*log(random()))*cos(2*PI*random())\"\n)\n\nuniform_jitter = gaussian_jitter.transform_calculate(\n    # Generate uniform jitter\n    jitter='random()'\n).encode(\n    alt.Y('Major Genre:N').axis(None)\n).properties(\n    title='Uniformly distributed jitter'\n)\n\n(gaussian_jitter | uniform_jitter).resolve_scale(yOffset='independent')\n"
  },
  {
    "path": "tests/examples_methods_syntax/top_k_items.py",
    "content": "\"\"\"\nTop K Items\n-----------\nThis example shows how to use the window and transformation filter to display\nthe Top items of a long list of items in decreasing order.\nHere we sort the top 10 highest ranking movies of IMDB.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\n# Top 10 movies by IMBD rating\nalt.Chart(\n    source,\n).mark_bar().encode(\n    alt.X('Title:N').sort('-y'),\n    alt.Y('IMDB Rating:Q'),\nalt.Color('IMDB Rating:Q')\n    \n).transform_window(\n    rank='rank(IMDB Rating)',\nsort=[alt.SortField('IMDB Rating', order='descending')]\n).transform_filter(\n    (alt.datum.rank < 10)\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/top_k_letters.py",
    "content": "\"\"\"\nTop K Letters\n-------------\nThis example shows how to use a window transform in order to display only the\ntop K categories by number of entries. In this case, we rank the characters in\nthe first paragraph of Dickens' *A Tale of Two Cities* by number of occurrences.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nimport pandas as pd\nimport numpy as np\n\n# Excerpt from A Tale of Two Cities; public domain text\ntext = \"\"\"\nIt was the best of times, it was the worst of times, it was the age of wisdom,\nit was the age of foolishness, it was the epoch of belief, it was the epoch of\nincredulity, it was the season of Light, it was the season of Darkness, it was\nthe spring of hope, it was the winter of despair, we had everything before us,\nwe had nothing before us, we were all going direct to Heaven, we were all going\ndirect the other way - in short, the period was so far like the present period,\nthat some of its noisiest authorities insisted on its being received, for good\nor for evil, in the superlative degree of comparison only.\n\"\"\"\n\nsource = pd.DataFrame(\n    {'letters': np.array([c for c in text if c.isalpha()])}\n)\n\nalt.Chart(source).transform_aggregate(\n    count='count()',\n    groupby=['letters']\n).transform_window(\n    rank='rank(count)',\n    sort=[alt.SortField('count', order='descending')]\n).transform_filter(\n    alt.datum.rank < 10\n).mark_bar().encode(\n    y=alt.Y('letters:N').sort('-x'),\n    x='count:Q',\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/top_k_with_others.py",
    "content": "\"\"\"\nTop-K Plot with Others\n----------------------\nThis example shows how to use aggregate, window, and calculate transformations\nto display the top-k directors by average worldwide gross while grouping the \nremaining directors as 'All Others'.\n\"\"\"\n# category: advanced calculations\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.movies.url\n\nalt.Chart(source).mark_bar().encode(\n    alt.X(\"aggregate_gross:Q\").aggregate(\"mean\").title(None),\n    alt.Y(\"ranked_director:N\")\n        .sort(op=\"mean\", field=\"aggregate_gross\", order=\"descending\")\n        .title(None)\n).transform_aggregate(\n    aggregate_gross='mean(Worldwide Gross)',\n    groupby=[\"Director\"],\n).transform_window(\n    rank='row_number()',\n    sort=[alt.SortField(\"aggregate_gross\", order=\"descending\")],\n).transform_calculate(\n    ranked_director=\"datum.rank < 10 ? datum.Director : 'All Others'\"\n).properties(\n    title=\"Top Directors by Average Worldwide Gross\",\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/us_employment.py",
    "content": "\"\"\"\nThe U.S. Employment Crash During the Great Recession\n----------------------------------------------------\nThis example is a fully developed bar chart with negative values using the sample dataset of U.S. employment changes during the Great Recession.\n\"\"\"\n# category: case studies\nimport altair as alt\nimport pandas as pd\nfrom altair.datasets import data\n\nsource = data.us_employment()\npresidents = pd.DataFrame([\n    {\n        \"start\": \"2006-01-01\",\n        \"end\": \"2009-01-19\",\n        \"president\": \"Bush\"\n    },\n    {\n        \"start\": \"2009-01-20\",\n        \"end\": \"2015-12-31\",\n        \"president\": \"Obama\"\n    }\n])\npredicate = alt.datum.nonfarm_change > 0\n\nbars = alt.Chart(\n    source,\n    title=\"The U.S. employment crash during the Great Recession\"\n).mark_bar().encode(\n    alt.X(\"month:T\").title(\"\"),\n    alt.Y(\"nonfarm_change:Q\").title(\"Change in non-farm employment (in thousands)\"),\n    color=alt.when(predicate).then(alt.value(\"steelblue\")).otherwise(alt.value(\"orange\")),\n)\n\nrule = alt.Chart(presidents).mark_rule(\n    color=\"black\",\n    strokeWidth=2\n).encode(\n    x='end:T'\n).transform_filter(alt.datum.president == \"Bush\")\n\ntext = alt.Chart(presidents).mark_text(\n    align='left',\n    baseline='middle',\n    dx=7,\n    dy=-135,\n    size=11\n).encode(\n    x='start:T',\n    text='president',\n    color=alt.value('#000000')\n)\n\n(bars + rule + text).properties(width=600)\n"
  },
  {
    "path": "tests/examples_methods_syntax/us_population_over_time.py",
    "content": "\"\"\"\nUS Population by Age and Sex\n============================\nThis chart visualizes the age distribution of the US population over time.\nIt uses a slider widget that is bound to the year to visualize the age\ndistribution over time.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.population.url\n\nselect_year = alt.selection_point(\n    name=\"Year\",\n    fields=[\"year\"],\n    bind=alt.binding_range(min=1900, max=2000, step=10, name=\"Year\"),\n    value=2000,\n)\n\nalt.Chart(source).mark_bar().encode(\n    alt.X(\"sex:N\").title('').axis(labels=False, ticks=False),\n    alt.Y(\"people:Q\").scale(domain=(0, 12000000)).title(\"Population\"),\n    alt.Color(\"sex:N\")\n        .scale(domain=(\"Male\", \"Female\"), range=[\"steelblue\", \"salmon\"])\n        .title(\"Sex\"),\n    alt.Column(\"age:O\").title(\"Age\")\n).properties(\n    width=20,\n    title=\"U.S. Population by Age and Sex\"\n).add_params(\n    select_year\n).transform_calculate(\n    \"sex\", alt.expr.if_(alt.datum.sex == 1, \"Male\", \"Female\")\n).transform_filter(\n    select_year\n).configure_facet(\n    spacing=8\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/us_population_over_time_facet.py",
    "content": "\"\"\"\nUS Population: Wrapped Facet\n============================\nThis chart visualizes the age distribution of the US population over time,\nusing a wrapped faceting of the data by decade.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.population.url\n\nalt.Chart(source).mark_area().encode(\n    x='age:O',\n    y=alt.Y('sum(people):Q').title('Population').axis(format='~s'),\n    facet=alt.Facet('year:O').columns(5),\n).properties(\n    title='US Age Distribution By Year',\n    width=90,\n    height=80\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/us_population_pyramid_over_time.py",
    "content": "'''\nUS Population Pyramid Over Time\n===============================\nA population pyramid shows the distribution of age groups within a population.\nIt uses a slider widget that is bound to the year to visualize the age\ndistribution over time.\n'''\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nsource = data.population.url\n\nslider = alt.binding_range(min=1850, max=2000, step=10)\nselect_year = alt.selection_point(name='year', fields=['year'],\n                                   bind=slider, value=2000)\n\nbase = alt.Chart(source).add_params(\n    select_year\n).transform_filter(\n    select_year\n).transform_calculate(\n    gender=alt.expr.if_(alt.datum.sex == 1, 'Male', 'Female')\n).properties(\n    width=250\n)\n\n\ncolor_scale = alt.Scale(domain=['Male', 'Female'],\n                        range=['#1f77b4', '#e377c2'])\n\nleft = base.transform_filter(\n    alt.datum.gender == 'Female'\n).encode(\n    alt.Y('age:O').axis(None),\n    alt.X('sum(people):Q')\n        .title('population')\n        .sort('descending'),\n    alt.Color('gender:N')\n        .scale(color_scale)\n        .legend(None)\n).mark_bar().properties(title='Female')\n\nmiddle = base.encode(\n    alt.Y('age:O').axis(None),\n    alt.Text('age:Q'),\n).mark_text().properties(width=20)\n\nright = base.transform_filter(\n    alt.datum.gender == 'Male'\n).encode(\n    alt.Y('age:O').axis(None),\n    alt.X('sum(people):Q').title('population'),\n    alt.Color('gender:N').scale(color_scale).legend(None)\n).mark_bar().properties(title='Male')\n\nalt.concat(left, middle, right, spacing=5)\n"
  },
  {
    "path": "tests/examples_methods_syntax/us_state_capitals.py",
    "content": "\"\"\"\nU.S. State Capitals Overlaid on a Map of the U.S\n-------------------------------------------------\nThis is a layered geographic visualization that shows US capitals\noverlaid on a map.\n\"\"\"\n# category: case studies\nimport altair as alt\nfrom altair.datasets import data\n\nstates = alt.topo_feature(data.us_10m.url, 'states')\ncapitals = data.us_state_capitals.url\n\n# US states background\nbackground = alt.Chart(states).mark_geoshape(\n    fill='lightgray',\n    stroke='white'\n).properties(\n    title='US State Capitols',\n    width=650,\n    height=400\n).project('albersUsa')\n\n# Points and text\nhover = alt.selection_point(on='pointerover', nearest=True,\n                      fields=['lat', 'lon'])\n\nbase = alt.Chart(capitals).encode(\n    longitude='lon:Q',\n    latitude='lat:Q',\n)\n\ntext = base.mark_text(dy=-5, align='right').encode( \n    alt.Text('city:N'),\n    opacity=alt.when(~hover).then(alt.value(0)).otherwise(alt.value(1))\n)\n\npoints = base.mark_point().encode(\n    color=alt.value('black'),\n    size=alt.when(~hover).then(alt.value(30)).otherwise(alt.value(100))\n).add_params(hover)\n\nbackground + points + text\n"
  },
  {
    "path": "tests/examples_methods_syntax/violin_plot.py",
    "content": "\"\"\"\nViolin Plot\n-----------\nThis example shows how to make a Violin Plot using Altair's density transform.\n\"\"\"\n# category: distributions\nimport altair as alt\nfrom altair.datasets import data\n\nalt.Chart(data.cars(), width=100).transform_density(\n    'Miles_per_Gallon',\n    as_=['Miles_per_Gallon', 'density'],\n    extent=[5, 50],\n    groupby=['Origin']\n).mark_area(orient='horizontal').encode(\n    alt.X('density:Q')\n        .stack('center')\n        .impute(None)\n        .title(None)\n        .axis(labels=False, values=[0], grid=False, ticks=True),\n    alt.Y('Miles_per_Gallon:Q'),\n    alt.Color('Origin:N'),\n    alt.Column('Origin:N')\n        .spacing(0)\n        .header(titleOrient='bottom', labelOrient='bottom', labelPadding=0)\n).configure_view(\n    stroke=None\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/wheat_wages.py",
    "content": "\"\"\"\nWheat and Wages\n---------------\nA recreation of William Playfair's classic chart visualizing\nthe price of wheat, the wages of a mechanic, and the reigning British monarch.\n\nThis is a more polished version of the simpler chart in :ref:`gallery_bar_and_line_with_dual_axis`.\n\"\"\"\n# category: case studies\nimport altair as alt\nimport pandas as pd\nfrom altair.datasets import data\n\n\nbase_wheat = alt.Chart(data.wheat.url).transform_calculate(year_end=\"+datum.year + 5\")\n\nbase_monarchs = alt.Chart(data.monarchs.url).transform_calculate(\n    offset=\"((!datum.commonwealth && datum.index % 2) ? -1: 1) * 2 + 95\",\n    off2=\"((!datum.commonwealth && datum.index % 2) ? -1: 1) + 95\",\n    y=\"95\",\n    x=\"+datum.start + (+datum.end - +datum.start)/2\",\n)\n\nbars = base_wheat.mark_bar(fill=\"#aaa\", stroke=\"#999\").encode(\n    alt.X(\"year:Q\").bin(\"binned\").axis(format=\"d\", tickCount=5).scale(zero=False),\n    alt.Y(\"wheat:Q\").axis(zindex=1),\n    alt.X2(\"year_end\"),\n)\n\nsection_data = pd.DataFrame(\n    [\n        {\"year\": 1600},\n        {\"year\": 1650},\n        {\"year\": 1700},\n        {\"year\": 1750},\n        {\"year\": 1800},\n    ]\n)\n\nsection_line = (\n    alt.Chart(section_data)\n    .mark_rule(stroke=\"#000\", strokeWidth=0.6, opacity=0.7)\n    .encode(alt.X(\"year\"))\n)\n\narea = base_wheat.mark_area(color=\"#a4cedb\", opacity=0.7).encode(\n    alt.X(\"year:Q\"), alt.Y(\"wages:Q\")\n)\n\narea_line_1 = area.mark_line(color=\"#000\", opacity=0.7)\narea_line_2 = area.mark_line(yOffset=-2, color=\"#EE8182\")\n\ntop_bars = base_monarchs.mark_bar(stroke=\"#000\").encode(\n    alt.X(\"start:Q\"),\n    alt.X2(\"end\"),\n    alt.Y(\"y:Q\"),\n    alt.Y2(\"offset\"),\n    alt.Fill(\"commonwealth:N\").legend(None).scale(range=[\"black\", \"white\"]),\n)\n\ntop_text = base_monarchs.mark_text(yOffset=14, fontSize=9, fontStyle=\"italic\").encode(\n    alt.X(\"x:Q\"), alt.Y(\"off2:Q\"), alt.Text(\"name:N\")\n)\n\n(\n    (bars + section_line + area + area_line_1 + area_line_2 + top_bars + top_text)\n    .properties(width=900, height=400)\n    .configure_axis(title=None, gridColor=\"white\", gridOpacity=0.25, domain=False)\n    .configure_view(stroke=\"transparent\")\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/wilkinson-dot-plot.py",
    "content": "\"\"\"\nWilkinson Dot Plot\n------------------\nAn example of a `Wilkinson Dot Plot <https://en.wikipedia.org/wiki/Dot_plot_(statistics)>`_\n\"\"\"\n# category: advanced calculations\n\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame(\n    {\"data\":[1,1,1,1,1,1,1,1,1,1,\n             2,2,2,\n             3,3,\n             4,4,4,4,4,4]\n    }\n)\n\nalt.Chart(source, height=100).mark_circle(opacity=1).transform_window(\n    id='rank()',\n    groupby=['data']\n).encode(\n    alt.X('data:O'),\n    alt.Y('id:O').axis(None).sort('descending')\n)\n"
  },
  {
    "path": "tests/examples_methods_syntax/wind_vector_map.py",
    "content": "\"\"\"\nWind Vector Map\n---------------\nAn example showing a vector array map showing wind speed and direction using ``wedge``\nas shape for ``mark_point`` and ``angle`` encoding for the wind direction.\nThis is adapted from this corresponding Vega-Lite Example:\n`Wind Vector Map <https://vega.github.io/vega-lite/examples/point_angle_windvector.html>`_\nwith an added base map.\n\"\"\"\n# category: maps\nimport altair as alt\nfrom altair.datasets import data\n\ndf_wind = data.windvectors()\ndata_world = alt.topo_feature(data.world_110m.url, \"countries\")\n\nwedge = alt.Chart(df_wind).mark_point(shape=\"wedge\", filled=True).encode(\n    alt.Latitude(\"latitude\"),\n    alt.Longitude(\"longitude\"),\n    alt.Color(\"dir\")\n        .scale(domain=[0, 360], scheme=\"rainbow\")\n        .legend(None),\n    alt.Angle(\"dir\").scale(domain=[0, 360], range=[180, 540]),\n    alt.Size(\"speed\").scale(rangeMax=500)\n).project(\"equalEarth\")\n\nxmin, xmax, ymin, ymax = (\n    df_wind.longitude.min(),\n    df_wind.longitude.max(),\n    df_wind.latitude.min(),\n    df_wind.latitude.max(),\n)\n\n# extent as feature or featurecollection\nextent = {\n    \"type\": \"Feature\", \n    \"geometry\": {\"type\": \"Polygon\", \n                 \"coordinates\": [[\n                     [xmax, ymax],\n                     [xmax, ymin],\n                     [xmin, ymin],\n                     [xmin, ymax],\n                     [xmax, ymax]]]\n                },\n    \"properties\": {}\n}\n\n# use fit combined with clip=True\nbase = (\n    alt.Chart(data_world)\n    .mark_geoshape(clip=True, fill=\"lightgray\", stroke=\"black\", strokeWidth=0.5)\n    .project(type=\"equalEarth\", fit=extent)\n)\n\nbase + wedge\n"
  },
  {
    "path": "tests/examples_methods_syntax/window_rank.py",
    "content": "\"\"\"\nWindow Rank Line Chart\n----------------------\nThis example shows the Group F rankings in the 2018 World Cup after each matchday. \nA window transformation is used to rank each after each match day, sorting by points and difference.\n\"\"\"\n# category: line charts\nimport altair as alt\nimport pandas as pd\n\nsource = pd.DataFrame(\n    [\n        {\"team\": \"Germany\", \"matchday\": 1, \"point\": 0, \"diff\": -1},\n        {\"team\": \"Germany\", \"matchday\": 2, \"point\": 3, \"diff\": 0},\n        {\"team\": \"Germany\", \"matchday\": 3, \"point\": 3, \"diff\": -2},\n        {\"team\": \"Mexico\", \"matchday\": 1, \"point\": 3, \"diff\": 1},\n        {\"team\": \"Mexico\", \"matchday\": 2, \"point\": 6, \"diff\": 2},\n        {\"team\": \"Mexico\", \"matchday\": 3, \"point\": 6, \"diff\": -1},\n        {\"team\": \"South Korea\", \"matchday\": 1, \"point\": 0, \"diff\": -1},\n        {\"team\": \"South Korea\", \"matchday\": 2, \"point\": 0, \"diff\": -2},\n        {\"team\": \"South Korea\", \"matchday\": 3, \"point\": 3, \"diff\": 0},\n        {\"team\": \"Sweden\", \"matchday\": 1, \"point\": 3, \"diff\": 1},\n        {\"team\": \"Sweden\", \"matchday\": 2, \"point\": 3, \"diff\": 0},\n        {\"team\": \"Sweden\", \"matchday\": 3, \"point\": 6, \"diff\": 3},\n    ]\n)\n\ncolor_scale = alt.Scale(\n    domain=[\"Germany\", \"Mexico\", \"South Korea\", \"Sweden\"],\n    range=[\"#000000\", \"#127153\", \"#C91A3C\", \"#0C71AB\"],\n)\n\nalt.Chart(source).mark_line().encode(\n    x=\"matchday:O\", y=\"rank:O\", color=alt.Color(\"team:N\").scale(color_scale)\n).transform_window(\n    rank=\"rank()\",\n    sort=[\n        alt.SortField(\"point\", order=\"descending\"),\n        alt.SortField(\"diff\", order=\"descending\"),\n    ],\n    groupby=[\"matchday\"],\n).properties(title=\"World Cup 2018: Group F Rankings\")\n"
  },
  {
    "path": "tests/expr/__init__.py",
    "content": ""
  },
  {
    "path": "tests/expr/test_expr.py",
    "content": "from __future__ import annotations\n\nimport datetime as dt\nimport operator\nimport sys\nfrom inspect import classify_class_attrs, getmembers, signature\nfrom typing import TYPE_CHECKING, Any, TypeVar, cast\n\nimport numpy as np\nimport pytest\nfrom jsonschema.exceptions import ValidationError\n\nfrom altair import datum, expr, ExprRef\nfrom altair.expr import _ExprMeta\nfrom altair.expr.core import Expression, GetAttrExpression\n\nif TYPE_CHECKING:\n    from collections.abc import Callable, Iterable, Iterator\n    from inspect import _IntrospectableCallable\n\nT = TypeVar(\"T\")\n\n# This maps vega expression function names to the Python name\nVEGA_REMAP = {\"if_\": \"if\"}\n\n\ndef _is_property(obj: Any, /) -> bool:\n    return isinstance(obj, property)\n\n\ndef _get_property_names(tp: type[Any], /) -> Iterator[str]:\n    for nm, _ in getmembers(tp, _is_property):\n        yield nm\n\n\ndef signature_n_params(\n    obj: _IntrospectableCallable,\n    /,\n    *,\n    exclude: Iterable[str] = frozenset((\"cls\", \"self\")),\n) -> int:\n    sig = signature(obj)\n    return len(set(sig.parameters).difference(exclude))\n\n\ndef _iter_classmethod_specs(\n    tp: type[T], /\n) -> Iterator[tuple[str, Callable[..., Expression], int]]:\n    for m in classify_class_attrs(tp):\n        if m.kind == \"class method\" and m.defining_class is tp:\n            name = m.name\n            fn = cast(\"classmethod[T, ..., Expression]\", m.object).__func__\n            yield (VEGA_REMAP.get(name, name), fn.__get__(tp), signature_n_params(fn))\n\n\ndef test_unary_operations():\n    OP_MAP = {\"-\": operator.neg, \"+\": operator.pos}\n    for op, func in OP_MAP.items():\n        z = func(datum.xxx)\n        assert repr(z) == f\"({op}datum.xxx)\"\n\n\ndef test_binary_operations():\n    OP_MAP = {\n        \"+\": operator.add,\n        \"-\": operator.sub,\n        \"*\": operator.mul,\n        \"/\": operator.truediv,\n        \"%\": operator.mod,\n        \"===\": operator.eq,\n        \"<\": operator.lt,\n        \"<=\": operator.le,\n        \">\": operator.gt,\n        \">=\": operator.ge,\n        \"!==\": operator.ne,\n        \"&&\": operator.and_,\n        \"||\": operator.or_,\n    }\n    # When these are on the RHS, the opposite is evaluated instead.\n    INEQ_REVERSE = {\n        \">\": \"<\",\n        \"<\": \">\",\n        \"<=\": \">=\",\n        \">=\": \"<=\",\n        \"===\": \"===\",\n        \"!==\": \"!==\",\n    }\n    for op, func in OP_MAP.items():\n        z1 = func(datum.xxx, 2)\n        assert repr(z1) == f\"(datum.xxx {op} 2)\"\n\n        z2 = func(2, datum.xxx)\n        if op in INEQ_REVERSE:\n            assert repr(z2) == f\"(datum.xxx {INEQ_REVERSE[op]} 2)\"\n        else:\n            assert repr(z2) == f\"(2 {op} datum.xxx)\"\n\n        z3 = func(datum.xxx, datum.yyy)\n        assert repr(z3) == f\"(datum.xxx {op} datum.yyy)\"\n\n\ndef test_abs():\n    z = abs(datum.xxx)\n    assert repr(z) == \"abs(datum.xxx)\"\n\n\n@pytest.mark.parametrize((\"veganame\", \"fn\", \"n_params\"), _iter_classmethod_specs(expr))\ndef test_expr_methods(\n    veganame: str, fn: Callable[..., Expression], n_params: int\n) -> None:\n    datum_names = [f\"col_{n}\" for n in range(n_params)]\n    datum_args = \",\".join(f\"datum.{nm}\" for nm in datum_names)\n\n    fn_call = fn(*(GetAttrExpression(\"datum\", nm) for nm in datum_names))\n    assert repr(fn_call) == f\"{veganame}({datum_args})\"\n\n\n@pytest.mark.parametrize(\"constname\", _get_property_names(_ExprMeta))\ndef test_expr_consts(constname: str):\n    \"\"\"Test all constants defined in expr.consts.\"\"\"\n    const = getattr(expr, constname)\n    z = const * datum.xxx\n    assert repr(z) == f\"({constname} * datum.xxx)\"\n\n\n@pytest.mark.parametrize(\"constname\", _get_property_names(_ExprMeta))\ndef test_expr_consts_immutable(constname: str):\n    \"\"\"Ensure e.g `alt.expr.PI = 2` is prevented.\"\"\"\n    if sys.version_info >= (3, 11):\n        pattern = f\"property {constname!r}.+has no setter\"\n    else:\n        pattern = f\"can't set attribute {constname!r}\"\n    with pytest.raises(AttributeError, match=pattern):\n        setattr(expr, constname, 2)\n\n\ndef test_json_reprs():\n    \"\"\"Test JSON representations of special values.\"\"\"\n    assert repr(datum.xxx == None) == \"(datum.xxx === null)\"  # noqa: E711\n    assert repr(datum.xxx == False) == \"(datum.xxx === false)\"  # noqa: E712\n    assert repr(datum.xxx == True) == \"(datum.xxx === true)\"  # noqa: E712\n    assert repr(datum.xxx == np.int64(0)) == \"(datum.xxx === 0)\"\n\n\ndef test_to_dict():\n    ex = datum.xxx * 2 > datum.yyy\n    assert ex.to_dict() == repr(ex)\n\n\ndef test_copy():\n    ex = datum.xxx * 2 > abs(datum.yyy)\n    ex_copy = ex.copy()\n    assert ex.to_dict() == ex_copy.to_dict()\n\n\ndef test_datum_getattr():\n    x = datum[\"foo\"]\n    assert repr(x) == \"datum['foo']\"\n\n    magic_attr = \"__magic__\"\n    with pytest.raises(AttributeError):\n        getattr(datum, magic_attr)\n\n\ndef test_expression_getitem():\n    x = datum.foo[0]\n    assert repr(x) == \"datum.foo[0]\"\n\n\ndef test_expression_function_expr():\n    # test including an expr.<CONSTANT> should return an ExprRef\n    er = expr(expr.PI * 2)\n    assert isinstance(er, ExprRef)\n    assert repr(er) == \"ExprRef({\\n  expr: (PI * 2)\\n})\"\n\n\ndef test_expression_function_string():\n    # expr() can only work with str\n    er = expr(\"2 * 2\")\n    assert isinstance(er, ExprRef)\n    assert repr(er) == \"ExprRef({\\n  expr: '2 * 2'\\n})\"\n\n\ndef test_expression_function_nostring():\n    # expr() can only work with str otherwise\n    # should raise a SchemaValidationError\n    with pytest.raises(ValidationError):\n        expr(2 * 2)  # pyright: ignore\n\n    with pytest.raises(ValidationError):\n        expr([\"foo\", \"bah\"])  # pyright: ignore\n\n\n@pytest.mark.parametrize(\n    (\"value\", \"expected\"),\n    [\n        (dt.date(2000, 1, 1), \"datetime(2000,0,1)\"),\n        (dt.datetime(2000, 1, 1), \"datetime(2000,0,1,0,0,0,0)\"),\n        (dt.datetime(2001, 1, 1, 9, 30, 0, 2999), \"datetime(2001,0,1,9,30,0,2)\"),\n        (\n            dt.datetime(2003, 5, 1, 1, 30, tzinfo=dt.timezone.utc),\n            \"utc(2003,4,1,1,30,0,0)\",\n        ),\n    ],\n    ids=[\"date\", \"datetime (no time)\", \"datetime (microseconds)\", \"datetime (UTC)\"],\n)\ndef test_expr_datetime(value: Any, expected: str) -> None:\n    r_datum = datum.date >= value\n    assert isinstance(r_datum, Expression)\n    assert repr(r_datum) == f\"(datum.date >= {expected})\"\n\n\n@pytest.mark.parametrize(\n    \"tzinfo\",\n    [\n        dt.timezone(dt.timedelta(hours=2), \"UTC+2\"),\n        dt.timezone(dt.timedelta(hours=1), \"BST\"),\n        dt.timezone(dt.timedelta(hours=-7), \"pdt\"),\n        dt.timezone(dt.timedelta(hours=-3), \"BRT\"),\n        dt.timezone(dt.timedelta(hours=9), \"UTC\"),\n        dt.timezone(dt.timedelta(minutes=60), \"utc\"),\n    ],\n)\ndef test_expr_datetime_unsupported_timezone(tzinfo: dt.timezone) -> None:\n    datetime = dt.datetime(2003, 5, 1, 1, 30)\n\n    result = datum.date == datetime\n    assert repr(result) == \"(datum.date === datetime(2003,4,1,1,30,0,0))\"\n\n    with pytest.raises(TypeError, match=r\"Unsupported timezone.+\\n.+UTC.+local\"):\n        datum.date == datetime.replace(tzinfo=tzinfo)  # noqa: B015\n"
  },
  {
    "path": "tests/test_datasets.py",
    "content": "from __future__ import annotations\n\nimport datetime as dt\nimport re\nimport sys\nfrom functools import partial\nfrom importlib import import_module\nfrom importlib.util import find_spec\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, cast, get_args\nfrom urllib.error import URLError\n\nimport pytest\nfrom narwhals.stable import v1 as nw\nfrom narwhals.stable.v1 import dependencies as nw_dep\n\nfrom altair.datasets import Loader\nfrom altair.datasets._exceptions import AltairDatasetsError\nfrom altair.datasets._typing import Dataset, Metadata\nfrom tests import no_xdist, skip_requires_geopandas, skip_requires_pyarrow\n\nif TYPE_CHECKING:\n    from collections.abc import Mapping\n    from pathlib import Path\n    from typing import Literal, TypeAlias\n\n    import pandas as pd\n    import polars as pl\n    from _pytest.mark import ParameterSet  # pyright: ignore[reportPrivateImportUsage]\n\n    from altair.datasets._reader import _Backend, _PandasAny, _Polars, _PyArrow\n    from altair.vegalite.v6.schema._typing import OneOrSeq\n\n    PolarsLoader: TypeAlias = Loader[pl.DataFrame, pl.LazyFrame]\n\n# =============================================================================\n# Test Configuration and Fixtures\n# =============================================================================\n\ndatasets_debug: pytest.MarkDecorator = pytest.mark.datasets_debug()\n\"\"\"\nCustom ``pytest.mark`` decorator.\n\nUse for more exhaustive tests that require many requests.\n\n**Disabled** by default in ``pyproject.toml``:\n\n    [tool.pytest.ini_options]\n    addopts = ...\n\"\"\"\n\n_backend_params: Mapping[_Backend, ParameterSet] = {\n    \"polars\": pytest.param(\"polars\"),\n    \"pandas\": pytest.param(\"pandas\"),\n    \"pandas[pyarrow]\": pytest.param(\"pandas[pyarrow]\", marks=skip_requires_pyarrow()),\n    \"pyarrow\": pytest.param(\"pyarrow\", marks=skip_requires_pyarrow()),\n}\n\nbackends: pytest.MarkDecorator = pytest.mark.parametrize(\n    \"backend\", _backend_params.values()\n)\nbackends_no_polars: pytest.MarkDecorator = pytest.mark.parametrize(\n    \"backend\", [v for k, v in _backend_params.items() if k != \"polars\"]\n)\nbackends_pandas_any: pytest.MarkDecorator = pytest.mark.parametrize(\n    \"backend\", [v for k, v in _backend_params.items() if \"pandas\" in k]\n)\nbackends_pyarrow: pytest.MarkDecorator = pytest.mark.parametrize(\n    \"backend\", [v for k, v in _backend_params.items() if k == \"pyarrow\"]\n)\n\ndatasets_all: pytest.MarkDecorator = pytest.mark.parametrize(\"name\", get_args(Dataset))\ndatasets_spatial: pytest.MarkDecorator = pytest.mark.parametrize(\n    \"name\",\n    [\"earthquakes\", \"london_boroughs\", \"london_tube_lines\", \"us_10m\", \"world_110m\"],\n)\n\nCACHE_ENV_VAR: Literal[\"ALTAIR_DATASETS_DIR\"] = \"ALTAIR_DATASETS_DIR\"\n\n\n@pytest.fixture(scope=\"session\")\ndef polars_loader() -> PolarsLoader:\n    \"\"\"Fastest and **most reliable** backend.\"\"\"\n    load = Loader.from_backend(\"polars\")\n    if load.cache.is_not_active():\n        load.cache.path = load.cache._XDG_CACHE\n    return load\n\n\n@pytest.fixture\ndef metadata_columns() -> frozenset[str]:\n    return Metadata.__required_keys__.union(Metadata.__optional_keys__)\n\n\n# =============================================================================\n# Utility Functions\n# =============================================================================\n\n\ndef is_frame_backend(frame: Any, backend: _Backend, /) -> bool:\n    pandas_any: set[_PandasAny] = {\"pandas\", \"pandas[pyarrow]\"}\n    if backend in pandas_any:\n        return nw_dep.is_pandas_dataframe(frame)\n    elif backend == \"pyarrow\":\n        return nw_dep.is_pyarrow_table(frame)\n    elif backend == \"polars\":\n        return nw_dep.is_polars_dataframe(frame)\n    else:\n        raise TypeError(backend)\n\n\ndef is_loader_backend(loader: Loader[Any, Any], backend: _Backend, /) -> bool:\n    return repr(loader) == f\"{type(loader).__name__}[{backend}]\"\n\n\ndef is_polars_backed_pyarrow(loader: Loader[Any, Any], /) -> bool:\n    \"\"\"\n    User requested ``pyarrow``, but also has ``polars`` installed.\n\n    Both support nested datatypes, which are required for spatial json.\n    \"\"\"\n    return (\n        is_loader_backend(loader, \"pyarrow\")\n        and \"earthquakes\" in loader._reader.profile()[\"supported\"]\n    )\n\n\ndef is_geopandas_backed_pandas(loader: Loader[Any, Any], /) -> bool:\n    return (\n        is_loader_backend(loader, \"pandas\")\n        or is_loader_backend(loader, \"pandas[pyarrow]\")\n    ) and \"earthquakes\" in loader._reader.profile()[\"supported\"]\n\n\n# =============================================================================\n# Backend and Loader Tests\n# =============================================================================\n\n\n@backends\ndef test_metadata_columns(backend: _Backend, metadata_columns: frozenset[str]) -> None:\n    \"\"\"Ensure all backends will query the same column names.\"\"\"\n    load = Loader.from_backend(backend)\n    schema_columns = load._reader._scan_metadata().collect().columns\n    assert set(schema_columns) == metadata_columns\n\n\n@backends\ndef test_loader_from_backend(backend: _Backend) -> None:\n    load = Loader.from_backend(backend)\n    assert is_loader_backend(load, backend)\n\n\n@backends\ndef test_loader_url(backend: _Backend) -> None:\n    load = Loader.from_backend(backend)\n    url = load.url(\"volcano\")\n    assert isinstance(url, str)\n    assert \"vega-datasets\" in url\n\n\n@no_xdist\ndef test_load_infer_priority(monkeypatch: pytest.MonkeyPatch) -> None:\n    \"\"\"\n    Ensure the **most reliable**, available backend is selected.\n\n    See Also\n    --------\n    ``altair.datasets._reader.infer_backend``\n    \"\"\"\n    import altair.datasets._loader\n    from altair.datasets import load\n\n    assert is_loader_backend(load, \"polars\")\n    monkeypatch.delattr(altair.datasets._loader, \"load\", raising=False)\n    monkeypatch.setitem(sys.modules, \"polars\", None)\n\n    from altair.datasets import load\n\n    if find_spec(\"pyarrow\") is None:\n        # NOTE: We can end the test early for the CI job that removes `pyarrow`\n        assert is_loader_backend(load, \"pandas\")\n        monkeypatch.delattr(altair.datasets._loader, \"load\")\n        monkeypatch.setitem(sys.modules, \"pandas\", None)\n        with pytest.raises(AltairDatasetsError, match=r\"no.+backend\"):\n            from altair.datasets import load\n    else:\n        assert is_loader_backend(load, \"pandas[pyarrow]\")\n        monkeypatch.delattr(altair.datasets._loader, \"load\")\n        monkeypatch.setitem(sys.modules, \"pyarrow\", None)\n\n        from altair.datasets import load\n\n        assert is_loader_backend(load, \"pandas\")\n        monkeypatch.delattr(altair.datasets._loader, \"load\")\n        monkeypatch.setitem(sys.modules, \"pandas\", None)\n        monkeypatch.delitem(sys.modules, \"pyarrow\")\n        monkeypatch.setitem(sys.modules, \"pyarrow\", import_module(\"pyarrow\"))\n        from altair.datasets import load\n\n        assert is_loader_backend(load, \"pyarrow\")\n        monkeypatch.delattr(altair.datasets._loader, \"load\")\n        monkeypatch.setitem(sys.modules, \"pyarrow\", None)\n\n        with pytest.raises(AltairDatasetsError, match=r\"no.+backend\"):\n            from altair.datasets import load\n\n\n@backends\ndef test_load_call(backend: _Backend, monkeypatch: pytest.MonkeyPatch) -> None:\n    \"\"\"Test that the load function can be called with different backends.\"\"\"\n    import altair.datasets._loader\n\n    monkeypatch.delattr(altair.datasets._loader, \"load\", raising=False)\n    from altair.datasets import load\n\n    assert is_loader_backend(load, \"polars\")\n    default = load(\"cars\")\n    df = load(\"cars\", backend=backend)\n    default_2 = load(\"cars\")\n    assert nw_dep.is_polars_dataframe(default)\n    assert is_frame_backend(df, backend)\n    assert nw_dep.is_polars_dataframe(default_2)\n\n\n@backends\ndef test_loader_call(backend: _Backend) -> None:\n    load = Loader.from_backend(backend)\n\n    if backend == \"pyarrow\":\n        # PyArrow has a known limitation with non-ISO date formats in CSV\n        # The stocks dataset has dates like \"Jan 1 2000\" which PyArrow cannot parse\n        # This should raise an informative AltairDatasetsError\n        with pytest.raises(\n            AltairDatasetsError, match=\"PyArrow cannot parse date format\"\n        ):\n            load(\"stocks\", \".csv\")\n    else:\n        # Other backends should work normally\n        frame = load(\"stocks\", \".csv\")\n        assert nw_dep.is_into_dataframe(frame)\n        nw_frame = nw.from_native(frame)\n        assert set(nw_frame.columns) == {\"symbol\", \"date\", \"price\"}\n\n\n# =============================================================================\n# URL and Dataset Discovery Tests\n# =============================================================================\n\n\ndef test_url_no_backend(monkeypatch: pytest.MonkeyPatch) -> None:\n    from altair.datasets._cache import csv_cache\n    from altair.datasets._reader import infer_backend\n\n    priority: Any = (\n        \"nonexistent_mod_1\",\n        \"nonexistent_mod_2\",\n        \"nonexistent_mod_3\",\n        \"nonexistent_mod_4\",\n    )\n    assert csv_cache._mapping == {}\n    with pytest.raises(AltairDatasetsError):\n        infer_backend(priority=priority)\n\n    url = csv_cache.url\n    # Test that URLs are valid strings pointing to vega-datasets\n    assert isinstance(url(\"jobs\"), str)\n    assert \"vega-datasets\" in url(\"jobs\")\n    assert csv_cache._mapping != {}\n\n    # Test a few representative datasets instead of all 15+\n    assert isinstance(url(\"cars\"), str)\n    assert \"vega-datasets\" in url(\"cars\")\n    assert isinstance(url(\"flights_10k\"), str)\n    assert \"vega-datasets\" in url(\"flights_10k\")\n\n    if find_spec(\"vegafusion\"):\n        assert isinstance(url(\"flights_3m\"), str)\n        assert \"vega-datasets\" in url(\"flights_3m\")\n\n    with monkeypatch.context() as mp:\n        mp.setitem(sys.modules, \"vegafusion\", None)\n        with pytest.raises(AltairDatasetsError, match=r\".parquet.+require.+vegafusion\"):\n            url(\"flights_3m\")\n    with pytest.raises(\n        TypeError, match=\"'nonexistent data' does not refer to a known dataset\"\n    ):\n        url(\"nonexistent data\")\n\n\n# =============================================================================\n# Error Handling and Edge Cases\n# =============================================================================\n\n\n@backends\ndef test_dataset_not_found(backend: _Backend) -> None:\n    \"\"\"Various queries that should **always raise** due to non-existent dataset.\"\"\"\n    load = Loader.from_backend(backend)\n    real_name: Literal[\"disasters\"] = \"disasters\"\n    nonexistent_name: Literal[\"nonexistent name\"] = \"nonexistent name\"\n    unsupported_suffix: Literal[\"unsupported suffix\"] = \"unsupported suffix\"\n    incorrect_suffix: Literal[\".json\"] = \".json\"\n    ERR_NO_RESULT = ValueError\n    MSG_NO_RESULT = \"Found no results for\"\n    NAME = \"dataset_name\"\n    SUFFIX = \"suffix\"\n\n    with pytest.raises(\n        ERR_NO_RESULT,\n        match=re.compile(rf\"{MSG_NO_RESULT}.+{NAME}.+{nonexistent_name}\", re.DOTALL),\n    ):\n        load.url(nonexistent_name)\n    with pytest.raises(\n        TypeError,\n        match=re.compile(\n            rf\"Expected '{SUFFIX}' to be one of.+\\(.+\\).+but got.+{unsupported_suffix}\",\n            re.DOTALL,\n        ),\n    ):\n        load.url(real_name, unsupported_suffix)  # type: ignore[arg-type]\n    with pytest.raises(\n        ERR_NO_RESULT,\n        match=re.compile(\n            rf\"{MSG_NO_RESULT}.+{NAME}.+{real_name}.+{SUFFIX}.+{incorrect_suffix}\",\n            re.DOTALL,\n        ),\n    ):\n        load.url(real_name, incorrect_suffix)\n\n\ndef test_reader_missing_dependencies() -> None:\n    from altair.datasets._reader import _import_guarded\n\n    nonexistent_name = \"not_a_real_package\"\n    real_name = \"altair\"\n    nonexistent_extra = \"AnotherNonexistentPackage\"\n    backend = f\"{real_name}[{nonexistent_extra}]\"\n    with pytest.raises(\n        ModuleNotFoundError,\n        match=re.compile(\n            rf\"{nonexistent_name}.+requires.+{nonexistent_name}.+but.+{nonexistent_name}.+not.+found.+pip install {nonexistent_name}\",\n            flags=re.DOTALL,\n        ),\n    ):\n        _import_guarded(nonexistent_name)  # type: ignore\n    with pytest.raises(\n        ModuleNotFoundError,\n        match=re.compile(\n            rf\"{re.escape(backend)}.+requires.+'{real_name}', '{nonexistent_extra}'.+but.+{nonexistent_extra}.+not.+found.+pip install {nonexistent_extra}\",\n            flags=re.DOTALL,\n        ),\n    ):\n        _import_guarded(backend)  # type: ignore\n\n\ndef test_reader_missing_implementation() -> None:\n    from altair.datasets._constraints import is_csv\n    from altair.datasets._reader import reader\n    from altair.datasets._readimpl import read\n\n    def func(*args, **kwds) -> pd.DataFrame:\n        if TYPE_CHECKING:\n            return pd.DataFrame()\n\n    name = \"pandas\"\n    rd = reader((read(func, is_csv),), name=name)\n    with pytest.raises(\n        AltairDatasetsError,\n        match=re.compile(rf\"Unable.+parquet.+native.+{name}\", flags=re.DOTALL),\n    ):\n        rd.dataset(\"flights_3m\")\n    with pytest.raises(\n        AltairDatasetsError,\n        match=re.compile(r\"Found no.+support.+flights.+json\", flags=re.DOTALL),\n    ):\n        rd.dataset(\"flights_2k\")\n    with pytest.raises(\n        AltairDatasetsError, match=re.compile(r\"Image data is non-tabular\")\n    ):\n        rd.dataset(\"icon_7zip\")\n\n\n# =============================================================================\n# Caching Tests\n# =============================================================================\n\n\n@backends\ndef test_reader_cache(\n    backend: _Backend, monkeypatch: pytest.MonkeyPatch, tmp_path: Path\n) -> None:\n    \"\"\"Ensure cache hits avoid network activity.\"\"\"\n    import polars as pl\n    from polars.testing import assert_frame_equal\n\n    monkeypatch.setenv(CACHE_ENV_VAR, str(tmp_path))\n    load = Loader.from_backend(backend)\n    assert load.cache.is_active()\n    cache_dir = load.cache.path\n    assert cache_dir == tmp_path\n    assert tuple(load.cache) == ()\n\n    # Use smaller datasets for faster testing\n    lookup_groups = load(\"lookup_groups\")\n    load(\"lookup_people\")\n    load(\"iowa_electricity\")\n    load(\"global_temp\")\n    cached_paths = tuple(load.cache)\n    assert len(cached_paths) == 4\n\n    if nw_dep.is_polars_dataframe(lookup_groups):\n        left, right = (\n            lookup_groups,\n            cast(\"pl.DataFrame\", load(\"lookup_groups\", \".csv\")),\n        )\n    else:\n        left, right = (\n            pl.DataFrame(lookup_groups),\n            pl.DataFrame(load(\"lookup_groups\", \".csv\")),\n        )\n\n    assert_frame_equal(left, right)\n    assert len(tuple(load.cache)) == 4\n    assert cached_paths == tuple(load.cache)\n    load(\"iowa_electricity\", \".csv\")\n    load(\"global_temp\", \".csv\")\n    load(\"global-temp.csv\")\n    assert len(tuple(load.cache)) == 4\n    assert cached_paths == tuple(load.cache)\n    load(\"lookup_people\")\n    load(\"lookup_people.csv\")\n    load(\"lookup_people\", \".csv\")\n    load(\"lookup_people\")\n    assert len(tuple(load.cache)) == 4\n    assert cached_paths == tuple(load.cache)\n\n\n@datasets_debug\n@backends\ndef test_reader_cache_exhaustive(\n    backend: _Backend,\n    monkeypatch: pytest.MonkeyPatch,\n    tmp_path: Path,\n    polars_loader: PolarsLoader,\n) -> None:\n    \"\"\"\n    Fully populate and then purge the cache for all backends.\n\n    Notes\n    -----\n    - Does not attempt to read the files\n    - Checking we can support pre-downloading and safely deleting\n        - Requests work the same for all backends\n        - The logic for detecting the cache contents uses ``narwhals``\n        - Here, we're testing that these ``narwhals`` operations are consistent\n    - `DatasetCache.download_all` is expensive for CI, so aiming for it to run **at most once**\n        - 34-45s per call (4x backends)\n    \"\"\"\n    polars_loader.cache.download_all()\n    CLONED: Path = tmp_path / \"clone\"\n    CLONED.mkdir(exist_ok=True)\n\n    # Copy the cache contents\n    import shutil\n\n    shutil.copytree(polars_loader.cache.path, CLONED, dirs_exist_ok=True)\n\n    monkeypatch.setenv(CACHE_ENV_VAR, str(tmp_path))\n    load = Loader.from_backend(backend)\n    assert load.cache.is_active()\n    cache_dir = load.cache.path\n    assert cache_dir == tmp_path\n    assert tuple(load.cache) == (CLONED,)\n    load.cache.path = CLONED\n    cached_paths = tuple(load.cache)\n    assert cached_paths != ()\n\n    # NOTE: Approximating all datasets downloaded (minimum expected count)\n    assert len(cached_paths) >= 70\n    assert all(bool(fp.exists() and fp.stat().st_size) for fp in load.cache)\n    # NOTE: Confirm this is a no-op (already downloaded)\n    load.cache.download_all()\n    assert len(cached_paths) == len(tuple(load.cache))\n\n    # NOTE: Ensure unrelated files in the directory are not removed during cache clearing\n    test_file: Path = tmp_path / \"test_file.json\"\n    test_file.touch(exist_ok=False)\n    load.cache.clear()\n\n    remaining = tuple(tmp_path.iterdir())\n    assert set(remaining) == {test_file, CLONED}\n    test_file.unlink()  # Remove the test file\n    shutil.rmtree(CLONED)  # Remove the cloned directory\n\n\n@no_xdist\ndef test_reader_cache_disable(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:\n    from altair.datasets import load\n\n    monkeypatch.setenv(CACHE_ENV_VAR, str(tmp_path))\n    assert load.cache.is_active()\n    assert load.cache.path == tmp_path\n    assert load.cache.is_empty()\n    load(\"cars\")\n    assert not load.cache.is_empty()\n    # ISSUE: https://github.com/python/mypy/issues/3004\n    load.cache.path = None\n    assert load.cache.is_not_active()\n    with pytest.raises(\n        ValueError,\n        match=re.compile(\n            rf\"Cache.+unset.+{CACHE_ENV_VAR}.+\\.cache\\.path =\", flags=re.DOTALL\n        ),\n    ):\n        tuple(load.cache)\n    load.cache.path = tmp_path\n    assert load.cache.is_active()\n    assert load.cache.path == tmp_path\n    assert not load.cache.is_empty()\n\n\n# =============================================================================\n# Format-Specific Tests\n# =============================================================================\n\n\n@pytest.mark.parametrize(\n    \"name\", [\"cars\", \"movies\", \"wheat\", \"barley\", \"gapminder\", \"income\", \"burtin\"]\n)\n@pytest.mark.parametrize(\"fallback\", [\"polars\", None])\n@backends_pyarrow\ndef test_pyarrow_read_json(\n    backend: _PyArrow,\n    fallback: _Polars | None,\n    name: Dataset,\n    monkeypatch: pytest.MonkeyPatch,\n) -> None:\n    if fallback is None:\n        monkeypatch.setitem(sys.modules, \"polars\", None)\n    load = Loader.from_backend(backend)\n    assert load(name, \".json\")\n\n\n@datasets_spatial\n@backends_no_polars\n@pytest.mark.geospatial\n@skip_requires_geopandas\ndef test_spatial(backend: _Backend, name: Dataset) -> None:\n    load = Loader.from_backend(backend)\n\n    # Specify layer parameter for datasets with multiple layers to avoid warnings\n    layer_kwargs = {}\n    if name == \"us_10m\":\n        layer_kwargs = {\"layer\": \"counties\"}\n    elif name == \"world_110m\":\n        layer_kwargs = {\"layer\": \"countries\"}\n\n    if is_polars_backed_pyarrow(load):\n        assert nw_dep.is_pyarrow_table(load(name, **layer_kwargs))\n    elif is_geopandas_backed_pandas(load):\n        import geopandas\n\n        assert isinstance(load(name, **layer_kwargs), geopandas.GeoDataFrame)\n    else:\n        pattern = re.compile(\n            rf\"{name}.+geospatial.+native.+{re.escape(backend)}.+try.+polars.+url\",\n            flags=re.DOTALL | re.IGNORECASE,\n        )\n        with pytest.raises(AltairDatasetsError, match=pattern):\n            load(name, **layer_kwargs)\n\n\n@backends\ndef test_tsv(backend: _Backend) -> None:\n    load = Loader.from_backend(backend)\n    is_frame_backend(load(\"unemployment\", \".tsv\"), backend)\n\n\n# =============================================================================\n# Comprehensive Dataset Tests\n# =============================================================================\n\n\n@datasets_all\n@datasets_debug\ndef test_all_datasets(polars_loader: PolarsLoader, name: Dataset) -> None:\n    \"\"\"\n    Test that all datasets can be loaded with the polars backend.\n\n    - For image files (e.g., icon_7zip, ffox, gimp), we expect an error because these are not tabular data.\n      The error message should be clear and helpful, and this is the correct behavior.\n    - Dataset names are valid Python identifiers, but the URLs may differ; we do not test URL construction here.\n    - This test checks Altair's integration with the datasets API, not the validity of upstream datasets or backends.\n    \"\"\"\n    if name in {\"icon_7zip\", \"ffox\", \"gimp\"}:\n        # These are image files that should raise an error when loaded as tabular data\n        # The error message contains the actual filename (e.g., '7zip.png', 'ffox.png', 'gimp.png')\n        pattern = re.compile(\n            r\"Unable to load '.+\\.png' as tabular data\",\n            flags=re.DOTALL | re.IGNORECASE,\n        )\n        with pytest.raises(AltairDatasetsError, match=pattern):\n            polars_loader(name)\n    else:\n        frame = polars_loader(name)\n        assert nw_dep.is_polars_dataframe(frame)\n\n\n# =============================================================================\n# Network and Connection Tests\n# =============================================================================\n\n\ndef _raise_exception(e: type[Exception], *args: Any, **kwds: Any):\n    raise e(*args, **kwds)\n\n\ndef test_no_remote_connection(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:\n    from polars.testing import assert_frame_equal\n\n    load = Loader.from_backend(\"polars\")\n    load.cache.path = tmp_path\n    load(\"london_centroids\")\n    load(\"stocks\")\n    load(\"driving\")\n    cached_paths = tuple(tmp_path.iterdir())\n    assert len(cached_paths) == 3\n    raiser = partial(_raise_exception, URLError)\n    with monkeypatch.context() as mp:\n        mp.setattr(load._reader._opener, \"open\", raiser)\n        # Existing cache entries don't trigger an error\n        load(\"london_centroids\")\n        load(\"stocks\")\n        load(\"driving\")\n        # Mocking cache-miss without remote conn\n        with pytest.raises(URLError):\n            load(\"birdstrikes\")\n        assert len(tuple(tmp_path.iterdir())) == 3\n\n    # Now we can get a cache-hit\n    frame = load(\"birdstrikes\")\n    assert nw_dep.is_polars_dataframe(frame)\n    assert len(tuple(tmp_path.iterdir())) == 4\n\n    with monkeypatch.context() as mp:\n        mp.setattr(load._reader._opener, \"open\", raiser)\n        # Here, the remote conn isn't considered - we already have the file\n        frame_from_cache = load(\"birdstrikes\")\n        assert len(tuple(tmp_path.iterdir())) == 4\n    assert_frame_equal(frame, frame_from_cache)\n\n\n# =============================================================================\n# Data Type and Schema Tests\n# =============================================================================\n\n\n@pytest.mark.parametrize(\n    (\"name\", \"column\"),\n    [\n        (\"cars\", \"Year\"),\n        (\"unemployment_across_industries\", \"date\"),\n        (\"flights_10k\", \"date\"),\n        (\"football\", \"date\"),\n        (\"crimea\", \"date\"),\n        (\"ohlc\", \"date\"),\n    ],\n)\ndef test_polars_date_read_json_roundtrip(\n    polars_loader: PolarsLoader, name: Dataset, column: str\n) -> None:\n    \"\"\"Ensure ``date`` columns are inferred using the roundtrip json -> csv method.\"\"\"\n    frame = polars_loader(name, \".json\")\n    tp = frame.schema.to_python()[column]\n    assert tp is dt.date or issubclass(tp, dt.date)\n\n\n@backends_pandas_any\n@pytest.mark.parametrize(\n    (\"name\", \"columns\"),\n    [\n        (\"birdstrikes\", \"Flight Date\"),\n        (\"cars\", \"Year\"),\n        (\"co2_concentration\", \"Date\"),\n        (\"crimea\", \"date\"),\n        (\"football\", \"date\"),\n        (\"iowa_electricity\", \"year\"),\n        (\"la_riots\", \"death_date\"),\n        (\"ohlc\", \"date\"),\n        (\"seattle_weather_hourly_normals\", \"date\"),\n        (\"seattle_weather\", \"date\"),\n        (\"sp500_2000\", \"date\"),\n        (\"unemployment_across_industries\", \"date\"),\n        (\"us_employment\", \"month\"),\n    ],\n)\ndef test_pandas_date_parse(\n    backend: _PandasAny,\n    name: Dataset,\n    columns: OneOrSeq[str],\n    polars_loader: PolarsLoader,\n) -> None:\n    \"\"\"\n    Ensure schema defaults are correctly parsed.\n\n    Notes\n    -----\n    - Depends on ``frictionless`` being able to detect the date/datetime columns.\n    - Not all format strings work\n    \"\"\"\n    date_columns: list[str] = [columns] if isinstance(columns, str) else list(columns)\n    load = Loader.from_backend(backend)\n    url = load.url(name)\n    kwds: dict[str, Any] = (\n        {\"convert_dates\": date_columns}\n        if url.endswith(\".json\")\n        else {\"parse_dates\": date_columns}\n    )\n    df_schema_derived: pd.DataFrame = load(name)\n    nw_schema = nw.from_native(df_schema_derived).schema\n    df_manually_specified: pd.DataFrame = load(name, **kwds)\n\n    assert set(date_columns).issubset(nw_schema)\n    for column in date_columns:\n        assert nw_schema[column] in {nw.Date, nw.Datetime}\n\n    assert nw_schema == nw.from_native(df_manually_specified).schema\n    # We do not assert that loading with parse_dates=[]/convert_dates=[] yields a\n    # different schema: backends may still infer date columns from the file.\n\n    # NOTE: Checking `polars` infers the same[1] as what `pandas` needs a hint for\n    # [1] Doesn't need to be exact, just recognize as *some kind* of date/datetime\n    pl_schema: pl.Schema = polars_loader(name).schema\n    for column in date_columns:\n        assert pl_schema[column].is_temporal()\n\n\n# =============================================================================\n# Data API Tests\n# =============================================================================\n\n\nclass TestDataObject:\n    \"\"\"Test the main DataObject functionality.\"\"\"\n\n    def test_list_datasets(self) -> None:\n        \"\"\"Test that list_datasets returns a list of available datasets.\"\"\"\n        from altair.datasets import data\n\n        datasets = data.list_datasets()\n        assert isinstance(datasets, list)\n        assert len(datasets) > 0\n        # Check that common datasets are present\n        common_datasets = [\"cars\", \"movies\", \"stocks\", \"penguins\"]\n        for dataset in common_datasets:\n            if dataset in datasets:\n                break\n        else:\n            pytest.fail(\"No common datasets found in list_datasets\")\n\n    def test_get_default_engine(self) -> None:\n        \"\"\"Test getting the default engine.\"\"\"\n        from altair.datasets import data\n\n        default_engine = data.get_default_engine()\n        assert default_engine in {\"pandas\", \"polars\", \"pandas[pyarrow]\", \"pyarrow\"}\n\n    def test_set_default_engine(self) -> None:\n        \"\"\"Test setting the default engine.\"\"\"\n        from altair.datasets import data\n\n        original_engine = data.get_default_engine()\n\n        data.set_default_engine(\"polars\")\n        assert data.get_default_engine() == \"polars\"\n\n        data.set_default_engine(\"pandas\")\n        assert data.get_default_engine() == \"pandas\"\n\n        data.set_default_engine(original_engine)\n\n    def test_nonexistent_dataset_attribute(self):\n        from altair.datasets import data\n\n        with pytest.raises(\n            AttributeError, match=\"Dataset 'nonexistent_dataset' not found\"\n        ):\n            # NOTE: Needing a type ignore here is a good thing\n            _ = data.nonexistent_dataset  # pyright: ignore[reportArgumentType]\n\n\nclass TestDataAPIIntegration:\n    \"\"\"Test integration scenarios with the data API.\"\"\"\n\n    def test_data_consistency(self) -> None:\n        \"\"\"Test that data loaded through different methods is consistent.\"\"\"\n        from altair.datasets import data\n\n        # Load through data API\n        cars_data_api = data.cars()\n\n        # Load through direct loader\n        from altair.datasets import Loader\n\n        loader = Loader.from_backend(\"pandas\")\n        cars_loader = loader(\"cars\")\n\n        # Both should have the same number of rows\n        assert len(cars_data_api) == len(cars_loader)\n\n\ndef test_unsupported_engine():\n    \"\"\"Test that unsupported engine raises appropriate error.\"\"\"\n    from altair.datasets import data\n\n    with pytest.raises(TypeError, match=\"Unknown backend\"):\n        # NOTE: Needing a type ignore here is a good thing\n        data.cars(engine=\"unsupported_engine\")  # pyright: ignore[reportArgumentType, reportCallIssue]\n"
  },
  {
    "path": "tests/test_examples.py",
    "content": "\"\"\"\nNote that this module dominates the testing time.\n\nTODO\n----\n- Research how this could be done with fixtures.\n\nOther optimization ideas\n------------------\nCache the calls to `compile` in `altair.utils.execeval`\n- The each file has every expression compiled 3x times\n- Would immediately reduce to 1x\n- Possible there are overlapping expressions between `examples_arguments_syntax` and `examples_methods_syntax`\n    - Could lead to further performance gains\n- All of the tests only call `eval_block` to operate on the finished chart\n    - The need to execute the code is not what is being tested\n\n\"\"\"\n\nfrom __future__ import annotations\n\nimport io\nfrom typing import Any\n\nimport altair as alt\nfrom altair.utils.execeval import eval_block\nfrom tests import (\n    distributed_examples,\n    ignore_DataFrameGroupBy,\n    skip_requires_vl_convert,\n    slow,\n)\n\n\n@ignore_DataFrameGroupBy\n@distributed_examples\ndef test_render_examples_to_chart(source: Any, filename: str) -> None:\n    chart = eval_block(source)\n    if chart is None:\n        msg = f\"Example file {filename} should define chart in its final statement.\"\n        raise ValueError(msg)\n    try:\n        assert isinstance(chart.to_dict(), dict)\n    except Exception as err:\n        msg = (\n            f\"Example file {filename} raised an exception when \"\n            f\"converting to a dict: {err}\"\n        )\n        raise AssertionError(msg) from err\n\n\n@ignore_DataFrameGroupBy\n@distributed_examples\ndef test_from_and_to_json_roundtrip(source: Any, filename: str) -> None:\n    \"\"\"\n    Tests if the to_json and from_json work for all examples in the Example Gallery.\n\n    (and by extension to_dict and from_dict)\n    \"\"\"\n    chart = eval_block(source)\n    if chart is None:\n        msg = f\"Example file {filename} should define chart in its final statement.\"\n        raise ValueError(msg)\n    try:\n        first_json = chart.to_json()\n        reconstructed_chart = alt.Chart.from_json(first_json)\n        # As the chart objects are not\n        # necessarily the same - they could use different objects to encode the same\n        # information - we do not test for equality of the chart objects, but rather\n        # for equality of the json strings.\n        second_json = reconstructed_chart.to_json()\n        assert first_json == second_json\n    except Exception as err:\n        msg = (\n            f\"Example file {filename} raised an exception when \"\n            f\"doing a json conversion roundtrip: {err}\"\n        )\n        raise AssertionError(msg) from err\n\n\n@slow\n@ignore_DataFrameGroupBy\n@distributed_examples\n@skip_requires_vl_convert\ndef test_render_examples_to_png(source: Any, filename: str) -> None:\n    chart = eval_block(source)\n    if chart is None:\n        msg = f\"Example file {filename} should define chart in its final statement.\"\n        raise ValueError(msg)\n    out = io.BytesIO()\n    chart.save(out, format=\"png\", engine=\"vl-convert\")\n    buf = out.getbuffer()\n    prefix = buf[:4].tobytes()\n    assert prefix == b\"\\x89PNG\"\n"
  },
  {
    "path": "tests/test_jupyter_chart.py",
    "content": "from importlib.metadata import version as importlib_version\n\nimport pandas as pd\nimport pytest\nfrom packaging.version import Version\n\nimport altair as alt\nfrom altair.datasets import data\n\n# If anywidget is not installed, we will skip the tests in this file.\ntry:\n    import anywidget  # noqa: F401\n\n    has_anywidget = True\nexcept ImportError:\n    has_anywidget = False\n\nif has_anywidget:\n    from altair.jupyter import jupyter_chart\nelse:\n    jupyter_chart = None  # type: ignore\n\nskip_requires_anywidget = pytest.mark.skipif(\n    not has_anywidget, reason=\"anywidget not importable\"\n)\n\n\ntry:\n    import vegafusion  # noqa: F401\n\n    transformers = [\"default\", \"vegafusion\"]\nexcept ImportError:\n    transformers = [\"default\"]\n\nparam_transformers = pytest.mark.parametrize(\"transformer\", transformers)\n\n\nif Version(importlib_version(\"ipywidgets\")) < Version(\"8.1.4\"):\n    # See https://github.com/vega/altair/issues/3234#issuecomment-2268515312\n    _filterwarn = pytest.mark.filterwarnings(\n        \"ignore:Deprecated in traitlets 4.1.*:DeprecationWarning\"\n    )\n    jupyter_marks: pytest.MarkDecorator = skip_requires_anywidget(\n        _filterwarn(param_transformers)\n    )\nelse:\n    jupyter_marks = skip_requires_anywidget(param_transformers)\n\n\n@jupyter_marks\ndef test_chart_with_no_interactivity(transformer):\n    with alt.data_transformers.enable(transformer):\n        source = pd.DataFrame(\n            {\n                \"a\": [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\"],\n                \"b\": [28, 55, 43, 91, 81, 53, 19, 87, 52],\n            }\n        )\n\n        chart = alt.Chart(source).mark_bar().encode(x=\"a\", y=\"b\")\n        widget = alt.JupyterChart(chart)\n\n        if transformer == \"vegafusion\":\n            # With the \"vegafusion\" transformer, the spec is not computed until the front-end\n            # sets the local_tz. Assign this property manually to simulate this.\n            widget.local_tz = \"UTC\"\n            assert widget.spec == chart.to_dict(format=\"vega\")\n        else:\n            assert widget.spec == chart.to_dict()\n\n        # There should be no params or selections initialized\n        assert len(widget.selections.trait_values()) == 0\n        assert len(widget.params.trait_values()) == 0\n\n\n@jupyter_marks\ndef test_interval_selection_example(transformer):\n    with alt.data_transformers.enable(transformer):\n        source = data.cars()\n        brush = alt.selection_interval(name=\"interval\")\n\n        chart = (\n            alt.Chart(source)\n            .mark_point()\n            .encode(\n                x=\"Horsepower:Q\",\n                y=\"Miles_per_Gallon:Q\",\n                color=alt.condition(brush, \"Cylinders:O\", alt.value(\"grey\")),\n            )\n            .add_params(brush)\n        )\n\n        widget = alt.JupyterChart(chart)\n\n        if transformer == \"vegafusion\":\n            widget.local_tz = \"UTC\"\n            assert widget.spec == chart.to_dict(format=\"vega\")\n        else:\n            assert widget.spec == chart.to_dict()\n\n        # There should be one selection and zero params\n        assert len(widget.selections.trait_values()) == 1\n        assert len(widget.params.trait_values()) == 0\n\n        # Check initial interval selection\n        selection = widget.selections.interval\n        assert isinstance(selection, jupyter_chart.IntervalSelection)\n        assert selection.value == {}\n        assert selection.store == []\n\n        # Simulate Vega signal update\n        store = [\n            {\n                \"unit\": \"\",\n                \"fields\": [\n                    {\"field\": \"Horsepower\", \"channel\": \"x\", \"type\": \"R\"},\n                    {\"field\": \"Miles_per_Gallon\", \"channel\": \"y\", \"type\": \"R\"},\n                ],\n                \"values\": [\n                    [40.0, 100],\n                    [25, 30],\n                ],\n            }\n        ]\n        widget._vl_selections = {\n            \"interval\": {\n                \"value\": {\n                    \"Horsepower\": [40.0, 100],\n                    \"Miles_per_Gallon\": [25, 30],\n                },\n                \"store\": store,\n            }\n        }\n\n        selection = widget.selections.interval\n        assert isinstance(selection, jupyter_chart.IntervalSelection)\n        assert selection.value == {\n            \"Horsepower\": [40.0, 100],\n            \"Miles_per_Gallon\": [25, 30],\n        }\n        assert selection.store == store\n\n\n@jupyter_marks\ndef test_index_selection_example(transformer):\n    with alt.data_transformers.enable(transformer):\n        source = data.cars()\n        brush = alt.selection_point(name=\"index\")\n\n        chart = (\n            alt.Chart(source)\n            .mark_point()\n            .encode(\n                x=\"Horsepower:Q\",\n                y=\"Miles_per_Gallon:Q\",\n                color=alt.condition(brush, \"Cylinders:O\", alt.value(\"grey\")),\n            )\n            .add_params(brush)\n        )\n\n        widget = alt.JupyterChart(chart)\n\n        if transformer == \"vegafusion\":\n            widget.local_tz = \"UTC\"\n            assert widget.spec == chart.to_dict(format=\"vega\")\n        else:\n            assert widget.spec == chart.to_dict()\n\n        # There should be one selection and zero params\n        assert len(widget.selections.trait_values()) == 1\n        assert len(widget.params.trait_values()) == 0\n\n        # Check initial interval selection\n        selection = widget.selections.index\n        assert isinstance(selection, jupyter_chart.IndexSelection)\n        assert selection.value == []\n        assert selection.store == []\n\n        # Simulate Vega signal update\n        store = [\n            {\"unit\": \"\", \"_vgsid_\": 220},\n            {\"unit\": \"\", \"_vgsid_\": 330},\n            {\"unit\": \"\", \"_vgsid_\": 341},\n        ]\n\n        widget._vl_selections = {\n            \"index\": {\n                \"value\": {\n                    \"_vgsid_\": \"Set(220,330,341)\",\n                    \"vlPoint\": {\n                        \"or\": [{\"_vgsid_\": 220}, {\"_vgsid_\": 330}, {\"_vgsid_\": 341}]\n                    },\n                },\n                \"store\": store,\n            }\n        }\n\n        selection = widget.selections.index\n        assert isinstance(selection, jupyter_chart.IndexSelection)\n        assert selection.value == [219, 329, 340]\n        assert selection.store == store\n\n\n@jupyter_marks\ndef test_point_selection(transformer):\n    with alt.data_transformers.enable(transformer):\n        source = data.cars()\n        brush = alt.selection_point(name=\"point\", encodings=[\"color\"], bind=\"legend\")\n\n        chart = (\n            alt.Chart(source)\n            .mark_point()\n            .encode(\n                x=\"Horsepower:Q\",\n                y=\"Miles_per_Gallon:Q\",\n                color=alt.condition(brush, \"Cylinders:O\", alt.value(\"grey\")),\n            )\n            .add_params(brush)\n        )\n\n        widget = alt.JupyterChart(chart)\n\n        if transformer == \"vegafusion\":\n            widget.local_tz = \"UTC\"\n            assert widget.spec == chart.to_dict(format=\"vega\")\n        else:\n            assert widget.spec == chart.to_dict()\n\n        # There should be one selection and zero params\n        assert len(widget.selections.trait_values()) == 1\n        assert len(widget.params.trait_values()) == 0\n\n        # Check initial interval selection\n        selection = widget.selections.point\n        assert isinstance(selection, jupyter_chart.PointSelection)\n        assert selection.value == []\n        assert selection.store == []\n\n        # Simulate Vega signal update\n        store = [\n            {\n                \"fields\": [{\"field\": \"Cylinders\", \"channel\": \"color\", \"type\": \"E\"}],\n                \"values\": [4],\n            },\n            {\n                \"fields\": [{\"field\": \"Cylinders\", \"channel\": \"color\", \"type\": \"E\"}],\n                \"values\": [5],\n            },\n        ]\n\n        widget._vl_selections = {\n            \"point\": {\n                \"value\": {\n                    \"Cylinders\": [4, 5],\n                    \"vlPoint\": {\"or\": [{\"Cylinders\": 4}, {\"Cylinders\": 5}]},\n                },\n                \"store\": store,\n            }\n        }\n\n        selection = widget.selections.point\n        assert isinstance(selection, jupyter_chart.PointSelection)\n        assert selection.value == [{\"Cylinders\": 4}, {\"Cylinders\": 5}]\n        assert selection.store == store\n\n\n@jupyter_marks\ndef test_param_updates(transformer):\n    with alt.data_transformers.enable(transformer):\n        source = data.cars()\n        size_param = alt.param(\n            name=\"size\", value=10, bind=alt.binding_range(min=1, max=100)\n        )\n        chart = (\n            alt.Chart(source)\n            .mark_point()\n            .encode(x=\"Horsepower:Q\", y=\"Miles_per_Gallon:Q\", size=size_param)\n            .add_params(size_param)\n        )\n\n        widget = alt.JupyterChart(chart)\n\n        # There should be one param and zero selections\n        assert len(widget.selections.trait_values()) == 0\n        assert len(widget.params.trait_values()) == 1\n\n        # Initial value should match what was provided\n        assert widget.params.size == 10\n\n        # Update param from python\n        widget.params.size = 50\n        assert widget.params.size == 50\n"
  },
  {
    "path": "tests/test_magics.py",
    "content": "from __future__ import annotations\n\nimport json\nfrom typing import TYPE_CHECKING, Any\n\nimport pytest\n\nfrom altair.vegalite.v6.display import VegaLite\nfrom tests import skip_requires_ipython\n\nif TYPE_CHECKING:\n    from IPython.core.interactiveshell import InteractiveShell\n\n\n@pytest.fixture\ndef records() -> list[dict[str, Any]]:\n    return [\n        {\"amount\": 28, \"category\": \"A\"},\n        {\"amount\": 55, \"category\": \"B\"},\n        {\"amount\": 43, \"category\": \"C\"},\n        {\"amount\": 91, \"category\": \"D\"},\n        {\"amount\": 81, \"category\": \"E\"},\n        {\"amount\": 53, \"category\": \"F\"},\n        {\"amount\": 19, \"category\": \"G\"},\n        {\"amount\": 87, \"category\": \"H\"},\n    ]\n\n\n@pytest.fixture\ndef vl_spec(records) -> dict[str, Any]:\n    return {\n        \"$schema\": \"https://vega.github.io/schema/vega-lite/v6.json\",\n        \"data\": {\"values\": records},\n        \"description\": \"A simple bar chart with embedded data.\",\n        \"encoding\": {\n            \"x\": {\"field\": \"category\", \"type\": \"ordinal\"},\n            \"y\": {\"field\": \"amount\", \"type\": \"quantitative\"},\n        },\n        \"mark\": {\"type\": \"bar\"},\n    }\n\n\n@pytest.fixture\ndef ipshell(records) -> InteractiveShell:\n    from IPython.core.interactiveshell import InteractiveShell\n\n    shell = InteractiveShell.instance()\n    shell.run_cell(\"%load_ext altair\")\n    shell.run_cell(\n        f\"import pandas as pd\\n\"\n        f\"table = pd.DataFrame.from_records({records})\\n\"\n        f\"the_data = table\"\n    )\n    return shell\n\n\n@skip_requires_ipython\ndef test_vegalite_magic_data_included(ipshell, vl_spec) -> None:\n    result = ipshell.run_cell(\"%%vegalite\\n\" + json.dumps(vl_spec))\n    assert isinstance(result.result, VegaLite)\n    assert result.result.spec == vl_spec\n\n\n@skip_requires_ipython\ndef test_vegalite_magic_json_flag(ipshell, vl_spec) -> None:\n    result = ipshell.run_cell(\"%%vegalite --json\\n\" + json.dumps(vl_spec))\n    assert isinstance(result.result, VegaLite)\n    assert result.result.spec == vl_spec\n\n\n@skip_requires_ipython\ndef test_vegalite_magic_pandas_data(ipshell, vl_spec) -> None:\n    spec = {key: val for key, val in vl_spec.items() if key != \"data\"}\n    result = ipshell.run_cell(\"%%vegalite table\\n\" + json.dumps(spec))\n    assert isinstance(result.result, VegaLite)\n    assert result.result.spec == vl_spec\n"
  },
  {
    "path": "tests/test_toplevel.py",
    "content": "import altair as alt\nfrom tools import update_init_file\n\n\ndef test_completeness_of__all__():\n    relevant_attributes = update_init_file.relevant_attributes(alt.__dict__)\n\n    # If the assert statement fails below, there are probably either new objects\n    # in the top-level Altair namespace or some were removed.\n    # In that case, run `hatch run update-init-file` to update __all__\n    assert alt.__all__ == relevant_attributes\n"
  },
  {
    "path": "tests/test_transformed_data.py",
    "content": "import pkgutil\nimport sys\nfrom importlib.metadata import version\nfrom importlib.util import find_spec\n\nimport narwhals.stable.v1 as nw\nimport pytest\nfrom packaging.version import Version\n\nimport altair as alt\nfrom altair.datasets import data\nfrom altair.utils.execeval import eval_block\nfrom tests import (\n    examples_methods_syntax,\n    ignore_DataFrameGroupBy,\n    skip_requires_vegafusion,\n    slow,\n)\n\nXDIST_ENABLED: bool = \"xdist\" in sys.modules\n\"\"\"Use as an `xfail` condition, if running in parallel may cause the test to fail.\"\"\"\n\nxfail_vegafusion_2: pytest.MarkDecorator = pytest.mark.xfail(\n    bool(find_spec(\"vegafusion\"))\n    and Version(version(\"vegafusion\")) >= Version(\"2.0.0a0\"),\n    raises=ValueError,\n    reason=\"https://github.com/vega/altair/issues/3701\",\n)\n\n\n# fmt: off\n@ignore_DataFrameGroupBy\n@skip_requires_vegafusion\n@pytest.mark.parametrize((\"filename\", \"rows\", \"cols\"), [\n    (\"annual_weather_heatmap.py\", 366, [\"monthdate_date_end\", \"max_temp_max\"]),\n    (\"anscombe_plot.py\", 44, [\"Series\", \"X\", \"Y\"]),\n    (\"bar_chart_sorted.py\", 6, [\"site\", \"sum_yield\"]),\n    (\"bar_chart_faceted_compact.py\", 27, [\"p\", \"p_end\"]),\n    (\"beckers_barley_facet.py\", 120, [\"year\", \"site\"]),\n    (\"beckers_barley_wrapped_facet.py\", 120, [\"site\", \"median_yield\"]),\n    (\"bump_chart.py\", 96, [\"rank\", \"yearmonth_date\"]),\n    (\"comet_chart.py\", 120, [\"variety\", \"delta\"]),\n    (\"diverging_stacked_bar_chart.py\", 40, [\"value\", \"percentage_start\"]),\n    (\"donut_chart.py\", 6, [\"value_start\", \"value_end\"]),\n    (\"gapminder_bubble_plot.py\", 187, [\"income\", \"population\"]),\n    (\"grouped_bar_chart2.py\", 9, [\"Group\", \"Value_start\"]),\n    (\"hexbins.py\", 84, [\"xFeaturePos\", \"mean_temp_max\"]),\n    pytest.param(\"histogram_heatmap.py\", 378, [\"bin_maxbins_40_Rotten Tomatoes Rating\", \"__count\"], marks=slow),\n    (\"histogram_scatterplot.py\", 64, [\"bin_maxbins_10_Rotten Tomatoes Rating\", \"__count\"]),\n    pytest.param(\"interactive_legend.py\", 1708, [\"sum_count_start\", \"series\"], marks=slow),\n    (\"iowa_electricity.py\", 51, [\"net_generation_start\", \"year\"]),\n    (\"isotype.py\", 37, [\"animal\", \"x\"]),\n    (\"isotype_grid.py\", 100, [\"row\", \"col\"]),\n    (\"lasagna_plot.py\", 492, [\"yearmonthdate_date\", \"sum_price\"]),\n    (\"layered_area_chart.py\", 51, [\"source\", \"net_generation\"]),\n    (\"layered_bar_chart.py\", 51, [\"source\", \"net_generation\"]),\n    (\"layered_histogram.py\", 113, [\"bin_maxbins_100_Measurement\"]),\n    (\"line_chart_with_cumsum.py\", 52, [\"cumulative_wheat\"]),\n    (\"line_custom_order.py\", 55, [\"miles\", \"gas\"]),\n    pytest.param(\"line_percent.py\", 30, [\"sex\", \"perc\"], marks=slow),\n    (\"line_with_log_scale.py\", 15, [\"year\", \"sum_people\"]),\n    (\"multifeature_scatter_plot.py\", 342, [\"Beak Depth (mm)\", \"Species\"]),\n    pytest.param(\"natural_disasters.py\", 686, [\"Deaths\", \"Year\"], marks=xfail_vegafusion_2),\n    (\"normalized_stacked_area_chart.py\", 51, [\"source\", \"net_generation_start\"]),\n    (\"normalized_stacked_bar_chart.py\", 60, [\"site\", \"sum_yield_start\"]),\n    (\"parallel_coordinates.py\", 1032, [\"key\", \"value\"]),\n    (\"percentage_of_total.py\", 5, [\"PercentOfTotal\", \"TotalTime\"]),\n    (\"pie_chart.py\", 6, [\"category\", \"value_start\"]),\n    (\"pyramid.py\", 3, [\"category\", \"value_start\"]),\n    (\"stacked_bar_chart_sorted_segments.py\", 60, [\"variety\", \"site\"]),\n    (\"stem_and_leaf.py\", 100, [\"stem\", \"leaf\"]),\n    pytest.param(\"streamgraph.py\", 1708, [\"series\", \"sum_count\"], marks=slow),\n    (\"top_k_items.py\", 10, [\"rank\", \"IMDB Rating_start\"]),\n    (\"top_k_letters.py\", 9, [\"rank\", \"letters\"]),\n    pytest.param(\"top_k_with_others.py\", 10, [\"ranked_director\", \"mean_aggregate_gross\"], marks=slow),\n    (\"area_faceted.py\", 492, [\"date\", \"price\"]),\n    (\"distributions_faceted_histogram.py\", 20, [\"Origin\", \"__count\"]),\n    (\"us_population_over_time.py\", 38, [\"sex\", \"people_start\"]),\n    (\"us_population_over_time_facet.py\", 285, [\"year\", \"sum_people\"]),\n    (\"wilkinson-dot-plot.py\", 21, [\"data\", \"id\"]),\n    (\"window_rank.py\", 12, [\"team\", \"diff\"]),\n])\n@pytest.mark.parametrize(\"to_reconstruct\", [True, False])\ndef test_primitive_chart_examples(filename, rows, cols, to_reconstruct):\n    # fmt: on\n    source = pkgutil.get_data(examples_methods_syntax.__name__, filename)\n    chart = eval_block(source, strict=True)\n    if to_reconstruct:\n        # When reconstructing a Chart, Altair uses different classes\n        # then what might have been originally used. See\n        # https://github.com/hex-inc/vegafusion/issues/354 for more info.\n        chart = alt.Chart.from_dict(chart.to_dict())\n    df = chart.transformed_data()\n    assert df is not None\n    nw_df = nw.from_native(df, eager_only=True)\n\n    assert len(nw_df) == rows\n    assert set(cols).issubset(set(nw_df.columns))\n\n\n# fmt: off\n@skip_requires_vegafusion\n@pytest.mark.parametrize((\"filename\", \"all_rows\", \"all_cols\"), [\n    (\"errorbars_with_std.py\", [10, 10], [[\"upper_yield\"], [\"extent_yield\"]]),\n    (\"candlestick_chart.py\", [44, 44], [[\"low\"], [\"close\"]]),\n    (\"co2_concentration.py\", [741, 8, 8], [[\"first_date\"], [\"scaled_date\"], [\"end\"]]),\n    pytest.param(\"falkensee.py\", [2, 38, 38], [[\"event\"], [\"population\"], [\"population\"]], marks=xfail_vegafusion_2),\n    (\"heat_lane.py\", [10, 10], [[\"bin_count_start\"], [\"y2\"]]),\n    (\"histogram_responsive.py\", [23, 23], [[\"__count\"], [\"__count\"]]),\n    (\"histogram_with_a_global_mean_overlay.py\", [9, 1], [[\"__count\"], [\"mean_IMDB Rating\"]]),\n    (\"horizon_graph.py\", [20, 20], [[\"x\"], [\"ny\"]]),\n    pytest.param(\"interactive_cross_highlight.py\", [64, 64, 13], [[\"__count\"], [\"__count\"], [\"Major Genre\"]], marks=slow),\n    (\"interval_selection.py\", [123, 123], [[\"price_start\"], [\"date\"]]),\n    (\"layered_chart_with_dual_axis.py\", [12, 12], [[\"month_date\"], [\"average_precipitation\"]]),\n    (\"layered_heatmap_text.py\", [9, 9], [[\"Cylinders\"], [\"mean_horsepower\"]]),\n    (\"multiline_highlight.py\", [560, 560], [[\"price\"], [\"date\"]]),\n    (\"multiline_tooltip.py\", [300, 300, 300, 0, 300], [[\"x\"], [\"y\"], [\"y\"], [\"x\"], [\"x\"]]),\n    (\"pie_chart_with_labels.py\", [6, 6], [[\"category\"], [\"value\"]]),\n    (\"radial_chart.py\", [6, 6], [[\"values\"], [\"values_start\"]]),\n    (\"scatter_linked_table.py\", [392, 14, 14, 14], [[\"Year\"], [\"Year\"], [\"Year\"], [\"Year\"]]),\n    (\"scatter_marginal_hist.py\", [24, 342, 33], [[\"__count\"], [\"Species\"], [\"__count\"]]),\n    pytest.param(\n        \"scatter_with_layered_histogram.py\",\n        [2, 19],\n        [[\"gender\"], [\"__count\"]],\n        marks=(slow, pytest.mark.xfail(\n            XDIST_ENABLED,\n            reason=\"Possibly `numpy` conflict with `xdist`.\\n\"\n            \"Very intermittent, but only affects `to_reconstruct=False`.\"\n        )),\n    ),\n    (\"scatter_with_minimap.py\", [1461, 1461], [[\"date\"], [\"date\"]]),\n    (\"scatter_with_rolling_mean.py\", [1461, 1461], [[\"date\"], [\"rolling_mean\"]]),\n    (\"seattle_weather_interactive.py\", [1461, 5], [[\"date\"], [\"__count\"]]),\n    (\"select_detail.py\", [20, 1000], [[\"id\"], [\"x\"]]),\n    (\"simple_scatter_with_errorbars.py\", [5, 5], [[\"x\"], [\"upper_ymin\"]]),\n    (\"stacked_bar_chart_with_text.py\", [60, 60], [[\"site\"], [\"site\"]]),\n    (\"us_employment.py\", [120, 1, 2], [[\"month\"], [\"president\"], [\"president\"]]),\n    (\"us_population_pyramid_over_time.py\", [19, 38, 19], [[\"gender\"], [\"year\"], [\"gender\"]]),\n])\n@pytest.mark.parametrize(\"to_reconstruct\", [True, False])\ndef test_compound_chart_examples(filename, all_rows, all_cols, to_reconstruct):\n    # fmt: on\n    source = pkgutil.get_data(examples_methods_syntax.__name__, filename)\n    chart = eval_block(source, strict=True)\n    if to_reconstruct:\n        # When reconstructing a Chart, Altair uses different classes\n        # then what might have been originally used. See\n        # https://github.com/hex-inc/vegafusion/issues/354 for more info.\n        chart = alt.Chart.from_dict(chart.to_dict())\n\n    assert isinstance(chart, (alt.LayerChart, alt.ConcatChart, alt.HConcatChart, alt.VConcatChart))\n    dfs = chart.transformed_data()\n\n    if not to_reconstruct:\n        # Only run assert statements if the chart is not reconstructed. Reason\n        # is that for some charts, the original chart contained duplicated datasets\n        # which disappear when reconstructing the chart.\n\n        nw_dfs = (nw.from_native(d, eager_only=True) for d in dfs)\n        assert len(dfs) == len(all_rows)\n        for df, rows, cols in zip(nw_dfs, all_rows, all_cols, strict=False):\n            assert len(df) == rows\n            assert set(cols).issubset(set(df.columns))\n\n\n@skip_requires_vegafusion\n@pytest.mark.parametrize(\"to_reconstruct\", [True, False])\ndef test_transformed_data_exclude(to_reconstruct):\n    source = data.wheat()\n    bar = alt.Chart(source).mark_bar().encode(x=\"year:O\", y=\"wheat:Q\")\n    rule = alt.Chart(source).mark_rule(color=\"red\").encode(y=\"mean(wheat):Q\")\n    some_annotation = (\n        alt.Chart(name=\"some_annotation\")\n        .mark_text(fontWeight=\"bold\")\n        .encode(text=alt.value(\"Just some text\"), y=alt.datum(85), x=alt.value(200))\n    )\n\n    chart = (bar + rule + some_annotation).properties(width=600)\n    if to_reconstruct:\n        # When reconstructing a Chart, Altair uses different classes\n        # then what might have been originally used. See\n        # https://github.com/hex-inc/vegafusion/issues/354 for more info.\n        chart = alt.Chart.from_dict(chart.to_dict())\n    assert isinstance(chart, alt.LayerChart)\n    datasets = chart.transformed_data(exclude=[\"some_annotation\"])\n\n    _datasets = [nw.from_native(d, eager_only=True) for d in datasets]\n    assert len(datasets) == len(_datasets)\n    assert len(_datasets) == 2\n    assert len(_datasets[0]) == 52\n    assert \"wheat_start\" in _datasets[0]\n    assert len(_datasets[1]) == 1\n    assert \"mean_wheat\" in _datasets[1]\n"
  },
  {
    "path": "tests/utils/__init__.py",
    "content": ""
  },
  {
    "path": "tests/utils/test_compiler.py",
    "content": "import json\n\nimport pytest\n\nfrom altair import Chart, vegalite_compilers\nfrom tests import skip_requires_vl_convert\n\n\n@pytest.fixture\ndef chart():\n    return (\n        Chart(\"cars.json\")\n        .mark_point()\n        .encode(\n            x=\"Horsepower:Q\",\n            y=\"Miles_per_Gallon:Q\",\n        )\n    )\n\n\ndef assert_is_vega_spec(vega_spec):\n    assert vega_spec[\"$schema\"] == \"https://vega.github.io/schema/vega/v6.json\"\n    assert \"data\" in vega_spec\n    assert \"marks\" in vega_spec\n    assert \"scales\" in vega_spec\n    assert \"axes\" in vega_spec\n\n\n@skip_requires_vl_convert\ndef test_vegalite_compiler(chart):\n    vegalite_spec = chart.to_dict()\n    fn = vegalite_compilers.get()\n    assert fn is not None\n    vega_spec = fn(vegalite_spec)\n    assert_is_vega_spec(vega_spec)\n\n\n@skip_requires_vl_convert\ndef test_to_dict_with_format_vega(chart):\n    vega_spec = chart.to_dict(format=\"vega\")\n    assert_is_vega_spec(vega_spec)\n\n\n@skip_requires_vl_convert\ndef test_to_json_with_format_vega(chart):\n    json_spec = chart.to_json(format=\"vega\")\n    assert isinstance(json_spec, str)\n    spec = json.loads(json_spec)\n    assert_is_vega_spec(spec)\n"
  },
  {
    "path": "tests/utils/test_core.py",
    "content": "from __future__ import annotations\n\nimport types\nfrom importlib.metadata import version as importlib_version\nfrom typing import Any\n\nimport numpy as np\nimport pandas as pd\nimport pytest\nfrom packaging.version import Version\nfrom pandas.api.types import infer_dtype\n\nimport altair as alt\nfrom altair.utils import core\nfrom altair.utils.core import infer_encoding_types, parse_shorthand, update_nested\nfrom tests import skip_requires_pyarrow\n\njson_schema_specification = alt.load_schema()[\"$schema\"]\njson_schema_dict_str = f'{{\"$schema\": \"{json_schema_specification}\"}}'\n\n\nPANDAS_VERSION = Version(importlib_version(\"pandas\"))\n\n\nFAKE_CHANNELS_MODULE = f'''\n\"\"\"Fake channels module for utility tests.\"\"\"\n\nfrom altair.utils import schemapi\n\n\nclass FieldChannel:\n    def __init__(self, shorthand, **kwargs):\n        kwargs['shorthand'] = shorthand\n        return super(FieldChannel, self).__init__(**kwargs)\n\n\nclass ValueChannel:\n    def __init__(self, value, **kwargs):\n        kwargs['value'] = value\n        return super(ValueChannel, self).__init__(**kwargs)\n\n\nclass X(FieldChannel, schemapi.SchemaBase):\n    _schema = {json_schema_dict_str}\n    _encoding_name = \"x\"\n\n\nclass XValue(ValueChannel, schemapi.SchemaBase):\n    _schema = {json_schema_dict_str}\n    _encoding_name = \"x\"\n\n\nclass Y(FieldChannel, schemapi.SchemaBase):\n    _schema = {json_schema_dict_str}\n    _encoding_name = \"y\"\n\n\nclass YValue(ValueChannel, schemapi.SchemaBase):\n    _schema = {json_schema_dict_str}\n    _encoding_name = \"y\"\n\n\nclass StrokeWidth(FieldChannel, schemapi.SchemaBase):\n    _schema = {json_schema_dict_str}\n    _encoding_name = \"strokeWidth\"\n\n\nclass StrokeWidthValue(ValueChannel, schemapi.SchemaBase):\n    _schema = {json_schema_dict_str}\n    _encoding_name = \"strokeWidth\"\n'''\n\n\n@pytest.fixture(params=[False, True])\ndef pd_data(request) -> pd.DataFrame:\n    data = pd.DataFrame(\n        {\n            \"x\": [1, 2, 3, 4, 5],\n            \"y\": [\"A\", \"B\", \"C\", \"D\", \"E\"],\n            \"z\": pd.date_range(\"2018-01-01\", periods=5, freq=\"D\"),\n            \"t\": pd.date_range(\"2018-01-01\", periods=5, freq=\"D\").tz_localize(\"UTC\"),\n        }\n    )\n    object_dtype = request.param\n    if object_dtype:\n        data = data.astype(\"object\")\n    return data\n\n\n@pytest.mark.parametrize(\n    (\"value\", \"expected_type\"),\n    [\n        ([1, 2, 3], \"integer\"),\n        ([1.0, 2.0, 3.0], \"floating\"),\n        ([1, 2.0, 3], \"mixed-integer-float\"),\n        ([\"a\", \"b\", \"c\"], \"string\"),\n        ([\"a\", \"b\", np.nan], \"mixed\"),\n    ],\n)\ndef test_infer_dtype(value, expected_type):\n    assert infer_dtype(value, skipna=False) == expected_type\n\n\n# ruff: noqa: C408\n\n\n@pytest.mark.parametrize(\n    (\"shorthand\", \"expected\"),\n    [\n        (\"\", {}),\n        # Fields alone\n        (\"foobar\", dict(field=\"foobar\")),\n        (r\"blah\\:(fd \", dict(field=r\"blah\\:(fd \")),\n        # Fields with type\n        (\"foobar:quantitative\", dict(type=\"quantitative\", field=\"foobar\")),\n        (\"foobar:nominal\", dict(type=\"nominal\", field=\"foobar\")),\n        (\"foobar:ordinal\", dict(type=\"ordinal\", field=\"foobar\")),\n        (\"foobar:temporal\", dict(type=\"temporal\", field=\"foobar\")),\n        (\"foobar:geojson\", dict(type=\"geojson\", field=\"foobar\")),\n        (\"foobar:Q\", dict(type=\"quantitative\", field=\"foobar\")),\n        (\"foobar:N\", dict(type=\"nominal\", field=\"foobar\")),\n        (\"foobar:O\", dict(type=\"ordinal\", field=\"foobar\")),\n        (\"foobar:T\", dict(type=\"temporal\", field=\"foobar\")),\n        (\"foobar:G\", dict(type=\"geojson\", field=\"foobar\")),\n        # Fields with aggregate and/or type\n        (\"average(foobar)\", dict(field=\"foobar\", aggregate=\"average\")),\n        (\n            \"min(foobar):temporal\",\n            dict(type=\"temporal\", field=\"foobar\", aggregate=\"min\"),\n        ),\n        (\"sum(foobar):Q\", dict(type=\"quantitative\", field=\"foobar\", aggregate=\"sum\")),\n        # check that invalid arguments are not split-out\n        (\"invalid(blah)\", dict(field=\"invalid(blah)\")),\n        (r\"blah\\:invalid\", dict(field=r\"blah\\:invalid\")),\n        (r\"invalid(blah)\\:invalid\", dict(field=r\"invalid(blah)\\:invalid\")),\n        # check parsing in presence of strange characters\n        (\n            r\"average(a b\\:(c\\nd):Q\",\n            dict(aggregate=\"average\", field=r\"a b\\:(c\\nd\", type=\"quantitative\"),\n        ),\n        # special case: count doesn't need an argument\n        (\"count()\", dict(aggregate=\"count\", type=\"quantitative\")),\n        (\"count():O\", dict(aggregate=\"count\", type=\"ordinal\")),\n        # time units:\n        (\"month(x)\", dict(field=\"x\", timeUnit=\"month\", type=\"temporal\")),\n        (\"year(foo):O\", dict(field=\"foo\", timeUnit=\"year\", type=\"ordinal\")),\n        (\n            \"date(date):quantitative\",\n            dict(field=\"date\", timeUnit=\"date\", type=\"quantitative\"),\n        ),\n        (\n            \"yearmonthdate(field)\",\n            dict(field=\"field\", timeUnit=\"yearmonthdate\", type=\"temporal\"),\n        ),\n    ],\n)\ndef test_parse_shorthand(shorthand: str, expected: dict[str, Any]) -> None:\n    assert parse_shorthand(shorthand) == expected\n\n\n@pytest.mark.parametrize(\n    (\"shorthand\", \"expected\"),\n    [\n        (\"x\", dict(field=\"x\", type=\"quantitative\")),\n        (\"y\", dict(field=\"y\", type=\"nominal\")),\n        (\"z\", dict(field=\"z\", type=\"temporal\")),\n        (\"t\", dict(field=\"t\", type=\"temporal\")),\n        (\"count(x)\", dict(field=\"x\", aggregate=\"count\", type=\"quantitative\")),\n        (\"count()\", dict(aggregate=\"count\", type=\"quantitative\")),\n        (\"month(z)\", dict(timeUnit=\"month\", field=\"z\", type=\"temporal\")),\n        (\"month(t)\", dict(timeUnit=\"month\", field=\"t\", type=\"temporal\")),\n    ],\n)\ndef test_parse_shorthand_with_data(\n    pd_data, shorthand: str, expected: dict[str, Any]\n) -> None:\n    assert parse_shorthand(shorthand, pd_data) == expected\n\n\n@pytest.mark.skipif(Version(\"1.0.0\") > PANDAS_VERSION, reason=\"dtype unavailable\")\ndef test_parse_shorthand_with_data_pandas_v1(pd_data) -> None:\n    pd_data[\"b\"] = pd.Series([True, False, True, False, None], dtype=\"boolean\")\n    shorthand = \"b\"\n    expected = dict(field=\"b\", type=\"nominal\")\n    assert parse_shorthand(shorthand, pd_data) == expected\n\n\n@skip_requires_pyarrow\ndef test_parse_shorthand_for_arrow_timestamp():\n    import pyarrow as pa\n\n    data = pd.DataFrame(\n        {\n            \"z\": pd.date_range(\"2018-01-01\", periods=5, freq=\"D\"),\n            \"t\": pd.date_range(\"2018-01-01\", periods=5, freq=\"D\").tz_localize(\"UTC\"),\n        }\n    )\n    # Convert to arrow-packed dtypes\n    data = pa.Table.from_pandas(data).to_pandas(types_mapper=pd.ArrowDtype)\n    assert parse_shorthand(\"z\", data) == {\"field\": \"z\", \"type\": \"temporal\"}\n    assert parse_shorthand(\"z\", data) == {\"field\": \"z\", \"type\": \"temporal\"}\n\n\ndef test_parse_shorthand_all_aggregates():\n    aggregates = alt.Root._schema[\"definitions\"][\"AggregateOp\"][\"enum\"]\n    for aggregate in aggregates:\n        shorthand = f\"{aggregate}(field):Q\"\n        assert parse_shorthand(shorthand) == {\n            \"aggregate\": aggregate,\n            \"field\": \"field\",\n            \"type\": \"quantitative\",\n        }\n\n\ndef test_parse_shorthand_all_timeunits():\n    timeUnits = []\n    for loc in [\"Local\", \"Utc\"]:\n        for typ in [\"Single\", \"Multi\"]:\n            defn = loc + typ + \"TimeUnit\"\n            timeUnits.extend(alt.Root._schema[\"definitions\"][defn][\"enum\"])\n    for timeUnit in timeUnits:\n        shorthand = f\"{timeUnit}(field):Q\"\n        assert parse_shorthand(shorthand) == {\n            \"timeUnit\": timeUnit,\n            \"field\": \"field\",\n            \"type\": \"quantitative\",\n        }\n\n\ndef test_parse_shorthand_window_count():\n    shorthand = \"count()\"\n    dct = parse_shorthand(\n        shorthand,\n        parse_aggregates=False,\n        parse_window_ops=True,\n        parse_timeunits=False,\n        parse_types=False,\n    )\n    assert dct == {\"op\": \"count\"}\n\n\ndef test_parse_shorthand_all_window_ops():\n    window_ops = alt.Root._schema[\"definitions\"][\"WindowOnlyOp\"][\"enum\"]\n    aggregates = alt.Root._schema[\"definitions\"][\"AggregateOp\"][\"enum\"]\n    for op in window_ops + aggregates:\n        shorthand = f\"{op}(field)\"\n        dct = parse_shorthand(\n            shorthand,\n            parse_aggregates=False,\n            parse_window_ops=True,\n            parse_timeunits=False,\n            parse_types=False,\n        )\n        assert dct == {\"field\": \"field\", \"op\": op}\n\n\ndef test_update_nested():\n    original = {\"x\": {\"b\": {\"foo\": 2}, \"c\": 4}}\n    update = {\"x\": {\"b\": {\"foo\": 5}, \"d\": 6}, \"y\": 40}\n\n    output = update_nested(original, update, copy=True)\n    assert output is not original\n    assert output == {\"x\": {\"b\": {\"foo\": 5}, \"c\": 4, \"d\": 6}, \"y\": 40}\n\n    output2 = update_nested(original, update)\n    assert output2 is original\n    assert output == output2\n\n\n@pytest.fixture\ndef channels() -> types.ModuleType:\n    channels = types.ModuleType(\"channels\")\n    exec(FAKE_CHANNELS_MODULE, channels.__dict__)\n    return channels\n\n\n@pytest.fixture\ndef channels_cached(channels) -> core._ChannelCache:\n    \"\"\"Previously ``_ChannelCache.from_channels``.\"\"\"\n    cached = core._ChannelCache.__new__(core._ChannelCache)\n    cached.channel_to_name = {\n        c: c._encoding_name  # pyright: ignore[reportAttributeAccessIssue]\n        for c in channels.__dict__.values()\n        if isinstance(c, type)\n        and issubclass(c, alt.SchemaBase)\n        and hasattr(c, \"_encoding_name\")\n    }\n    cached.name_to_channel = core._invert_group_channels(cached.channel_to_name)\n    return cached\n\n\ndef _getargs(*args, **kwargs):\n    return args, kwargs\n\n\ndef test_infer_encoding_types(\n    monkeypatch: pytest.MonkeyPatch, channels, channels_cached\n):\n    # Indirectly initialize `_CHANNEL_CACHE`\n    infer_encoding_types((), {})\n    # Replace with contents of `FAKE_CHANNELS_MODULE`\n    # Scoped to only this test\n    monkeypatch.setattr(core, \"_CHANNEL_CACHE\", channels_cached)\n\n    expected = {\n        \"x\": channels.X(\"xval\"),\n        \"y\": channels.YValue(\"yval\"),\n        \"strokeWidth\": channels.StrokeWidthValue(value=4),\n    }\n\n    # All positional args\n    args, kwds = _getargs(\n        channels.X(\"xval\"), channels.YValue(\"yval\"), channels.StrokeWidthValue(4)\n    )\n    assert infer_encoding_types(args, kwds) == expected\n\n    # All keyword args\n    args, kwds = _getargs(x=\"xval\", y=alt.value(\"yval\"), strokeWidth=alt.value(4))\n    assert infer_encoding_types(args, kwds) == expected\n\n    # Mixed positional & keyword\n    args, kwds = _getargs(\n        channels.X(\"xval\"), channels.YValue(\"yval\"), strokeWidth=alt.value(4)\n    )\n    assert infer_encoding_types(args, kwds) == expected\n\n\ndef test_infer_encoding_types_with_condition():\n    args, kwds = _getargs(\n        size=alt.condition(\"pred1\", alt.value(1), alt.value(2)),\n        color=alt.condition(\"pred2\", alt.value(\"red\"), \"cfield:N\"),\n        opacity=alt.condition(\"pred3\", \"ofield:N\", alt.value(0.2)),\n    )\n\n    expected = {\n        \"size\": alt.SizeValue(\n            2,\n            condition=alt.ConditionalPredicateValueDefnumberExprRef(\n                value=1, test=alt.Predicate(\"pred1\")\n            ),\n        ),\n        \"color\": alt.Color(\n            field=alt.FieldName(\"cfield\"),\n            type=alt.StandardType(\"nominal\"),\n            condition=alt.ConditionalPredicateValueDefGradientstringnullExprRef(\n                value=\"red\",\n                test=alt.Predicate(\"pred2\"),\n            ),\n        ),\n        \"opacity\": alt.OpacityValue(\n            0.2,\n            condition=alt.ConditionalPredicateMarkPropFieldOrDatumDef(\n                field=alt.FieldName(\"ofield\"),\n                test=alt.Predicate(\"pred3\"),\n                type=alt.StandardType(\"nominal\"),\n            ),\n        ),\n    }\n    assert infer_encoding_types(args, kwds) == expected\n\n\ndef test_invalid_data_type():\n    with pytest.raises(\n        ValueError, match=r'\"\\(fd \" is not one of the valid encoding data types'\n    ):\n        parse_shorthand(r\"blah:(fd \")\n"
  },
  {
    "path": "tests/utils/test_data.py",
    "content": "from __future__ import annotations\n\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, SupportsIndex, TypeVar\n\nimport narwhals.stable.v1 as nw\nimport pandas as pd\nimport polars as pl\nimport pytest\n\nfrom altair.utils.data import (\n    MaxRowsError,\n    limit_rows,\n    sample,\n    to_csv,\n    to_json,\n    to_values,\n)\n\nif TYPE_CHECKING:\n    from collections.abc import Callable\n\nT = TypeVar(\"T\")\n\n\ndef _pipe(data: Any, *funcs: Callable[..., Any]) -> Any:\n    # Redefined to maintain existing tests\n    # Originally part of `toolz` dependency\n    for func in funcs:\n        data = func(data)\n    return data\n\n\ndef _create_dataframe(\n    n: SupportsIndex, /, tp: Callable[..., T] | type[Any] = pd.DataFrame\n) -> T | Any:\n    data = tp({\"x\": range(n), \"y\": range(n)})\n    return data\n\n\ndef _create_data_with_values(n: SupportsIndex, /) -> dict[str, Any]:\n    data = {\"values\": [{\"x\": i, \"y\": i + 1} for i in range(n)]}\n    return data\n\n\ndef test_limit_rows():\n    \"\"\"Test the limit_rows data transformer.\"\"\"\n    data = nw.from_native(_create_dataframe(10), eager_only=True)\n    result = limit_rows(data, max_rows=20)\n    assert data is result\n    with pytest.raises(MaxRowsError):\n        _pipe(data, limit_rows(max_rows=5))\n    data = _create_data_with_values(10)\n    result = _pipe(data, limit_rows(max_rows=20))\n    assert data is result\n    with pytest.raises(MaxRowsError):\n        limit_rows(data, max_rows=5)\n\n\ndef test_sample():\n    \"\"\"Test the sample data transformer.\"\"\"\n    data = _create_dataframe(20)\n    result = _pipe(data, sample(n=10))\n    assert len(result) == 10\n    assert isinstance(result, pd.DataFrame)\n    data = _create_data_with_values(20)\n    result = sample(data, n=10)\n    assert isinstance(result, dict)\n    assert \"values\" in result\n    assert len(result[\"values\"]) == 10\n    data = _create_dataframe(20)\n    result = _pipe(data, sample(frac=0.5))\n    assert len(result) == 10\n    assert isinstance(result, pd.DataFrame)\n    data = _create_data_with_values(20)\n    result = sample(data, frac=0.5)\n    assert isinstance(result, dict)\n    assert \"values\" in result\n    assert len(result[\"values\"]) == 10\n    result = sample(pl.DataFrame(data), n=10)\n    assert isinstance(result, pl.DataFrame)\n    assert len(result) == 10\n\n\ndef test_to_values():\n    \"\"\"Test the to_values data transformer.\"\"\"\n    data = _create_dataframe(10)\n    result = _pipe(data, to_values)\n    assert result == {\"values\": data.to_dict(orient=\"records\")}\n\n\ndef test_type_error():\n    \"\"\"Ensure that TypeError is raised for types other than dict/DataFrame.\"\"\"\n    for f in (sample, limit_rows, to_values):\n        with pytest.raises(TypeError):\n            _pipe(0, f)\n\n\ndef test_dataframe_to_json():\n    \"\"\"\n    Test to_json.\n\n    - make certain the filename is deterministic\n    - make certain the file contents match the data.\n    \"\"\"\n    filename = \"\"\n    data = _create_dataframe(10)\n    try:\n        result1 = _pipe(data, to_json)\n        result2 = _pipe(data, to_json)\n        filename = result1[\"url\"]\n        output = pd.read_json(filename)\n    finally:\n        if filename:\n            Path(filename).unlink()\n\n    assert result1 == result2\n    assert output.equals(data)\n\n\ndef test_dict_to_json():\n    \"\"\"\n    Test to_json.\n\n    - make certain the filename is deterministic\n    - make certain the file contents match the data.\n    \"\"\"\n    filename = \"\"\n    data = _create_data_with_values(10)\n    try:\n        result1 = _pipe(data, to_json)\n        result2 = _pipe(data, to_json)\n        filename = result1[\"url\"]\n        output = pd.read_json(filename).to_dict(orient=\"records\")\n    finally:\n        if filename:\n            Path(filename).unlink()\n\n    assert result1 == result2\n    assert data == {\"values\": output}\n\n\n@pytest.mark.parametrize(\"tp\", [pd.DataFrame, pl.DataFrame], ids=[\"pandas\", \"polars\"])\ndef test_dataframe_to_csv(tp: type[Any]) -> None:\n    \"\"\"\n    Test to_csv with dataframe input.\n\n    - make certain the filename is deterministic\n    - make certain the file contents match the data.\n    \"\"\"\n    filename: str = \"\"\n    data = _create_dataframe(10, tp=tp)\n    try:\n        result1 = _pipe(data, to_csv)\n        result2 = _pipe(data, to_csv)\n        filename = result1[\"url\"]\n        output = tp(pd.read_csv(filename))\n    finally:\n        if filename:\n            Path(filename).unlink()\n\n    assert result1 == result2\n    assert output.equals(data)\n\n\ndef test_dict_to_csv():\n    \"\"\"\n    Test to_csv with dict input.\n\n    - make certain the filename is deterministic\n    - make certain the file contents match the data.\n    \"\"\"\n    filename = \"\"\n    data = _create_data_with_values(10)\n    try:\n        result1 = _pipe(data, to_csv)\n        result2 = _pipe(data, to_csv)\n        filename = result1[\"url\"]\n        output = pd.read_csv(filename).to_dict(orient=\"records\")\n    finally:\n        if filename:\n            Path(filename).unlink()\n\n    assert result1 == result2\n    assert data == {\"values\": output}\n"
  },
  {
    "path": "tests/utils/test_deprecation.py",
    "content": "# ruff: noqa: B018\nimport re\n\nimport pytest\n\nfrom altair.utils.deprecation import (\n    AltairDeprecationWarning,\n    _warnings_monitor,\n    deprecated,\n    deprecated_warn,\n)\n\n\ndef test_deprecated_class():\n    class Dummy:\n        def __init__(self, *args) -> None:\n            self.args = args\n\n    OldChart = deprecated(version=\"2.0.0\", alternative=\"LayerChart\")(Dummy)\n\n    with pytest.warns(AltairDeprecationWarning, match=r\"altair=2\\.0\\.0.+LayerChart\"):\n        OldChart()\n\n\ndef test_deprecation_decorator():\n    @deprecated(version=\"999\", alternative=\"func_12345\")\n    def func(x):\n        return x + 1\n\n    with pytest.warns(\n        AltairDeprecationWarning, match=r\"altair=999.+func_12345 instead\"\n    ):\n        y = func(1)\n    assert y == 2\n\n\ndef test_deprecation_warn():\n    with pytest.warns(\n        AltairDeprecationWarning,\n        match=re.compile(r\"altair=3321.+this code path is a noop\", flags=re.DOTALL),\n    ):\n        deprecated_warn(\"this code path is a noop\", version=\"3321\", stacklevel=1)\n\n\ndef test_deprecated_import():\n    import altair as alt\n\n    pattern = re.compile(\n        r\"altair=5\\.5\\.0.+\\.theme instead.+user.guide\",\n        flags=re.DOTALL | re.IGNORECASE,\n    )\n    with pytest.warns(AltairDeprecationWarning, match=pattern):\n        alt.themes\n\n    # NOTE: Tests that second access does not trigger a warning\n    assert alt.themes\n    # Then reset cache\n    _warnings_monitor.clear()\n\n    with pytest.warns(AltairDeprecationWarning, match=pattern):\n        from altair import themes  # noqa: F401\n\n    assert alt.themes == alt.theme._themes\n    _warnings_monitor.clear()\n"
  },
  {
    "path": "tests/utils/test_execeval.py",
    "content": "from altair.utils.execeval import eval_block\n\nHAS_RETURN = \"\"\"\nx = 4\ny = 2 * x\n3 * y\n\"\"\"\n\nNO_RETURN = \"\"\"\nx = 4\ny = 2 * x\nz = 3 * y\n\"\"\"\n\n\ndef test_eval_block_with_return():\n    _globals = {}\n    result = eval_block(HAS_RETURN, _globals)\n    assert result == 24\n    assert _globals[\"x\"] == 4\n    assert _globals[\"y\"] == 8\n\n\ndef test_eval_block_without_return():\n    _globals = {}\n    result = eval_block(NO_RETURN, _globals)\n    assert result is None\n    assert _globals[\"x\"] == 4\n    assert _globals[\"y\"] == 8\n    assert _globals[\"z\"] == 24\n"
  },
  {
    "path": "tests/utils/test_html.py",
    "content": "import pytest\n\nfrom altair.utils.html import spec_to_html\n\n\n@pytest.fixture\ndef spec():\n    return {\n        \"data\": {\"url\": \"data.json\"},\n        \"mark\": {\"type\": \"point\"},\n        \"encoding\": {\n            \"x\": {\"field\": \"x\", \"type\": \"quantitative\"},\n            \"y\": {\"field\": \"y\", \"type\": \"quantitative\"},\n        },\n    }\n\n\n@pytest.mark.parametrize(\"requirejs\", [True, False])\n@pytest.mark.parametrize(\"fullhtml\", [True, False])\ndef test_spec_to_html(requirejs, fullhtml, spec):\n    # We can't test that the html actually renders, but we'll test aspects of\n    # it to make certain that the keywords are respected.\n    vegaembed_version = \"3.12\"\n    vegalite_version = \"3.0\"\n    vega_version = \"4.0\"\n\n    html = spec_to_html(\n        spec,\n        mode=\"vega-lite\",\n        requirejs=requirejs,\n        fullhtml=fullhtml,\n        vegalite_version=vegalite_version,\n        vegaembed_version=vegaembed_version,\n        vega_version=vega_version,\n    )\n    html = html.strip()\n\n    if fullhtml:\n        assert html.startswith(\"<!DOCTYPE html>\")\n        assert html.endswith(\"</html>\")\n    else:\n        assert html.startswith(\"<style>\")\n        assert html.endswith(\"</script>\")\n\n    if requirejs:\n        assert \"require(\" in html\n    else:\n        assert \"require(\" not in html\n\n    assert f\"vega-lite@{vegalite_version}\" in html\n    assert f\"vega@{vega_version}\" in html\n    assert f\"vega-embed@{vegaembed_version}\" in html\n"
  },
  {
    "path": "tests/utils/test_mimebundle.py",
    "content": "from __future__ import annotations\n\nfrom typing import Any\n\nimport pytest\n\nimport altair as alt\nfrom altair import VEGA_VERSION\nfrom altair.utils.mimebundle import spec_to_mimebundle\nfrom tests import skip_requires_vegafusion, skip_requires_vl_convert\n\n\n@pytest.fixture\ndef vegalite_spec() -> dict[str, Any]:\n    return {\n        \"$schema\": \"https://vega.github.io/schema/vega-lite/v6.json\",\n        \"description\": \"A simple bar chart with embedded data.\",\n        \"data\": {\n            \"values\": [\n                {\"a\": \"A\", \"b\": 28},\n                {\"a\": \"B\", \"b\": 55},\n                {\"a\": \"C\", \"b\": 43},\n                {\"a\": \"D\", \"b\": 91},\n                {\"a\": \"E\", \"b\": 81},\n                {\"a\": \"F\", \"b\": 53},\n                {\"a\": \"G\", \"b\": 19},\n                {\"a\": \"H\", \"b\": 87},\n                {\"a\": \"I\", \"b\": 52},\n            ]\n        },\n        \"mark\": {\"type\": \"bar\"},\n        \"encoding\": {\n            \"x\": {\"field\": \"a\", \"type\": \"ordinal\"},\n            \"y\": {\"field\": \"b\", \"type\": \"quantitative\"},\n        },\n    }\n\n\n@pytest.fixture\ndef vega_spec():\n    return {\n        \"$schema\": \"https://vega.github.io/schema/vega/v6.json\",\n        \"axes\": [\n            {\n                \"aria\": False,\n                \"domain\": False,\n                \"grid\": True,\n                \"gridScale\": \"x\",\n                \"labels\": False,\n                \"maxExtent\": 0,\n                \"minExtent\": 0,\n                \"orient\": \"left\",\n                \"scale\": \"y\",\n                \"tickCount\": {\"signal\": \"ceil(height/40)\"},\n                \"ticks\": False,\n                \"zindex\": 0,\n            },\n            {\n                \"grid\": False,\n                \"labelAlign\": \"right\",\n                \"labelAngle\": 270,\n                \"labelBaseline\": \"middle\",\n                \"orient\": \"bottom\",\n                \"scale\": \"x\",\n                \"title\": \"a\",\n                \"zindex\": 0,\n            },\n            {\n                \"grid\": False,\n                \"labelOverlap\": True,\n                \"orient\": \"left\",\n                \"scale\": \"y\",\n                \"tickCount\": {\"signal\": \"ceil(height/40)\"},\n                \"title\": \"b\",\n                \"zindex\": 0,\n            },\n        ],\n        \"background\": \"white\",\n        \"data\": [\n            {\n                \"name\": \"source_0\",\n                \"values\": [\n                    {\"a\": \"A\", \"b\": 28},\n                    {\"a\": \"B\", \"b\": 55},\n                    {\"a\": \"C\", \"b\": 43},\n                    {\"a\": \"D\", \"b\": 91},\n                    {\"a\": \"E\", \"b\": 81},\n                    {\"a\": \"F\", \"b\": 53},\n                    {\"a\": \"G\", \"b\": 19},\n                    {\"a\": \"H\", \"b\": 87},\n                    {\"a\": \"I\", \"b\": 52},\n                ],\n            },\n            {\n                \"name\": \"data_0\",\n                \"source\": \"source_0\",\n                \"transform\": [\n                    {\n                        \"as\": [\"b_start\", \"b_end\"],\n                        \"field\": \"b\",\n                        \"groupby\": [\"a\"],\n                        \"offset\": \"zero\",\n                        \"sort\": {\"field\": [], \"order\": []},\n                        \"type\": \"stack\",\n                    },\n                    {\n                        \"expr\": 'isValid(datum[\"b\"]) && isFinite(+datum[\"b\"])',\n                        \"type\": \"filter\",\n                    },\n                ],\n            },\n        ],\n        \"description\": \"A simple bar chart with embedded data.\",\n        \"height\": 300,\n        \"marks\": [\n            {\n                \"encode\": {\n                    \"update\": {\n                        \"ariaRoleDescription\": {\"value\": \"bar\"},\n                        \"description\": {\n                            \"signal\": '\"a: \" + (isValid(datum[\"a\"]) ? datum[\"a\"] : \"\"+datum[\"a\"]) + \"; b: \" + (format(datum[\"b\"], \"\"))'\n                        },\n                        \"fill\": {\"value\": \"#4c78a8\"},\n                        \"width\": {\"signal\": \"max(0.25, bandwidth('x'))\"},\n                        \"x\": {\"field\": \"a\", \"scale\": \"x\"},\n                        \"y\": {\"field\": \"b_end\", \"scale\": \"y\"},\n                        \"y2\": {\"field\": \"b_start\", \"scale\": \"y\"},\n                    }\n                },\n                \"from\": {\"data\": \"data_0\"},\n                \"name\": \"marks\",\n                \"style\": [\"bar\"],\n                \"type\": \"rect\",\n            }\n        ],\n        \"padding\": 5,\n        \"scales\": [\n            {\n                \"domain\": {\"data\": \"data_0\", \"field\": \"a\", \"sort\": True},\n                \"name\": \"x\",\n                \"paddingInner\": 0.1,\n                \"paddingOuter\": 0.05,\n                \"range\": {\"step\": {\"signal\": \"x_step\"}},\n                \"type\": \"band\",\n            },\n            {\n                \"domain\": {\"data\": \"data_0\", \"fields\": [\"b_start\", \"b_end\"]},\n                \"name\": \"y\",\n                \"nice\": True,\n                \"range\": [{\"signal\": \"height\"}, 0],\n                \"type\": \"linear\",\n                \"zero\": True,\n            },\n        ],\n        \"signals\": [\n            {\"name\": \"x_step\", \"value\": 20},\n            {\n                \"name\": \"width\",\n                \"update\": \"bandspace(domain('x').length, 0.1, 0.05) * x_step\",\n            },\n        ],\n        \"style\": \"cell\",\n    }\n\n\n@skip_requires_vl_convert\ndef test_vegalite_to_vega_mimebundle(vegalite_spec, vega_spec):\n    bundle = spec_to_mimebundle(\n        spec=vegalite_spec,\n        format=\"vega\",\n        mode=\"vega-lite\",\n        vega_version=alt.VEGA_VERSION,\n        vegalite_version=alt.VEGALITE_VERSION,\n        vegaembed_version=alt.VEGAEMBED_VERSION,\n        engine=\"vl-convert\",\n    )\n\n    assert bundle == {\"application/vnd.vega.v6+json\": vega_spec}\n\n\ndef test_spec_to_vegalite_mimebundle(vegalite_spec):\n    bundle = spec_to_mimebundle(\n        spec=vegalite_spec,\n        mode=\"vega-lite\",\n        format=\"vega-lite\",\n        vegalite_version=alt.VEGALITE_VERSION,\n    )\n    assert bundle == {\"application/vnd.vegalite.v6+json\": vegalite_spec}\n\n\ndef test_spec_to_vega_mimebundle(vega_spec):\n    # ValueError: mode must be 'vega-lite'\n    with pytest.raises(ValueError):  # noqa: PT011\n        spec_to_mimebundle(  # pyright: ignore[reportCallIssue]\n            spec=vega_spec,\n            mode=\"vega\",  # pyright: ignore[reportArgumentType]\n            format=\"vega\",\n            vega_version=alt.VEGA_VERSION,\n        )\n\n\ndef test_spec_to_json_mimebundle(vegalite_spec):\n    bundle = spec_to_mimebundle(\n        spec=vegalite_spec,\n        mode=\"vega-lite\",\n        format=\"json\",\n    )\n    assert bundle == {\"application/json\": vegalite_spec}\n\n\ndef check_pre_transformed_vega_spec(vega_spec):\n    assert (\n        vega_spec[\"$schema\"]\n        == f\"https://vega.github.io/schema/vega/v{VEGA_VERSION}.json\"\n    )\n\n    # Check data_0 is there\n    data_0 = vega_spec[\"data\"][1]\n    assert data_0[\"name\"] == \"data_0\"\n\n    # Check that the bin transform has been applied\n    row0 = data_0[\"values\"][0]\n    assert row0 == {\"a\": \"A\", \"b_end\": 28.0, \"b_start\": 0.0}\n\n    # And no transforms remain\n    assert len(data_0.get(\"transform\", [])) == 0\n\n\n@skip_requires_vegafusion\ndef test_vegafusion_spec_to_vega_mime_bundle(vegalite_spec):\n    with alt.data_transformers.enable(\"vegafusion\"):\n        bundle = spec_to_mimebundle(\n            spec=vegalite_spec,\n            mode=\"vega-lite\",\n            format=\"vega\",\n        )\n        # Returned bundle will be vega\n        vega_spec = bundle[\"application/vnd.vega.v6+json\"]\n        check_pre_transformed_vega_spec(vega_spec)\n\n\n@skip_requires_vegafusion\ndef test_vegafusion_chart_to_vega_mime_bundle(vegalite_spec):\n    chart = alt.Chart.from_dict(vegalite_spec)\n    with alt.data_transformers.enable(\"vegafusion\"), alt.renderers.enable(\"json\"):\n        bundle = chart._repr_mimebundle_()\n        assert isinstance(bundle, tuple)\n        vega_spec = bundle[0][\"application/json\"]\n        check_pre_transformed_vega_spec(vega_spec)\n"
  },
  {
    "path": "tests/utils/test_plugin_registry.py",
    "content": "from collections.abc import Callable\n\nfrom altair.utils.plugin_registry import PluginRegistry\n\n\nclass TypedCallableRegistry(PluginRegistry[Callable[[int], int], int]):\n    pass\n\n\nclass GeneralCallableRegistry(PluginRegistry):\n    _global_settings = {\"global_setting\": None}\n\n    @property\n    def global_setting(self):\n        return self._global_settings[\"global_setting\"]\n\n    @global_setting.setter\n    def global_setting(self, val):\n        self._global_settings[\"global_setting\"] = val\n\n\ndef test_plugin_registry():\n    plugins = TypedCallableRegistry()\n\n    assert plugins.names() == []\n    assert plugins.active == \"\"\n    assert plugins.get() is None\n    assert repr(plugins) == \"TypedCallableRegistry(active='', registered=[])\"\n\n    plugins.register(\"new_plugin\", lambda x: x**2)\n    assert plugins.names() == [\"new_plugin\"]\n    assert plugins.active == \"\"\n    assert plugins.get() is None\n    assert repr(plugins) == (\n        \"TypedCallableRegistry(active='', registered=['new_plugin'])\"\n    )\n\n    plugins.enable(\"new_plugin\")\n    assert plugins.names() == [\"new_plugin\"]\n    assert plugins.active == \"new_plugin\"\n    fn = plugins.get()\n    assert fn is not None\n    assert fn(3) == 9\n    assert repr(plugins) == (\n        \"TypedCallableRegistry(active='new_plugin', registered=['new_plugin'])\"\n    )\n\n\ndef test_plugin_registry_extra_options():\n    plugins = GeneralCallableRegistry()\n\n    plugins.register(\"metadata_plugin\", lambda x, p=2: x**p)\n    plugins.enable(\"metadata_plugin\")\n    fn = plugins.get()\n    assert fn is not None\n    assert fn(3) == 9\n\n    plugins.enable(\"metadata_plugin\", p=3)\n    assert plugins.active == \"metadata_plugin\"\n    fn = plugins.get()\n    assert fn is not None\n    assert fn(3) == 27\n\n    # enabling without changing name\n    plugins.enable(p=2)\n    assert plugins.active == \"metadata_plugin\"\n    fn = plugins.get()\n    assert fn is not None\n    assert fn(3) == 9\n\n\ndef test_plugin_registry_global_settings():\n    plugins = GeneralCallableRegistry()\n\n    # we need some default plugin, but we won't do anything with it\n    plugins.register(\"default\", lambda x: x)\n    plugins.enable(\"default\")\n\n    # default value of the global flag\n    assert plugins.global_setting is None\n\n    # enabling changes the global state, not the options\n    plugins.enable(global_setting=True)\n    assert plugins.global_setting is True\n    assert plugins._options == {}\n\n    # context manager changes global state temporarily\n    with plugins.enable(global_setting=\"temp\"):\n        assert plugins.global_setting == \"temp\"\n        assert plugins._options == {}\n    assert plugins.global_setting is True\n    assert plugins._options == {}\n\n\ndef test_plugin_registry_context():\n    plugins = GeneralCallableRegistry()\n\n    plugins.register(\"default\", lambda x, p=2: x**p)\n\n    # At first there is no plugin enabled\n    assert plugins.active == \"\"\n    assert plugins.options == {}\n\n    # Make sure the context is set and reset correctly\n    with plugins.enable(\"default\", p=6):\n        assert plugins.active == \"default\"\n        assert plugins.options == {\"p\": 6}\n\n    assert plugins.active == \"\"\n    assert plugins.options == {}\n\n    # Make sure the context is reset even if there is an error\n    try:\n        with plugins.enable(\"default\", p=6):\n            assert plugins.active == \"default\"\n            assert plugins.options == {\"p\": 6}\n            raise ValueError()\n    except ValueError:\n        pass\n\n    assert plugins.active == \"\"\n    assert plugins.options == {}\n\n    # Enabling without specifying name uses current name\n    plugins.enable(\"default\", p=2)\n\n    with plugins.enable(p=6):\n        assert plugins.active == \"default\"\n        assert plugins.options == {\"p\": 6}\n\n    assert plugins.active == \"default\"\n    assert plugins.options == {\"p\": 2}\n"
  },
  {
    "path": "tests/utils/test_schemapi.py",
    "content": "# ruff: noqa: W291\nfrom __future__ import annotations\n\nimport copy\nimport datetime as dt\nimport inspect\nimport io\nimport json\nimport pickle\nimport re\nimport types\nimport warnings\nfrom collections import deque\nfrom functools import partial\nfrom typing import TYPE_CHECKING, Any\n\nimport jsonschema\nimport jsonschema.exceptions\nimport numpy as np\nimport pandas as pd\nimport polars as pl\nimport pytest\n\nimport altair as alt\nfrom altair import load_schema\nfrom altair.datasets import data\nfrom altair.utils.schemapi import (\n    _DEFAULT_JSON_SCHEMA_DRAFT_URL,\n    SchemaBase,\n    SchemaValidationError,\n    Undefined,\n    UndefinedType,\n    _FromDict,\n)\nfrom altair.vegalite.v6.schema.channels import X\nfrom altair.vegalite.v6.schema.core import FieldOneOfPredicate, Legend\n\nif TYPE_CHECKING:\n    from collections.abc import Callable, Iterable, Sequence\n\n    from narwhals.stable.v1.typing import IntoDataFrame\n\n_JSON_SCHEMA_DRAFT_URL = load_schema()[\"$schema\"]\n# Make tests inherit from _TestSchema, so that when we test from_dict it won't\n# try to use SchemaBase objects defined elsewhere as wrappers.\n\n\ndef test_actual_json_schema_draft_is_same_as_hardcoded_default():\n    # See comments next to definition of _DEFAULT_JSON_SCHEMA_DRAFT_URL\n    # for details why we need this test\n    assert _DEFAULT_JSON_SCHEMA_DRAFT_URL == _JSON_SCHEMA_DRAFT_URL, (\n        \"The default json schema URL, which is hardcoded,\"\n        + \" is not the same as the one used in the Vega-Lite schema.\"\n        + \" You need to update the default value.\"\n    )\n\n\nclass _TestSchema(SchemaBase):\n    @classmethod\n    def _default_wrapper_classes(cls):\n        return _TestSchema.__subclasses__()\n\n\nclass MySchema(_TestSchema):\n    _schema = {\n        \"$schema\": _JSON_SCHEMA_DRAFT_URL,\n        \"definitions\": {\n            \"StringMapping\": {\n                \"type\": \"object\",\n                \"additionalProperties\": {\"type\": \"string\"},\n            },\n            \"StringArray\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}},\n        },\n        \"properties\": {\n            \"a\": {\"$ref\": \"#/definitions/StringMapping\"},\n            \"a2\": {\"type\": \"object\", \"additionalProperties\": {\"type\": \"number\"}},\n            \"b\": {\"$ref\": \"#/definitions/StringArray\"},\n            \"b2\": {\"type\": \"array\", \"items\": {\"type\": \"number\"}},\n            \"c\": {\"type\": [\"string\", \"number\"]},\n            \"d\": {\n                \"anyOf\": [\n                    {\"$ref\": \"#/definitions/StringMapping\"},\n                    {\"$ref\": \"#/definitions/StringArray\"},\n                ]\n            },\n            \"e\": {\"items\": [{\"type\": \"string\"}, {\"type\": \"string\"}]},\n        },\n    }\n\n\nclass StringMapping(_TestSchema):\n    _schema = {\"$ref\": \"#/definitions/StringMapping\"}\n    _rootschema = MySchema._schema\n\n\nclass StringArray(_TestSchema):\n    _schema = {\"$ref\": \"#/definitions/StringArray\"}\n    _rootschema = MySchema._schema\n\n\nclass Derived(_TestSchema):\n    _schema = {\n        \"$schema\": _JSON_SCHEMA_DRAFT_URL,\n        \"definitions\": {\n            \"Foo\": {\"type\": \"object\", \"properties\": {\"d\": {\"type\": \"string\"}}},\n            \"Bar\": {\"type\": \"string\", \"enum\": [\"A\", \"B\"]},\n        },\n        \"type\": \"object\",\n        \"additionalProperties\": False,\n        \"properties\": {\n            \"a\": {\"type\": \"integer\"},\n            \"b\": {\"type\": \"string\"},\n            \"c\": {\"$ref\": \"#/definitions/Foo\"},\n        },\n    }\n\n\nclass Foo(_TestSchema):\n    _schema = {\"$ref\": \"#/definitions/Foo\"}\n    _rootschema = Derived._schema\n\n\nclass Bar(_TestSchema):\n    _schema = {\"$ref\": \"#/definitions/Bar\"}\n    _rootschema = Derived._schema\n\n\nclass SimpleUnion(_TestSchema):\n    _schema = {\n        \"$schema\": _JSON_SCHEMA_DRAFT_URL,\n        \"anyOf\": [{\"type\": \"integer\"}, {\"type\": \"string\"}],\n    }\n\n\nclass DefinitionUnion(_TestSchema):\n    _schema = {\"anyOf\": [{\"$ref\": \"#/definitions/Foo\"}, {\"$ref\": \"#/definitions/Bar\"}]}\n    _rootschema = Derived._schema\n\n\nclass SimpleArray(_TestSchema):\n    _schema = {\n        \"$schema\": _JSON_SCHEMA_DRAFT_URL,\n        \"type\": \"array\",\n        \"items\": {\"anyOf\": [{\"type\": \"integer\"}, {\"type\": \"string\"}]},\n    }\n\n\nclass InvalidProperties(_TestSchema):\n    _schema = {\n        \"$schema\": _JSON_SCHEMA_DRAFT_URL,\n        \"type\": \"object\",\n        \"properties\": {\"for\": {}, \"as\": {}, \"vega-lite\": {}, \"$schema\": {}},\n    }\n\n\n_validation_selection_schema = {\n    \"properties\": {\n        \"e\": {\"type\": \"number\", \"exclusiveMinimum\": 10},\n    },\n}\n\n\nclass Draft4Schema(_TestSchema):\n    _schema = {\n        **_validation_selection_schema,\n        \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n    }\n\n\nclass Draft6Schema(_TestSchema):\n    _schema = {\n        **_validation_selection_schema,\n        \"$schema\": \"http://json-schema.org/draft-06/schema#\",\n    }\n\n\ndef test_construct_multifaceted_schema():\n    dct = {\n        \"a\": {\"foo\": \"bar\"},\n        \"a2\": {\"foo\": 42},\n        \"b\": [\"a\", \"b\", \"c\"],\n        \"b2\": [1, 2, 3],\n        \"c\": 42,\n        \"d\": [\"x\", \"y\", \"z\"],\n        \"e\": [\"a\", \"b\"],\n    }\n\n    myschema = MySchema.from_dict(dct)\n    assert myschema.to_dict() == dct\n\n    myschema2 = MySchema(**dct)\n    assert myschema2.to_dict() == dct\n\n    assert isinstance(myschema.a, StringMapping)\n    assert isinstance(myschema.a2, dict)\n    assert isinstance(myschema.b, StringArray)\n    assert isinstance(myschema.b2, list)\n    assert isinstance(myschema.d, StringArray)\n\n\ndef test_schema_cases():\n    assert Derived(a=4, b=\"yo\").to_dict() == {\"a\": 4, \"b\": \"yo\"}\n    assert Derived(a=4, c={\"d\": \"hey\"}).to_dict() == {\"a\": 4, \"c\": {\"d\": \"hey\"}}\n    assert Derived(a=4, b=\"5\", c=Foo(d=\"val\")).to_dict() == {\n        \"a\": 4,\n        \"b\": \"5\",\n        \"c\": {\"d\": \"val\"},\n    }\n    assert Foo(d=\"hello\", f=4).to_dict() == {\"d\": \"hello\", \"f\": 4}\n\n    assert Derived().to_dict() == {}\n    assert Foo().to_dict() == {}\n\n    with pytest.raises(jsonschema.ValidationError):\n        # a needs to be an integer\n        Derived(a=\"yo\").to_dict()\n\n    with pytest.raises(jsonschema.ValidationError):\n        # Foo.d needs to be a string\n        Derived(c=Foo(4)).to_dict()\n\n    with pytest.raises(jsonschema.ValidationError):\n        # no additional properties allowed\n        Derived(foo=\"bar\").to_dict()\n\n\ndef test_round_trip():\n    D = {\"a\": 4, \"b\": \"yo\"}\n    assert Derived.from_dict(D).to_dict() == D\n\n    D = {\"a\": 4, \"c\": {\"d\": \"hey\"}}\n    assert Derived.from_dict(D).to_dict() == D\n\n    D = {\"a\": 4, \"b\": \"5\", \"c\": {\"d\": \"val\"}}\n    assert Derived.from_dict(D).to_dict() == D\n\n    D = {\"d\": \"hello\", \"f\": 4}\n    assert Foo.from_dict(D).to_dict() == D\n\n\ndef test_from_dict():\n    D = {\"a\": 4, \"b\": \"5\", \"c\": {\"d\": \"val\"}}\n    obj = Derived.from_dict(D)\n    assert obj.a == 4\n    assert obj.b == \"5\"\n    assert isinstance(obj.c, Foo)\n\n\ndef test_simple_type():\n    assert SimpleUnion(4).to_dict() == 4\n\n\ndef test_simple_array():\n    assert SimpleArray([4, 5, \"six\"]).to_dict() == [4, 5, \"six\"]\n    assert SimpleArray.from_dict(list(\"abc\")).to_dict() == list(\"abc\")  # pyright: ignore[reportArgumentType]\n\n\ndef test_definition_union():\n    obj = DefinitionUnion.from_dict(\"A\")  # pyright: ignore[reportArgumentType]\n    assert isinstance(obj, Bar)\n    assert obj.to_dict() == \"A\"\n\n    obj = DefinitionUnion.from_dict(\"B\")  # pyright: ignore[reportArgumentType]\n    assert isinstance(obj, Bar)\n    assert obj.to_dict() == \"B\"\n\n    obj = DefinitionUnion.from_dict({\"d\": \"yo\"})\n    assert isinstance(obj, Foo)\n    assert obj.to_dict() == {\"d\": \"yo\"}\n\n\ndef test_invalid_properties():\n    dct = {\"for\": 2, \"as\": 3, \"vega-lite\": 4, \"$schema\": 5}\n    invalid = InvalidProperties.from_dict(dct)\n    assert invalid[\"for\"] == 2\n    assert invalid[\"as\"] == 3\n    assert invalid[\"vega-lite\"] == 4\n    assert invalid[\"$schema\"] == 5\n    assert invalid.to_dict() == dct\n\n\ndef test_undefined_singleton():\n    assert Undefined is UndefinedType()\n\n\ndef test_schema_validator_selection():\n    # Tests if the correct validator class is chosen based on the $schema\n    # property in the schema. This uses a backwards-incompatible change\n    # in Draft 6 which introduced exclusiveMinimum as a number instead of a boolean.\n    # Therefore, with Draft 4 there is no actual minimum set as a number and validating\n    # the dictionary below passes. With Draft 6, it correctly checks if the number is\n    # > 10 and raises a ValidationError. See\n    # https://json-schema.org/draft-06/json-schema-release-notes.html#q-what-are-\n    # the-changes-between-draft-04-and-draft-06 for more details\n    dct = {\n        \"e\": 9,\n    }\n\n    assert Draft4Schema.from_dict(dct).to_dict() == dct\n    with pytest.raises(\n        jsonschema.exceptions.ValidationError,\n        match=\"9 is less than or equal to the minimum of 10\",\n    ):\n        Draft6Schema.from_dict(dct)\n\n\n@pytest.fixture\ndef dct():\n    return {\n        \"a\": {\"foo\": \"bar\"},\n        \"a2\": {\"foo\": 42},\n        \"b\": [\"a\", \"b\", \"c\"],\n        \"b2\": [1, 2, 3],\n        \"c\": 42,\n        \"d\": [\"x\", \"y\", \"z\"],\n    }\n\n\ndef test_copy_method(dct):\n    myschema = MySchema.from_dict(dct)\n\n    # Make sure copy is deep\n    copy = myschema.copy(deep=True)\n    copy[\"a\"][\"foo\"] = \"new value\"\n    copy[\"b\"] = [\"A\", \"B\", \"C\"]\n    copy[\"c\"] = 164\n    assert myschema.to_dict() == dct\n\n    # If we ignore a value, changing the copy changes the original\n    copy = myschema.copy(deep=True, ignore=[\"a\"])\n    copy[\"a\"][\"foo\"] = \"new value\"\n    copy[\"b\"] = [\"A\", \"B\", \"C\"]\n    copy[\"c\"] = 164\n    mydct = myschema.to_dict()\n    assert mydct[\"a\"][\"foo\"] == \"new value\"\n    assert mydct[\"b\"][0] == dct[\"b\"][0]\n    assert mydct[\"c\"] == dct[\"c\"]\n\n    # If copy is not deep, then changing copy below top level changes original\n    copy = myschema.copy(deep=False)\n    copy[\"a\"][\"foo\"] = \"baz\"\n    copy[\"b\"] = [\"A\", \"B\", \"C\"]\n    copy[\"c\"] = 164\n    mydct = myschema.to_dict()\n    assert mydct[\"a\"][\"foo\"] == \"baz\"\n    assert mydct[\"b\"] == dct[\"b\"]\n    assert mydct[\"c\"] == dct[\"c\"]\n\n\ndef test_copy_module(dct):\n    myschema = MySchema.from_dict(dct)\n\n    cp = copy.deepcopy(myschema)\n    cp[\"a\"][\"foo\"] = \"new value\"\n    cp[\"b\"] = [\"A\", \"B\", \"C\"]\n    cp[\"c\"] = 164\n    assert myschema.to_dict() == dct\n\n\ndef test_attribute_error():\n    m = MySchema()\n    invalid_attr = \"invalid_attribute\"\n    with pytest.raises(AttributeError) as err:\n        getattr(m, invalid_attr)\n    assert str(err.value) == (\"'MySchema' object has no attribute 'invalid_attribute'\")\n\n\ndef test_to_from_json(dct):\n    json_str = MySchema.from_dict(dct).to_json()\n    new_dct = MySchema.from_json(json_str).to_dict()\n\n    assert new_dct == dct\n\n\ndef test_to_from_pickle(dct):\n    myschema = MySchema.from_dict(dct)\n    output = io.BytesIO()\n    pickle.dump(myschema, output)\n    output.seek(0)\n    myschema_new = pickle.load(output)\n\n    assert myschema_new.to_dict() == dct\n\n\ndef test_class_with_no_schema():\n    class BadSchema(SchemaBase):\n        pass\n\n    with pytest.raises(ValueError) as err:  # noqa: PT011\n        BadSchema(4)\n    assert str(err.value).startswith(\"Cannot instantiate object\")\n\n\n@pytest.mark.parametrize(\"use_json\", [True, False])\ndef test_hash_schema(use_json):\n    classes = _TestSchema._default_wrapper_classes()\n\n    for cls in classes:\n        hsh1 = _FromDict.hash_schema(cls._schema, use_json=use_json)\n        hsh2 = _FromDict.hash_schema(cls._schema, use_json=use_json)\n        assert hsh1 == hsh2\n        assert hash(hsh1) == hash(hsh2)\n\n\ndef test_schema_validation_error():\n    try:\n        MySchema(a={\"foo\": 4})\n        the_err = None\n    except jsonschema.ValidationError as err:\n        the_err = err\n\n    assert isinstance(the_err, SchemaValidationError)\n    message = str(the_err)\n\n    assert the_err.message in message\n\n\ndef chart_error_example__layer():\n    # Error: Width is not a valid property of a VConcatChart\n    points = (\n        alt.Chart(data.cars.url)\n        .mark_point()\n        .encode(\n            x=\"Horsepower:Q\",\n            y=\"Miles_per_Gallon:Q\",\n        )\n    )\n    return (points & points).properties(width=400)\n\n\ndef chart_error_example__hconcat():\n    # Error: Invalid value for title in Text\n    source = data.cars()\n    points = (\n        alt.Chart(source)\n        .mark_point()\n        .encode(\n            x=\"Horsepower\",\n            y=\"Miles_per_Gallon\",\n        )\n    )\n\n    text = (\n        alt.Chart(source)\n        .mark_text()\n        .encode(\n            alt.Text(\"Horsepower:N\", title={\"text\": \"Horsepower\", \"align\": \"right\"})  # pyright: ignore[reportArgumentType]\n        )\n    )\n\n    return points | text\n\n\ndef chart_error_example__invalid_y_option_value_unknown_x_option():\n    # Error 1: unknown is an invalid channel option for X\n    # Error 2: Invalid Y option value \"asdf\" and unknown option \"unknown\" for X\n    return (\n        alt.Chart(data.barley())\n        .mark_bar()\n        .encode(\n            x=alt.X(\"variety\", unknown=2),\n            y=alt.Y(\"sum(yield)\", stack=\"asdf\"),  # pyright: ignore[reportArgumentType]\n        )\n    )\n\n\ndef chart_error_example__invalid_y_option_value():\n    # Error: Invalid Y option value \"asdf\"\n    return (\n        alt.Chart(data.barley())\n        .mark_bar()\n        .encode(\n            x=alt.X(\"variety\"),\n            y=alt.Y(\"sum(yield)\", stack=\"asdf\"),  # pyright: ignore[reportArgumentType]\n        )\n    )\n\n\ndef chart_error_example__invalid_y_option_value_with_condition():\n    # Error: Invalid Y option value \"asdf\". Condition is correct\n    # but is added below as in previous implementations of Altair this interfered\n    # with finding the invalidChannel error\n    return (\n        alt.Chart(data.barley())\n        .mark_bar()\n        .encode(\n            x=\"variety\",\n            y=alt.Y(\"sum(yield)\", stack=\"asdf\"),  # pyright: ignore[reportArgumentType]\n            opacity=alt.condition(\"datum.yield > 0\", alt.value(1), alt.value(0.2)),\n        )\n    )\n\n\ndef chart_error_example__invalid_timeunit_value():\n    # Error: Invalid value for Angle.timeUnit\n    return alt.Chart().encode(alt.Angle().timeUnit(\"invalid_value\"))  # pyright: ignore[reportArgumentType]\n\n\ndef chart_error_example__invalid_sort_value():\n    # Error: Invalid value for Angle.sort\n    return alt.Chart().encode(alt.Angle().sort(\"invalid_value\"))\n\n\ndef chart_error_example__invalid_bandposition_value():\n    # Error: Invalid value for Text.bandPosition\n    return (\n        alt.Chart(data.cars())\n        .mark_text(align=\"right\")\n        .encode(alt.Text(\"Horsepower:N\", bandPosition=\"4\"))  # pyright: ignore[reportArgumentType]\n    )\n\n\ndef chart_error_example__invalid_type():\n    # Error: Invalid value for type\n    return alt.Chart().encode(alt.X(type=\"unknown\"))  # pyright: ignore[reportArgumentType]\n\n\ndef chart_error_example__additional_datum_argument():\n    # Error: wrong_argument is not a valid argument to datum\n    return alt.Chart().mark_point().encode(x=alt.datum(1, wrong_argument=1))\n\n\ndef chart_error_example__additional_value_argument():\n    # Error: `ColorValue` has no parameter named 'predicate'\n    return alt.Chart().mark_point().encode(color=alt.value(\"red\", predicate=True))\n\n\ndef chart_error_example__invalid_value_type():\n    # Error: Value cannot be an integer in this case\n    return (\n        alt.Chart(data.cars())\n        .mark_point()\n        .encode(\n            x=\"Acceleration:Q\",\n            y=\"Horsepower:Q\",\n            color=alt.value(1),  # should be eg. alt.value('red')\n        )\n    )\n\n\ndef chart_error_example__wrong_tooltip_type_in_faceted_chart():\n    # Error: Wrong data type to pass to tooltip\n    return (\n        alt.Chart(pd.DataFrame({\"a\": [1]}))\n        .mark_point()\n        .encode(tooltip=[{\"wrong\"}])  # pyright: ignore[reportArgumentType]\n        .facet()\n    )\n\n\ndef chart_error_example__wrong_tooltip_type_in_layered_chart():\n    # Error: Wrong data type to pass to tooltip\n    return alt.layer(alt.Chart().mark_point().encode(tooltip=[{\"wrong\"}]))  # pyright: ignore[reportArgumentType]\n\n\ndef chart_error_example__two_errors_in_layered_chart():\n    # Error 1: Wrong data type to pass to tooltip\n    # Error 2: `Color` has no parameter named 'invalidArgument'\n    return alt.layer(\n        alt.Chart().mark_point().encode(tooltip=[{\"wrong\"}]),  # pyright: ignore[reportArgumentType]\n        alt.Chart().mark_line().encode(alt.Color(invalidArgument=\"unknown\")),\n    )\n\n\ndef chart_error_example__two_errors_in_complex_concat_layered_chart():\n    # Error 1: Wrong data type to pass to tooltip\n    # Error 2: Invalid value for bandPosition\n    return (\n        chart_error_example__wrong_tooltip_type_in_layered_chart()\n        | chart_error_example__invalid_bandposition_value()\n    )\n\n\ndef chart_error_example__three_errors_in_complex_concat_layered_chart():\n    # Error 1: Wrong data type to pass to tooltip\n    # Error 2: `Color` has no parameter named 'invalidArgument'\n    # Error 3: Invalid value for bandPosition\n    return (\n        chart_error_example__two_errors_in_layered_chart()\n        | chart_error_example__invalid_bandposition_value()\n    )\n\n\ndef chart_error_example__two_errors_with_one_in_nested_layered_chart():\n    # Error 1: invalidOption is not a valid option for Scale\n    # Error 2: `Color` has no parameter named 'invalidArgument'\n\n    # In the final chart object, the `layer` attribute will look like this:\n    # [alt.Chart(...), alt.Chart(...), alt.LayerChart(...)]\n    # We can therefore use this example to test if an error is also\n    # spotted in a layered chart within another layered chart\n    source = pd.DataFrame(\n        [\n            {\"Day\": 1, \"Value\": 103.3},\n            {\"Day\": 2, \"Value\": 394.8},\n            {\"Day\": 3, \"Value\": 199.5},\n        ]\n    )\n\n    blue_bars = (\n        alt.Chart(source)\n        .encode(alt.X(\"Day:O\").scale(invalidOption=10), alt.Y(\"Value:Q\"))  # pyright: ignore[reportCallIssue]\n        .mark_bar()\n    )\n    red_bars = (\n        alt.Chart(source)\n        .transform_filter(alt.datum.Value >= 300)\n        .transform_calculate(as_=\"baseline\", calculate=\"300\")\n        .encode(\n            alt.X(\"Day:O\"),\n            alt.Y(\"baseline:Q\"),\n            alt.Y2(\"Value:Q\"),\n            color=alt.value(\"#e45755\"),\n        )\n        .mark_bar()\n    )\n\n    bars = blue_bars + red_bars\n\n    base = alt.Chart().encode(y=alt.datum(300))\n\n    rule = base.mark_rule().encode(alt.Color(invalidArgument=\"unknown\"))\n    text = base.mark_text(text=\"hazardous\")\n    rule_text = rule + text\n\n    chart = bars + rule_text\n    return chart\n\n\ndef chart_error_example__four_errors_hide_fourth():\n    # Error 1: unknown is not a valid encoding channel option\n    # Error 2: Invalid Y option value \"asdf\".\n    # Error 3: another_unknown is not a valid encoding channel option\n    # Error 4: fourth_error is not a valid encoding channel option <- this error\n    # should not show up in the final error message as it is capped at showing\n    # 3 errors\n    return (\n        alt.Chart(data.barley())\n        .mark_bar()\n        .encode(\n            x=alt.X(\"variety\", unknown=2),\n            y=alt.Y(\"sum(yield)\", stack=\"asdf\"),  # pyright: ignore[reportArgumentType]\n            color=alt.Color(\"variety\", another_unknown=2),\n            opacity=alt.Opacity(\"variety\", fourth_error=1),\n        )\n    )\n\n\ndef id_func_chart_error_example(val) -> str:\n    \"\"\"\n    Ensures the generated test-id name uses only the unique portion of `chart_func`.\n\n    Otherwise the name is like below, but ``...`` represents the full error message::\n\n        \"test_chart_validation_errors[chart_error_example__two_errors_with_one_in_nested_layered_chart-...]\"\n    \"\"\"\n    if isinstance(val, types.FunctionType):\n        return val.__name__.replace(\"chart_error_example__\", \"\")\n    else:\n        return \"\"\n\n\n# NOTE: Avoids all cases appearing in a failure traceback\n# At the time of writing, this is over 300 lines\nchart_funcs_error_message: list[tuple[Callable[..., Any], str]] = [\n    (\n        chart_error_example__invalid_y_option_value_unknown_x_option,\n        rf\"\"\"Multiple errors were found.\n\n                Error 1: `X` has no parameter named 'unknown'\n\n                    Existing parameter names are:\n                    shorthand      bin      scale   timeUnit   \n                    aggregate      field    sort    title      \n                    axis           impute   stack   type       \n                    bandPosition                               \n\n                    See the help for `X` to read the full description of these parameters\n\n                Error 2: 'asdf' is an invalid value for `stack`. Valid values are:\n\n                    - One of \\['zero', 'center', 'normalize'\\]\n                    - Of type {re.escape(\"`bool | None`\")}$\"\"\",\n    ),\n    (\n        chart_error_example__wrong_tooltip_type_in_faceted_chart,\n        rf\"\"\"'\\['wrong'\\]' is an invalid value for `field`. Valid values are of type {re.escape(\"`str | Mapping[str, Any]`\")}.$\"\"\",\n    ),\n    (\n        chart_error_example__wrong_tooltip_type_in_layered_chart,\n        rf\"\"\"'\\['wrong'\\]' is an invalid value for `field`. Valid values are of type {re.escape(\"`str | Mapping[str, Any]`\")}.$\"\"\",\n    ),\n    (\n        chart_error_example__two_errors_in_layered_chart,\n        rf\"\"\"Multiple errors were found.\n\n                Error 1: '\\['wrong'\\]' is an invalid value for `field`. Valid values are of type {re.escape(\"`str | Mapping[str, Any]`\")}.\n\n                Error 2: `Color` has no parameter named 'invalidArgument'\n\n                    Existing parameter names are:\n                    shorthand      bin         legend   timeUnit   \n                    aggregate      condition   scale    title      \n                    bandPosition   field       sort     type       \n\n                    See the help for `Color` to read the full description of these parameters$\"\"\",\n    ),\n    (\n        chart_error_example__two_errors_in_complex_concat_layered_chart,\n        rf\"\"\"Multiple errors were found.\n\n                Error 1: '\\['wrong'\\]' is an invalid value for `field`. Valid values are of type {re.escape(\"`str | Mapping[str, Any]`\")}.\n\n                Error 2: '4' is an invalid value for `bandPosition`. Valid values are of type `float`.$\"\"\",\n    ),\n    (\n        chart_error_example__three_errors_in_complex_concat_layered_chart,\n        rf\"\"\"Multiple errors were found.\n\n                Error 1: '\\['wrong'\\]' is an invalid value for `field`. Valid values are of type {re.escape(\"`str | Mapping[str, Any]`\")}.\n\n                Error 2: `Color` has no parameter named 'invalidArgument'\n\n                    Existing parameter names are:\n                    shorthand      bin         legend   timeUnit   \n                    aggregate      condition   scale    title      \n                    bandPosition   field       sort     type       \n\n                    See the help for `Color` to read the full description of these parameters\n\n                Error 3: '4' is an invalid value for `bandPosition`. Valid values are of type `float`.$\"\"\",\n    ),\n    (\n        chart_error_example__two_errors_with_one_in_nested_layered_chart,\n        r\"\"\"Multiple errors were found.\n\n                Error 1: `Scale` has no parameter named 'invalidOption'\n\n                    Existing parameter names are:\n                    align      domain      exponent       paddingOuter   round    \n                    base       domainMax   interpolate    range          scheme   \n                    bins       domainMid   nice           rangeMax       type     \n                    clamp      domainMin   padding        rangeMin       zero     \n                    constant   domainRaw   paddingInner   reverse                 \n\n                    See the help for `Scale` to read the full description of these parameters\n\n                Error 2: `Color` has no parameter named 'invalidArgument'\n\n                    Existing parameter names are:\n                    shorthand      bin         legend   timeUnit   \n                    aggregate      condition   scale    title      \n                    bandPosition   field       sort     type       \n\n                    See the help for `Color` to read the full description of these parameters$\"\"\",\n    ),\n    (\n        chart_error_example__layer,\n        r\"\"\"`VConcatChart` has no parameter named 'width'\n\n                Existing parameter names are:\n                vconcat      center     description   params    title       \n                autosize     config     name          resolve   transform   \n                background   data       padding       spacing   usermeta    \n                bounds       datasets                                       \n\n                See the help for `VConcatChart` to read the full description of these parameters$\"\"\",\n    ),\n    (\n        chart_error_example__invalid_y_option_value,\n        rf\"\"\"'asdf' is an invalid value for `stack`. Valid values are:\n\n                - One of \\['zero', 'center', 'normalize'\\]\n                - Of type {re.escape(\"`bool | None`\")}$\"\"\",\n    ),\n    (\n        chart_error_example__invalid_y_option_value_with_condition,\n        rf\"\"\"'asdf' is an invalid value for `stack`. Valid values are:\n\n                - One of \\['zero', 'center', 'normalize'\\]\n                - Of type {re.escape(\"`bool | None`\")}$\"\"\",\n    ),\n    (\n        chart_error_example__hconcat,\n        rf\"\"\"'{{'text': 'Horsepower', 'align': 'right'}}' is an invalid value for `title`. Valid values are of type {re.escape(\"`str | Sequence | None`\")}.$\"\"\",\n    ),\n    (\n        chart_error_example__invalid_timeunit_value,\n        rf\"\"\"'invalid_value' is an invalid value for `timeUnit`. Valid values are:\n\n                - One of \\['year', 'quarter', 'month', 'week', 'day', 'dayofyear', 'date', 'hours', 'minutes', 'seconds', 'milliseconds'\\]\n                - One of \\['utcyear', 'utcquarter', 'utcmonth', 'utcweek', 'utcday', 'utcdayofyear', 'utcdate', 'utchours', 'utcminutes', 'utcseconds', 'utcmilliseconds'\\]\n                - One of \\['yearquarter', 'yearquartermonth', 'yearmonth', 'yearmonthdate', 'yearmonthdatehours', 'yearmonthdatehoursminutes', 'yearmonthdatehoursminutesseconds', 'yearweek', 'yearweekday', 'yearweekdayhours', 'yearweekdayhoursminutes', 'yearweekdayhoursminutesseconds', 'yeardayofyear', 'quartermonth', 'monthdate', 'monthdatehours', 'monthdatehoursminutes', 'monthdatehoursminutesseconds', 'weekday', 'weekdayhours', 'weekdayhoursminutes', 'weekdayhoursminutesseconds', 'dayhours', 'dayhoursminutes', 'dayhoursminutesseconds', 'hoursminutes', 'hoursminutesseconds', 'minutesseconds', 'secondsmilliseconds'\\]\n                - One of \\['utcyearquarter', 'utcyearquartermonth', 'utcyearmonth', 'utcyearmonthdate', 'utcyearmonthdatehours', 'utcyearmonthdatehoursminutes', 'utcyearmonthdatehoursminutesseconds', 'utcyearweek', 'utcyearweekday', 'utcyearweekdayhours', 'utcyearweekdayhoursminutes', 'utcyearweekdayhoursminutesseconds', 'utcyeardayofyear', 'utcquartermonth', 'utcmonthdate', 'utcmonthdatehours', 'utcmonthdatehoursminutes', 'utcmonthdatehoursminutesseconds', 'utcweekday', 'utcweekdayhours', 'utcweekdayhoursminutes', 'utcweekdayhoursminutesseconds', 'utcdayhours', 'utcdayhoursminutes', 'utcdayhoursminutesseconds', 'utchoursminutes', 'utchoursminutesseconds', 'utcminutesseconds', 'utcsecondsmilliseconds'\\]\n                - One of \\['binnedyear', 'binnedyearquarter', 'binnedyearquartermonth', 'binnedyearmonth', 'binnedyearmonthdate', 'binnedyearmonthdatehours', 'binnedyearmonthdatehoursminutes', 'binnedyearmonthdatehoursminutesseconds', 'binnedyearweek', 'binnedyearweekday', 'binnedyearweekdayhours', 'binnedyearweekdayhoursminutes', 'binnedyearweekdayhoursminutesseconds', 'binnedyeardayofyear', 'binnedutcyear', 'binnedutcyearquarter', 'binnedutcyearquartermonth', 'binnedutcyearmonth', 'binnedutcyearmonthdate', 'binnedutcyearmonthdatehours', 'binnedutcyearmonthdatehoursminutes', 'binnedutcyearmonthdatehoursminutesseconds', 'binnedutcyearweek', 'binnedutcyearweekday', 'binnedutcyearweekdayhours', 'binnedutcyearweekdayhoursminutes', 'binnedutcyearweekdayhoursminutesseconds', 'binnedutcyeardayofyear'\\]\n                - Of type {re.escape(\"`Mapping[str, Any]`\")}$\"\"\",\n    ),\n    (\n        chart_error_example__invalid_sort_value,\n        rf\"\"\"'invalid_value' is an invalid value for `sort`. Valid values are:\n\n                - One of \\['ascending', 'descending'\\]\n                - One of \\['x', 'y', 'color', 'fill', 'stroke', 'strokeWidth', 'size', 'shape', 'fillOpacity', 'strokeOpacity', 'opacity', 'text'\\]\n                - One of \\['-x', '-y', '-color', '-fill', '-stroke', '-strokeWidth', '-size', '-shape', '-fillOpacity', '-strokeOpacity', '-opacity', '-text'\\]\n                - Of type {re.escape(\"`Sequence | Mapping[str, Any] | None`\")}$\"\"\",\n    ),\n    (\n        chart_error_example__invalid_bandposition_value,\n        r\"\"\"'4' is an invalid value for `bandPosition`. Valid values are of type `float`.$\"\"\",\n    ),\n    (\n        chart_error_example__invalid_type,\n        r\"\"\"'unknown' is an invalid value for `type`. Valid values are one of \\['quantitative', 'ordinal', 'temporal', 'nominal', 'geojson'\\].$\"\"\",\n    ),\n    (\n        chart_error_example__additional_datum_argument,\n        r\"\"\"`XDatum` has no parameter named 'wrong_argument'\n\n                Existing parameter names are:\n                datum          impute   title   \n                axis           scale    type    \n                bandPosition   stack            \n\n                See the help for `XDatum` to read the full description of these parameters$\"\"\",\n    ),\n    (\n        chart_error_example__additional_value_argument,\n        r\"\"\"`ColorValue` has no parameter named 'predicate'\n\n                Existing parameter names are:\n                value   condition   \n\n                See the help for `ColorValue` to read the full description of these parameters$\"\"\",\n    ),\n    (\n        chart_error_example__invalid_value_type,\n        rf\"\"\"'1' is an invalid value for `value`. Valid values are of type {re.escape(\"`str | Mapping[str, Any] | None`\")}.$\"\"\",\n    ),\n    (\n        chart_error_example__four_errors_hide_fourth,\n        r\"\"\"Multiple errors were found.\n\n                Error 1: `Color` has no parameter named 'another_unknown'\n\n                    Existing parameter names are:\n                    shorthand      bin         legend   timeUnit   \n                    aggregate      condition   scale    title      \n                    bandPosition   field       sort     type       \n\n                    See the help for `Color` to read the full description of these parameters\n\n                Error 2: `Opacity` has no parameter named 'fourth_error'\n\n                    Existing parameter names are:\n                    shorthand      bin         legend   timeUnit   \n                    aggregate      condition   scale    title      \n                    bandPosition   field       sort     type       \n\n                    See the help for `Opacity` to read the full description of these parameters\n\n                Error 3: `X` has no parameter named 'unknown'\n\n                    Existing parameter names are:\n                    shorthand      bin      scale   timeUnit   \n                    aggregate      field    sort    title      \n                    axis           impute   stack   type       \n                    bandPosition                               \n\n                    See the help for `X` to read the full description of these parameters$\"\"\",\n    ),\n]\n\n\n@pytest.mark.parametrize(\n    (\"chart_func\", \"expected_error_message\"),\n    chart_funcs_error_message,\n    ids=id_func_chart_error_example,\n)\ndef test_chart_validation_errors(chart_func, expected_error_message):\n    # For some wrong chart specifications such as an unknown encoding channel,\n    # Altair already raises a warning before the chart specifications are validated.\n    # We can ignore these warnings as we are interested in the errors being raised\n    # during validation which is triggered by to_dict\n    with warnings.catch_warnings():\n        warnings.filterwarnings(\"ignore\", category=UserWarning)\n        chart = chart_func()\n    expected_error_message = inspect.cleandoc(expected_error_message)\n    with pytest.raises(SchemaValidationError, match=expected_error_message):\n        chart.to_dict()\n\n\ndef test_multiple_field_strings_in_condition():\n    selection = alt.selection_point()\n    expected_error_message = \"A field cannot be used for both the `if_true` and `if_false` values of a condition. One of them has to specify a `value` or `datum` definition.\"\n    with pytest.raises(ValueError, match=expected_error_message):\n        chart = (  # noqa: F841\n            alt.Chart(data.cars())\n            .mark_circle()\n            .add_params(selection)\n            .encode(color=alt.condition(selection, \"Origin\", \"Origin\"))\n            .to_dict()\n        )\n\n\n@pytest.mark.parametrize(\"tp\", [pd.DataFrame, pl.DataFrame])\ndef test_non_existent_column_name(tp: Callable[..., IntoDataFrame]) -> None:\n    df = tp({\"a\": [1, 2], \"b\": [4, 5]})\n    msg = (\n        'Unable to determine data type for the field \"c\"; verify that the field name '\n        \"is not misspelled. If you are referencing a field from a transform, also \"\n        \"confirm that the data type is specified correctly.\"\n    )\n    with pytest.raises(ValueError, match=msg):\n        alt.Chart(df).mark_line().encode(x=\"a\", y=\"c\").to_json()\n\n\ndef test_serialize_numpy_types():\n    m = MySchema(\n        a={\"date\": np.datetime64(\"2019-01-01\")},\n        a2={\"int64\": np.int64(1), \"float64\": np.float64(2)},\n        b2=np.arange(4),\n    )\n    out = m.to_json()\n    dct = json.loads(out)\n    assert dct == {\n        \"a\": {\"date\": \"2019-01-01T00:00:00\"},\n        \"a2\": {\"int64\": 1, \"float64\": 2},\n        \"b2\": [0, 1, 2, 3],\n    }\n\n\ndef test_to_dict_no_side_effects():\n    # Tests that shorthands are expanded in returned dictionary when calling to_dict\n    # but that they remain untouched in the chart object. Goal is to ensure that\n    # the chart object stays unchanged when to_dict is called\n    def validate_encoding(encoding):\n        assert encoding.x[\"shorthand\"] == \"a\"\n        assert encoding.x[\"field\"] is alt.Undefined\n        assert encoding.x[\"type\"] is alt.Undefined\n        assert encoding.y[\"shorthand\"] == \"b:Q\"\n        assert encoding.y[\"field\"] is alt.Undefined\n        assert encoding.y[\"type\"] is alt.Undefined\n\n    data = pd.DataFrame(\n        {\n            \"a\": [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\"],\n            \"b\": [28, 55, 43, 91, 81, 53, 19, 87, 52],\n        }\n    )\n\n    chart = alt.Chart(data).mark_bar().encode(x=\"a\", y=\"b:Q\")\n\n    validate_encoding(chart.encoding)\n    dct = chart.to_dict()\n    validate_encoding(chart.encoding)\n\n    assert \"shorthand\" not in dct[\"encoding\"][\"x\"]\n    assert dct[\"encoding\"][\"x\"][\"field\"] == \"a\"\n\n    assert \"shorthand\" not in dct[\"encoding\"][\"y\"]\n    assert dct[\"encoding\"][\"y\"][\"field\"] == \"b\"\n    assert dct[\"encoding\"][\"y\"][\"type\"] == \"quantitative\"\n\n\ndef test_to_dict_expand_mark_spec():\n    # Test that `to_dict` correctly expands marks to a dictionary\n    # without impacting the original spec which remains a string\n    chart = alt.Chart().mark_bar()\n    assert chart.to_dict()[\"mark\"] == {\"type\": \"bar\"}\n    assert chart.mark == \"bar\"\n\n\n@pytest.mark.parametrize(\n    \"expected\",\n    [list(\"cdfabe\"), [0, 3, 4, 5, 8]],\n)\n@pytest.mark.parametrize(\n    \"tp\",\n    [\n        tuple,\n        list,\n        deque,\n        pl.Series,\n        pd.Series,\n        pd.Index,\n        pd.Categorical,\n        pd.CategoricalIndex,\n        np.array,\n    ],\n)\n@pytest.mark.parametrize(\n    \"schema_param\",\n    [\n        (partial(X, \"x:N\"), \"sort\"),\n        (partial(FieldOneOfPredicate, \"name\"), \"oneOf\"),\n        (Legend, \"values\"),\n    ],\n)\ndef test_to_dict_iterables(\n    tp: Callable[..., Iterable[Any]],\n    expected: Sequence[Any],\n    schema_param: tuple[Callable[..., SchemaBase], str],\n) -> None:\n    \"\"\"\n    Confirm `SchemaBase` can convert common `(Sequence|Iterable)` types to `list`.\n\n    Parameters\n    ----------\n    tp\n        Constructor for test `Iterable`.\n    expected\n        Values wrapped by `tp`.\n    schema_param\n        Constructor for `SchemaBase` subclass, and target parameter name.\n\n    Notes\n    -----\n    `partial` can be used to reshape the `SchemaBase` constructor.\n\n    References\n    ----------\n    - https://github.com/vega/altair/issues/2808\n    - https://github.com/vega/altair/issues/2877\n    \"\"\"\n    tp_schema, param = schema_param\n    validated = tp_schema(**{param: tp(expected)}).to_dict()\n    actual = validated[param]\n    assert actual == expected\n\n\n@pytest.mark.parametrize(\n    \"tp\", [range, np.arange, partial(pl.int_range, eager=True), pd.RangeIndex]\n)\ndef test_to_dict_range(tp) -> None:\n    expected = [0, 1, 2, 3, 4]\n    x_dict = alt.X(\"x:O\", sort=tp(0, 5)).to_dict()\n    actual = x_dict[\"sort\"]  # type: ignore\n    assert actual == expected\n\n\n@pytest.fixture\ndef stocks() -> alt.Chart:\n    source = \"https://cdn.jsdelivr.net/npm/vega-datasets@v3.2.1/data/sp500.csv\"\n    return alt.Chart(source).mark_area().encode(x=\"date:T\", y=\"price:Q\")\n\n\ndef DateTime(\n    year: int,\n    month: int,\n    day: int,\n    hour: int = 0,\n    minute: int = 0,\n    second: int = 0,\n    milliseconds: int = 0,\n    *,\n    utc: bool | None = None,\n) -> alt.DateTime:\n    \"\"\"Factory for positionally aligning `datetime.datetime`/ `alt.DateTime`.\"\"\"\n    kwds: dict[str, Any] = {}\n    if utc is True:\n        kwds.update(utc=utc)\n    if (hour, minute, second, milliseconds) != (0, 0, 0, 0):\n        kwds.update(\n            hours=hour, minutes=minute, seconds=second, milliseconds=milliseconds\n        )\n    return alt.DateTime(year=year, month=month, date=day, **kwds)\n\n\n@pytest.mark.parametrize(\n    (\"window\", \"expected\"),\n    [\n        (\n            (dt.date(2005, 1, 1), dt.date(2009, 1, 1)),\n            (DateTime(2005, 1, 1), DateTime(2009, 1, 1)),\n        ),\n        (\n            (dt.datetime(2005, 1, 1), dt.datetime(2009, 1, 1)),\n            (\n                # NOTE: Keep this to test truncating independently!\n                alt.DateTime(year=2005, month=1, date=1),\n                alt.DateTime(year=2009, month=1, date=1),\n            ),\n        ),\n        (\n            (\n                dt.datetime(2001, 1, 1, 9, 30, 0, 2999),\n                dt.datetime(2002, 1, 1, 17, 0, 0, 5000),\n            ),\n            (\n                DateTime(2001, 1, 1, 9, 30, 0, 2),\n                DateTime(2002, 1, 1, 17, 0, 0, 5),\n            ),\n        ),\n        (\n            (\n                dt.datetime(2003, 5, 1, 1, 30, tzinfo=dt.timezone.utc),\n                dt.datetime(2003, 6, 3, 4, 3, tzinfo=dt.timezone.utc),\n            ),\n            (\n                DateTime(2003, 5, 1, 1, 30, 0, 0, utc=True),\n                DateTime(2003, 6, 3, 4, 3, 0, 0, utc=True),\n            ),\n        ),\n    ],\n    ids=[\"date\", \"datetime (no time)\", \"datetime (microseconds)\", \"datetime (UTC)\"],\n)\ndef test_to_dict_datetime(\n    stocks, window: tuple[dt.date, dt.date], expected: tuple[alt.DateTime, alt.DateTime]\n) -> None:\n    \"\"\"\n    Includes `datetime.datetime` with an empty time component.\n\n    This confirms that conversion matches how `alt.DateTime` omits `Undefined`.\n    \"\"\"\n    expected_dicts = [e.to_dict() for e in expected]\n    brush = alt.selection_interval(encodings=[\"x\"], value={\"x\": window})\n    base = stocks\n\n    upper = base.encode(alt.X(\"date:T\").scale(domain=brush))\n    lower = base.add_params(brush)\n    chart = upper & lower\n    mapping = chart.to_dict()\n    params_value = mapping[\"params\"][0][\"value\"][\"x\"]\n\n    assert isinstance(params_value, list)\n    assert params_value == expected_dicts\n\n\n@pytest.mark.parametrize(\n    \"tzinfo\",\n    [\n        dt.timezone(dt.timedelta(hours=2), \"UTC+2\"),\n        dt.timezone(dt.timedelta(hours=1), \"BST\"),\n        dt.timezone(dt.timedelta(hours=-7), \"pdt\"),\n        dt.timezone(dt.timedelta(hours=-3), \"BRT\"),\n        dt.timezone(dt.timedelta(hours=9), \"UTC\"),\n        dt.timezone(dt.timedelta(minutes=60), \"utc\"),\n    ],\n)\ndef test_to_dict_datetime_unsupported_timezone(tzinfo: dt.timezone) -> None:\n    datetime = dt.datetime(2003, 5, 1, 1, 30)\n\n    result = alt.FieldEqualPredicate(datetime, \"column 1\")\n    assert result.to_dict()\n\n    with pytest.raises(TypeError, match=r\"Unsupported timezone.+\\n.+UTC.+local\"):\n        alt.FieldEqualPredicate(datetime.replace(tzinfo=tzinfo), \"column 1\")\n\n\ndef test_to_dict_datetime_typing() -> None:\n    \"\"\"\n    Enumerating various places that need updated annotations.\n\n    All work at runtime, just need to give the type checkers the new info.\n\n    Sub-issue of https://github.com/vega/altair/issues/3650\n    \"\"\"\n    datetime = dt.datetime(2003, 5, 1, 1, 30)\n    datetime_seq = [datetime, datetime.replace(2005), datetime.replace(2008)]\n    assert alt.FieldEqualPredicate(datetime, field=\"column 1\")\n    assert alt.FieldOneOfPredicate(oneOf=datetime_seq, field=\"column 1\")\n\n    assert alt.Legend(values=datetime_seq)\n\n    assert alt.Scale(domain=datetime_seq)\n    assert alt.Scale(domainMin=datetime_seq[0], domainMax=datetime_seq[2])\n\n    # NOTE: `datum` is not annotated?\n    assert alt.XDatum(datum=datetime).to_dict()\n\n    # NOTE: `*args` is not annotated?\n    # - All of these uses *args incorrectly\n    assert alt.Vector2DateTime(datetime_seq[:2])\n"
  },
  {
    "path": "tests/utils/test_server.py",
    "content": "\"\"\"Test http server.\"\"\"\n\nfrom altair.utils.server import MockServer, serve\nfrom tests import slow\n\n\n@slow\ndef test_serve():\n    html = \"<html><title>Title</title><body><p>Content</p></body></html>\"\n    serve(html, open_browser=False, http_server=MockServer)\n"
  },
  {
    "path": "tests/utils/test_to_values_narwhals.py",
    "content": "import re\nfrom datetime import datetime\n\nimport narwhals.stable.v1 as nw\nimport pandas as pd\nimport pytest\n\nfrom altair.utils.data import to_values\nfrom tests import skip_requires_pyarrow\n\n\n@skip_requires_pyarrow(requires_tzdata=True)\ndef test_arrow_timestamp_conversion():\n    \"\"\"Test that arrow timestamp values are converted to ISO-8601 strings.\"\"\"\n    import pyarrow as pa\n\n    data = {\n        \"date\": [datetime(2004, 8, 1), datetime(2004, 9, 1), None],\n        \"value\": [102, 129, 139],\n    }\n    pa_table = pa.table(data)\n    nw_frame = nw.from_native(pa_table)\n\n    values = to_values(nw_frame)\n    expected_values = {\n        \"values\": [\n            {\"date\": \"2004-08-01T00:00:00.000000\", \"value\": 102},\n            {\"date\": \"2004-09-01T00:00:00.000000\", \"value\": 129},\n            {\"date\": None, \"value\": 139},\n        ]\n    }\n    assert values == expected_values\n\n\n@skip_requires_pyarrow\ndef test_duration_raises():\n    import pyarrow as pa\n\n    td = pd.timedelta_range(0, periods=3, freq=\"h\")\n    df = pd.DataFrame(td).reset_index()\n    df.columns = [\"id\", \"timedelta\"]\n    pa_table = pa.table(df)\n    nw_frame = nw.from_native(pa_table)\n    with pytest.raises(ValueError) as e:  # noqa: PT011\n        to_values(nw_frame)\n\n    # Check that exception mentions the duration[ns] type,\n    # which is what the pandas timedelta is converted into\n\n    assert re.match(\n        r'^Field \"timedelta\" has type \"Duration.*\" which is not supported by Altair',\n        e.value.args[0],\n    )\n"
  },
  {
    "path": "tests/utils/test_utils.py",
    "content": "import io\nimport json\n\nimport narwhals.stable.v1 as nw\nimport numpy as np\nimport pandas as pd\nimport pytest\n\nfrom altair.utils import (\n    infer_vegalite_type_for_pandas,\n    sanitize_narwhals_dataframe,\n    sanitize_pandas_dataframe,\n)\nfrom tests import skip_requires_polars, skip_requires_pyarrow\n\n\ndef test_infer_vegalite_type():\n    def _check(arr, typ):\n        assert infer_vegalite_type_for_pandas(arr) == typ\n\n    _check(np.arange(5, dtype=float), \"quantitative\")\n    _check(np.arange(5, dtype=int), \"quantitative\")\n    _check(np.zeros(5, dtype=bool), \"nominal\")\n    _check(pd.date_range(\"2012\", \"2013\"), \"temporal\")\n    _check(pd.timedelta_range(365, periods=12), \"temporal\")\n\n    rng = np.random.default_rng()\n    nulled = pd.Series(rng.integers(10, size=10))\n    nulled[0] = None\n    _check(nulled, \"quantitative\")\n    _check([\"a\", \"b\", \"c\"], \"nominal\")\n\n    with pytest.warns(UserWarning, match=r\"infer vegalite type\"):\n        _check([], \"nominal\")\n\n\ndef test_sanitize_dataframe():\n    # create a dataframe with various types\n    df = pd.DataFrame(\n        {\n            \"s\": list(\"abcde\"),\n            \"f\": np.arange(5, dtype=float),\n            \"i\": np.arange(5, dtype=int),\n            \"b\": np.array([True, False, True, True, False]),\n            \"d\": pd.date_range(\"2012-01-01\", periods=5, freq=\"h\"),\n            \"c\": pd.Series(list(\"ababc\"), dtype=\"category\"),\n            \"c2\": pd.Series([1, \"A\", 2.5, \"B\", None], dtype=\"category\"),\n            \"o\": pd.Series([np.array(i) for i in range(5)]),\n            \"p\": pd.date_range(\"2012-01-01\", periods=5, freq=\"h\").tz_localize(\"UTC\"),\n        }\n    )\n\n    # add some nulls\n    df.iloc[0, df.columns.get_loc(\"s\")] = None\n    df.iloc[0, df.columns.get_loc(\"f\")] = np.nan\n    df.iloc[0, df.columns.get_loc(\"d\")] = pd.NaT\n    df.iloc[0, df.columns.get_loc(\"o\")] = np.array(np.nan)\n\n    # JSON serialize. This will fail on non-sanitized dataframes\n    print(df[[\"s\", \"c2\"]])\n    df_clean = sanitize_pandas_dataframe(df)\n    print(df_clean[[\"s\", \"c2\"]])\n    print(df_clean[[\"s\", \"c2\"]].to_dict())\n    s = json.dumps(df_clean.to_dict(orient=\"records\"))\n    print(s)\n\n    # Re-construct pandas dataframe\n    df2 = pd.read_json(io.StringIO(s))\n\n    # Re-order the columns to match df\n    df2 = df2[df.columns]\n\n    # pandas doesn't properly recognize np.array(np.nan); use float64 so df matches read_json\n    df.iloc[0, df.columns.get_loc(\"o\")] = np.nan\n    df[\"o\"] = df[\"o\"].astype(np.float64)\n\n    # Re-apply original types\n    for col in df:\n        if str(df[col].dtype).startswith(\"datetime\"):\n            # astype(datetime) introduces time-zone issues:\n            # to_datetime() does not.\n            utc = isinstance(df[col].dtype, pd.DatetimeTZDtype)\n            df2[col] = pd.to_datetime(df2[col], utc=utc)\n        else:\n            df2[col] = df2[col].astype(df[col].dtype)\n\n    assert df.equals(df2)\n\n\n@pytest.mark.filterwarnings(\"ignore:'H' is deprecated.*:FutureWarning\")\n@skip_requires_pyarrow\ndef test_sanitize_dataframe_arrow_columns():\n    import pyarrow as pa\n\n    # create a dataframe with various types\n    df = pd.DataFrame(\n        {\n            \"s\": list(\"abcde\"),\n            \"f\": np.arange(5, dtype=float),\n            \"i\": np.arange(5, dtype=int),\n            \"b\": np.array([True, False, True, True, False]),\n            \"d\": pd.date_range(\"2012-01-01\", periods=5, freq=\"h\"),\n            \"c\": pd.Series(list(\"ababc\"), dtype=\"category\"),\n            \"p\": pd.date_range(\"2012-01-01\", periods=5, freq=\"h\").tz_localize(\"UTC\"),\n        }\n    )\n    df_arrow = pa.Table.from_pandas(df).to_pandas(types_mapper=pd.ArrowDtype)\n    df_clean = sanitize_pandas_dataframe(df_arrow)\n    records = df_clean.to_dict(orient=\"records\")\n    assert records[0] == {\n        \"s\": \"a\",\n        \"f\": 0.0,\n        \"i\": 0,\n        \"b\": True,\n        \"d\": \"2012-01-01T00:00:00\",\n        \"c\": \"a\",\n        \"p\": \"2012-01-01T00:00:00+00:00\",\n    }\n\n    # Make sure we can serialize to JSON without error\n    json.dumps(records)\n\n\n@skip_requires_pyarrow(requires_tzdata=True)\ndef test_sanitize_pyarrow_table_columns() -> None:\n    import pyarrow as pa\n\n    # create a dataframe with various types\n    df = pd.DataFrame(\n        {\n            \"s\": list(\"abcde\"),\n            \"f\": np.arange(5, dtype=float),\n            \"i\": np.arange(5, dtype=int),\n            \"b\": np.array([True, False, True, True, False]),\n            \"d\": pd.date_range(\"2012-01-01\", periods=5, freq=\"h\"),\n            \"c\": pd.Series(list(\"ababc\"), dtype=\"category\"),\n            \"p\": pd.date_range(\"2012-01-01\", periods=5, freq=\"h\").tz_localize(\"UTC\"),\n        }\n    )\n\n    # Create pyarrow table with explicit schema so that date32 type is preserved\n    pa_table = pa.Table.from_pandas(\n        df,\n        pa.schema(\n            (\n                pa.field(\"s\", pa.string()),\n                pa.field(\"f\", pa.float64()),\n                pa.field(\"i\", pa.int64()),\n                pa.field(\"b\", pa.bool_()),\n                pa.field(\"d\", pa.date32()),\n                pa.field(\"c\", pa.dictionary(pa.int8(), pa.string())),\n                pa.field(\"p\", pa.timestamp(\"ns\", tz=\"UTC\")),\n            )\n        ),\n    )\n    sanitized = sanitize_narwhals_dataframe(nw.from_native(pa_table, eager_only=True))\n    values = sanitized.rows(named=True)\n\n    assert values[0] == {\n        \"s\": \"a\",\n        \"f\": 0.0,\n        \"i\": 0,\n        \"b\": True,\n        \"d\": \"2012-01-01T00:00:00\",\n        \"c\": \"a\",\n        \"p\": \"2012-01-01T00:00:00.000000000\",\n    }\n\n    # Make sure we can serialize to JSON without error\n    json.dumps(values)\n\n\n@skip_requires_polars\ndef test_sanitize_polars_datetime_timezone_preserved() -> None:\n    import polars as pl\n\n    start = pl.datetime(2023, 11, 5, time_zone=\"US/Mountain\")\n    df = pl.DataFrame(\n        {\n            \"datetime\": pl.datetime_range(\n                start, start.dt.offset_by(\"3h\"), \"1h\", closed=\"both\", eager=True\n            ),\n            \"value\": [10, 20, 30, 40],\n        }\n    )\n\n    sanitized = sanitize_narwhals_dataframe(nw.from_native(df, eager_only=True))\n\n    assert sanitized.rows(named=True) == [\n        {\"datetime\": \"2023-11-05T00:00:00-0600\", \"value\": 10},\n        {\"datetime\": \"2023-11-05T01:00:00-0600\", \"value\": 20},\n        {\"datetime\": \"2023-11-05T01:00:00-0700\", \"value\": 30},\n        {\"datetime\": \"2023-11-05T02:00:00-0700\", \"value\": 40},\n    ]\n\n\ndef test_sanitize_dataframe_colnames():\n    df = pd.DataFrame(np.arange(12).reshape(4, 3))\n\n    # Test that RangeIndex is converted to strings\n    df = sanitize_pandas_dataframe(df)\n    assert [isinstance(col, str) for col in df.columns]\n\n    # Test that non-string columns result in an error\n    df.columns = [4, \"foo\", \"bar\"]\n    with pytest.raises(ValueError, match=r\"Dataframe contains invalid column name: 4.\"):\n        sanitize_pandas_dataframe(df)\n\n\ndef test_sanitize_dataframe_timedelta():\n    df = pd.DataFrame({\"r\": pd.timedelta_range(start=\"1 day\", periods=4)})\n    with pytest.raises(ValueError, match='Field \"r\" has type \"timedelta'):\n        sanitize_pandas_dataframe(df)\n\n\ndef test_sanitize_dataframe_infs():\n    df = pd.DataFrame({\"x\": [0, 1, 2, np.inf, -np.inf, np.nan]})\n    df_clean = sanitize_pandas_dataframe(df)\n    assert list(df_clean.dtypes) == [object]\n    assert list(df_clean[\"x\"]) == [0, 1, 2, None, None, None]\n\n\n@pytest.mark.skipif(\n    not hasattr(pd, \"Int64Dtype\"),\n    reason=f\"Nullable integers not supported in pandas v{pd.__version__}\",\n)\ndef test_sanitize_nullable_integers():\n    df = pd.DataFrame(\n        {\n            \"int_np\": [1, 2, 3, 4, 5],\n            \"int64\": pd.Series([1, 2, 3, None, 5], dtype=\"UInt8\"),\n            \"int64_nan\": pd.Series([1, 2, 3, float(\"nan\"), 5], dtype=\"Int64\"),\n            \"float\": [1.0, 2.0, 3.0, 4, 5.0],\n            \"float_null\": [1, 2, None, 4, 5],\n            \"float_inf\": [1, 2, None, 4, (float(\"inf\"))],\n        }\n    )\n\n    df_clean = sanitize_pandas_dataframe(df)\n    assert {col.dtype.name for _, col in df_clean.items()} == {\"object\"}\n\n    result_python = {col_name: list(col) for col_name, col in df_clean.items()}\n    assert result_python == {\n        \"int_np\": [1, 2, 3, 4, 5],\n        \"int64\": [1, 2, 3, None, 5],\n        \"int64_nan\": [1, 2, 3, None, 5],\n        \"float\": [1.0, 2.0, 3.0, 4.0, 5.0],\n        \"float_null\": [1.0, 2.0, None, 4.0, 5.0],\n        \"float_inf\": [1.0, 2.0, None, 4.0, None],\n    }\n\n\n@pytest.mark.skipif(\n    not hasattr(pd, \"StringDtype\"),\n    reason=f\"dedicated String dtype not supported in pandas v{pd.__version__}\",\n)\ndef test_sanitize_string_dtype():\n    df = pd.DataFrame(\n        {\n            \"string_object\": [\"a\", \"b\", \"c\", \"d\"],\n            \"string_string\": pd.array([\"a\", \"b\", \"c\", \"d\"], dtype=\"string\"),\n            \"string_object_null\": [\"a\", \"b\", None, \"d\"],\n            \"string_string_null\": pd.array([\"a\", \"b\", None, \"d\"], dtype=\"string\"),\n        }\n    )\n\n    df_clean = sanitize_pandas_dataframe(df)\n    # pandas 3+ with pyarrow may leave .dtype.name as \"str\" in some cases\n    assert {col.dtype.name for _, col in df_clean.items()} <= {\"object\", \"str\"}\n\n    result_python = {col_name: list(col) for col_name, col in df_clean.items()}\n    assert result_python == {\n        \"string_object\": [\"a\", \"b\", \"c\", \"d\"],\n        \"string_string\": [\"a\", \"b\", \"c\", \"d\"],\n        \"string_object_null\": [\"a\", \"b\", None, \"d\"],\n        \"string_string_null\": [\"a\", \"b\", None, \"d\"],\n    }\n\n\n@pytest.mark.skipif(\n    not hasattr(pd, \"BooleanDtype\"),\n    reason=f\"Nullable boolean dtype not supported in pandas v{pd.__version__}\",\n)\ndef test_sanitize_boolean_dtype():\n    df = pd.DataFrame(\n        {\n            \"bool_none\": pd.array([True, False, None], dtype=\"boolean\"),\n            \"none\": pd.array([None, None, None], dtype=\"boolean\"),\n            \"bool\": pd.array([True, False, True], dtype=\"boolean\"),\n        }\n    )\n\n    df_clean = sanitize_pandas_dataframe(df)\n    assert {col.dtype.name for _, col in df_clean.items()} == {\"object\"}\n\n    result_python = {col_name: list(col) for col_name, col in df_clean.items()}\n    assert result_python == {\n        \"bool_none\": [True, False, None],\n        \"none\": [None, None, None],\n        \"bool\": [True, False, True],\n    }\n"
  },
  {
    "path": "tests/vegalite/__init__.py",
    "content": ""
  },
  {
    "path": "tests/vegalite/test_common.py",
    "content": "\"\"\"Tests of functionality that should work in all vegalite versions.\"\"\"\n\nimport pandas as pd\nimport pytest\n\nfrom altair.vegalite import v6\n\n\n@pytest.fixture\ndef basic_spec():\n    return {\n        \"data\": {\"url\": \"data.csv\"},\n        \"mark\": {\"type\": \"line\"},\n        \"encoding\": {\n            \"color\": {\"type\": \"nominal\", \"field\": \"color\"},\n            \"x\": {\"type\": \"quantitative\", \"field\": \"xval\"},\n            \"y\": {\"type\": \"ordinal\", \"field\": \"yval\"},\n        },\n    }\n\n\ndef make_final_spec(alt, basic_spec):\n    from altair.theme import _themes\n\n    theme = _themes.get()\n    assert theme\n    spec = theme()\n    spec.update(basic_spec)\n    return spec\n\n\ndef make_basic_chart(alt):\n    data = pd.DataFrame(\n        {\n            \"a\": [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\"],\n            \"b\": [28, 55, 43, 91, 81, 53, 19, 87, 52],\n        }\n    )\n\n    return alt.Chart(data).mark_bar().encode(x=\"a\", y=\"b\")\n\n\n@pytest.mark.parametrize(\"alt\", [v6])\ndef test_basic_chart_to_dict(alt, basic_spec):\n    chart = (\n        alt.Chart(\"data.csv\")\n        .mark_line()\n        .encode(alt.X(\"xval:Q\"), y=alt.Y(\"yval:O\"), color=\"color:N\")\n    )\n    dct = chart.to_dict()\n\n    # schema should be in the top level\n    assert dct.pop(\"$schema\").startswith(\"http\")\n\n    # remainder of spec should match the basic spec\n    assert dct == make_final_spec(alt, basic_spec)\n\n\n@pytest.mark.parametrize(\"alt\", [v6])\ndef test_basic_chart_from_dict(alt, basic_spec):\n    chart = alt.Chart.from_dict(basic_spec)\n    dct = chart.to_dict()\n\n    # schema should be in the top level\n    assert dct.pop(\"$schema\").startswith(\"http\")\n\n    # remainder of spec should match the basic spec\n    assert dct == make_final_spec(alt, basic_spec)\n\n\n@pytest.mark.parametrize(\"alt\", [v6])\ndef test_theme_enable(alt, basic_spec):\n    from altair.theme import _themes\n\n    active_theme = _themes.active\n\n    try:\n        _themes.enable(\"none\")\n\n        chart = alt.Chart.from_dict(basic_spec)\n        dct = chart.to_dict()\n\n        # schema should be in the top level\n        assert dct.pop(\"$schema\").startswith(\"http\")\n\n        # remainder of spec should match the basic spec\n        # without any theme settings\n        assert dct == basic_spec\n    finally:\n        # reset the theme to its initial value\n        _themes.enable(active_theme)  # pyright: ignore[reportArgumentType]\n\n\n@pytest.mark.parametrize(\"alt\", [v6])\ndef test_max_rows(alt):\n    basic_chart = make_basic_chart(alt)\n\n    with alt.data_transformers.enable(\"default\"):\n        basic_chart.to_dict()  # this should not fail\n    with (\n        alt.data_transformers.enable(\"default\", max_rows=5),\n        pytest.raises(alt.MaxRowsError),\n    ):\n        basic_chart.to_dict()  # this should not fail\n"
  },
  {
    "path": "tests/vegalite/v6/__init__.py",
    "content": ""
  },
  {
    "path": "tests/vegalite/v6/schema/__init__.py",
    "content": ""
  },
  {
    "path": "tests/vegalite/v6/schema/test_channels.py",
    "content": "from __future__ import annotations\n\nimport datetime as dt\nfrom collections import deque\nfrom typing import TYPE_CHECKING\n\nimport pytest\n\nfrom altair.utils.schemapi import SchemaValidationError\nfrom altair.vegalite.v6.schema import channels as alt\nfrom altair.vegalite.v6.schema.core import DateTime\n\nif TYPE_CHECKING:\n    from collections.abc import Sequence\n\n    from altair.vegalite.v6.schema._typing import Temporal\n\n\ndef test_channels_typing() -> None:\n    \"\"\"\n    Ensuring static typing aligns with `SchemaValidationError`(s).\n\n    Important\n    ---------\n    Unless a comment says otherwise, **every** ``# (type|pyright): ignore`` **is intentional**.\n\n    Notes\n    -----\n    - *Non-exhaustive*, focusing on several repeated patterns.\n    - Not generated from the schema\n        - To avoid leaking logic defined during generation\n    \"\"\"\n    nums: list[int] = [1, 2, 3, 4, 5]\n    range_nums: range = range(5)\n    day: dt.date = dt.date(2024, 10, 27)\n    dates: tuple[dt.date, ...] = tuple(day.replace(day.year + n) for n in range_nums)\n    dates_mixed: Sequence[Temporal | DateTime] = (\n        DateTime(year=2000),\n        *dates,\n        dt.datetime(2001, 1, 1),\n    )\n\n    angle = alt.Angle(\"field:Q\")\n    assert angle.to_dict()\n\n    assert angle.sort(\"ascending\").to_dict()\n    assert angle.sort(\"-fillOpacity\").to_dict()\n    assert angle.sort(None)\n    assert angle.sort(nums).to_dict()\n    assert angle.sort(range_nums).to_dict()\n    assert angle.sort(deque(nums)).to_dict()\n    assert angle.sort(dates).to_dict()\n    assert angle.sort(dates_mixed).to_dict()\n\n    # NOTE: Triggering static and runtime errors\n    invariant_sequence = angle.sort([*nums, *dates])  # type: ignore\n    with pytest.raises(SchemaValidationError):\n        invariant_sequence.to_dict()\n\n    positional_as_keyword = angle.sort(_=\"ascending\")  # type: ignore[call-overload]\n    with pytest.raises(\n        SchemaValidationError,\n        match=r\"'{'_': 'ascending'}' is an invalid value for `sort`\",\n    ):\n        positional_as_keyword.to_dict()\n\n    keyword_as_positional = angle.sort(\"field:Q\", \"min\", \"descending\")  # type: ignore[call-overload]\n    with pytest.raises(SchemaValidationError):\n        keyword_as_positional.to_dict()\n    angle.sort(field=\"field:Q\", op=\"min\", order=\"descending\")\n\n    # NOTE: Doesn't raise `SchemaValidationError`\n    # - `\"ascending\"` is silently ignored when positional\n    # - Caught as invalid statically, but not at runtime\n    bad = angle.sort(\"x\", \"ascending\").to_dict()  # type: ignore[call-overload]\n    good = angle.sort(encoding=\"x\", order=\"ascending\").to_dict()\n    assert isinstance(bad, dict)\n    assert isinstance(good, dict)\n    with pytest.raises(\n        AssertionError, match=r\"'x' == {'encoding': 'x', 'order': 'ascending'}\"\n    ):\n        assert bad[\"sort\"] == good[\"sort\"]\n"
  },
  {
    "path": "tests/vegalite/v6/test_alias.py",
    "content": "import pytest\n\nimport altair.vegalite.v6 as alt\n\n\ndef test_aliases():\n    \"\"\"Ensure that any aliases defined in `api.py` aren't colliding with names already defined in `core.py` or `channels.py`.\"\"\"\n    for alias in [\"Bin\", \"Impute\", \"Title\"]:\n        # this test pass if the alias can resolve to its real name\n        try:\n            getattr(alt, alias)\n        except AttributeError as err:\n            msg = f\"cannot resolve '{alias}':, {err}\"\n            raise AssertionError(msg) from err\n\n        # this test fails if the alias match a colliding name in core\n        with pytest.raises(AttributeError):\n            getattr(alt.core, alias)\n\n        # this test fails if the alias match a colliding name in channels\n        with pytest.raises(AttributeError):\n            getattr(alt.channels, alias)\n"
  },
  {
    "path": "tests/vegalite/v6/test_api.py",
    "content": "\"\"\"Unit tests for altair API.\"\"\"\n\nfrom __future__ import annotations\n\nimport io\nimport json\nimport operator\nimport os\nimport pathlib\nimport re\nimport sys\nimport tempfile\nimport warnings\nfrom collections.abc import Mapping\nfrom datetime import date, datetime\nfrom importlib.metadata import version as importlib_version\nfrom importlib.util import find_spec\nfrom typing import TYPE_CHECKING\n\nimport jsonschema\nimport narwhals.stable.v1 as nw\nimport pandas as pd\nimport polars as pl\nimport pytest\nfrom packaging.version import Version\n\nimport altair as alt\nfrom altair.utils.core import use_signature_func\nfrom altair.utils.schemapi import Optional, SchemaValidationError, Undefined\nfrom tests import (\n    skip_requires_duckdb,\n    skip_requires_pyarrow,\n    skip_requires_vl_convert,\n    slow,\n)\n\nif TYPE_CHECKING:\n    from typing import Any\n\n    import duckdb  # pyright: ignore[reportMissingImports]\n\n    from altair.vegalite.v6.api import _Conditional, _Conditions\n    from altair.vegalite.v6.schema._typing import Map\n\n\nPANDAS_VERSION = Version(importlib_version(\"pandas\"))\n\n\ndef getargs(*args, **kwargs):\n    return args, kwargs\n\n\nOP_DICT = {\n    \"layer\": operator.add,\n    \"hconcat\": operator.or_,\n    \"vconcat\": operator.and_,\n}\n\n\ndef _make_chart_type(chart_type):\n    data = pd.DataFrame(\n        {\n            \"x\": [28, 55, 43, 91, 81, 53, 19, 87],\n            \"y\": [43, 91, 81, 53, 19, 87, 52, 28],\n            \"color\": list(\"AAAABBBB\"),\n        }\n    )\n    base = (\n        alt.Chart(data)\n        .mark_point()\n        .encode(\n            x=\"x\",\n            y=\"y\",\n            color=\"color\",\n        )\n    )\n\n    if chart_type in {\"layer\", \"hconcat\", \"vconcat\", \"concat\"}:\n        func = getattr(alt, chart_type)\n        return func(base.mark_square(), base.mark_circle())\n    elif chart_type == \"facet\":\n        return base.facet(\"color\")\n    elif chart_type == \"facet_encoding\":\n        return base.encode(facet=\"color\")\n    elif chart_type == \"repeat\":\n        return base.encode(alt.X(alt.repeat(), type=\"quantitative\")).repeat([\"x\", \"y\"])\n    elif chart_type == \"chart\":\n        return base\n    else:\n        msg = f\"chart_type='{chart_type}' is not recognized\"\n        raise ValueError(msg)\n\n\n@pytest.fixture\ndef basic_chart() -> alt.Chart:\n    data = pd.DataFrame(\n        {\n            \"a\": [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\"],\n            \"b\": [28, 55, 43, 91, 81, 53, 19, 87, 52],\n        }\n    )\n\n    return alt.Chart(data).mark_bar().encode(x=\"a\", y=\"b\")\n\n\n@pytest.fixture\ndef cars():\n    return pd.DataFrame(\n        {\n            \"Name\": [\n                \"chevrolet chevelle malibu\",\n                \"buick skylark 320\",\n                \"plymouth satellite\",\n                \"amc rebel sst\",\n                \"ford torino\",\n                \"ford galaxie 500\",\n                \"chevrolet impala\",\n                \"plymouth fury iii\",\n                \"pontiac catalina\",\n                \"amc ambassador dpl\",\n            ],\n            \"Miles_per_Gallon\": [\n                18.0,\n                15.0,\n                18.0,\n                16.0,\n                17.0,\n                15.0,\n                14.0,\n                14.0,\n                14.0,\n                15.0,\n            ],\n            \"Cylinders\": [8, 8, 8, 8, 8, 8, 8, 8, 8, 8],\n            \"Displacement\": [\n                307.0,\n                350.0,\n                318.0,\n                304.0,\n                302.0,\n                429.0,\n                454.0,\n                440.0,\n                455.0,\n                390.0,\n            ],\n            \"Horsepower\": [\n                130.0,\n                165.0,\n                150.0,\n                150.0,\n                140.0,\n                198.0,\n                220.0,\n                215.0,\n                225.0,\n                190.0,\n            ],\n            \"Weight_in_lbs\": [\n                3504,\n                3693,\n                3436,\n                3433,\n                3449,\n                4341,\n                4354,\n                4312,\n                4425,\n                3850,\n            ],\n            \"Acceleration\": [12.0, 11.5, 11.0, 12.0, 10.5, 10.0, 9.0, 8.5, 10.0, 8.5],\n            \"Year\": [\n                pd.Timestamp(\"1970-01-01 00:00:00\"),\n                pd.Timestamp(\"1970-01-01 00:00:00\"),\n                pd.Timestamp(\"1970-01-01 00:00:00\"),\n                pd.Timestamp(\"1970-01-01 00:00:00\"),\n                pd.Timestamp(\"1970-01-01 00:00:00\"),\n                pd.Timestamp(\"1970-01-01 00:00:00\"),\n                pd.Timestamp(\"1970-01-01 00:00:00\"),\n                pd.Timestamp(\"1970-01-01 00:00:00\"),\n                pd.Timestamp(\"1970-01-01 00:00:00\"),\n                pd.Timestamp(\"1970-01-01 00:00:00\"),\n            ],\n            \"Origin\": [\n                \"USA\",\n                \"USA\",\n                \"USA\",\n                \"USA\",\n                \"USA\",\n                \"USA\",\n                \"USA\",\n                \"USA\",\n                \"USA\",\n                \"USA\",\n            ],\n        }\n    )\n\n\ndef test_chart_data_types():\n    def Chart(data):\n        return alt.Chart(data).mark_point().encode(x=\"x:Q\", y=\"y:Q\")\n\n    # Url Data\n    data = \"/path/to/my/data.csv\"\n    dct = Chart(data).to_dict()\n    assert dct[\"data\"] == {\"url\": data}\n\n    # Dict Data\n    data = {\"values\": [{\"x\": 1, \"y\": 2}, {\"x\": 2, \"y\": 3}]}\n    with alt.data_transformers.enable(consolidate_datasets=False):\n        dct = Chart(data).to_dict()\n    assert dct[\"data\"] == data\n\n    with alt.data_transformers.enable(consolidate_datasets=True):\n        dct = Chart(data).to_dict()\n    name = dct[\"data\"][\"name\"]\n    assert dct[\"datasets\"][name] == data[\"values\"]\n\n    # DataFrame data\n    data = pd.DataFrame({\"x\": range(5), \"y\": range(5)})\n    with alt.data_transformers.enable(consolidate_datasets=False):\n        dct = Chart(data).to_dict()\n    assert dct[\"data\"][\"values\"] == data.to_dict(orient=\"records\")\n\n    with alt.data_transformers.enable(consolidate_datasets=True):\n        dct = Chart(data).to_dict()\n    name = dct[\"data\"][\"name\"]\n    assert dct[\"datasets\"][name] == data.to_dict(orient=\"records\")\n\n    # Named data object\n    data = alt.NamedData(name=\"Foo\")\n    dct = Chart(data).to_dict()\n    assert dct[\"data\"] == {\"name\": \"Foo\"}\n\n\ndef test_chart_infer_types():\n    try:\n        x_dates = pd.date_range(\"2012\", periods=10, freq=\"YE\")\n    except (ValueError, TypeError):\n        # Older pandas may not recognize \"YE\"; use \"Y\" (year-end) instead\n        x_dates = pd.date_range(\"2012\", periods=10, freq=\"Y\")\n    data = pd.DataFrame(\n        {\n            \"x\": x_dates,\n            \"y\": range(10),\n            \"c\": list(\"abcabcabca\"),\n            \"s\": pd.Categorical([1, 2] * 5, categories=[2, 1], ordered=True),\n        }\n    )\n\n    def _check_encodings(chart):\n        dct = chart.to_dict()\n        assert dct[\"encoding\"][\"x\"][\"type\"] == \"temporal\"\n        assert dct[\"encoding\"][\"x\"][\"field\"] == \"x\"\n        assert dct[\"encoding\"][\"y\"][\"type\"] == \"quantitative\"\n        assert dct[\"encoding\"][\"y\"][\"field\"] == \"y\"\n        assert dct[\"encoding\"][\"color\"][\"type\"] == \"nominal\"\n        assert dct[\"encoding\"][\"color\"][\"field\"] == \"c\"\n        assert dct[\"encoding\"][\"size\"][\"type\"] == \"ordinal\"\n        assert dct[\"encoding\"][\"size\"][\"field\"] == \"s\"\n        assert dct[\"encoding\"][\"size\"][\"sort\"] == [2, 1]\n        assert dct[\"encoding\"][\"tooltip\"][\"type\"] == \"ordinal\"\n        assert dct[\"encoding\"][\"tooltip\"][\"field\"] == \"s\"\n        # \"sort\" should be removed for channels that don't support it\n        assert \"sort\" not in dct[\"encoding\"][\"tooltip\"]\n\n    # Pass field names by keyword\n    chart = (\n        alt.Chart(data)\n        .mark_point()\n        .encode(x=\"x\", y=\"y\", color=\"c\", size=\"s\", tooltip=\"s\")\n    )\n    _check_encodings(chart)\n\n    # pass Channel objects by keyword\n    chart = (\n        alt.Chart(data)\n        .mark_point()\n        .encode(\n            x=alt.X(\"x\"),\n            y=alt.Y(\"y\"),\n            color=alt.Color(\"c\"),\n            size=alt.Size(\"s\"),\n            tooltip=alt.Tooltip(\"s\"),\n        )\n    )\n    _check_encodings(chart)\n\n    # pass Channel objects by value\n    chart = (\n        alt.Chart(data)\n        .mark_point()\n        .encode(alt.X(\"x\"), alt.Y(\"y\"), alt.Color(\"c\"), alt.Size(\"s\"), alt.Tooltip(\"s\"))\n    )\n    _check_encodings(chart)\n\n    # override default types\n    chart = (\n        alt.Chart(data)\n        .mark_point()\n        .encode(\n            alt.X(\"x\", type=\"nominal\"),\n            alt.Y(\"y\", type=\"ordinal\"),\n            alt.Size(\"s\", type=\"nominal\"),\n            alt.Tooltip(\"s\", type=\"nominal\"),\n        )\n    )\n    dct = chart.to_dict()\n    assert dct[\"encoding\"][\"x\"][\"type\"] == \"nominal\"\n    assert dct[\"encoding\"][\"y\"][\"type\"] == \"ordinal\"\n    assert dct[\"encoding\"][\"size\"][\"type\"] == \"nominal\"\n    assert \"sort\" not in dct[\"encoding\"][\"size\"]\n    assert dct[\"encoding\"][\"tooltip\"][\"type\"] == \"nominal\"\n    assert \"sort\" not in dct[\"encoding\"][\"tooltip\"]\n\n\n@pytest.mark.parametrize(\n    (\"args\", \"kwargs\"),\n    [\n        getargs(detail=[\"value:Q\", \"name:N\"], tooltip=[\"value:Q\", \"name:N\"]),\n        getargs(detail=[\"value\", \"name\"], tooltip=[\"value\", \"name\"]),\n        getargs(alt.Detail([\"value:Q\", \"name:N\"]), alt.Tooltip([\"value:Q\", \"name:N\"])),\n        getargs(alt.Detail([\"value\", \"name\"]), alt.Tooltip([\"value\", \"name\"])),\n        getargs(\n            [alt.Detail(\"value:Q\"), alt.Detail(\"name:N\")],\n            [alt.Tooltip(\"value:Q\"), alt.Tooltip(\"name:N\")],\n        ),\n        getargs(\n            [alt.Detail(\"value\"), alt.Detail(\"name\")],\n            [alt.Tooltip(\"value\"), alt.Tooltip(\"name\")],\n        ),\n    ],\n)\ndef test_multiple_encodings(args, kwargs):\n    df = pd.DataFrame({\"value\": [1, 2, 3], \"name\": [\"A\", \"B\", \"C\"]})\n    encoding_dct = [\n        {\"field\": \"value\", \"type\": \"quantitative\"},\n        {\"field\": \"name\", \"type\": \"nominal\"},\n    ]\n    chart = alt.Chart(df).mark_point().encode(*args, **kwargs)\n    dct = chart.to_dict()\n    assert dct[\"encoding\"][\"detail\"] == encoding_dct\n    assert dct[\"encoding\"][\"tooltip\"] == encoding_dct\n\n\ndef test_chart_operations():\n    data = pd.DataFrame(\n        {\n            \"x\": pd.date_range(\"2012\", periods=10, freq=\"YS\"),\n            \"y\": range(10),\n            \"c\": list(\"abcabcabca\"),\n        }\n    )\n    chart1 = alt.Chart(data).mark_line().encode(x=\"x\", y=\"y\", color=\"c\")\n    chart2 = chart1.mark_point()\n    chart3 = chart1.mark_circle()\n    chart4 = chart1.mark_square()\n\n    chart = chart1 + chart2 + chart3\n    assert isinstance(chart, alt.LayerChart)\n    assert len(chart.layer) == 3\n    chart += chart4\n    assert len(chart.layer) == 4\n\n    chart = chart1 | chart2 | chart3\n    assert isinstance(chart, alt.HConcatChart)\n    assert len(chart.hconcat) == 3\n    chart |= chart4\n    assert len(chart.hconcat) == 4\n\n    chart = chart1 & chart2 & chart3\n    assert isinstance(chart, alt.VConcatChart)\n    assert len(chart.vconcat) == 3\n    chart &= chart4\n    assert len(chart.vconcat) == 4\n\n\ndef test_when() -> None:\n    select = alt.selection_point(name=\"select\", on=\"click\")\n    condition = alt.condition(select, alt.value(1), \"two\", empty=False)[\"condition\"]\n    condition.pop(\"value\")\n    when = alt.when(select, empty=False)\n    when_constraint = alt.when(Origin=\"Europe\")\n    when_constraints = alt.when(\n        Name=\"Name_1\", Color=\"Green\", Age=25, StartDate=\"2000-10-01\"\n    )\n    expected_constraint = alt.datum.Origin == \"Europe\"\n    expected_constraints = (\n        (alt.datum.Name == \"Name_1\")\n        & (alt.datum.Color == \"Green\")\n        & (alt.datum.Age == 25)\n        & (alt.datum.StartDate == \"2000-10-01\")\n    )\n\n    assert isinstance(when, alt.When)\n    assert condition == when._condition\n    assert isinstance(when_constraint, alt.When)\n    assert when_constraint._condition[\"test\"] == expected_constraint\n    assert when_constraints._condition[\"test\"] == expected_constraints\n    with pytest.raises((NotImplementedError, TypeError), match=\"list\"):\n        alt.when([1, 2, 3])  # type: ignore\n    with pytest.raises(TypeError, match=\"Undefined\"):\n        alt.when()\n    with pytest.raises(TypeError, match=\"int\"):\n        alt.when(select, alt.datum.Name == \"Name_1\", 99, TestCon=5.901)  # type: ignore\n\n\ndef test_when_then() -> None:\n    select = alt.selection_point(name=\"select\", on=\"click\")\n    when = alt.when(select)\n    when_then = when.then(alt.value(5))\n\n    assert isinstance(when_then, alt.Then)\n    condition = when_then.condition\n    assert isinstance(condition, list)\n    assert condition[-1].get(\"value\") == 5\n\n    with pytest.raises(TypeError, match=r\"Path\"):\n        when.then(pathlib.Path(\"some\"))  # type: ignore\n\n    with pytest.raises(TypeError, match=\"float\"):\n        when_then.when(select, alt.datum.Name != \"Name_2\", 86.123, empty=True)  # type: ignore\n\n\ndef test_when_then_only(basic_chart) -> None:\n    \"\"\"`Then` is an acceptable encode argument.\"\"\"\n    select = alt.selection_point(name=\"select\", on=\"click\")\n\n    basic_chart.encode(fillOpacity=alt.when(select).then(alt.value(5))).to_dict()\n\n\ndef test_when_then_otherwise() -> None:\n    select = alt.selection_point(name=\"select\", on=\"click\")\n    when_then = alt.when(select).then(alt.value(2, empty=False))\n    when_then_otherwise = when_then.otherwise(alt.value(0))\n\n    expected = dict(alt.condition(select, alt.value(2, empty=False), alt.value(0)))\n    with pytest.raises(TypeError, match=\"list\"):\n        when_then.otherwise([1, 2, 3])  # type: ignore\n\n    # Needed to modify to a list of conditions,\n    # which isn't possible in `condition`\n    single_condition = expected.pop(\"condition\")\n    expected[\"condition\"] = [single_condition]\n\n    assert expected == when_then_otherwise\n\n\ndef test_when_then_when_then_otherwise() -> None:\n    \"\"\"Test for [#3301](https://github.com/vega/altair/issues/3301).\"\"\"\n    data = {\n        \"values\": [\n            {\"a\": \"A\", \"b\": 28},\n            {\"a\": \"B\", \"b\": 55},\n            {\"a\": \"C\", \"b\": 43},\n            {\"a\": \"D\", \"b\": 91},\n            {\"a\": \"E\", \"b\": 81},\n            {\"a\": \"F\", \"b\": 53},\n            {\"a\": \"G\", \"b\": 19},\n            {\"a\": \"H\", \"b\": 87},\n            {\"a\": \"I\", \"b\": 52},\n        ]\n    }\n\n    select = alt.selection_point(name=\"select\", on=\"click\")\n    highlight = alt.selection_point(name=\"highlight\", on=\"pointerover\")\n    when_then_when_then = (\n        alt.when(select)\n        .then(alt.value(2, empty=False))\n        .when(highlight)\n        .then(alt.value(1, empty=False))\n    )\n    with pytest.raises(TypeError, match=\"set\"):\n        when_then_when_then.otherwise({\"five\", \"six\"})  # type: ignore\n\n    expected_stroke = {\n        \"condition\": [\n            {\"param\": \"select\", \"empty\": False, \"value\": 2},\n            {\"param\": \"highlight\", \"empty\": False, \"value\": 1},\n        ],\n        \"value\": 0,\n    }\n    actual_stroke = when_then_when_then.otherwise(alt.value(0))\n    fill_opacity = alt.when(select).then(alt.value(1)).otherwise(alt.value(0.3))\n\n    assert expected_stroke == actual_stroke\n    chart = (\n        alt.Chart(data)\n        .mark_bar(fill=\"#4C78A8\", stroke=\"black\", cursor=\"pointer\")\n        .encode(x=\"a:O\", y=\"b:Q\", fillOpacity=fill_opacity, strokeWidth=actual_stroke)\n        .configure_scale(bandPaddingInner=0.2)\n        .add_params(select, highlight)\n    )\n    chart.to_dict()\n\n\ndef test_when_multi_channel_param(cars):\n    \"\"\"Adapted from [2236376458](https://github.com/vega/altair/pull/3427#issuecomment-2236376458).\"\"\"\n    brush = alt.selection_interval()\n    hover = alt.selection_point(on=\"pointerover\", nearest=True, empty=False)\n\n    chart_1 = (\n        alt.Chart(cars)\n        .mark_rect()\n        .encode(\n            x=\"Cylinders:N\",\n            y=\"Origin:N\",\n            color=alt.when(brush).then(\"count()\").otherwise(alt.value(\"grey\")),\n            opacity=alt.when(brush).then(alt.value(1)).otherwise(alt.value(0.6)),\n        )\n        .add_params(brush)\n    )\n    chart_1.to_dict()\n\n    color = alt.when(hover).then(alt.value(\"coral\")).otherwise(alt.value(\"lightgray\"))\n\n    chart_2 = (\n        alt.Chart(cars, title=\"Selection obscured by other points\")\n        .mark_circle(opacity=1)\n        .encode(\n            x=\"Horsepower:Q\",\n            y=\"Miles_per_Gallon:Q\",\n            color=color,\n            size=alt.when(hover).then(alt.value(300)).otherwise(alt.value(30)),\n        )\n        .add_params(hover)\n    )\n\n    chart_3 = chart_2 | chart_2.encode(\n        order=alt.when(hover).then(alt.value(1)).otherwise(alt.value(0))\n    ).properties(title=\"Selection brought to front\")\n\n    chart_3.to_dict()\n\n\ndef test_when_labels_position_based_on_condition() -> None:\n    \"\"\"\n    Test for [2144026368-1](https://github.com/vega/altair/pull/3427#issuecomment-2144026368).\n\n    Original [labels-position-based-on-condition](https://altair-viz.github.io/user_guide/marks/text.html#labels-position-based-on-condition)\n    \"\"\"\n    import numpy as np\n    import pandas as pd\n\n    from altair.utils.schemapi import SchemaValidationError\n\n    rand = np.random.RandomState(42)\n    df = pd.DataFrame({\"xval\": range(100), \"yval\": rand.randn(100).cumsum()})\n\n    bind_range = alt.binding_range(min=100, max=300, name=\"Slider value:  \")\n    param_width = alt.param(bind=bind_range)\n    param_width_lt_200 = param_width < 200\n\n    # Examples of how to write both js and python expressions\n    param_color_js_expr = alt.param(expr=f\"{param_width.name} < 200 ? 'red' : 'black'\")\n    param_color_py_expr = alt.param(\n        expr=alt.expr.if_(param_width_lt_200, \"red\", \"black\")\n    )\n    when = (\n        alt.when(param_width_lt_200.expr)\n        .then(alt.value(\"red\"))\n        .otherwise(alt.value(\"black\"))\n    )\n\n    # NOTE: If the `@overload` signatures change,\n    # `mypy` will flag structural errors here\n    cond = when[\"condition\"][0]\n    otherwise = when[\"value\"]\n\n    # TODO: Open an issue on making `OperatorMixin` generic\n    # Something like this would be used as the return type for all `__dunder__` methods:\n    # R = TypeVar(\"R\", Expression, SelectionPredicateComposition)\n    test = cond[\"test\"]\n    assert not isinstance(test, alt.PredicateComposition)\n    param_color_py_when = alt.param(expr=alt.expr.if_(test, cond[\"value\"], otherwise))\n    lhs_param = param_color_py_expr.param\n    rhs_param = param_color_py_when.param\n    assert isinstance(lhs_param, alt.VariableParameter)\n    assert isinstance(rhs_param, alt.VariableParameter)\n    assert repr(lhs_param.expr) == repr(rhs_param.expr)\n\n    chart = (\n        alt.Chart(df)\n        .mark_point()\n        .encode(\n            alt.X(\"xval\").axis(titleColor=param_color_js_expr),\n            alt.Y(\"yval\").axis(titleColor=param_color_py_when),\n        )\n        .add_params(param_width, param_color_js_expr, param_color_py_when)\n    )\n    chart.to_dict()\n    fail_condition = alt.condition(\n        param_width < 200, alt.value(\"red\"), alt.value(\"black\")\n    )\n    with pytest.raises(SchemaValidationError, match=\"invalid value for `expr`\"):\n        alt.param(expr=fail_condition)  # type: ignore\n\n\ndef test_when_expressions_inside_parameters() -> None:\n    \"\"\"Test for [2144026368-2](https://github.com/vega/altair/pull/3427#issuecomment-2144026368).\"\"\"\n    import polars as pl\n\n    source = pl.DataFrame({\"a\": [\"A\", \"B\", \"C\"], \"b\": [28, -5, 10]})\n\n    bar = (\n        alt.Chart(source)\n        .mark_bar()\n        .encode(y=\"a:N\", x=alt.X(\"b:Q\").scale(domain=[-10, 35]))\n    )\n    when_then_otherwise = (\n        alt.when(alt.datum.b >= 0).then(alt.value(10)).otherwise(alt.value(-20))\n    )\n    cond = when_then_otherwise[\"condition\"][0]\n    otherwise = when_then_otherwise[\"value\"]\n    expected = alt.expr.if_(alt.datum.b >= 0, 10, -20)\n    test = cond[\"test\"]\n    assert not isinstance(test, alt.PredicateComposition)\n    actual = alt.expr.if_(test, cond[\"value\"], otherwise)\n    assert expected == actual\n\n    text_conditioned = bar.mark_text(\n        align=\"left\",\n        baseline=\"middle\",\n        dx=alt.expr(actual),  # type: ignore[arg-type]\n    ).encode(text=\"b\")\n\n    chart = bar + text_conditioned\n    chart.to_dict()\n\n\ndef test_when_multiple_fields():\n    # Triggering structural errors\n    # https://vega.github.io/vega-lite/docs/condition.html#field\n    brush = alt.selection_interval()\n    select_x = alt.selection_interval(encodings=[\"x\"])\n    when = alt.when(brush)\n    reveal_msg = re.compile(r\"Only one field.+Shorthand 'max\\(\\)'\", flags=re.DOTALL)\n    with pytest.raises(TypeError, match=reveal_msg):\n        when.then(\"count()\").otherwise(\"max()\")\n\n    chain_mixed_msg = re.compile(\n        r\"Chained.+mixed.+conflict.+\\{'field': 'field_1', 'type': 'quantitative'\\}.+otherwise\",\n        flags=re.DOTALL,\n    )\n    with pytest.raises(TypeError, match=chain_mixed_msg):\n        when.then({\"field\": \"field_1\", \"type\": \"quantitative\"}).when(\n            select_x, field_2=99\n        )\n\n    with pytest.raises(TypeError, match=chain_mixed_msg):\n        when.then(\"field_1:Q\").when(Genre=\"pop\")\n\n    chained_when = when.then(alt.value(5)).when(\n        alt.selection_point(fields=[\"b\"]) | brush, empty=False, b=63812\n    )\n\n    chain_then_msg = re.compile(\n        r\"Chained.+mixed.+field.+min\\(foo\\):Q.+'aggregate': 'min', 'field': 'foo', 'type': 'quantitative'\",\n        flags=re.DOTALL,\n    )\n\n    with pytest.raises(TypeError, match=chain_then_msg):\n        chained_when.then(\"min(foo):Q\")\n\n    chain_otherwise_msg = re.compile(\n        r\"Chained.+mixed.+field.+AggregatedFieldDef.+'this_field_here'\",\n        flags=re.DOTALL,\n    )\n    with pytest.raises(TypeError, match=chain_otherwise_msg):\n        chained_when.then(alt.value(2)).otherwise(\n            alt.AggregatedFieldDef(\n                \"argmax\", field=\"field_9\", **{\"as\": \"this_field_here\"}\n            )\n        )\n\n\ndef test_when_typing(cars) -> None:\n    chart = alt.Chart(cars).mark_rect()\n    predicate = alt.datum.Weight_in_lbs >= 3500\n    statement = alt.value(\"black\")\n    default = alt.value(\"white\")\n\n    then: alt.Then[_Conditions] = alt.when(predicate).then(statement)\n    otherwise: _Conditional[_Conditions] = then.otherwise(default)\n    condition: Map = alt.condition(predicate, statement, default)\n\n    # NOTE: both `condition()` and `when-then-otherwise` are allowed in these three locations\n    chart.encode(\n        color=condition,\n        x=alt.X(\"Cylinders:N\").axis(labelColor=condition),\n        y=alt.Y(\"Origin:N\", axis=alt.Axis(tickColor=condition)),\n    ).to_dict()\n\n    chart.encode(\n        color=otherwise,\n        x=alt.X(\"Cylinders:N\").axis(labelColor=otherwise),\n        y=alt.Y(\"Origin:N\", axis=alt.Axis(tickColor=otherwise)),\n    ).to_dict()\n\n    with pytest.raises(SchemaValidationError):\n        # NOTE: `when-then` is allowed as an encoding, but not as a `ConditionalAxisProperty`\n        # The latter fails validation since it does not have a default `value`\n        chart.encode(\n            color=then,\n            x=alt.X(\"Cylinders:N\").axis(labelColor=then),  # type: ignore[call-overload]\n            y=alt.Y(\"Origin:N\", axis=alt.Axis(labelColor=then)),  # type: ignore[arg-type]\n        )\n\n    # NOTE: Passing validation then requires an `.otherwise()` **only** for the property cases\n    chart.encode(\n        color=then,\n        x=alt.X(\"Cylinders:N\").axis(labelColor=otherwise),\n        y=alt.Y(\"Origin:N\", axis=alt.Axis(labelColor=otherwise)),\n    ).to_dict()\n\n\n@pytest.mark.parametrize(\n    (\"channel\", \"then\", \"otherwise\"),\n    [\n        (\"color\", alt.ColorValue(\"red\"), alt.ColorValue(\"blue\")),\n        (\"opacity\", alt.value(0.5), alt.value(1.0)),\n        (\"text\", alt.TextValue(\"foo\"), alt.value(\"bar\")),\n        (\"color\", alt.Color(\"col1:N\"), alt.value(\"blue\")),\n        (\"opacity\", \"col1:N\", alt.value(0.5)),\n        (\"text\", alt.value(\"abc\"), alt.Text(\"Name:N\")),\n        (\"size\", alt.value(20), \"Name:N\"),\n        (\"size\", \"count()\", alt.value(0)),\n    ],\n)\n@pytest.mark.parametrize(\n    \"when\",\n    [\n        alt.selection_interval(),\n        alt.selection_point(),\n        alt.datum.Displacement > alt.value(350),\n        alt.selection_point(name=\"select\", on=\"click\"),\n        alt.selection_point(fields=[\"Horsepower\"]),\n    ],\n)\n@pytest.mark.parametrize(\"empty\", [Undefined, True, False])\ndef test_when_condition_parity(\n    cars, channel: str, when, empty: Optional[bool], then, otherwise\n):\n    params = [when] if isinstance(when, alt.Parameter) else ()\n    kwds = {\"x\": \"Cylinders:N\", \"y\": \"Origin:N\"}\n\n    input_condition = alt.condition(when, then, otherwise, empty=empty)\n    chart_condition = (\n        alt.Chart(cars)\n        .mark_rect()\n        .encode(**kwds, **{channel: input_condition})\n        .add_params(*params)\n        .to_dict()\n    )\n\n    input_when = alt.when(when, empty=empty).then(then).otherwise(otherwise)\n    chart_when = (\n        alt.Chart(cars)\n        .mark_rect()\n        .encode(**kwds, **{channel: input_when})\n        .add_params(*params)\n        .to_dict()\n    )\n\n    if isinstance(input_when[\"condition\"], list):\n        input_when[\"condition\"] = input_when[\"condition\"][0]\n        assert input_condition == input_when\n    else:\n        assert chart_condition == chart_when\n\n\ndef test_when_then_interactive() -> None:\n    \"\"\"Copy-related regression found in https://github.com/vega/altair/pull/3394#issuecomment-2302995453.\"\"\"\n    source = \"https://cdn.jsdelivr.net/npm/vega-datasets@v3.2.1/data/movies.json\"\n    predicate = (alt.datum[\"IMDB Rating\"] == None) | (  # noqa: E711\n        alt.datum[\"Rotten Tomatoes Rating\"] == None  # noqa: E711\n    )\n\n    chart = (\n        alt.Chart(source)\n        .mark_point(invalid=None)\n        .encode(\n            x=\"IMDB Rating:Q\",\n            y=\"Rotten Tomatoes Rating:Q\",\n            color=alt.when(predicate).then(alt.value(\"grey\")),\n        )\n    )\n    assert chart.interactive()\n    assert chart.copy()\n    assert chart.to_dict()\n\n\ndef test_selection_to_dict():\n    brush = alt.selection_interval()\n\n    # test some value selections\n    # Note: X and Y cannot have conditions\n    alt.Chart(\"path/to/data.json\").mark_point().encode(\n        color=alt.condition(brush, alt.ColorValue(\"red\"), alt.ColorValue(\"blue\")),\n        opacity=alt.condition(brush, alt.value(0.5), alt.value(1.0)),\n        text=alt.condition(brush, alt.TextValue(\"foo\"), alt.value(\"bar\")),\n    ).to_dict()\n\n    # test some field selections\n    # Note: X and Y cannot have conditions\n    # Conditions cannot both be fields\n    alt.Chart(\"path/to/data.json\").mark_point().encode(\n        color=alt.condition(brush, alt.Color(\"col1:N\"), alt.value(\"blue\")),\n        opacity=alt.condition(brush, \"col1:N\", alt.value(0.5)),\n        text=alt.condition(brush, alt.value(\"abc\"), alt.Text(\"col2:N\")),\n        size=alt.condition(brush, alt.value(20), \"col2:N\"),\n    ).to_dict()\n\n\ndef test_selection_expression():\n    from altair.expr.core import Expression\n\n    selection = alt.selection_point(fields=[\"value\"])\n\n    assert isinstance(selection.value, alt.SelectionExpression)\n    assert selection.value.to_dict() == {\"expr\": f\"{selection.name}.value\"}\n\n    assert isinstance(selection[\"value\"], Expression)\n    assert selection[\"value\"].to_dict() == f\"{selection.name}['value']\"\n\n    magic_attr = \"__magic__\"\n    with pytest.raises(AttributeError):\n        getattr(selection, magic_attr)\n\n\n@pytest.mark.parametrize(\n    \"format\", [\"html\", \"json\", \"png\", \"svg\", \"pdf\", \"vega\", \"bogus\"]\n)\n@pytest.mark.parametrize(\"engine\", [\"vl-convert\"])\ndef test_save(format, engine, basic_chart):\n    if format in {\"pdf\", \"png\"}:\n        out = io.BytesIO()\n        mode = \"rb\"\n    else:\n        out = io.StringIO()\n        mode = \"r\"\n\n    if format in {\"svg\", \"png\", \"pdf\", \"vega\", \"bogus\"} and engine == \"vl-convert\":\n        if format == \"bogus\":\n            with pytest.raises(ValueError) as err:  # noqa: PT011\n                basic_chart.save(out, format=format, engine=engine)\n            assert f\"Unsupported format: '{format}'\" in str(err.value)\n            return\n        elif find_spec(\"vl_convert\") is None:\n            with pytest.raises(ValueError) as err:  # noqa: PT011\n                basic_chart.save(out, format=format, engine=engine)\n            assert \"vl-convert-python\" in str(err.value)\n            return\n\n    basic_chart.save(out, format=format, engine=engine)\n    out.seek(0)\n    content = out.read()\n\n    if format == \"json\":\n        assert \"$schema\" in json.loads(content)\n    elif format == \"vega\":\n        vega_spec = json.loads(content)\n        assert \"$schema\" in vega_spec\n        # Verify it's a Vega schema, not Vega-Lite\n        assert \"vega/v\" in vega_spec[\"$schema\"]\n        assert \"vega-lite\" not in vega_spec[\"$schema\"]\n        # Verify it has Vega-specific structures\n        assert \"marks\" in vega_spec\n        assert \"scales\" in vega_spec\n    elif format == \"html\":\n        assert isinstance(content, str)\n        assert content.startswith(\"<!DOCTYPE html>\")\n    elif format == \"svg\":\n        assert isinstance(content, str)\n        assert content.startswith(\"<svg\")\n    elif format == \"png\":\n        assert not isinstance(content, (str, bytearray, memoryview))\n        assert content.startswith(b\"\\x89PNG\")\n    elif format == \"pdf\":\n        assert not isinstance(content, (str, bytearray, memoryview))\n        assert content.startswith(b\"%PDF-\")\n\n    fid, filename = tempfile.mkstemp(suffix=\".\" + format)\n    os.close(fid)\n\n    # test both string filenames and pathlib.Paths\n    for fp in [filename, pathlib.Path(filename)]:\n        try:\n            basic_chart.save(fp, format=format, engine=engine)\n            with pathlib.Path(fp).open(mode) as f:\n                assert f.read()[:1000] == content[:1000]\n        finally:\n            pathlib.Path(fp).unlink()\n\n\n@pytest.mark.parametrize(\"inline\", [False, pytest.param(True, marks=slow)])\n@skip_requires_vl_convert\ndef test_save_html(basic_chart, inline):\n    out = io.StringIO()\n    basic_chart.save(out, format=\"html\", inline=inline)\n    out.seek(0)\n    content = out.read()\n\n    assert content.startswith(\"<!DOCTYPE html>\")\n\n    if inline:\n        assert '<script type=\"text/javascript\">' in content\n    else:\n        assert 'src=\"https://cdn.jsdelivr.net/npm/vega@6' in content\n        assert 'src=\"https://cdn.jsdelivr.net/npm/vega-lite@6' in content\n        assert 'src=\"https://cdn.jsdelivr.net/npm/vega-embed@7' in content\n\n\n@skip_requires_vl_convert\ndef test_to_url(basic_chart):\n    share_url = basic_chart.to_url()\n\n    assert share_url.startswith(\"https://vega.github.io/editor/#/url/vega-lite/\")\n\n    # Check fullscreen\n    fullscreen_share_url = basic_chart.to_url(fullscreen=True)\n    assert fullscreen_share_url.startswith(\n        \"https://vega.github.io/editor/#/url/vega-lite/\"\n    )\n    assert fullscreen_share_url.endswith(\"/view\")\n\n\ndef test_facet_basic():\n    # wrapped facet\n    chart1 = (\n        alt.Chart(\"data.csv\")\n        .mark_point()\n        .encode(\n            x=\"x:Q\",\n            y=\"y:Q\",\n        )\n        .facet(\"category:N\", columns=2)\n    )\n\n    dct1 = chart1.to_dict()\n\n    assert dct1[\"facet\"] == alt.Facet(\"category:N\").to_dict()\n    assert dct1[\"columns\"] == 2\n    assert dct1[\"data\"] == alt.UrlData(\"data.csv\").to_dict()\n\n    # explicit row/col facet\n    chart2 = (\n        alt.Chart(\"data.csv\")\n        .mark_point()\n        .encode(\n            x=\"x:Q\",\n            y=\"y:Q\",\n        )\n        .facet(row=\"category1:Q\", column=\"category2:Q\")\n    )\n\n    dct2 = chart2.to_dict()\n\n    assert dct2[\"facet\"][\"row\"] == alt.Facet(\"category1:Q\").to_dict()\n    assert dct2[\"facet\"][\"column\"] == alt.Facet(\"category2:Q\").to_dict()\n    assert \"columns\" not in dct2\n    assert dct2[\"data\"] == alt.UrlData(\"data.csv\").to_dict()\n\n\ndef test_facet_parse():\n    chart = (\n        alt.Chart(\"data.csv\")\n        .mark_point()\n        .encode(x=\"x:Q\", y=\"y:Q\")\n        .facet(row=\"row:N\", column=\"column:O\")\n    )\n    dct = chart.to_dict()\n    assert dct[\"data\"] == {\"url\": \"data.csv\"}\n    assert \"data\" not in dct[\"spec\"]\n    assert dct[\"facet\"] == {\n        \"column\": {\"field\": \"column\", \"type\": \"ordinal\"},\n        \"row\": {\"field\": \"row\", \"type\": \"nominal\"},\n    }\n\n\ndef test_facet_parse_data():\n    data = pd.DataFrame({\"x\": range(5), \"y\": range(5), \"row\": list(\"abcab\")})\n    chart = (\n        alt.Chart(data)\n        .mark_point()\n        .encode(x=\"x\", y=\"y:O\")\n        .facet(row=\"row\", column=\"column:O\")\n    )\n    with alt.data_transformers.enable(consolidate_datasets=False):\n        dct = chart.to_dict()\n    assert \"values\" in dct[\"data\"]\n    assert \"data\" not in dct[\"spec\"]\n    assert dct[\"facet\"] == {\n        \"column\": {\"field\": \"column\", \"type\": \"ordinal\"},\n        \"row\": {\"field\": \"row\", \"type\": \"nominal\"},\n    }\n\n    with alt.data_transformers.enable(consolidate_datasets=True):\n        dct = chart.to_dict()\n    assert \"datasets\" in dct\n    assert \"name\" in dct[\"data\"]\n    assert \"data\" not in dct[\"spec\"]\n    assert dct[\"facet\"] == {\n        \"column\": {\"field\": \"column\", \"type\": \"ordinal\"},\n        \"row\": {\"field\": \"row\", \"type\": \"nominal\"},\n    }\n\n\ndef test_selection():\n    # test instantiation of selections\n    interval = alt.selection_interval(name=\"selec_1\")\n    param = interval.param\n    assert isinstance(param, alt.SelectionParameter)\n    select = param.select\n    assert isinstance(select, alt.IntervalSelectionConfig)\n    assert select.type == \"interval\"\n    assert interval.name == \"selec_1\"\n\n    single = alt.selection_point(name=\"selec_2\")\n    assert isinstance(single.param, alt.SelectionParameter)\n    assert single.param.select.type == \"point\"\n    assert single.name == \"selec_2\"\n\n    multi = alt.selection_point(name=\"selec_3\")\n    assert isinstance(multi.param, alt.SelectionParameter)\n    assert multi.param.select.type == \"point\"\n    assert multi.name == \"selec_3\"\n\n    # test adding to chart\n    chart = alt.Chart().add_params(single)\n    chart = chart.add_params(multi, interval)\n    assert {x.name for x in chart.params} == {\"selec_1\", \"selec_2\", \"selec_3\"}\n\n    # test logical operations\n    assert isinstance(single & multi, alt.SelectionPredicateComposition)\n    assert isinstance(single | multi, alt.SelectionPredicateComposition)\n    assert isinstance(~single, alt.SelectionPredicateComposition)\n    assert \"and\" in (single & multi).to_dict()\n    assert \"or\" in (single | multi).to_dict()\n    assert \"not\" in (~single).to_dict()\n\n    # test that default names are deterministic and unique for different types\n    sel1 = alt.selection_point()\n    sel2 = alt.selection_point()\n    sel3 = alt.selection_interval()\n    names = {s.name for s in (sel1, sel2, sel3)}\n    # With hash-based naming, identical specifications get the same name\n    # sel1 and sel2 are identical selection_point() calls, so they get the same name\n    # sel3 is a selection_interval(), so it gets a different name\n    assert len(names) == 2\n    assert sel1.name == sel2.name  # Identical specifications get same name\n    assert sel1.name != sel3.name  # Different specifications get different names\n\n\ndef test_selection_empty_property_preservation():\n    \"\"\"Test that the empty property is preserved in logical operations on selections.\"\"\"\n    # Test basic selection with empty=False\n    click = alt.selection_point(\"click\", empty=False)\n    ctrl_click = alt.selection_point(\n        name=\"ctrl_click\", on=\"click[event.ctrlKey]\", empty=True\n    )\n\n    # Test AND operation preserves empty properties\n    and_result = (click & ctrl_click).to_dict()\n    expected_and = {\n        \"and\": [\n            {\"param\": \"click\", \"empty\": False},\n            {\"param\": \"ctrl_click\", \"empty\": True},\n        ]\n    }\n    assert and_result == expected_and\n\n    # Test with both selections having empty=False\n    ctrl_click_false = alt.selection_point(\n        name=\"ctrl_click_false\", on=\"click[event.ctrlKey]\", empty=False\n    )\n    and_result_false = (ctrl_click_false & ctrl_click).to_dict()\n    expected_and_false = {\n        \"and\": [\n            {\"param\": \"ctrl_click_false\", \"empty\": False},\n            {\"param\": \"ctrl_click\", \"empty\": True},\n        ]\n    }\n    assert and_result_false == expected_and_false\n\n    # Test OR operation preserves empty properties\n    or_result = (click | ctrl_click).to_dict()\n    expected_or = {\n        \"or\": [\n            {\"param\": \"click\", \"empty\": False},\n            {\"param\": \"ctrl_click\", \"empty\": True},\n        ]\n    }\n    assert or_result == expected_or\n\n    # Test NOT operation preserves empty property\n    not_result = (~click).to_dict()\n    expected_not = {\"not\": {\"param\": \"click\", \"empty\": False}}\n    assert not_result == expected_not\n\n    # Test complex nested operations\n    complex_result = ((click & ctrl_click) | (~ctrl_click_false)).to_dict()\n    expected_complex = {\n        \"or\": [\n            {\n                \"and\": [\n                    {\"param\": \"click\", \"empty\": False},\n                    {\"param\": \"ctrl_click\", \"empty\": True},\n                ]\n            },\n            {\"not\": {\"param\": \"ctrl_click_false\", \"empty\": False}},\n        ]\n    }\n    assert complex_result == expected_complex\n\n    # Test with interval selections\n    interval_false = alt.selection_interval(name=\"interval_false\", empty=False)\n    interval_true = alt.selection_interval(name=\"interval_true\", empty=True)\n\n    interval_and = (interval_false & interval_true).to_dict()\n    expected_interval_and = {\n        \"and\": [\n            {\"param\": \"interval_false\", \"empty\": False},\n            {\"param\": \"interval_true\", \"empty\": True},\n        ]\n    }\n    assert interval_and == expected_interval_and\n\n    # Test mixed selection types\n    mixed_result = (click & interval_true).to_dict()\n    expected_mixed = {\n        \"and\": [\n            {\"param\": \"click\", \"empty\": False},\n            {\"param\": \"interval_true\", \"empty\": True},\n        ]\n    }\n    assert mixed_result == expected_mixed\n\n\ndef test_transforms():\n    # aggregate transform\n    agg1 = alt.AggregatedFieldDef(op=\"mean\", field=\"y\", **{\"as\": \"x1\"})\n    agg2 = alt.AggregatedFieldDef(op=\"median\", field=\"z\", **{\"as\": \"x2\"})\n    chart = alt.Chart().transform_aggregate([agg1], [\"foo\"], x2=\"median(z)\")\n    kwds = {\"aggregate\": [agg1, agg2], \"groupby\": [\"foo\"]}\n    assert chart.transform == [alt.AggregateTransform(**kwds)]\n\n    # bin transform\n    chart = alt.Chart().transform_bin(\"binned\", field=\"field\", bin=True)\n    kwds = {\"as\": \"binned\", \"field\": \"field\", \"bin\": True}\n    assert chart.transform == [alt.BinTransform(**kwds)]\n\n    # calculate transform\n    chart = alt.Chart().transform_calculate(\"calc\", \"datum.a * 4\")\n    kwds = {\"as\": \"calc\", \"calculate\": \"datum.a * 4\"}\n    assert chart.transform == [alt.CalculateTransform(**kwds)]\n\n    # density transform\n    chart = alt.Chart().transform_density(\"x\", as_=[\"value\", \"density\"])\n    kwds = {\"as\": [\"value\", \"density\"], \"density\": \"x\"}\n    assert chart.transform == [alt.DensityTransform(**kwds)]\n\n    # extent transform\n    chart = alt.Chart().transform_extent(\"x\", \"x_extent\")\n    assert chart.transform == [alt.ExtentTransform(extent=\"x\", param=\"x_extent\")]\n\n    # filter transform\n    chart = alt.Chart().transform_filter(\"datum.a < 4\")\n    assert chart.transform == [alt.FilterTransform(filter=\"datum.a < 4\")]\n\n    # flatten transform\n    chart = alt.Chart().transform_flatten([\"A\", \"B\"], [\"X\", \"Y\"])\n    kwds = {\"as\": [\"X\", \"Y\"], \"flatten\": [\"A\", \"B\"]}\n    assert chart.transform == [alt.FlattenTransform(**kwds)]\n\n    # fold transform\n    chart = alt.Chart().transform_fold([\"A\", \"B\", \"C\"], as_=[\"key\", \"val\"])\n    kwds = {\"as\": [\"key\", \"val\"], \"fold\": [\"A\", \"B\", \"C\"]}\n    assert chart.transform == [alt.FoldTransform(**kwds)]\n\n    # impute transform\n    chart = alt.Chart().transform_impute(\"field\", \"key\", groupby=[\"x\"])\n    kwds = {\"impute\": \"field\", \"key\": \"key\", \"groupby\": [\"x\"]}\n    assert chart.transform == [alt.ImputeTransform(**kwds)]\n\n    # joinaggregate transform\n    chart = alt.Chart().transform_joinaggregate(min=\"min(x)\", groupby=[\"key\"])\n    kwds = {\n        \"joinaggregate\": [\n            alt.JoinAggregateFieldDef(field=\"x\", op=\"min\", **{\"as\": \"min\"})\n        ],\n        \"groupby\": [\"key\"],\n    }\n    assert chart.transform == [alt.JoinAggregateTransform(**kwds)]\n\n    # loess transform\n    chart = alt.Chart().transform_loess(\"x\", \"y\", as_=[\"xx\", \"yy\"])\n    kwds = {\"on\": \"x\", \"loess\": \"y\", \"as\": [\"xx\", \"yy\"]}\n    assert chart.transform == [alt.LoessTransform(**kwds)]\n\n    # lookup transform (data)\n    lookup_data = alt.LookupData(alt.UrlData(\"foo.csv\"), \"id\", [\"rate\"])\n    chart = alt.Chart().transform_lookup(\"a\", from_=lookup_data, as_=\"a\", default=\"b\")\n    kwds = {\"from\": lookup_data, \"as\": \"a\", \"lookup\": \"a\", \"default\": \"b\"}\n    assert chart.transform == [alt.LookupTransform(**kwds)]\n\n    # lookup transform (selection)\n    lookup_selection = alt.LookupSelection(key=\"key\", param=\"sel\")\n    chart = alt.Chart().transform_lookup(\n        \"a\", from_=lookup_selection, as_=\"a\", default=\"b\"\n    )\n    kwds = {\"from\": lookup_selection, \"as\": \"a\", \"lookup\": \"a\", \"default\": \"b\"}\n    assert chart.transform == [alt.LookupTransform(**kwds)]\n\n    # pivot transform\n    chart = alt.Chart().transform_pivot(\"x\", \"y\")\n    assert chart.transform == [alt.PivotTransform(pivot=\"x\", value=\"y\")]\n\n    # quantile transform\n    chart = alt.Chart().transform_quantile(\"x\", as_=[\"prob\", \"value\"])\n    kwds = {\"quantile\": \"x\", \"as\": [\"prob\", \"value\"]}\n    assert chart.transform == [alt.QuantileTransform(**kwds)]\n\n    # regression transform\n    chart = alt.Chart().transform_regression(\"x\", \"y\", as_=[\"xx\", \"yy\"])\n    kwds = {\"on\": \"x\", \"regression\": \"y\", \"as\": [\"xx\", \"yy\"]}\n    assert chart.transform == [alt.RegressionTransform(**kwds)]\n\n    # sample transform\n    chart = alt.Chart().transform_sample()\n    assert chart.transform == [alt.SampleTransform(1000)]\n\n    # stack transform\n    chart = alt.Chart().transform_stack(\"stacked\", \"x\", groupby=[\"y\"])\n    assert chart.transform == [\n        alt.StackTransform(\n            groupby=[\"y\"],\n            stack=\"x\",\n            offset=Undefined,\n            sort=Undefined,\n            **{\"as\": \"stacked\"},\n        )\n    ]\n\n    # timeUnit transform\n    chart = alt.Chart().transform_timeunit(\"foo\", field=\"x\", timeUnit=\"date\")\n    assert chart.transform == [\n        alt.TimeUnitTransform(field=\"x\", timeUnit=\"date\", **{\"as\": \"foo\"})\n    ]\n\n    # window transform\n    chart = alt.Chart().transform_window(xsum=\"sum(x)\", ymin=\"min(y)\", frame=[None, 0])\n    window = [\n        alt.WindowFieldDef(field=\"x\", op=\"sum\", param=Undefined, **{\"as\": \"xsum\"}),\n        alt.WindowFieldDef(field=\"y\", op=\"min\", param=Undefined, **{\"as\": \"ymin\"}),\n    ]\n\n    # kwargs don't maintain order in Python < 3.6, so window list can\n    # be reversed\n    assert chart.transform in (\n        [alt.WindowTransform(frame=[None, 0], window=window)],\n        [alt.WindowTransform(frame=[None, 0], window=window[::-1])],\n    )\n\n\ndef test_filter_transform_selection_predicates():\n    selector1 = alt.selection_interval(name=\"s1\")\n    selector2 = alt.selection_interval(name=\"s2\")\n    base = alt.Chart(\"data.txt\").mark_point()\n\n    chart = base.transform_filter(selector1)\n    assert chart.to_dict()[\"transform\"] == [{\"filter\": {\"param\": \"s1\"}}]\n\n    chart = base.transform_filter(~selector1)\n    assert chart.to_dict()[\"transform\"] == [{\"filter\": {\"not\": {\"param\": \"s1\"}}}]\n\n    chart = base.transform_filter(selector1 & selector2)\n    assert chart.to_dict()[\"transform\"] == [\n        {\"filter\": {\"and\": [{\"param\": \"s1\"}, {\"param\": \"s2\"}]}}\n    ]\n\n    chart = base.transform_filter(selector1 | selector2)\n    assert chart.to_dict()[\"transform\"] == [\n        {\"filter\": {\"or\": [{\"param\": \"s1\"}, {\"param\": \"s2\"}]}}\n    ]\n\n    chart = base.transform_filter(selector1 | ~selector2)\n    assert chart.to_dict()[\"transform\"] == [\n        {\"filter\": {\"or\": [{\"param\": \"s1\"}, {\"not\": {\"param\": \"s2\"}}]}}\n    ]\n\n    chart = base.transform_filter(~selector1 | ~selector2)\n    assert chart.to_dict()[\"transform\"] == [\n        {\"filter\": {\"or\": [{\"not\": {\"param\": \"s1\"}}, {\"not\": {\"param\": \"s2\"}}]}}\n    ]\n\n    chart = base.transform_filter(~(selector1 & selector2))\n    assert chart.to_dict()[\"transform\"] == [\n        {\"filter\": {\"not\": {\"and\": [{\"param\": \"s1\"}, {\"param\": \"s2\"}]}}}\n    ]\n\n\ndef test_predicate_composition() -> None:\n    columns = [\"Drought\", \"Epidemic\", \"Earthquake\", \"Flood\"]\n    field_one_of = alt.FieldOneOfPredicate(field=\"Entity\", oneOf=columns)\n    field_range = alt.FieldRangePredicate(field=\"Year\", range=[1900, 2000])\n    fields_and = field_one_of & field_range\n    expected_and = {\n        \"and\": [\n            {\"field\": \"Entity\", \"oneOf\": columns},\n            {\"field\": \"Year\", \"range\": [1900, 2000]},\n        ]\n    }\n    assert isinstance(fields_and, alt.PredicateComposition)\n    actual_and = fields_and.to_dict()\n\n    # NOTE: Extra guarantee that something hasn't overloaded `__eq__` or `to_dict`\n    assert isinstance(actual_and, Mapping)\n    assert isinstance(actual_and == expected_and, bool)\n\n    assert actual_and == expected_and\n\n    actual_when = (\n        alt.when(field_one_of, field_range).then(alt.value(0)).otherwise(alt.value(1))\n    )\n    expected_when = {\"condition\": [{\"test\": fields_and, \"value\": 0}], \"value\": 1}\n    assert actual_when == expected_when\n\n    field_range = alt.FieldRangePredicate(field=\"year\", range=[1950, 1960])\n    field_range_not = ~field_range\n    expected_not = {\"not\": {\"field\": \"year\", \"range\": [1950, 1960]}}\n    assert isinstance(field_range_not, alt.PredicateComposition)\n    actual_not = field_range_not.to_dict()\n    assert actual_not == expected_not\n\n    expected_or = alt.LogicalOrPredicate(\n        **{\"or\": [field_range, field_one_of]}\n    ).to_dict()\n    actual_or = (field_range | field_one_of).to_dict()\n    assert actual_or == expected_or\n\n    param_pred = alt.ParameterPredicate(param=\"dummy_1\", empty=True)\n    field_eq = alt.FieldEqualPredicate(equal=999, field=\"measure\")\n    field_gt = alt.FieldGTPredicate(gt=4, field=\"measure 2\")\n    expected_multi = alt.LogicalOrPredicate(\n        **{\n            \"or\": [\n                alt.LogicalNotPredicate(**{\"not\": param_pred}),\n                alt.LogicalAndPredicate(**{\"and\": [field_eq, field_gt]}),\n            ]\n        }\n    ).to_dict()\n    actual_multi = (~param_pred | (field_eq & field_gt)).to_dict()\n    assert actual_multi == expected_multi\n\n\ndef test_filter_transform_predicates(basic_chart) -> None:\n    lhs, rhs = alt.datum[\"b\"] >= 30, alt.datum[\"b\"] < 60\n    expected = [{\"filter\": lhs & rhs}]\n    actual = basic_chart.transform_filter(lhs, rhs).to_dict()[\"transform\"]\n    assert actual == expected\n\n\ndef test_filter_transform_constraints(basic_chart) -> None:\n    lhs, rhs = alt.datum[\"a\"] == \"A\", alt.datum[\"b\"] == 30\n    expected = [{\"filter\": lhs & rhs}]\n    actual = basic_chart.transform_filter(a=\"A\", b=30).to_dict()[\"transform\"]\n    assert actual == expected\n\n\ndef test_filter_transform_predicates_constraints(basic_chart) -> None:\n    from functools import reduce\n    from operator import and_\n\n    predicates = (\n        alt.datum[\"a\"] != \"A\",\n        alt.datum[\"a\"] != \"B\",\n        alt.datum[\"a\"] != \"C\",\n        alt.datum[\"b\"] > 1,\n        alt.datum[\"b\"] < 99,\n    )\n    constraints = {\"b\": 30, \"a\": \"D\"}\n    pred_constraints = *predicates, alt.datum[\"b\"] == 30, alt.datum[\"a\"] != \"D\"\n    expected = [{\"filter\": reduce(and_, pred_constraints)}]\n    actual = basic_chart.transform_filter(*predicates, **constraints).to_dict()[\n        \"transform\"\n    ]\n    assert actual == expected\n\n\ndef test_filter_transform_errors(basic_chart) -> None:\n    NO_ARGS = r\"At least one.+Undefined\"\n    FILTER_KWARGS = r\"ambiguous\"\n\n    depr_filter = {\"field\": \"year\", \"oneOf\": [1955, 2000]}\n    expected = [{\"filter\": depr_filter}]\n\n    with pytest.raises(TypeError, match=NO_ARGS):\n        basic_chart.transform_filter()\n    with pytest.raises(TypeError, match=NO_ARGS):\n        basic_chart.transform_filter(empty=True)\n    with pytest.raises(TypeError, match=NO_ARGS):\n        basic_chart.transform_filter(empty=False)\n\n    with pytest.warns(alt.AltairDeprecationWarning, match=FILTER_KWARGS):\n        basic_chart.transform_filter(filter=depr_filter)\n\n    with warnings.catch_warnings():\n        warnings.filterwarnings(\"ignore\", category=alt.AltairDeprecationWarning)\n        actual = basic_chart.transform_filter(filter=depr_filter).to_dict()[\"transform\"]\n\n    assert actual == expected\n\n\ndef test_resolve_methods():\n    chart = alt.LayerChart().resolve_axis(x=\"shared\", y=\"independent\")\n    assert chart.resolve == alt.Resolve(\n        axis=alt.AxisResolveMap(x=\"shared\", y=\"independent\")\n    )\n\n    chart = alt.LayerChart().resolve_legend(color=\"shared\", fill=\"independent\")\n    assert chart.resolve == alt.Resolve(\n        legend=alt.LegendResolveMap(color=\"shared\", fill=\"independent\")\n    )\n\n    chart = alt.LayerChart().resolve_scale(x=\"shared\", y=\"independent\")\n    assert chart.resolve == alt.Resolve(\n        scale=alt.ScaleResolveMap(x=\"shared\", y=\"independent\")\n    )\n\n\ndef test_layer_encodings():\n    chart = alt.LayerChart().encode(x=\"column:Q\")\n    assert chart.encoding.x == alt.X(shorthand=\"column:Q\")\n\n\ndef test_add_selection():\n    selections = [\n        alt.selection_interval(),\n        alt.selection_point(),\n        alt.selection_point(),\n    ]\n    chart = (\n        alt.Chart()\n        .mark_point()\n        .add_params(selections[0])\n        .add_params(selections[1], selections[2])\n    )\n    # The second and third selections are identical (same hash-based name),\n    # so only the first two unique selections should be added\n    expected = [selections[0].param, selections[1].param]\n    assert chart.params == expected\n\n\ndef test_repeat_add_selections():\n    base = alt.Chart(\"data.csv\").mark_point()\n    selection = alt.selection_point()\n    alt.Chart._counter = 0\n    chart1 = base.add_params(selection).repeat(list(\"ABC\"))\n    alt.Chart._counter = 0\n    chart2 = base.repeat(list(\"ABC\")).add_params(selection)\n    assert chart1.to_dict() == chart2.to_dict()\n\n\ndef test_facet_add_selections():\n    base = alt.Chart(\"data.csv\").mark_point()\n    selection = alt.selection_point()\n    alt.Chart._counter = 0\n    chart1 = base.add_params(selection).facet(\"val:Q\")\n    alt.Chart._counter = 0\n    chart2 = base.facet(\"val:Q\").add_params(selection)\n    assert chart1.to_dict() == chart2.to_dict()\n\n\ndef test_layer_add_selection():\n    base = alt.Chart(\"data.csv\").mark_point()\n    selection = alt.selection_point()\n    alt.Chart._counter = 0\n    chart1 = alt.layer(base.add_params(selection), base)\n    alt.Chart._counter = 0\n    chart2 = alt.layer(base, base).add_params(selection)\n    assert chart1.to_dict() == chart2.to_dict()\n\n\n@pytest.mark.parametrize(\"charttype\", [alt.concat, alt.hconcat, alt.vconcat])\ndef test_compound_add_selections(charttype):\n    base = alt.Chart(\"data.csv\").mark_point()\n    selection = alt.selection_point()\n    alt.Chart._counter = 0\n    chart1 = charttype(base.add_params(selection), base.add_params(selection))\n    alt.Chart._counter = 0\n    chart2 = charttype(base, base).add_params(selection)\n    assert chart1.to_dict() == chart2.to_dict()\n\n\ndef test_selection_property():\n    sel = alt.selection_interval()\n    chart = alt.Chart(\"data.csv\").mark_point().properties(selection=sel)\n\n    assert list(chart[\"selection\"].keys()) == [sel.name]\n\n\ndef test_LookupData():\n    df = nw.from_native(pd.DataFrame({\"x\": [1, 2, 3], \"y\": [4, 5, 6]}))\n    # Data type hints won't match with what TopLevelUnitSpec expects\n    # as there is some data processing happening when converting to a VL spec\n    lookup = alt.LookupData(data=df, key=\"x\")  # pyright: ignore[reportArgumentType]\n\n    dct = lookup.to_dict()\n    assert dct[\"key\"] == \"x\"\n    assert dct[\"data\"] == {\n        \"values\": [{\"x\": 1, \"y\": 4}, {\"x\": 2, \"y\": 5}, {\"x\": 3, \"y\": 6}]\n    }\n\n\ndef test_themes():\n    from altair import theme\n\n    chart = alt.Chart(\"foo.txt\").mark_point()\n\n    with theme.enable(\"default\"):\n        assert chart.to_dict()[\"config\"] == {\n            \"view\": {\"continuousWidth\": 300, \"continuousHeight\": 300}\n        }\n\n    with theme.enable(\"opaque\"):\n        assert chart.to_dict()[\"config\"] == {\n            \"background\": \"white\",\n            \"view\": {\"continuousWidth\": 300, \"continuousHeight\": 300},\n        }\n\n    with theme.enable(\"none\"):\n        assert \"config\" not in chart.to_dict()\n\n\ndef test_chart_from_dict():\n    base = alt.Chart(\"data.csv\").mark_point().encode(x=\"x:Q\", y=\"y:Q\")\n\n    charts = [\n        base,\n        base + base,\n        base | base,\n        base & base,\n        base.facet(\"c:N\"),\n        (base + base).facet(row=\"c:N\", data=\"data.csv\"),\n        base.repeat([\"c\", \"d\"]),\n        (base + base).repeat(row=[\"c\", \"d\"]),\n    ]\n\n    for chart in charts:\n        chart_out = alt.Chart.from_dict(chart.to_dict())\n        assert type(chart_out) is type(chart)\n\n    # test that an invalid spec leads to a schema validation error\n    with pytest.raises(jsonschema.ValidationError):\n        alt.Chart.from_dict({\"invalid\": \"spec\"})\n\n\ndef test_consolidate_datasets(basic_chart):\n    subchart1 = basic_chart\n    subchart2 = basic_chart.copy()\n    subchart2.data = basic_chart.data.copy()\n    chart = subchart1 | subchart2\n\n    with alt.data_transformers.enable(consolidate_datasets=True):\n        dct_consolidated = chart.to_dict()\n\n    with alt.data_transformers.enable(consolidate_datasets=False):\n        dct_standard = chart.to_dict()\n\n    assert \"datasets\" in dct_consolidated\n    assert \"datasets\" not in dct_standard\n\n    datasets = dct_consolidated[\"datasets\"]\n\n    # two dataset copies should be recognized as duplicates\n    assert len(datasets) == 1\n\n    # make sure data matches original & names are correct\n    name, data = datasets.popitem()\n\n    for spec in dct_standard[\"hconcat\"]:\n        assert spec[\"data\"][\"values\"] == data\n\n    for spec in dct_consolidated[\"hconcat\"]:\n        assert spec[\"data\"] == {\"name\": name}\n\n\ndef test_consolidate_InlineData():\n    data = alt.InlineData(\n        values=[{\"a\": 1, \"b\": 1}, {\"a\": 2, \"b\": 2}], format={\"type\": \"csv\"}\n    )\n    chart = alt.Chart(data).mark_point()\n\n    with alt.data_transformers.enable(consolidate_datasets=False):\n        dct = chart.to_dict()\n    assert dct[\"data\"][\"format\"] == data.format\n    assert dct[\"data\"][\"values\"] == data.values\n\n    with alt.data_transformers.enable(consolidate_datasets=True):\n        dct = chart.to_dict()\n    assert dct[\"data\"][\"format\"] == data.format\n    assert next(iter(dct[\"datasets\"].values())) == data.values\n\n    data = alt.InlineData(values=[], name=\"runtime_data\")\n    chart = alt.Chart(data).mark_point()\n\n    with alt.data_transformers.enable(consolidate_datasets=False):\n        dct = chart.to_dict()\n    assert dct[\"data\"] == data.to_dict()\n\n    with alt.data_transformers.enable(consolidate_datasets=True):\n        dct = chart.to_dict()\n    assert dct[\"data\"] == data.to_dict()\n\n\ndef test_repeat():\n    # wrapped repeat\n    chart1 = (\n        alt.Chart(\"data.csv\")\n        .mark_point()\n        .encode(\n            x=alt.X(alt.repeat(), type=\"quantitative\"),\n            y=\"y:Q\",\n        )\n        .repeat([\"A\", \"B\", \"C\", \"D\"], columns=2)\n    )\n\n    dct1 = chart1.to_dict()\n\n    assert dct1[\"repeat\"] == [\"A\", \"B\", \"C\", \"D\"]\n    assert dct1[\"columns\"] == 2\n    assert dct1[\"spec\"][\"encoding\"][\"x\"][\"field\"] == {\"repeat\": \"repeat\"}\n\n    # explicit row/col repeat\n    chart2 = (\n        alt.Chart(\"data.csv\")\n        .mark_point()\n        .encode(\n            x=alt.X(alt.repeat(\"row\"), type=\"quantitative\"),\n            y=alt.Y(alt.repeat(\"column\"), type=\"quantitative\"),\n        )\n        .repeat(row=[\"A\", \"B\", \"C\"], column=[\"C\", \"B\", \"A\"])\n    )\n\n    dct2 = chart2.to_dict()\n\n    assert dct2[\"repeat\"] == {\"row\": [\"A\", \"B\", \"C\"], \"column\": [\"C\", \"B\", \"A\"]}\n    assert \"columns\" not in dct2\n    assert dct2[\"spec\"][\"encoding\"][\"x\"][\"field\"] == {\"repeat\": \"row\"}\n    assert dct2[\"spec\"][\"encoding\"][\"y\"][\"field\"] == {\"repeat\": \"column\"}\n\n\ndef test_data_property():\n    data = pd.DataFrame({\"x\": [1, 2, 3], \"y\": list(\"ABC\")})\n    chart1 = alt.Chart(data).mark_point()\n    chart2 = alt.Chart().mark_point().properties(data=data)\n\n    assert chart1.to_dict() == chart2.to_dict()\n\n\n@pytest.mark.parametrize(\"method\", [\"layer\", \"hconcat\", \"vconcat\", \"concat\"])\n@pytest.mark.parametrize(\n    \"data\", [\"data.json\", pd.DataFrame({\"x\": range(3), \"y\": list(\"abc\")})]\n)\ndef test_subcharts_with_same_data(method, data):\n    func = getattr(alt, method)\n\n    point = alt.Chart(data).mark_point().encode(x=\"x:Q\", y=\"y:Q\")\n    line = point.mark_line()\n    text = point.mark_text()\n\n    chart1 = func(point, line, text)\n    assert chart1.data is not Undefined\n    assert all(c.data is Undefined for c in getattr(chart1, method))\n\n    if method != \"concat\":\n        op = OP_DICT[method]\n        chart2 = op(op(point, line), text)\n        assert chart2.data is not Undefined\n        assert all(c.data is Undefined for c in getattr(chart2, method))\n\n\n@pytest.mark.parametrize(\"method\", [\"layer\", \"hconcat\", \"vconcat\", \"concat\"])\n@pytest.mark.parametrize(\n    \"data\", [\"data.json\", pd.DataFrame({\"x\": range(3), \"y\": list(\"abc\")})]\n)\ndef test_subcharts_different_data(method, data):\n    func = getattr(alt, method)\n\n    point = alt.Chart(data).mark_point().encode(x=\"x:Q\", y=\"y:Q\")\n    otherdata = alt.Chart(\"data.csv\").mark_point().encode(x=\"x:Q\", y=\"y:Q\")\n    nodata = alt.Chart().mark_point().encode(x=\"x:Q\", y=\"y:Q\")\n\n    chart1 = func(point, otherdata)\n    assert chart1.data is Undefined\n    assert getattr(chart1, method)[0].data is data\n\n    chart2 = func(point, nodata)\n    assert chart2.data is Undefined\n    assert getattr(chart2, method)[0].data is data\n\n\ndef test_layer_facet(basic_chart):\n    chart = (basic_chart + basic_chart).facet(row=\"row:Q\")\n    assert chart.data is not Undefined\n    assert chart.spec.data is Undefined\n    for layer in chart.spec.layer:\n        assert layer.data is Undefined\n\n    dct = chart.to_dict()\n    assert \"data\" in dct\n\n\ndef test_layer_errors():\n    toplevel_chart = alt.Chart(\"data.txt\").mark_point().configure_legend(columns=2)\n\n    facet_chart1 = alt.Chart(\"data.txt\").mark_point().encode(facet=\"row:Q\")\n\n    facet_chart2 = alt.Chart(\"data.txt\").mark_point().facet(\"row:Q\")\n\n    repeat_chart = alt.Chart(\"data.txt\").mark_point().repeat([\"A\", \"B\", \"C\"])\n\n    simple_chart = alt.Chart(\"data.txt\").mark_point()\n\n    with pytest.raises(TypeError, match=r\".config. attribute cannot.+LayerChart\"):\n        toplevel_chart + simple_chart\n\n    with pytest.raises(TypeError, match=r\"Concat.+cannot.+layered.+before concat\"):\n        alt.hconcat(simple_chart) + simple_chart\n\n    with pytest.raises(TypeError, match=r\"Repeat.+cannot.+layered.+before repeat\"):\n        repeat_chart + simple_chart\n\n    with pytest.raises(TypeError, match=r\"Facet.+.+cannot.+layered.+before facet\"):\n        facet_chart1 + simple_chart\n\n    with pytest.raises(TypeError, match=r\"Facet.+.+cannot.+layered.+before facet\"):\n        alt.layer(simple_chart) + facet_chart2\n\n\n@pytest.fixture\ndef facet_layer_data():\n    import pandas as pd\n\n    return pd.DataFrame(\n        {\"x\": [1, 2], \"y\": [3, 4], \"row\": [\"a\", \"b\"], \"col\": [\"c\", \"d\"]}\n    )\n\n\ndef test_layer_hoist_row_returns_facetchart(facet_layer_data):\n    \"\"\"Layering charts that share a row encoding produces a FacetChart.\"\"\"\n    base = alt.Chart(facet_layer_data).encode(x=\"x:Q\", row=\"row:N\")\n    chart = alt.layer(\n        base.mark_point().encode(y=\"y:Q\"), base.mark_line().encode(y=\"y:Q\")\n    )\n\n    assert isinstance(chart, alt.FacetChart)\n    assert isinstance(chart.spec, alt.LayerChart)\n\n\ndef test_layer_hoist_row_column_returns_facetchart(facet_layer_data):\n    \"\"\"Layering charts that share row+column encodings produces a FacetChart.\"\"\"\n    base = alt.Chart(facet_layer_data).encode(x=\"x:Q\", row=\"row:N\", column=\"col:N\")\n    chart = base.mark_point().encode(y=\"y:Q\") + base.mark_line().encode(y=\"y:Q\")\n\n    assert isinstance(chart, alt.FacetChart)\n    assert isinstance(chart.facet, alt.FacetMapping)\n    assert chart.facet.row is not Undefined\n    assert chart.facet.column is not Undefined\n\n\ndef test_layer_hoist_wrapped_facet_returns_facetchart(facet_layer_data):\n    \"\"\"Layering charts that share a wrapped facet encoding produces a FacetChart.\"\"\"\n    base = alt.Chart(facet_layer_data).encode(x=\"x:Q\", facet=\"row:N\")\n    chart = alt.layer(\n        base.mark_point().encode(y=\"y:Q\"), base.mark_line().encode(y=\"y:Q\")\n    )\n\n    assert isinstance(chart, alt.FacetChart)\n    assert not isinstance(chart.facet, alt.FacetMapping)\n\n\ndef test_layer_hoist_inner_layers_have_no_facet_encoding(facet_layer_data):\n    \"\"\"After hoisting, the inner layer specs must not contain facet channels.\"\"\"\n    base = alt.Chart(facet_layer_data).encode(x=\"x:Q\", row=\"row:N\", column=\"col:N\")\n    chart = alt.layer(\n        base.mark_point().encode(y=\"y:Q\"), base.mark_line().encode(y=\"y:Q\")\n    )\n\n    for layer_spec in chart.spec.layer:\n        encoding = layer_spec._get(\"encoding\")\n        for ch in (\"row\", \"column\", \"facet\"):\n            assert encoding._get(ch) is Undefined, f\"channel {ch!r} was not stripped\"\n\n\ndef test_layer_hoist_does_not_mutate_inputs(facet_layer_data):\n    \"\"\"Input charts must not be mutated by the hoisting operation.\"\"\"\n    base = alt.Chart(facet_layer_data).encode(x=\"x:Q\", row=\"row:N\")\n    layer1 = base.mark_point().encode(y=\"y:Q\")\n    layer2 = base.mark_line().encode(y=\"y:Q\")\n\n    before1 = layer1.to_dict()\n    before2 = layer2.to_dict()\n\n    alt.layer(layer1, layer2)\n\n    assert layer1.to_dict() == before1, \"layer1 was mutated\"\n    assert layer2.to_dict() == before2, \"layer2 was mutated\"\n\n\ndef test_layer_hoist_row_vega_spec_matches_manual(facet_layer_data):\n    \"\"\"Hoisted row spec must produce the same Vega-Lite JSON as manual .facet().\"\"\"\n    base = alt.Chart(facet_layer_data).encode(x=\"x:Q\", row=\"row:N\")\n    auto = alt.layer(\n        base.mark_point().encode(y=\"y:Q\"), base.mark_line().encode(y=\"y:Q\")\n    )\n\n    manual = alt.layer(\n        alt.Chart(facet_layer_data).mark_point().encode(x=\"x:Q\", y=\"y:Q\"),\n        alt.Chart(facet_layer_data).mark_line().encode(x=\"x:Q\", y=\"y:Q\"),\n    ).facet(row=\"row:N\")\n\n    assert auto.to_dict() == manual.to_dict()\n\n\ndef test_layer_hoist_row_column_vega_spec_matches_manual(facet_layer_data):\n    \"\"\"Hoisted row+column spec must produce the same Vega-Lite JSON as manual .facet().\"\"\"\n    base = alt.Chart(facet_layer_data).encode(x=\"x:Q\", row=\"row:N\", column=\"col:N\")\n    auto = base.mark_point().encode(y=\"y:Q\") + base.mark_line().encode(y=\"y:Q\")\n\n    manual = alt.layer(\n        alt.Chart(facet_layer_data).mark_point().encode(x=\"x:Q\", y=\"y:Q\"),\n        alt.Chart(facet_layer_data).mark_line().encode(x=\"x:Q\", y=\"y:Q\"),\n    ).facet(row=\"row:N\", column=\"col:N\")\n\n    assert auto.to_dict() == manual.to_dict()\n\n\ndef test_layer_hoist_wrapped_facet_vega_spec_matches_manual(facet_layer_data):\n    \"\"\"Hoisted wrapped-facet spec must produce the same Vega-Lite JSON as manual .facet().\"\"\"\n    base = alt.Chart(facet_layer_data).encode(x=\"x:Q\", facet=\"row:N\")\n    auto = alt.layer(\n        base.mark_point().encode(y=\"y:Q\"), base.mark_line().encode(y=\"y:Q\")\n    )\n\n    manual = alt.layer(\n        alt.Chart(facet_layer_data).mark_point().encode(x=\"x:Q\", y=\"y:Q\"),\n        alt.Chart(facet_layer_data).mark_line().encode(x=\"x:Q\", y=\"y:Q\"),\n    ).facet(facet=\"row:N\")\n\n    assert auto.to_dict() == manual.to_dict()\n\n\ndef test_layer_hoist_three_layers_all_matching(facet_layer_data):\n    \"\"\"Three layers that all share the same facet encoding are hoisted correctly.\"\"\"\n    base = alt.Chart(facet_layer_data).encode(x=\"x:Q\", row=\"row:N\")\n    chart = alt.layer(\n        base.mark_point().encode(y=\"y:Q\"),\n        base.mark_line().encode(y=\"y:Q\"),\n        base.mark_area().encode(y=\"y:Q\"),\n    )\n\n    assert isinstance(chart, alt.FacetChart)\n    assert len(chart.spec.layer) == 3\n    for layer_spec in chart.spec.layer:\n        assert layer_spec._get(\"encoding\")._get(\"row\") is Undefined\n\n\ndef test_layer_hoist_three_layers_partial_mismatch_raises(facet_layer_data):\n    \"\"\"Three layers where only two share the facet encoding still raise TypeError.\"\"\"\n    base = alt.Chart(facet_layer_data).encode(x=\"x:Q\", row=\"row:N\")\n    chart_different_row = (\n        alt.Chart(facet_layer_data).mark_point().encode(x=\"x:Q\", y=\"y:Q\", row=\"col:N\")\n    )\n\n    with pytest.raises(TypeError, match=r\"Faceted.+cannot be layered\"):\n        alt.layer(\n            base.mark_point().encode(y=\"y:Q\"),\n            base.mark_line().encode(y=\"y:Q\"),\n            chart_different_row,\n        )\n\n\ndef test_layer_hoist_facet_mismatched_raises():\n    \"\"\"Layers with different facet field names raise TypeError.\"\"\"\n    chart_row_a = alt.Chart(\"data.csv\").mark_point().encode(row=\"a:N\")\n    chart_row_b = alt.Chart(\"data.csv\").mark_point().encode(row=\"b:N\")\n\n    with pytest.raises(TypeError, match=r\"Faceted.+cannot be layered\"):\n        alt.layer(chart_row_a, chart_row_b)\n\n\ndef test_layer_hoist_facet_partial_raises():\n    \"\"\"A chart with a facet encoding layered with one without raises TypeError.\"\"\"\n    chart_with_facet = alt.Chart(\"data.csv\").mark_point().encode(row=\"a:N\")\n    chart_without = alt.Chart(\"data.csv\").mark_point()\n\n    with pytest.raises(TypeError, match=r\"Faceted.+cannot be layered\"):\n        alt.layer(chart_with_facet, chart_without)\n\n\n@pytest.mark.parametrize(\n    \"chart_type\",\n    [\"layer\", \"hconcat\", \"vconcat\", \"concat\", \"facet\", \"facet_encoding\", \"repeat\"],\n)\ndef test_resolve(chart_type):\n    chart = _make_chart_type(chart_type)\n    chart = (\n        chart.resolve_scale(\n            x=\"independent\",\n        )\n        .resolve_legend(color=\"independent\")\n        .resolve_axis(y=\"independent\")\n    )\n    dct = chart.to_dict()\n    assert dct[\"resolve\"] == {\n        \"scale\": {\"x\": \"independent\"},\n        \"legend\": {\"color\": \"independent\"},\n        \"axis\": {\"y\": \"independent\"},\n    }\n\n\n# TODO: test vconcat, hconcat, concat, facet_encoding when schema allows them.\n# This is blocked by https://github.com/vega/vega-lite/issues/5261\n@pytest.mark.parametrize(\"chart_type\", [\"chart\", \"layer\"])\n@pytest.mark.parametrize(\"facet_arg\", [None, \"facet\", \"row\", \"column\"])\ndef test_facet(chart_type, facet_arg):\n    chart = _make_chart_type(chart_type)\n    if facet_arg is None:\n        chart = chart.facet(\"color:N\", columns=2)\n    else:\n        chart = chart.facet(**{facet_arg: \"color:N\", \"columns\": 2})\n    dct = chart.to_dict()\n\n    assert \"spec\" in dct\n    assert dct[\"columns\"] == 2\n    expected = {\"field\": \"color\", \"type\": \"nominal\"}\n    if facet_arg is None or facet_arg == \"facet\":\n        assert dct[\"facet\"] == expected\n    else:\n        assert dct[\"facet\"][facet_arg] == expected\n\n\ndef test_sequence():\n    data = alt.sequence(100)\n    assert data.to_dict() == {\"sequence\": {\"start\": 0, \"stop\": 100}}\n\n    data = alt.sequence(5, 10)\n    assert data.to_dict() == {\"sequence\": {\"start\": 5, \"stop\": 10}}\n\n    data = alt.sequence(0, 1, 0.1, as_=\"x\")\n    assert data.to_dict() == {\n        \"sequence\": {\"start\": 0, \"stop\": 1, \"step\": 0.1, \"as\": \"x\"}\n    }\n\n\ndef test_graticule():\n    data = alt.graticule()\n    assert data.to_dict() == {\"graticule\": True}\n\n    data = alt.graticule(step=[15, 15])\n    assert data.to_dict() == {\"graticule\": {\"step\": [15, 15]}}\n\n\ndef test_sphere():\n    data = alt.sphere()\n    assert data.to_dict() == {\"sphere\": True}\n\n\ndef test_validate_dataset():\n    d = {\"data\": {\"values\": [{}]}, \"mark\": {\"type\": \"point\"}}\n\n    chart = alt.Chart.from_dict(d)\n    jsn = chart.to_json()\n\n    assert jsn\n\n\ndef test_polars_with_pandas_nor_pyarrow(monkeypatch: pytest.MonkeyPatch):\n    monkeypatch.delitem(sys.modules, \"pandas\")\n    monkeypatch.delitem(sys.modules, \"numpy\")\n    monkeypatch.delitem(sys.modules, \"pyarrow\", raising=False)\n\n    df = pl.DataFrame({\"a\": [1, 2, 3], \"b\": [4, 5, 6]})\n    _ = alt.Chart(df).mark_line().encode(x=\"a\", y=\"b\").to_json()\n    # Check pandas and PyArrow weren't imported anywhere along the way,\n    # confirming that the plot above would work without pandas no PyArrow\n    # installed.\n    assert \"pandas\" not in sys.modules\n    assert \"pyarrow\" not in sys.modules\n    assert \"numpy\" not in sys.modules\n\n\ndef test_polars_date_32():\n    df = pl.DataFrame(\n        {\"a\": [1, 2, 3], \"b\": [date(2020, 1, 1), date(2020, 1, 2), date(2020, 1, 3)]}\n    )\n    result = alt.Chart(df).mark_line().encode(x=\"a\", y=\"b\").to_dict()\n    assert next(iter(result[\"datasets\"].values())) == [\n        {\"a\": 1, \"b\": \"2020-01-01T00:00:00\"},\n        {\"a\": 2, \"b\": \"2020-01-02T00:00:00\"},\n        {\"a\": 3, \"b\": \"2020-01-03T00:00:00\"},\n    ]\n\n\n@skip_requires_pyarrow(requires_tzdata=True)\n@skip_requires_duckdb\ndef test_interchange_with_date_32():\n    # Test that objects which Narwhals only supports at the interchange\n    # level can be plotted when they contain date32 columns.\n    import duckdb  # pyright: ignore[reportMissingImports]\n\n    df = pl.DataFrame(  # noqa: F841\n        {\"a\": [1, 2, 3], \"b\": [date(2020, 1, 1), date(2020, 1, 2), date(2020, 1, 3)]}\n    )\n    rel = duckdb.sql(\"select * from df\")\n    result = alt.Chart(rel).mark_line().encode(x=\"a\", y=\"b\").to_dict()\n    assert next(iter(result[\"datasets\"].values())) == [\n        {\"a\": 1, \"b\": \"2020-01-01T00:00:00\"},\n        {\"a\": 2, \"b\": \"2020-01-02T00:00:00\"},\n        {\"a\": 3, \"b\": \"2020-01-03T00:00:00\"},\n    ]\n\n\n@skip_requires_pyarrow(requires_tzdata=True)\n@skip_requires_duckdb\ndef test_interchange_with_vegafusion(monkeypatch: pytest.MonkeyPatch):\n    # Test that objects which Narwhals only supports at the interchange\n    # level don't get converted to PyArrow unnecessarily when plotted\n    # with the vegafusion transformer.\n    # TODO: this test can be drastically simplified when some level of\n    # DuckDB support in VegaFusion, as it can then just be `alt.Chart(rel_df)`\n    # without DuckDBWithInterchangeSupport.\n    import duckdb  # pyright: ignore[reportMissingImports]\n\n    df = pl.DataFrame(  # noqa: F841\n        {\n            \"a\": [1, 2, 3],\n            \"b\": [datetime(2020, 1, 1), datetime(2020, 1, 2), datetime(2020, 1, 3)],\n        }\n    )\n    rel = duckdb.sql(\"select * from df\")\n\n    class DuckDBWithInterchangeSupport:\n        \"\"\"\n        DuckDB doesn't (yet?) support the interchange protocol.\n\n        So, we create duckdb wrapper which defers to PyArrow's\n        implementation of the protocol.\n        \"\"\"\n\n        def __init__(self, rel: duckdb.DuckDBPyRelation) -> None:\n            self._rel = rel\n\n        def __dataframe__(self, allow_copy: bool = True) -> object:\n            return self._rel.to_arrow_table().__dataframe__()\n\n    rel_df = DuckDBWithInterchangeSupport(rel)\n    # \"poison\" `arrow_table_from_dfi_dataframe` to check that it does not get called\n    # if we use the vegafusion transformer\n    monkeypatch.setattr(\n        \"altair.utils.data.arrow_table_from_dfi_dataframe\", lambda x: 1 / 0\n    )\n\n    # Narwhals doesn't fully support our custom DuckDBWithInterchangeSupport,\n    # so we need to overwrite `to_native`\n    def to_native(df, strict):\n        if isinstance(df, nw.DataFrame):\n            return rel_df\n        return df\n\n    monkeypatch.setattr(\"narwhals.stable.v1.to_native\", to_native)\n\n    with alt.data_transformers.enable(\"vegafusion\"):\n        result = (\n            alt.Chart(rel_df).mark_line().encode(x=\"a\", y=\"b\").to_dict(format=\"vega\")\n        )\n    assert next(iter(result[\"data\"]))[\"values\"] == [\n        {\"a\": 1, \"b\": \"2020-01-01T00:00:00.000\"},\n        {\"a\": 2, \"b\": \"2020-01-02T00:00:00.000\"},\n        {\"a\": 3, \"b\": \"2020-01-03T00:00:00.000\"},\n    ]\n\n\ndef test_binding() -> None:\n    @use_signature_func(alt.Binding)\n    def old_binding(input: Any, **kwargs: Any) -> alt.Binding:\n        \"\"\"A generic binding.\"\"\"\n        return alt.Binding(input=input, **kwargs)\n\n    # NOTE: `mypy` doesn't complain, but `pyright` does\n    old = old_binding(input=\"search\", placeholder=\"Country\", name=\"Search\")  # pyright: ignore[reportCallIssue]\n    old_positional = old_binding(\"search\", placeholder=\"Country\", name=\"Search\")\n\n    new = alt.binding(input=\"search\", placeholder=\"Country\", name=\"Search\")\n    new_positional = alt.binding(\"search\", placeholder=\"Country\", name=\"Search\")\n\n    assert (\n        old.to_dict()\n        == old_positional.to_dict()\n        == new.to_dict()\n        == new_positional.to_dict()\n    )\n    assert all(\n        isinstance(x, alt.Binding) for x in (old, old_positional, new, new_positional)\n    )\n\n    MISSING_INPUT = r\"missing 1 required positional argument: 'input\"\n\n    # NOTE: `mypy` doesn't complain, but `pyright` does (Again)\n    with pytest.raises(TypeError, match=MISSING_INPUT):\n        old_binding(placeholder=\"Country\", name=\"Search\")  # pyright: ignore[reportCallIssue]\n\n    # NOTE: Both type checkers can detect the issue on the new signature\n    with pytest.raises(TypeError, match=MISSING_INPUT):\n        alt.binding(placeholder=\"Country\", name=\"Search\")  # type: ignore[call-arg]\n\n\ndef _view_name_of_concat_cell(cell: dict) -> str:\n    \"\"\"View name used by a single vconcat/hconcat cell (facet spec).\"\"\"\n    spec = cell.get(\"spec\", {})\n    if \"layer\" in spec:\n        return spec[\"layer\"][0][\"name\"]\n    return spec[\"name\"]\n\n\ndef test_concat_faceted_three_params_unique_views_per_param_issue_3954():\n    \"\"\"Regression for #3954: concat of three faceted charts with p1, p2, p3 — each param gets only its cell's view.\"\"\"\n    data = pd.DataFrame({\"x\": [1, 2, 3, 4], \"y\": [1, 2, 3, 4], \"z\": [0, 0, 1, 1]})\n    c = alt.Chart(data).mark_line().encode(x=\"x\", y=\"y\").facet(\"z\")\n    p1, p2, p3 = (\n        alt.selection_point(name=\"p1\"),\n        alt.selection_point(name=\"p2\"),\n        alt.selection_point(name=\"p3\"),\n    )\n    with warnings.catch_warnings(record=True):\n        spec = (c.add_params(p1) & c.add_params(p2) & c.add_params(p3)).to_dict()\n    params = spec[\"params\"]\n    vconcat = spec[\"vconcat\"]\n    assert len(params) == 3\n    assert len(vconcat) == 3\n    for i in range(3):\n        assert params[i][\"views\"] == [_view_name_of_concat_cell(vconcat[i])]\n\n\ndef test_concat_faceted_shared_param_both_views_issue_3954():\n    \"\"\"Regression for #3954: concat of two faceted charts with one shared param — param lists both cell views.\"\"\"\n    data = pd.DataFrame(\n        {\"x\": [1, 2], \"y\": [3, 4], \"row\": [\"a\", \"b\"], \"col\": [\"c\", \"d\"]}\n    )\n    manual = alt.layer(\n        alt.Chart(data).mark_point().encode(x=\"x:Q\", y=\"y:Q\"),\n        alt.Chart(data).mark_line().encode(x=\"x:Q\", y=\"y:Q\"),\n    ).facet(row=\"row:N\", column=\"col:N\")\n    selection = alt.selection_interval(bind=\"scales\")\n    with warnings.catch_warnings(record=True):\n        spec = (manual & manual).add_params(selection).to_dict()\n    params = spec[\"params\"]\n    vconcat = spec[\"vconcat\"]\n    assert len(params) == 1\n    assert len(vconcat) == 2\n    assert set(params[0][\"views\"]) == {\n        _view_name_of_concat_cell(vconcat[0]),\n        _view_name_of_concat_cell(vconcat[1]),\n    }\n\n\ndef test_concat_faceted_two_shared_params_both_views_issue_3954():\n    \"\"\"Regression for #3954: concat of two faceted charts with two shared params — each param must list both cell views.\"\"\"\n    data = pd.DataFrame({\"x\": [1, 2, 3, 4], \"y\": [1, 2, 3, 4], \"z\": [0, 0, 1, 1]})\n    c = alt.Chart(data).mark_line().encode(x=\"x\", y=\"y\").facet(\"z\")\n    p1 = alt.selection_point(name=\"p1\")\n    p2 = alt.selection_point(name=\"p2\")\n    with warnings.catch_warnings(record=True):\n        spec = (c.add_params(p1, p2) & c.add_params(p1, p2)).to_dict()\n    params = spec[\"params\"]\n    vconcat = spec[\"vconcat\"]\n    assert len(params) == 2\n    assert len(vconcat) == 2\n    view0 = _view_name_of_concat_cell(vconcat[0])\n    view1 = _view_name_of_concat_cell(vconcat[1])\n    for p in params:\n        assert set(p[\"views\"]) == {view0, view1}\n"
  },
  {
    "path": "tests/vegalite/v6/test_data.py",
    "content": "from pathlib import Path\n\nimport pandas as pd\nimport pytest\n\nfrom altair.vegalite.v6 import data as alt\n\n\n@pytest.fixture\ndef sample_data():\n    return pd.DataFrame({\"x\": range(10), \"y\": range(10)})\n\n\ndef test_disable_max_rows(sample_data):\n    with alt.data_transformers.enable(\"default\", max_rows=5):\n        # Ensure max rows error is raised.\n        with pytest.raises(alt.MaxRowsError):\n            alt.data_transformers.get()(sample_data)\n\n        # Ensure that max rows error is properly disabled.\n        with alt.data_transformers.disable_max_rows():\n            alt.data_transformers.get()(sample_data)\n\n    try:\n        # Ensure that there is no TypeError for non-max_rows transformers.\n        with (\n            alt.data_transformers.enable(\"json\"),\n            alt.data_transformers.disable_max_rows(),\n        ):\n            jsonfile = alt.data_transformers.get()(sample_data)\n    except TypeError:\n        jsonfile = {}\n    finally:\n        if jsonfile:\n            Path(jsonfile[\"url\"]).unlink()\n"
  },
  {
    "path": "tests/vegalite/v6/test_display.py",
    "content": "from contextlib import contextmanager\n\nimport pytest\n\nimport altair.vegalite.v6 as alt\n\n\n@contextmanager\ndef check_render_options(**options):\n    \"\"\"Asserts that alt.renderers.options are equivalent to the given options in the IPython.display.display call.\"\"\"\n    import IPython.display\n\n    def check_options(obj):\n        assert alt.renderers.options == options\n\n    _display = IPython.display.display\n    IPython.display.display = check_options\n    try:\n        yield\n    finally:\n        IPython.display.display = _display\n\n\ndef test_check_renderer_options():\n    # this test should pass\n    with check_render_options():\n        from IPython.display import display\n\n        display(None)\n\n    # check that an error is appropriately raised if the test fails\n    with pytest.raises(AssertionError), check_render_options(foo=\"bar\"):  # noqa: PT012\n        from IPython.display import display\n\n        display(None)\n\n\ndef test_display_options():\n    chart = alt.Chart(\"data.csv\").mark_point().encode(x=\"foo:Q\")\n\n    # check that there are no options by default\n    with check_render_options():\n        chart.display()\n\n    # check that display options are passed\n    with check_render_options(embed_options={\"tooltip\": False, \"renderer\": \"canvas\"}):\n        chart.display(\"canvas\", tooltip=False)\n\n    # check that above options do not persist\n    with check_render_options():\n        chart.display()\n\n    # check that display options augment rather than overwrite pre-set options\n    with alt.renderers.enable(embed_options={\"tooltip\": True, \"renderer\": \"svg\"}):\n        with check_render_options(embed_options={\"tooltip\": True, \"renderer\": \"svg\"}):\n            chart.display()\n\n        with check_render_options(\n            embed_options={\"tooltip\": True, \"renderer\": \"canvas\"}\n        ):\n            chart.display(\"canvas\")\n\n    # check that above options do not persist\n    with check_render_options():\n        chart.display()\n"
  },
  {
    "path": "tests/vegalite/v6/test_geo_interface.py",
    "content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any\n\nimport pytest\n\nimport altair.vegalite.v6 as alt\n\nif TYPE_CHECKING:\n    from collections.abc import MutableMapping\n\n    from altair.utils.data import SupportsGeoInterface\n\n\ndef geom_obj(geom: dict[str, Any]) -> SupportsGeoInterface:\n    class Geom:\n        __geo_interface__: MutableMapping[str, Any]\n\n    geom_obj = Geom()\n    geom_obj.__geo_interface__ = geom\n    return geom_obj\n\n\n# correct translation of Polygon geometry to Feature type\ndef test_geo_interface_polygon_feature() -> None:\n    geom: dict[str, Any] = {\n        \"coordinates\": [[(0, 0), (0, 2), (2, 2), (2, 0), (0, 0)]],\n        \"type\": \"Polygon\",\n    }\n    feat = geom_obj(geom)\n\n    with alt.data_transformers.enable(consolidate_datasets=False):\n        spec = alt.Chart(feat).mark_geoshape().to_dict()\n    assert spec[\"data\"][\"values\"][\"type\"] == \"Feature\"\n\n\n# merge geometry with empty properties dictionary\ndef test_geo_interface_removal_empty_properties() -> None:\n    geom = {\n        \"geometry\": {\n            \"coordinates\": [\n                [[6.90, 53.48], [5.98, 51.85], [6.07, 53.51], [6.90, 53.48]]\n            ],\n            \"type\": \"Polygon\",\n        },\n        \"id\": None,\n        \"properties\": {},\n        \"type\": \"Feature\",\n    }\n    feat = geom_obj(geom)\n\n    with alt.data_transformers.enable(consolidate_datasets=False):\n        spec = alt.Chart(feat).mark_geoshape().to_dict()\n    assert spec[\"data\"][\"values\"][\"type\"] == \"Feature\"\n\n\n# only register metadata in the properties member\ndef test_geo_interface_register_foreign_member() -> None:\n    geom = {\n        \"geometry\": {\n            \"coordinates\": [\n                [[6.90, 53.48], [5.98, 51.85], [6.07, 53.51], [6.90, 53.48]]\n            ],\n            \"type\": \"Polygon\",\n        },\n        \"id\": 2,\n        \"properties\": {\"foo\": \"bah\"},\n        \"type\": \"Feature\",\n    }\n    feat = geom_obj(geom)\n\n    with alt.data_transformers.enable(consolidate_datasets=False):\n        spec = alt.Chart(feat).mark_geoshape().to_dict()\n    with pytest.raises(KeyError):\n        spec[\"data\"][\"values\"][\"id\"]\n    assert spec[\"data\"][\"values\"][\"foo\"] == \"bah\"\n\n\n# correct serializing of arrays and nested tuples\ndef test_geo_interface_serializing_arrays_tuples() -> None:\n    import array as arr\n\n    geom = {\n        \"bbox\": arr.array(\"d\", [1, 2, 3, 4]),\n        \"geometry\": {\n            \"coordinates\": [\n                (\n                    (6.90, 53.48),\n                    (5.98, 51.85),\n                    (6.07, 53.51),\n                    (6.90, 53.48),\n                )\n            ],\n            \"type\": \"Polygon\",\n        },\n        \"id\": 27,\n        \"properties\": {},\n        \"type\": \"Feature\",\n    }\n    feat = geom_obj(geom)\n\n    with alt.data_transformers.enable(consolidate_datasets=False):\n        spec = alt.Chart(feat).mark_geoshape().to_dict()\n    assert spec[\"data\"][\"values\"][\"geometry\"][\"coordinates\"][0][0] == [6.9, 53.48]\n\n\n# overwrite existing 'type' value in properties with `Feature`\ndef test_geo_interface_reserved_members() -> None:\n    geom = {\n        \"geometry\": {\n            \"coordinates\": [\n                [[6.90, 53.48], [5.98, 51.85], [6.07, 53.51], [6.90, 53.48]]\n            ],\n            \"type\": \"Polygon\",\n        },\n        \"id\": 27,\n        \"properties\": {\"type\": \"foo\"},\n        \"type\": \"Feature\",\n    }\n    feat = geom_obj(geom)\n\n    with alt.data_transformers.enable(consolidate_datasets=False):\n        spec = alt.Chart(feat).mark_geoshape().to_dict()\n    assert spec[\"data\"][\"values\"][\"type\"] == \"Feature\"\n\n\n# an empty FeatureCollection is valid\ndef test_geo_interface_empty_feature_collection() -> None:\n    geom = {\"type\": \"FeatureCollection\", \"features\": []}\n    feat = geom_obj(geom)\n\n    with alt.data_transformers.enable(consolidate_datasets=False):\n        spec = alt.Chart(feat).mark_geoshape().to_dict()\n    assert spec[\"data\"][\"values\"] == []\n\n\n# Features in a FeatureCollection only keep properties and geometry\ndef test_geo_interface_feature_collection() -> None:\n    geom = {\n        \"type\": \"FeatureCollection\",\n        \"features\": [\n            {\n                \"geometry\": {\n                    \"coordinates\": [\n                        [[6.90, 53.48], [5.98, 51.85], [6.07, 53.51], [6.90, 53.48]]\n                    ],\n                    \"type\": \"Polygon\",\n                },\n                \"id\": 27,\n                \"properties\": {\"type\": \"foo\", \"id\": 1, \"geometry\": 1},\n                \"type\": \"Feature\",\n            },\n            {\n                \"geometry\": {\n                    \"coordinates\": [\n                        [[8.90, 53.48], [7.98, 51.85], [8.07, 53.51], [8.90, 53.48]]\n                    ],\n                    \"type\": \"Polygon\",\n                },\n                \"id\": 28,\n                \"properties\": {\"type\": \"foo\", \"id\": 2, \"geometry\": 1},\n                \"type\": \"Feature\",\n            },\n        ],\n    }\n    feat = geom_obj(geom)\n\n    with alt.data_transformers.enable(consolidate_datasets=False):\n        spec = alt.Chart(feat).mark_geoshape().to_dict()\n    assert spec[\"data\"][\"values\"][0][\"id\"] == 1\n    assert spec[\"data\"][\"values\"][1][\"id\"] == 2\n    assert \"coordinates\" in spec[\"data\"][\"values\"][0][\"geometry\"]\n    assert \"coordinates\" in spec[\"data\"][\"values\"][1][\"geometry\"]\n    assert spec[\"data\"][\"values\"][0][\"type\"] == \"Feature\"\n    assert spec[\"data\"][\"values\"][1][\"type\"] == \"Feature\"\n\n\n# typical output of a __geo_interface__ from geopandas GeoDataFrame\n# notice that the index value is registered as a commonly used identifier\n# with the name \"id\" (in this case 49). Similar to serialization of a\n# pandas DataFrame is the index not included in the output\ndef test_geo_interface_feature_collection_gdf() -> None:\n    geom = {\n        \"bbox\": (19.89, -26.82, 29.43, -17.66),\n        \"features\": [\n            {\n                \"bbox\": (19.89, -26.82, 29.43, -17.66),\n                \"geometry\": {\n                    \"coordinates\": [\n                        [[6.90, 53.48], [5.98, 51.85], [6.07, 53.51], [6.90, 53.48]]\n                    ],\n                    \"type\": \"Polygon\",\n                },\n                \"id\": \"49\",\n                \"properties\": {\n                    \"continent\": \"Africa\",\n                    \"gdp_md_est\": 35900.0,\n                    \"id\": \"BWA\",\n                    \"iso_a3\": \"BWA\",\n                    \"name\": \"Botswana\",\n                    \"pop_est\": 2214858,\n                },\n                \"type\": \"Feature\",\n            }\n        ],\n        \"type\": \"FeatureCollection\",\n    }\n    feat = geom_obj(geom)\n\n    with alt.data_transformers.enable(consolidate_datasets=False):\n        spec = alt.Chart(feat).mark_geoshape().to_dict()\n    assert spec[\"data\"][\"values\"][0][\"id\"] == \"BWA\"\n"
  },
  {
    "path": "tests/vegalite/v6/test_layer_props.py",
    "content": "import pytest\n\nimport altair.vegalite.v6 as alt\n\n\ndef test_layer_props():\n    \"\"\"Beginning in Vega-Lite v6, the properties \"height\" and \"width\" were no longer allowed in a subchart within a LayerChart.  We check here that these are moved to the top level by Altair.\"\"\"\n    base = alt.Chart().mark_point()\n\n    # Allowed\n    base.properties(width=100) + base\n    base.properties(width=100) + base.properties(height=200)\n    base.properties(width=100) + base.properties(height=200, width=100)\n\n    # Not allowed\n    with pytest.raises(ValueError, match=\"inconsistent\"):\n        base.properties(width=100) + base.properties(width=200)\n\n    # Check that the resulting LayerChart has the correct properties.\n    c = base.properties(width=100) + base.properties(height=200, width=100)\n    assert isinstance(c, alt.LayerChart)\n    assert c.width == 100\n    assert c.height == 200\n"
  },
  {
    "path": "tests/vegalite/v6/test_params.py",
    "content": "\"\"\"Tests for variable parameters and selection parameters.\"\"\"\n\nimport re\nimport warnings\n\nimport pandas as pd\nimport pytest\n\nimport altair.vegalite.v6 as alt\nfrom altair.utils.deprecation import AltairDeprecationWarning\n\n\ndef test_variable_param():\n    data = pd.DataFrame([{\"a\": \"A\", \"b\": 28}])\n\n    rad_slider = alt.binding_range(min=0, max=20, step=1)\n    rad_var = alt.param(bind=rad_slider, value=0, name=\"paramName\")\n\n    c = (\n        alt.Chart(data)\n        .mark_bar(cornerRadius=rad_var)\n        .encode(\n            x=\"a:N\",\n            y=\"b:Q\",\n        )\n        .add_params(rad_var)\n    )\n\n    dct = c.to_dict()\n\n    mark_dict = {\"type\": \"bar\", \"cornerRadius\": {\"expr\": \"paramName\"}}\n    param_list = [\n        {\n            \"name\": \"paramName\",\n            \"bind\": {\"input\": \"range\", \"max\": 20, \"min\": 0, \"step\": 1},\n            \"value\": 0,\n        }\n    ]\n\n    assert dct[\"mark\"] == mark_dict\n    assert dct[\"params\"] == param_list\n\n\ndef test_param_expr():\n    height_var = alt.param(name=\"height\")\n    inner_var = height_var / 2\n    tick_var = (3 * height_var) / 4\n\n    height_str = height_var._to_expr()\n    inner_str = inner_var._to_expr()\n    tick_str = tick_var._to_expr()\n\n    assert height_str == \"height\"\n    assert inner_str == \"(height / 2)\"\n    assert tick_str == \"((3 * height) / 4)\"\n\n    data = pd.DataFrame({\"r1\": [310, 0], \"r2\": [270, 0], \"r3\": [125, 225]})\n\n    c1 = alt.Chart(data).mark_bar(size=height_var).encode(x=\"r1\")\n\n    c2 = alt.Chart(data).mark_bar(size=inner_var).encode(x=\"r2\")\n\n    c3 = alt.Chart(data).mark_tick(size=tick_var).encode(x=\"r3\")\n\n    c = (c1 + c2 + c3).add_params(height_var)\n\n    dct = c.to_dict()\n    expr_set = {d[\"mark\"][\"size\"][\"expr\"] for d in dct[\"layer\"]}\n\n    assert \"height\" in expr_set\n    assert \"(height / 2)\" in expr_set\n    assert \"((3 * height) / 4)\" in expr_set\n\n\ndef test_selection_deprecation():\n    # We use the `warnings.catch_warnings` context so pytest will also report deprecation warnings\n    with warnings.catch_warnings():\n        warnings.simplefilter(\"error\")\n\n        # new syntax\n        alt.selection_point()\n        alt.selection_interval()\n\n        # this v4 syntax is deprecated\n        with pytest.warns(AltairDeprecationWarning):\n            alt.selection_single()\n        with pytest.warns(AltairDeprecationWarning):\n            alt.selection_multi()\n\n        # new syntax\n        brush = alt.selection_interval()\n        c = alt.Chart().mark_point()\n        c.add_params(brush)\n\n        # this v4 syntax is deprecated\n        brush = alt.selection_interval()\n        c = alt.Chart().mark_point()\n        with pytest.warns(AltairDeprecationWarning):\n            c.add_selection(brush)\n\n\ndef test_parameter_naming():\n    # test explicit naming\n    prm = alt.param(name=\"some_name\")\n    assert prm.param.name == \"some_name\"\n\n    # test automatic naming which now uses hash-based naming\n    prm0, prm1, prm2 = (alt.param() for _ in range(3))\n\n    # Check that all parameters have hash-based names (16 character hex)\n    res = re.match(r\"param_([0-9a-f]{16})\", prm0.param.name)\n    assert res, f\"Expected hash-based name, got: {prm0.param.name}\"\n\n    # With hash-based naming, identical specifications get the same name\n    assert prm0.param.name == prm1.param.name == prm2.param.name, (\n        \"Identical parameters should have same hash-based name\"\n    )\n\n\ndef test_selection_expression():\n    from altair.expr.core import Expression\n\n    data = pd.DataFrame([{\"a\": \"A\", \"b\": 28}])\n\n    sel = alt.selection_point(fields=[\"b\"])\n    se = sel.b | 300\n\n    assert isinstance(se, alt.SelectionExpression)\n    assert isinstance(se.expr, Expression)\n\n    c = (\n        alt.Chart(data)\n        .mark_point()\n        .encode(\n            x=\"a:N\",\n            y=\"b:Q\",\n            size=alt.value(se),\n        )\n        .add_params(sel)\n    )\n\n    dct = c.to_dict()\n    expr_str = str(se.expr)\n\n    assert dct[\"encoding\"][\"size\"][\"value\"][\"expr\"] == expr_str\n\n\ndef test_selection_condition():\n    sel = alt.selection_point(empty=False)\n\n    c = (\n        alt.Chart()\n        .mark_point()\n        .encode(size=alt.condition(sel, alt.value(100), alt.value(10)))\n        .add_params(sel)\n    )\n\n    dct = c.to_dict()\n\n    param_name = sel.param.name\n\n    cond = dct[\"encoding\"][\"size\"][\"condition\"]\n\n    assert cond[\"value\"] == 100\n    assert cond[\"param\"] == param_name\n\n    # The else condition\n    assert dct[\"encoding\"][\"size\"][\"value\"] == 10\n\n\ndef test_selection_interval_value_typing() -> None:\n    \"\"\"Ensure each encoding restricts types independently.\"\"\"\n    import datetime as dt\n\n    w_date = dt.date(2005, 1, 1), dt.date(2009, 1, 1)\n    w_float = (0, 999)\n    w_date_datetime = dt.date(2005, 1, 1), alt.DateTime(year=2009)\n    w_str = [\"0\", \"500\"]\n\n    a = alt.selection_interval(encodings=[\"x\"], value={\"x\": w_date}).to_dict()\n    b = alt.selection_interval(encodings=[\"y\"], value={\"y\": w_float}).to_dict()\n    c = alt.selection_interval(encodings=[\"x\"], value={\"x\": w_date_datetime}).to_dict()\n    d = alt.selection_interval(encodings=[\"text\"], value={\"text\": w_str}).to_dict()\n\n    a_b = alt.selection_interval(\n        encodings=[\"x\", \"y\"], value={\"x\": w_date, \"y\": w_float}\n    ).to_dict()\n    a_c = alt.selection_interval(\n        encodings=[\"x\", \"y\"], value={\"x\": w_date, \"y\": w_date_datetime}\n    ).to_dict()\n    b_c_d = alt.selection_interval(\n        encodings=[\"x\", \"y\", \"text\"],\n        value={\"x\": w_date_datetime, \"y\": w_float, \"text\": w_str},\n    ).to_dict()\n\n    assert a\n    assert b\n    assert c\n    assert d\n    assert a_b\n    assert a_c\n    assert b_c_d\n\n\ndef test_creation_views_params_layered_repeat_chart():\n    import altair as alt\n    from altair.datasets import data\n\n    source = alt.UrlData(data.flights_2k.url, format={\"parse\": {\"date\": \"date\"}})\n\n    brush = alt.selection_interval(encodings=[\"x\"])\n\n    # Define the base chart, with the common parts of the\n    # background and highlights\n    base = (\n        alt.Chart(width=160, height=130)\n        .mark_bar()\n        .encode(x=alt.X(alt.repeat(\"column\")).bin(maxbins=20), y=\"count()\")\n    )\n\n    # gray background with selection\n    background = base.encode(color=alt.value(\"#ddd\")).add_params(brush)\n\n    # blue highlights on the transformed data\n    highlight = base.transform_filter(brush)\n\n    # layer the two charts & repeat\n    c = (\n        alt.layer(background, highlight, data=source)\n        .transform_calculate(\"time\", \"hours(datum.date)\")\n        .repeat(column=[\"distance\", \"delay\", \"time\"])\n    )\n\n    dct = c.to_dict()\n    assert \"child__column_distance_view_\" in dct[\"params\"][0][\"views\"][0]\n\n\ndef test_parameter_deduplication():\n    \"\"\"Test that hash-based parameters are deduplicated to avoid duplicate signal names.\"\"\"\n    # Test with hash-based naming - these should be deduplicated\n    param1 = alt.param()  # Will get hash-based name\n    param2 = alt.param()  # Will get same hash-based name\n\n    chart = alt.Chart().mark_point().add_params(param1, param2)\n\n    # Check that only one parameter was added\n    assert len(chart.params) == 1\n    assert param1.name == param2.name  # Should have same hash-based name\n    assert chart.params[0].name == param1.name\n\n    # Test that the spec doesn't have duplicate parameter names\n    spec = chart.to_dict()\n    param_names = [p[\"name\"] for p in spec[\"params\"]]\n    assert len(param_names) == len(set(param_names)), (\n        \"Duplicate parameter names found in spec\"\n    )\n\n\ndef test_explicitly_named_parameters_error():\n    \"\"\"Test that explicitly named parameters with duplicate names raise an error.\"\"\"\n    # Create two parameters with explicit names - this should raise an error\n    param1 = alt.param(name=\"my_param_1\")\n    param2 = alt.param(name=\"my_param_1\")\n\n    # Create a chart and add both parameters - should raise an error\n    with pytest.raises(\n        ValueError, match=\"Duplicate explicit parameter name: my_param_1\"\n    ):\n        alt.Chart().mark_point().add_params(param1, param2)\n\n\ndef test_identical_hash_based_parameters_deduplication():\n    \"\"\"Test that identical parameters with hash-based names are deduplicated.\"\"\"\n    from altair.datasets import data\n\n    cars = data.cars.url\n    param_opacity = alt.param(value=1)\n    param_size = alt.param(value=1)\n\n    # Create chart with same parameter added twice\n    chart = (\n        alt.Chart(cars)\n        .mark_circle(opacity=param_opacity, size=param_size)\n        .encode(x=\"Horsepower:Q\", y=\"Miles_per_Gallon:Q\", color=\"Origin:N\")\n        .add_params(param_opacity, param_size)\n    )\n\n    # Check that only one parameter was added\n    assert len(chart.params) == 1\n\n    # Get the spec and verify it has only one parameter\n    spec = chart.to_dict()\n    assert len(spec[\"params\"]) == 1\n\n    # Verify the parameter name is hash-based\n    param_name = spec[\"params\"][0][\"name\"]\n    assert param_name.startswith(\"param_\")\n    assert len(param_name) == 22  # \"param_\" + 16 hex chars\n\n    # Verify both opacity and size reference the same parameter\n    assert spec[\"mark\"][\"opacity\"][\"expr\"] == param_name\n    assert spec[\"mark\"][\"size\"][\"expr\"] == param_name\n\n\ndef test_interactive_name_respected():\n    import altair as alt\n    from altair.datasets import data\n\n    cars = data.cars.url\n\n    chart = (\n        alt.Chart(cars)\n        .mark_point()\n        .encode(x=\"Horsepower:Q\", y=\"Miles_per_Gallon:Q\")\n        .interactive(name=\"MY_CHART\")\n    )\n\n    # Suppress warning since this deduplication is intentional (same chart concatenated)\n    with warnings.catch_warnings():\n        warnings.simplefilter(\"ignore\", UserWarning)\n        spec = (chart & chart).to_dict()\n    # There should be a single parameter with the name 'MY_CHART'\n    param_names = [p[\"name\"] for p in spec[\"params\"]]\n    assert param_names == [\"MY_CHART\"], f\"Expected ['MY_CHART'], got {param_names}\"\n\n    # Check that the parameter has the correct view IDs\n    # The view IDs should be deterministic and consistent across OS/chart types\n    param = spec[\"params\"][0]\n    assert \"views\" in param, \"Parameter should have 'views' field\"\n    view_ids = param[\"views\"]\n    assert len(view_ids) == 2, f\"Expected 2 view IDs, got {len(view_ids)}\"\n\n    # The view IDs should follow the pattern: view_<hash>_<position>\n    # where <hash> is the same for both charts (they're identical)\n    # and <position> is 0 and 1 for the two concatenated charts\n    assert view_ids[0].endswith(\"_0\"), (\n        f\"First view ID should end with '_0', got {view_ids[0]}\"\n    )\n    assert view_ids[1].endswith(\"_1\"), (\n        f\"Second view ID should end with '_1', got {view_ids[1]}\"\n    )\n\n    # Both view IDs should have the same base hash name\n    base_name_0 = view_ids[0].rsplit(\"_\", 1)[0]\n    base_name_1 = view_ids[1].rsplit(\"_\", 1)[0]\n    assert base_name_0 == base_name_1, (\n        f\"View IDs should have same base name: {base_name_0} vs {base_name_1}\"\n    )\n\n    # The base name should start with 'view_' and contain a hex hash\n    assert base_name_0.startswith(\"view_\"), (\n        f\"Base name should start with 'view_', got {base_name_0}\"\n    )\n    hash_part = base_name_0[5:]  # Remove 'view_' prefix\n    assert len(hash_part) == 16, (\n        f\"Hash part should be 16 characters, got {len(hash_part)}: {hash_part}\"\n    )\n    assert all(c in \"0123456789abcdef\" for c in hash_part), (\n        f\"Hash part should be hex, got {hash_part}\"\n    )\n\n    # For this specific chart configuration, we expect a consistent hash\n    # This ensures the hash is deterministic across different runs/OS\n    expected_base_name = \"view_6e7cfb454e831ee6\"\n    assert base_name_0 == expected_base_name, (\n        f\"Expected base name {expected_base_name}, got {base_name_0}\"\n    )\n"
  },
  {
    "path": "tests/vegalite/v6/test_renderers.py",
    "content": "\"\"\"Tests of various renderers.\"\"\"\n\nimport json\nfrom importlib.metadata import version as importlib_version\n\nimport pytest\nfrom packaging.version import Version\n\nimport altair.vegalite.v6 as alt\nfrom tests import skip_requires_vl_convert\n\ntry:\n    import anywidget\n\nexcept ImportError:\n    anywidget = None  # type: ignore\n\n\nskip_requires_anywidget = pytest.mark.skipif(\n    not anywidget, reason=\"anywidget not importable\"\n)\nif Version(importlib_version(\"ipywidgets\")) < Version(\"8.1.4\"):\n    # See https://github.com/vega/altair/issues/3234#issuecomment-2268515312\n    jupyter_marks = skip_requires_anywidget(\n        pytest.mark.filterwarnings(\n            \"ignore:Deprecated in traitlets 4.1.*:DeprecationWarning\"\n        )\n    )\nelse:\n    jupyter_marks = skip_requires_anywidget\n\n\n@pytest.fixture\ndef chart():\n    return alt.Chart(\"data.csv\").mark_point()\n\n\ndef test_html_renderer_embed_options(chart):\n    \"\"\"Test that embed_options in renderer metadata are correctly manifest in html.\"\"\"\n    # Short of parsing the javascript, it's difficult to parse out the\n    # actions. So we use string matching\n\n    def assert_has_options(chart, **opts):\n        html = chart._repr_mimebundle_(None, None)[\"text/html\"]\n        for key, val in opts.items():\n            assert json.dumps({key: val})[1:-1] in html\n\n    with alt.renderers.enable(\"html\"):\n        assert_has_options(chart, mode=\"vega-lite\")\n\n        with alt.renderers.enable(embed_options={\"actions\": {\"export\": True}}):\n            assert_has_options(chart, mode=\"vega-lite\", actions={\"export\": True})\n\n        with alt.renderers.set_embed_options(actions=True):\n            assert_has_options(chart, mode=\"vega-lite\", actions=True)\n\n\ndef test_mimetype_renderer_embed_options(chart):\n    # check that metadata is passed appropriately\n    from altair.vegalite.v6.display import VEGALITE_MIME_TYPE\n\n    mimetype = VEGALITE_MIME_TYPE\n    spec = chart.to_dict()\n    with alt.renderers.enable(\"mimetype\"):\n        # Sanity check: no metadata specified\n        bundle, metadata = chart._repr_mimebundle_(None, None)\n        assert bundle[mimetype] == spec\n        assert metadata == {}\n        with alt.renderers.set_embed_options(actions=False):\n            bundle, metadata = chart._repr_mimebundle_(None, None)\n            assert set(bundle.keys()) == {mimetype, \"text/plain\"}\n            assert bundle[mimetype] == spec\n            assert metadata == {mimetype: {\"embed_options\": {\"actions\": False}}}\n\n\ndef test_json_renderer_embed_options(chart):\n    \"\"\"Test that embed_options in renderer metadata are correctly manifest in html.\"\"\"\n    mimetype = \"application/json\"\n    spec = chart.to_dict()\n    with alt.renderers.enable(\"json\"):\n        # Sanity check: no options specified\n        bundle, metadata = chart._repr_mimebundle_(None, None)\n        assert bundle[mimetype] == spec\n        assert metadata == {}\n\n        with alt.renderers.enable(option=\"foo\"):\n            bundle, metadata = chart._repr_mimebundle_(None, None)\n            assert set(bundle.keys()) == {mimetype, \"text/plain\"}\n            assert bundle[mimetype] == spec\n            assert metadata == {mimetype: {\"option\": \"foo\"}}\n\n\n@skip_requires_vl_convert\ndef test_renderer_with_none_embed_options(chart):\n    # Check that setting embed_options to None doesn't crash\n    from altair.utils.mimebundle import spec_to_mimebundle\n\n    spec = chart.to_dict()\n    with alt.renderers.enable(\"mimetype\", embed_options=None):\n        bundle = spec_to_mimebundle(\n            spec=spec,\n            mode=\"vega-lite\",\n            format=\"svg\",\n            embed_options=None,\n        )\n        assert bundle[\"image/svg+xml\"].startswith(\"<svg\")\n\n\n@jupyter_marks\ndef test_jupyter_renderer_mimetype(chart) -> None:\n    \"\"\"Test that we get the expected widget mimetype when the jupyter renderer is enabled.\"\"\"\n    with alt.renderers.enable(\"jupyter\"):\n        assert (\n            \"application/vnd.jupyter.widget-view+json\"\n            in chart._repr_mimebundle_(None, None)[0]\n        )\n"
  },
  {
    "path": "tests/vegalite/v6/test_theme.py",
    "content": "from __future__ import annotations\n\nimport json\nfrom collections.abc import Callable, Mapping, Set\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Literal, TypeVar, cast, get_args\n\nimport pytest\n\nimport altair.vegalite.v6 as alt\nfrom altair import theme\nfrom altair.theme import ConfigKwds, ThemeConfig\nfrom altair.vegalite.v6 import schema\nfrom altair.vegalite.v6.schema._typing import VegaThemes, is_color_hex\nfrom altair.vegalite.v6.theme import VEGA_THEMES\nfrom tests import slow\n\nif TYPE_CHECKING:\n    import sys\n\n    if sys.version_info >= (3, 13):\n        from typing import TypeIs\n    else:\n        from typing_extensions import TypeIs\n    if sys.version_info >= (3, 11):\n        from typing import LiteralString\n    else:\n        from typing_extensions import LiteralString\n    from typing import TypeAlias\n\nT = TypeVar(\"T\")\n\n_Config: TypeAlias = Literal[\"config\"]\n_PartialThemeConfig: TypeAlias = Mapping[_Config, ConfigKwds]\n\"\"\"Represents ``ThemeConfig``, but **only** using the ``\"config\"`` key.\"\"\"\n\n\n@pytest.fixture\ndef chart() -> alt.Chart:\n    return alt.Chart(\"data.csv\").mark_bar().encode(x=\"x:Q\")\n\n\ndef test_vega_themes(chart) -> None:\n    for theme_name in VEGA_THEMES:\n        with theme.enable(theme_name):\n            dct = chart.to_dict()\n        assert dct[\"usermeta\"] == {\"embedOptions\": {\"theme\": theme_name}}\n        assert dct[\"config\"] == {\n            \"view\": {\"continuousWidth\": 300, \"continuousHeight\": 300}\n        }\n\n\n@slow\ndef test_theme_remote_lambda() -> None:\n    \"\"\"\n    Compatibility test for ``lambda`` usage in `dash-vega-components`_.\n\n    A ``lambda`` here is to fetch the remote resource **once**, wrapping the result in a function.\n\n    .. _dash-vega-components:\n        https://github.com/vega/dash-vega-components/blob/c3e8cae873580bc7a52bc01daea1f27a7df02b8b/example_app.py#L13-L17\n    \"\"\"\n    import altair as alt  # noqa: I001\n    from urllib.request import urlopen\n    import json\n\n    URL = \"https://gist.githubusercontent.com/binste/b4042fa76a89d72d45cbbb9355ec6906/raw/e36f79d722bcd9dd954389b1753a2d4a18113227/altair_theme.json\"\n    with urlopen(URL) as response:\n        custom_theme = json.load(response)\n\n    alt.theme.register(\"remote_binste\", enable=True)(lambda: custom_theme)\n    assert alt.theme.active == \"remote_binste\"\n\n    # NOTE: A decorator-compatible way to define an \"anonymous\" function\n    @alt.theme.register(\"remote_binste_2\", enable=True)\n    def _():\n        return custom_theme\n\n    assert alt.theme.active == \"remote_binste_2\"\n\n    decorated_theme = alt.theme.get()\n    alt.theme.enable(\"remote_binste\")\n    assert alt.theme.active == \"remote_binste\"\n    lambda_theme = alt.theme.get()\n\n    assert decorated_theme\n    assert lambda_theme\n    assert decorated_theme() == lambda_theme()\n\n\ndef test_theme_register_decorator() -> None:\n    @theme.register(\"unique name\", enable=True)\n    def custom_theme() -> ThemeConfig:\n        return {\"height\": 400, \"width\": 700}\n\n    assert theme._themes.active == \"unique name\" == theme.active\n    registered = theme._themes.get()\n    assert registered is not None\n    assert registered == theme.get()\n    assert registered() == {\"height\": 400, \"width\": 700} == custom_theme()\n\n\ndef test_theme_unregister() -> None:\n    @theme.register(\"big square\", enable=True)\n    def custom_theme() -> ThemeConfig:\n        return {\"height\": 1000, \"width\": 1000}\n\n    assert theme.active == \"big square\"\n    fn = theme.unregister(\"big square\")\n    assert fn() == custom_theme()\n    assert theme.active == theme._themes.active\n    # BUG: https://github.com/vega/altair/issues/3619\n    # assert theme.active != \"big square\"\n\n    with pytest.raises(\n        TypeError, match=r\"Found no theme named 'big square' in registry.\"\n    ):\n        theme.unregister(\"big square\")\n\n\n@pytest.mark.parametrize(\n    (\"color_code\", \"valid\"),\n    [\n        (\"#FFFFFF\", True),\n        (\"##ff6347\", False),\n        (\"#EE82EE\", True),\n        (\"#1ec9a0\", True),\n        (\"#19B_71\", False),\n        (\"#00#761\", False),\n        (\"123455\", False),\n        (\"#6a5acd \", False),\n        (\"#f8f8f899\", True),\n        (\"#6a5acd6E\", True),\n    ],\n)\ndef test_is_color_hex(color_code: Any, *, valid: bool) -> None:\n    assert is_color_hex(color_code) == valid\n\n\ndef carbonwhite_theme() -> ThemeConfig:\n    \"\"\"\n    Only including **1/4** of `carbon`_ , which gives sufficient structural coverage.\n\n    .. _carbon:\n        https://github.com/vega/vega-themes/blob/5f1a5c5b22cc462cf3d46894212152b71cfe964f/src/carbongen.ts\n    \"\"\"\n    return ThemeConfig(\n        config={\n            \"arc\": {\"fill\": \"#6929c4\"},\n            \"area\": {\"fill\": \"#6929c4\"},\n            \"axis\": {\n                \"grid\": True,\n                \"gridColor\": \"#e0e0e0\",\n                \"labelAngle\": 0,\n                \"labelColor\": \"#525252\",\n                \"labelFont\": 'IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, \".SFNSText-Regular\", sans-serif',\n                \"labelFontSize\": 12,\n                \"labelFontWeight\": 400,\n                \"titleColor\": \"#161616\",\n                \"titleFontSize\": 12,\n                \"titleFontWeight\": 600,\n            },\n            \"axisX\": {\"titlePadding\": 10},\n            \"axisY\": {\"titlePadding\": 2.5},\n            \"background\": \"#ffffff\",\n            \"circle\": {\"fill\": \"#6929c4\"},\n            \"range\": {\n                \"category\": [\n                    \"#6929c4\",\n                    \"#1192e8\",\n                    \"#005d5d\",\n                    \"#9f1853\",\n                    \"#fa4d56\",\n                    \"#570408\",\n                    \"#198038\",\n                    \"#002d9c\",\n                    \"#ee538b\",\n                    \"#b28600\",\n                    \"#009d9a\",\n                    \"#012749\",\n                    \"#8a3800\",\n                    \"#a56eff\",\n                ],\n                \"diverging\": [\n                    \"#750e13\",\n                    \"#a2191f\",\n                    \"#da1e28\",\n                    \"#fa4d56\",\n                    \"#ff8389\",\n                    \"#ffb3b8\",\n                    \"#ffd7d9\",\n                    \"#fff1f1\",\n                    \"#e5f6ff\",\n                    \"#bae6ff\",\n                    \"#82cfff\",\n                    \"#33b1ff\",\n                    \"#1192e8\",\n                    \"#0072c3\",\n                    \"#00539a\",\n                    \"#003a6d\",\n                ],\n                \"heatmap\": [\n                    \"#f6f2ff\",\n                    \"#e8daff\",\n                    \"#d4bbff\",\n                    \"#be95ff\",\n                    \"#a56eff\",\n                    \"#8a3ffc\",\n                    \"#6929c4\",\n                    \"#491d8b\",\n                    \"#31135e\",\n                    \"#1c0f30\",\n                ],\n            },\n            \"rect\": {\"fill\": \"#6929c4\"},\n            \"style\": {\n                \"guide-label\": {\n                    \"fill\": \"#525252\",\n                    \"font\": 'IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\".sfnstext-regular\",sans-serif',\n                    \"fontWeight\": 400,\n                },\n                \"guide-title\": {\n                    \"fill\": \"#525252\",\n                    \"font\": 'IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\".sfnstext-regular\",sans-serif',\n                    \"fontWeight\": 400,\n                },\n            },  # type: ignore[typeddict-unknown-key]\n            \"title\": {\n                \"anchor\": \"start\",\n                \"color\": \"#161616\",\n                \"dy\": -15,\n                \"font\": 'IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\".sfnstext-regular\",sans-serif',\n                \"fontSize\": 16,\n                \"fontWeight\": 600,\n            },\n            \"view\": {\"fill\": \"#ffffff\", \"stroke\": \"#ffffff\"},\n        }\n    )\n\n\ndef dark_theme() -> ThemeConfig:\n    return ThemeConfig(\n        config=ConfigKwds(\n            axis={\"domainColor\": \"#fff\", \"gridColor\": \"#888\", \"tickColor\": \"#fff\"},\n            background=\"#333\",\n            style={\n                \"guide-label\": {\"fill\": \"#fff\"},\n                \"guide-title\": {\"fill\": \"#fff\"},\n            },  # type: ignore[typeddict-unknown-key]\n            title={\"color\": \"#fff\", \"subtitleColor\": \"#fff\"},\n            view={\"stroke\": \"#888\"},\n        )\n    )\n\n\ndef excel_theme() -> ThemeConfig:\n    return {\n        \"config\": {\n            \"arc\": {\"fill\": \"#4572a7\"},\n            \"area\": {\"fill\": \"#4572a7\"},\n            \"axis\": {\n                \"bandPosition\": 0.5,\n                \"grid\": True,\n                \"gridColor\": \"#000000\",\n                \"gridOpacity\": 1,\n                \"gridWidth\": 0.5,\n                \"labelPadding\": 10,\n                \"tickSize\": 5,\n                \"tickWidth\": 0.5,\n            },\n            \"axisBand\": {\"grid\": False, \"tickExtra\": True},\n            \"background\": \"#fff\",\n            \"legend\": {\n                \"labelBaseline\": \"middle\",\n                \"labelFontSize\": 11,\n                \"symbolSize\": 50,\n                \"symbolType\": \"square\",\n            },\n            \"line\": {\"stroke\": \"#4572a7\", \"strokeWidth\": 2},\n            \"range\": {\n                \"category\": [\n                    \"#4572a7\",\n                    \"#aa4643\",\n                    \"#8aa453\",\n                    \"#71598e\",\n                    \"#4598ae\",\n                    \"#d98445\",\n                    \"#94aace\",\n                    \"#d09393\",\n                    \"#b9cc98\",\n                    \"#a99cbc\",\n                ]\n            },\n            \"rect\": {\"fill\": \"#4572a7\"},\n        }\n    }\n\n\ndef fivethirtyeight_theme() -> ThemeConfig:\n    return {\n        \"config\": {\n            \"arc\": {\"fill\": \"#30a2da\"},\n            \"area\": {\"fill\": \"#30a2da\"},\n            \"axis\": {\n                \"domainColor\": \"#cbcbcb\",\n                \"grid\": True,\n                \"gridColor\": \"#cbcbcb\",\n                \"gridWidth\": 1,\n                \"labelColor\": \"#999\",\n                \"labelFontSize\": 10,\n                \"labelPadding\": 4,\n                \"tickColor\": \"#cbcbcb\",\n                \"tickSize\": 10,\n                \"titleColor\": \"#333\",\n                \"titleFontSize\": 14,\n                \"titlePadding\": 10,\n            },\n            \"axisBand\": {\"grid\": False},\n            \"background\": \"#f0f0f0\",\n            \"bar\": {\"binSpacing\": 2, \"fill\": \"#30a2da\", \"stroke\": None},\n            \"legend\": {\n                \"labelColor\": \"#333\",\n                \"labelFontSize\": 11,\n                \"padding\": 1,\n                \"symbolSize\": 30,\n                \"symbolType\": \"square\",\n                \"titleColor\": \"#333\",\n                \"titleFontSize\": 14,\n                \"titlePadding\": 10,\n            },\n            \"line\": {\"stroke\": \"#30a2da\", \"strokeWidth\": 2},\n            \"point\": {\"filled\": True, \"shape\": \"circle\"},\n            \"range\": {\n                \"category\": [\n                    \"#30a2da\",\n                    \"#fc4f30\",\n                    \"#e5ae38\",\n                    \"#6d904f\",\n                    \"#8b8b8b\",\n                    \"#b96db8\",\n                    \"#ff9e27\",\n                    \"#56cc60\",\n                    \"#52d2ca\",\n                    \"#52689e\",\n                    \"#545454\",\n                    \"#9fe4f8\",\n                ],\n                \"diverging\": [\n                    \"#cc0020\",\n                    \"#e77866\",\n                    \"#f6e7e1\",\n                    \"#d6e8ed\",\n                    \"#91bfd9\",\n                    \"#1d78b5\",\n                ],\n                \"heatmap\": [\"#d6e8ed\", \"#cee0e5\", \"#91bfd9\", \"#549cc6\", \"#1d78b5\"],\n            },\n            \"rect\": {\"fill\": \"#30a2da\"},\n            \"title\": {\n                \"anchor\": \"start\",\n                \"fontSize\": 24,\n                \"fontWeight\": 600,\n                \"offset\": 20,\n            },\n        }\n    }\n\n\ndef ggplot2_theme() -> ThemeConfig:\n    return {\n        \"config\": {\n            \"arc\": {\"fill\": \"#000\"},\n            \"area\": {\"fill\": \"#000\"},\n            \"axis\": {\n                \"domain\": False,\n                \"grid\": True,\n                \"gridColor\": \"#FFFFFF\",\n                \"gridOpacity\": 1,\n                \"labelColor\": \"#7F7F7F\",\n                \"labelPadding\": 4,\n                \"tickColor\": \"#7F7F7F\",\n                \"tickSize\": 5.67,\n                \"titleFontSize\": 16,\n                \"titleFontWeight\": \"normal\",\n            },\n            \"legend\": {\n                \"labelBaseline\": \"middle\",\n                \"labelFontSize\": 11,\n                \"symbolSize\": 40,\n            },\n            \"line\": {\"stroke\": \"#000\"},\n            \"range\": {\n                \"category\": [\n                    \"#000000\",\n                    \"#7F7F7F\",\n                    \"#1A1A1A\",\n                    \"#999999\",\n                    \"#333333\",\n                    \"#B0B0B0\",\n                    \"#4D4D4D\",\n                    \"#C9C9C9\",\n                    \"#666666\",\n                    \"#DCDCDC\",\n                ]\n            },\n            \"rect\": {\"fill\": \"#000\"},\n        }\n    }\n\n\ndef googlecharts_theme() -> ThemeConfig:\n    \"\"\"``Padding`` definition `float | Map` needs to be stricter.\"\"\"\n    return {\n        \"config\": {\n            \"arc\": {\"fill\": \"#3366CC\"},\n            \"area\": {\"fill\": \"#3366CC\"},\n            \"axis\": {\n                \"domain\": False,\n                \"grid\": True,\n                \"gridColor\": \"#ccc\",\n                \"tickColor\": \"#ccc\",\n            },\n            \"background\": \"#fff\",\n            \"circle\": {\"fill\": \"#3366CC\"},\n            \"padding\": {\n                \"bottom\": 10,\n                \"left\": 10,\n                \"right\": 10,\n                \"top\": 10,\n            },\n            \"range\": {\n                \"category\": [\n                    \"#4285F4\",\n                    \"#DB4437\",\n                    \"#F4B400\",\n                    \"#0F9D58\",\n                    \"#AB47BC\",\n                    \"#00ACC1\",\n                    \"#FF7043\",\n                    \"#9E9D24\",\n                    \"#5C6BC0\",\n                    \"#F06292\",\n                    \"#00796B\",\n                    \"#C2185B\",\n                ],\n                \"heatmap\": [\"#c6dafc\", \"#5e97f6\", \"#2a56c6\"],\n            },\n            \"rect\": {\"fill\": \"#3366CC\"},\n            \"style\": {\n                \"group-title\": {\"font\": \"Arial, sans-serif\", \"fontSize\": 12},\n                \"guide-label\": {\"font\": \"Arial, sans-serif\", \"fontSize\": 12},\n                \"guide-title\": {\"font\": \"Arial, sans-serif\", \"fontSize\": 12},\n            },  # type: ignore[typeddict-unknown-key]\n            \"title\": {\n                \"anchor\": \"start\",\n                \"dy\": -3,\n                \"font\": \"Arial, sans-serif\",\n                \"fontSize\": 14,\n                \"fontWeight\": \"bold\",\n            },\n        }\n    }\n\n\ndef latimes_theme() -> ThemeConfig:\n    return {\n        \"config\": {\n            \"arc\": {\"fill\": \"#82c6df\"},\n            \"area\": {\"fill\": \"#82c6df\"},\n            \"axis\": {\n                \"labelFont\": \"Benton Gothic, sans-serif\",\n                \"labelFontSize\": 11.5,\n                \"labelFontWeight\": \"normal\",\n                \"titleFont\": \"Benton Gothic Bold, sans-serif\",\n                \"titleFontSize\": 13,\n                \"titleFontWeight\": \"normal\",\n            },\n            \"axisX\": {\"labelAngle\": 0, \"labelPadding\": 4, \"tickSize\": 3},\n            \"axisY\": {\n                \"labelBaseline\": \"middle\",\n                \"maxExtent\": 45,\n                \"minExtent\": 45,\n                \"tickSize\": 2,\n                \"titleAlign\": \"left\",\n                \"titleAngle\": 0,\n                \"titleX\": -45,\n                \"titleY\": -11,\n            },\n            \"background\": \"#ffffff\",\n            \"legend\": {\n                \"labelFont\": \"Benton Gothic, sans-serif\",\n                \"labelFontSize\": 11.5,\n                \"symbolType\": \"square\",\n                \"titleFont\": \"Benton Gothic Bold, sans-serif\",\n                \"titleFontSize\": 13,\n                \"titleFontWeight\": \"normal\",\n            },\n            \"line\": {\"stroke\": \"#82c6df\", \"strokeWidth\": 2},\n            \"range\": {\n                \"category\": [\n                    \"#ec8431\",\n                    \"#829eb1\",\n                    \"#c89d29\",\n                    \"#3580b1\",\n                    \"#adc839\",\n                    \"#ab7fb4\",\n                ],\n                \"diverging\": [\n                    \"#e68a4f\",\n                    \"#f4bb6a\",\n                    \"#f9e39c\",\n                    \"#dadfe2\",\n                    \"#a6b7c6\",\n                    \"#849eae\",\n                ],\n                \"heatmap\": [\n                    \"#fbf2c7\",\n                    \"#f9e39c\",\n                    \"#f8d36e\",\n                    \"#f4bb6a\",\n                    \"#e68a4f\",\n                    \"#d15a40\",\n                    \"#ab4232\",\n                ],\n                \"ordinal\": [\n                    \"#fbf2c7\",\n                    \"#f9e39c\",\n                    \"#f8d36e\",\n                    \"#f4bb6a\",\n                    \"#e68a4f\",\n                    \"#d15a40\",\n                    \"#ab4232\",\n                ],\n                \"ramp\": [\n                    \"#fbf2c7\",\n                    \"#f9e39c\",\n                    \"#f8d36e\",\n                    \"#f4bb6a\",\n                    \"#e68a4f\",\n                    \"#d15a40\",\n                    \"#ab4232\",\n                ],\n            },\n            \"rect\": {\"fill\": \"#82c6df\"},\n            \"title\": {\n                \"anchor\": \"start\",\n                \"color\": \"#000000\",\n                \"font\": \"Benton Gothic Bold, sans-serif\",\n                \"fontSize\": 22,\n                \"fontWeight\": \"normal\",\n            },\n        }\n    }\n\n\ndef powerbi_theme() -> ThemeConfig:\n    return {\n        \"config\": {\n            \"arc\": {\"fill\": \"#118DFF\"},\n            \"area\": {\"fill\": \"#118DFF\", \"line\": True, \"opacity\": 0.6},\n            \"axis\": {\n                \"domain\": False,\n                \"grid\": False,\n                \"labelColor\": \"#605E5C\",\n                \"labelFontSize\": 12,\n                \"ticks\": False,\n                \"titleColor\": \"#252423\",\n                \"titleFont\": \"wf_standard-font, helvetica, arial, sans-serif\",\n                \"titleFontSize\": 16,\n                \"titleFontWeight\": \"normal\",\n            },\n            \"axisBand\": {\"tickExtra\": True},\n            \"axisQuantitative\": {\n                \"grid\": True,\n                \"gridColor\": \"#C8C6C4\",\n                \"gridDash\": [1, 5],\n                \"labelFlush\": False,\n                \"tickCount\": 3,\n            },\n            \"axisX\": {\"labelPadding\": 5},\n            \"axisY\": {\"labelPadding\": 10},\n            \"background\": \"transparent\",\n            \"bar\": {\"fill\": \"#118DFF\"},\n            \"font\": \"Segoe UI\",\n            \"header\": {\n                \"labelColor\": \"#605E5C\",\n                \"labelFont\": \"Segoe UI\",\n                \"labelFontSize\": 13.333333333333332,\n                \"titleColor\": \"#252423\",\n                \"titleFont\": \"wf_standard-font, helvetica, arial, sans-serif\",\n                \"titleFontSize\": 16,\n            },\n            \"legend\": {\n                \"labelColor\": \"#605E5C\",\n                \"labelFont\": \"Segoe UI\",\n                \"labelFontSize\": 13.333333333333332,\n                \"symbolSize\": 75,\n                \"symbolType\": \"circle\",\n                \"titleColor\": \"#605E5C\",\n                \"titleFont\": \"Segoe UI\",\n                \"titleFontWeight\": \"bold\",\n            },\n            \"line\": {\n                \"stroke\": \"#118DFF\",\n                \"strokeCap\": \"round\",\n                \"strokeJoin\": \"round\",\n                \"strokeWidth\": 3,\n            },\n            \"point\": {\"fill\": \"#118DFF\", \"filled\": True, \"size\": 75},\n            \"range\": {\n                \"category\": [\n                    \"#118DFF\",\n                    \"#12239E\",\n                    \"#E66C37\",\n                    \"#6B007B\",\n                    \"#E044A7\",\n                    \"#744EC2\",\n                    \"#D9B300\",\n                    \"#D64550\",\n                ],\n                \"diverging\": [\"#DEEFFF\", \"#118DFF\"],\n                \"heatmap\": [\"#DEEFFF\", \"#118DFF\"],\n                \"ordinal\": [\n                    \"#DEEFFF\",\n                    \"#c7e4ff\",\n                    \"#b0d9ff\",\n                    \"#9aceff\",\n                    \"#83c3ff\",\n                    \"#6cb9ff\",\n                    \"#55aeff\",\n                    \"#3fa3ff\",\n                    \"#2898ff\",\n                    \"#118DFF\",\n                ],\n            },\n            \"rect\": {\"fill\": \"#118DFF\"},\n            \"text\": {\"fill\": \"#605E5C\", \"font\": \"Segoe UI\", \"fontSize\": 12},\n            \"view\": {\"stroke\": \"transparent\"},\n        }\n    }\n\n\ndef quartz_theme() -> ThemeConfig:\n    return {\n        \"config\": {\n            \"arc\": {\"fill\": \"#ab5787\"},\n            \"area\": {\"fill\": \"#ab5787\"},\n            \"axis\": {\n                \"domainColor\": \"#979797\",\n                \"domainWidth\": 0.5,\n                \"gridWidth\": 0.2,\n                \"labelColor\": \"#979797\",\n                \"tickColor\": \"#979797\",\n                \"tickWidth\": 0.2,\n                \"titleColor\": \"#979797\",\n            },\n            \"axisBand\": {\"grid\": False},\n            \"axisX\": {\"grid\": True, \"tickSize\": 10},\n            \"axisY\": {\"domain\": False, \"grid\": True, \"tickSize\": 0},\n            \"background\": \"#f9f9f9\",\n            \"legend\": {\n                \"labelFontSize\": 11,\n                \"padding\": 1,\n                \"symbolSize\": 30,\n                \"symbolType\": \"square\",\n            },\n            \"line\": {\"stroke\": \"#ab5787\"},\n            \"range\": {\n                \"category\": [\n                    \"#ab5787\",\n                    \"#51b2e5\",\n                    \"#703c5c\",\n                    \"#168dd9\",\n                    \"#d190b6\",\n                    \"#00609f\",\n                    \"#d365ba\",\n                    \"#154866\",\n                    \"#666666\",\n                    \"#c4c4c4\",\n                ]\n            },\n            \"rect\": {\"fill\": \"#ab5787\"},\n        }\n    }\n\n\ndef urbaninstitute_theme() -> ThemeConfig:\n    return {\n        \"config\": {\n            \"arc\": {\"fill\": \"#1696d2\"},\n            \"area\": {\"fill\": \"#1696d2\"},\n            \"axisX\": {\n                \"domain\": True,\n                \"domainColor\": \"#000000\",\n                \"domainWidth\": 1,\n                \"grid\": False,\n                \"labelAngle\": 0,\n                \"labelFont\": \"Lato\",\n                \"labelFontSize\": 12,\n                \"tickColor\": \"#000000\",\n                \"tickSize\": 5,\n                \"titleFont\": \"Lato\",\n                \"titleFontSize\": 12,\n                \"titlePadding\": 10,\n            },\n            \"axisY\": {\n                \"domain\": False,\n                \"domainWidth\": 1,\n                \"grid\": True,\n                \"gridColor\": \"#DEDDDD\",\n                \"gridWidth\": 1,\n                \"labelFont\": \"Lato\",\n                \"labelFontSize\": 12,\n                \"labelPadding\": 8,\n                \"ticks\": False,\n                \"titleAngle\": 0,\n                \"titleFont\": \"Lato\",\n                \"titleFontSize\": 12,\n                \"titlePadding\": 10,\n                \"titleX\": 18,\n                \"titleY\": -10,\n            },\n            \"background\": \"#FFFFFF\",\n            \"legend\": {\n                \"labelFont\": \"Lato\",\n                \"labelFontSize\": 12,\n                \"offset\": 10,\n                \"orient\": \"right\",\n                \"symbolSize\": 100,\n                \"titleFont\": \"Lato\",\n                \"titleFontSize\": 12,\n                \"titlePadding\": 10,\n            },\n            \"line\": {\"color\": \"#1696d2\", \"stroke\": \"#1696d2\", \"strokeWidth\": 5},\n            \"point\": {\"filled\": True},\n            \"range\": {\n                \"category\": [\n                    \"#1696d2\",\n                    \"#ec008b\",\n                    \"#fdbf11\",\n                    \"#000000\",\n                    \"#d2d2d2\",\n                    \"#55b748\",\n                ],\n                \"diverging\": [\n                    \"#ca5800\",\n                    \"#fdbf11\",\n                    \"#fdd870\",\n                    \"#fff2cf\",\n                    \"#cfe8f3\",\n                    \"#73bfe2\",\n                    \"#1696d2\",\n                    \"#0a4c6a\",\n                ],\n                \"heatmap\": [\n                    \"#ca5800\",\n                    \"#fdbf11\",\n                    \"#fdd870\",\n                    \"#fff2cf\",\n                    \"#cfe8f3\",\n                    \"#73bfe2\",\n                    \"#1696d2\",\n                    \"#0a4c6a\",\n                ],\n                \"ordinal\": [\n                    \"#cfe8f3\",\n                    \"#a2d4ec\",\n                    \"#73bfe2\",\n                    \"#46abdb\",\n                    \"#1696d2\",\n                    \"#12719e\",\n                ],\n                \"ramp\": [\n                    \"#CFE8F3\",\n                    \"#A2D4EC\",\n                    \"#73BFE2\",\n                    \"#46ABDB\",\n                    \"#1696D2\",\n                    \"#12719E\",\n                    \"#0A4C6A\",\n                    \"#062635\",\n                ],\n            },\n            \"rect\": {\"fill\": \"#1696d2\"},\n            \"style\": {\"bar\": {\"fill\": \"#1696d2\", \"stroke\": None}},\n            \"text\": {\n                \"align\": \"center\",\n                \"color\": \"#1696d2\",\n                \"font\": \"Lato\",\n                \"fontSize\": 11,\n                \"fontWeight\": 400,\n                \"size\": 11,\n            },\n            \"title\": {\"anchor\": \"start\", \"font\": \"Lato\", \"fontSize\": 18},\n            \"trail\": {\n                \"color\": \"#1696d2\",\n                \"size\": 1,\n                \"stroke\": \"#1696d2\",\n                \"strokeWidth\": 0,\n            },\n            \"view\": {\"stroke\": \"transparent\"},\n        }\n    }\n\n\ndef vox_theme() -> ThemeConfig:\n    return {\n        \"config\": {\n            \"arc\": {\"fill\": \"#3e5c69\"},\n            \"area\": {\"fill\": \"#3e5c69\"},\n            \"axis\": {\n                \"domainWidth\": 0.5,\n                \"grid\": True,\n                \"labelPadding\": 2,\n                \"tickSize\": 5,\n                \"tickWidth\": 0.5,\n                \"titleFontWeight\": \"normal\",\n            },\n            \"axisBand\": {\"grid\": False},\n            \"axisX\": {\"gridWidth\": 0.2},\n            \"axisY\": {\"gridDash\": [3], \"gridWidth\": 0.4},\n            \"background\": \"#fff\",\n            \"legend\": {\"labelFontSize\": 11, \"padding\": 1, \"symbolType\": \"square\"},\n            \"line\": {\"stroke\": \"#3e5c69\"},\n            \"range\": {\n                \"category\": [\n                    \"#3e5c69\",\n                    \"#6793a6\",\n                    \"#182429\",\n                    \"#0570b0\",\n                    \"#3690c0\",\n                    \"#74a9cf\",\n                    \"#a6bddb\",\n                    \"#e2ddf2\",\n                ]\n            },\n            \"rect\": {\"fill\": \"#3e5c69\"},\n        }\n    }\n\n\ndef binste_altair_theme() -> ThemeConfig:\n    \"\"\"Copied from https://gist.github.com/binste/b4042fa76a89d72d45cbbb9355ec6906.\"\"\"\n    return ThemeConfig(\n        config={\n            \"axis\": {\n                \"labelFontSize\": 16,\n                \"titleFontSize\": 16,\n                \"titleFontWeight\": \"normal\",\n                \"gridColor\": \"lightGray\",\n                \"labelAngle\": 0,\n                \"labelFlush\": False,\n                \"labelPadding\": 5,\n            },\n            \"axisY\": {\n                \"domain\": False,\n                \"ticks\": False,\n                \"labelPadding\": 10,\n                \"titleAngle\": 0,\n                \"titleY\": -20,\n                \"titleAlign\": \"left\",\n                \"titlePadding\": 0,\n            },\n            \"axisTemporal\": {\"grid\": False},\n            \"axisDiscrete\": {\"ticks\": False, \"labelPadding\": 10, \"grid\": False},\n            \"scale\": {\"barBandPaddingInner\": 0.2},\n            \"header\": {\"labelFontSize\": 16, \"titleFontSize\": 16},\n            \"legend\": {\n                \"labelFontSize\": 16,\n                \"titleFontSize\": 16,\n                \"titleFontWeight\": \"normal\",\n            },\n            \"title\": {\n                \"fontSize\": 20,\n                \"fontStyle\": \"normal\",\n                \"align\": \"left\",\n                \"anchor\": \"start\",\n                \"orient\": \"top\",\n                \"fontWeight\": 600,\n                \"offset\": 10,\n                \"subtitlePadding\": 3,\n                \"subtitleFontSize\": 16,\n            },\n            \"view\": {\n                \"strokeWidth\": 0,\n                \"continuousHeight\": 350,\n                \"continuousWidth\": 600,\n                \"step\": 50,\n            },\n            \"line\": {\"strokeWidth\": 3.5},\n            \"text\": {\"fontSize\": 16},\n            \"circle\": {\"size\": 60},\n            \"point\": {\"size\": 60},\n            \"square\": {\"size\": 60},\n        }\n    )\n\n\ndef husky_theme() -> ThemeConfig:\n    \"\"\"\n    Adapted from https://github.com/deppen8/husky-altair-theme/blob/46f680532ee38c44e656903d3f1affe11b9982bb/husky_theme.py.\n\n    Keeps 2 errors present in the original (marked by `# type: ignore[...]`).\n    \"\"\"\n    PURPLE = \"#4b2e83\"\n    GOLD = \"#b7a57a\"\n    METALLIC_GOLD = \"#85754d\"\n    LIGHT_GRAY = \"#d9d9d9\"\n    DARK_GRAY = \"#444444\"\n    BLACK = \"#000000\"\n\n    HEADER_FONT = \"EncodeSans-Regular\"\n    BODY_FONT = \"OpenSans-Regular\"\n    BODY_FONT_BOLD = \"OpenSans-Bold\"\n\n    return ThemeConfig(\n        config={\n            \"title\": {\n                \"fontSize\": 18,\n                \"font\": HEADER_FONT,\n                \"anchor\": \"start\",\n                \"color\": PURPLE,\n            },\n            \"axisX\": {\n                \"domain\": True,\n                \"domainColor\": DARK_GRAY,\n                \"domainWidth\": 1,\n                \"grid\": True,\n                \"gridColor\": LIGHT_GRAY,\n                \"gridWidth\": 0.5,\n                \"labelFont\": BODY_FONT,\n                \"labelFontSize\": 12,\n                \"labelColor\": DARK_GRAY,\n                \"labelAngle\": 0,\n                \"tickColor\": DARK_GRAY,\n                \"tickSize\": 5,\n                \"titleFont\": BODY_FONT_BOLD,\n                \"titleFontSize\": 12,\n            },\n            \"axisY\": {\n                \"domain\": True,\n                \"domainColor\": DARK_GRAY,\n                \"grid\": True,\n                \"gridColor\": LIGHT_GRAY,\n                \"gridWidth\": 0.5,\n                \"labelFont\": BODY_FONT,\n                \"labelFontSize\": 12,\n                \"labelAngle\": 0,\n                \"ticks\": True,\n                \"titleFont\": BODY_FONT_BOLD,\n                \"titleFontSize\": 12,\n            },\n            \"header\": {\n                \"labelFont\": BODY_FONT,\n                \"labelFontSize\": 16,\n                \"titleFont\": BODY_FONT_BOLD,\n                \"titleFontSize\": 16,\n            },\n            \"range\": {\n                \"category\": [\n                    PURPLE,\n                    GOLD,\n                    LIGHT_GRAY,\n                    METALLIC_GOLD,\n                    BLACK,\n                    DARK_GRAY,\n                ],\n                \"diverging\": [PURPLE, \"#c2a5cf\", LIGHT_GRAY, GOLD, METALLIC_GOLD],\n            },\n            \"legend\": {\n                \"labelFont\": BODY_FONT,\n                \"labelFontSize\": 12,\n                \"symbolSize\": 100,\n                \"titleFont\": BODY_FONT_BOLD,\n                \"titleFontSize\": 12,\n            },\n            \"area\": {\n                \"fill\": PURPLE,\n            },\n            \"circle\": {\"fill\": PURPLE, \"size\": 40},\n            \"line\": {\n                \"color\": PURPLE,\n                \"stroke\": PURPLE,\n                \"strokeWidth\": 3,\n            },\n            \"trail\": {\n                \"color\": PURPLE,\n                \"stroke\": PURPLE,\n                \"strokeWidth\": 0,\n                \"size\": 1,\n            },\n            \"path\": {\n                \"stroke\": PURPLE,\n                \"strokeWidth\": 0.5,\n            },  # type: ignore[typeddict-unknown-key]\n            \"point\": {\"color\": PURPLE, \"size\": 40},\n            \"text\": {\n                \"font\": BODY_FONT,\n                \"color\": PURPLE,\n                \"fontSize\": 11,\n                \"align\": \"right\",\n                \"size\": 14,\n            },\n            \"bar\": {\n                \"size\": 10,\n                \"binSpacing\": 1,\n                \"continuousBandSize\": 10,\n                \"fill\": PURPLE,\n                \"stroke\": False,  # type: ignore[typeddict-item]\n            },\n            \"tick\": {\"color\": PURPLE},\n        },\n    )\n\n\nknown_themes: pytest.MarkDecorator = pytest.mark.parametrize(\n    \"theme_func\",\n    [\n        carbonwhite_theme,\n        dark_theme,\n        excel_theme,\n        fivethirtyeight_theme,\n        ggplot2_theme,\n        googlecharts_theme,\n        latimes_theme,\n        powerbi_theme,\n        quartz_theme,\n        urbaninstitute_theme,\n        vox_theme,\n        binste_altair_theme,\n        husky_theme,\n    ],\n)\n\"\"\"\n``pytest.mark.parametrize`` decorator.\n\nProvides themes from `vega-themes`_ and `other sources`_.\n\nNotes\n-----\nThese are **redefined by hand** to run through a type checker.\n\n.. _vega-themes:\n   https://vega.github.io/vega-themes/\n.. _other sources:\n    https://github.com/vega/altair/issues/3519#issuecomment-2292010192\n\"\"\"\n\n\n@known_themes\ndef test_theme_config(theme_func: Callable[[], ThemeConfig], chart) -> None:\n    \"\"\"\n    Simple-minded extra safety for themes.\n\n    See ``(test_vega_themes|test_register_theme_decorator)`` for comprehensive suite.\n    \"\"\"\n    name = cast(\"LiteralString\", theme_func.__qualname__)\n    theme.register(name, enable=True)(theme_func)\n    assert chart.to_dict(validate=True)\n    assert theme.get() == theme_func\n\n\n# NOTE: There are roughly 70 keys\n# - not really reasonable to create a literal that long for testing only\n# - therefore, using `frozenset[str]`\n@pytest.fixture(scope=\"session\")\ndef config_keys() -> frozenset[str]:\n    return ConfigKwds.__required_keys__.union(\n        ConfigKwds.__optional_keys__,\n        # TODO: Remove [attr-defined,unused-ignore] when mypy properly supports TypedDict attributes\n        ConfigKwds.__readonly_keys__,  # type: ignore[attr-defined,unused-ignore]\n        ConfigKwds.__mutable_keys__,  # type: ignore[attr-defined,unused-ignore]\n    )\n\n\n@pytest.fixture(scope=\"session\")\ndef theme_name_keys() -> frozenset[VegaThemes]:\n    return frozenset(get_args(VegaThemes))\n\n\n@pytest.fixture(scope=\"session\")\ndef themes_path() -> Path:\n    return Path(schema.__file__).parent / \"vega-themes.json\"\n\n\ndef is_keyed_exact(obj: Any, other: Set[T]) -> TypeIs[Mapping[T, Any]]:\n    return isinstance(obj, Mapping) and obj.keys() == other\n\n\ndef is_config_kwds(obj: Any, other: Any) -> TypeIs[ConfigKwds]:\n    return isinstance(obj, Mapping) and obj.keys() <= other\n\n\ndef is_vega_theme(obj: Any, config_keys: Any) -> TypeIs[_PartialThemeConfig]:\n    if is_keyed_exact(obj, frozenset[_Config]({\"config\"})):\n        inner = obj[\"config\"]\n        return is_config_kwds(inner, config_keys)\n    else:\n        return False\n\n\ndef is_vega_theme_all(\n    obj: Any, theme_name_keys: frozenset[VegaThemes], config_keys: frozenset[str]\n) -> TypeIs[Mapping[VegaThemes, _PartialThemeConfig]]:\n    return is_keyed_exact(obj, theme_name_keys) and all(\n        is_vega_theme(definition, config_keys) for definition in obj.values()\n    )\n\n\ndef test_vendored_vega_themes_json(\n    themes_path: Path,\n    theme_name_keys: frozenset[VegaThemes],\n    config_keys: frozenset[str],\n) -> None:\n    \"\"\"\n    Ensure every vendored theme can be represented as a ``ThemeConfig`` type.\n\n    Related\n    -------\n    - https://github.com/vega/altair/issues/3666#issuecomment-2450057530\n    \"\"\"\n    with themes_path.open(encoding=\"utf-8\") as f:\n        content = json.load(f)\n\n    assert is_vega_theme_all(content, theme_name_keys, config_keys)\n"
  },
  {
    "path": "tools/__init__.py",
    "content": "from tools import (\n    fs,\n    generate_api_docs,\n    generate_schema_wrapper,\n    markup,\n    schemapi,\n    update_init_file,\n    versioning,\n)\n\n__all__ = [\n    \"fs\",\n    \"generate_api_docs\",\n    \"generate_schema_wrapper\",\n    \"markup\",\n    \"schemapi\",\n    \"update_init_file\",\n    \"versioning\",\n]\n"
  },
  {
    "path": "tools/cleanup_nightlies.py",
    "content": "#!/usr/bin/env python3\n\"\"\"\nSimple script to clean up old nightly releases.\n\nKeeps only the last 10 nightly releases to avoid clutter.\n\"\"\"\n\n\ndef cleanup_old_nightlies():\n    \"\"\"Remove nightly releases older than 30 days.\"\"\"\n    # This would need GitHub API token and implementation\n    # For now, just a placeholder\n    print(\n        \"Cleanup script placeholder - would remove nightly releases older than 30 days\"\n    )\n    print(\"Implementation would use GitHub API to list and delete old releases\")\n\n\nif __name__ == \"__main__\":\n    cleanup_old_nightlies()\n"
  },
  {
    "path": "tools/codemod.py",
    "content": "# ruff: noqa: D418\nfrom __future__ import annotations\n\nimport ast\nimport subprocess\nimport sys\nimport textwrap\nimport warnings\nfrom ast import unparse\nfrom collections import deque\nfrom collections.abc import Iterable\nfrom importlib.util import find_spec\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, TypeVar, overload\n\nif sys.version_info >= (3, 12):\n    from typing import Protocol, TypeAliasType\nelse:\n    from typing_extensions import Protocol, TypeAliasType\n\nif TYPE_CHECKING:\n    if sys.version_info >= (3, 11):\n        from typing import LiteralString\n    else:\n        from typing_extensions import LiteralString\n\n    from collections.abc import Iterator\n    from typing import ClassVar, Literal\n\n\n__all__ = [\"extract_func_def\", \"extract_func_def_embed\", \"ruff\", \"ruff_inline_docs\"]\n\nT = TypeVar(\"T\")\nOneOrIterV = TypeAliasType(\n    \"OneOrIterV\",\n    \"T | Iterable[T] | Iterable[OneOrIterV[T]]\",\n    type_params=(T,),\n)\n_Code = OneOrIterV[str]\n\n\ndef parse_module(name: str, /) -> ast.Module:\n    \"\"\"\n    Find absolute path and parse module into an ast.\n\n    Use regular dotted import style, no `.py` suffix.\n\n    Acceptable ``name``:\n\n        altair.package.subpackage.etc\n        tools.____\n        tests.____\n        doc.____\n        sphinxext.____\n    \"\"\"\n    if (spec := find_spec(name)) and (origin := spec.origin):\n        return ast.parse(Path(origin).read_bytes())\n    else:\n        raise FileNotFoundError(name)\n\n\ndef find_func_def(mod: ast.Module, fn_name: str, /) -> ast.FunctionDef:\n    \"\"\"\n    Return a function node matching ``fn_name``.\n\n    Notes\n    -----\n    Provides some extra type safety, over::\n\n        ast.Module.body: list[ast.stmt]\n    \"\"\"\n    for stmt in mod.body:\n        if isinstance(stmt, ast.FunctionDef) and stmt.name == fn_name:\n            return stmt\n        else:\n            continue\n    msg = f\"Found no function named {fn_name!r}\"\n    raise NotImplementedError(msg)\n\n\ndef validate_body(fn: ast.FunctionDef, /) -> tuple[list[ast.stmt], ast.expr]:\n    \"\"\"\n    Ensure function has inlined imports and a return statement.\n\n    Returns::\n\n        (ast.FunctionDef.body[:-1], ast.Return.value)\n    \"\"\"\n    body = fn.body\n    first = body[0]\n    if not isinstance(first, (ast.Import, ast.ImportFrom)):\n        msg = (\n            f\"First statement in function must be an import, \"\n            f\"got {type(first).__name__!r}\\n\\n\"\n            f\"{unparse(first)!r}\"\n        )\n        raise TypeError(msg)\n    last = body.pop()\n    if not isinstance(last, ast.Return) or last.value is None:\n        body.append(last)\n        msg = (\n            f\"Last statement in function must return an expression, \"\n            f\"got {type(last).__name__!r}\\n\\n\"\n            f\"{unparse(last)!r}\"\n        )\n        raise TypeError(msg)\n    else:\n        return body, last.value\n\n\ndef iter_flatten(*elements: _Code) -> Iterator[str]:\n    for el in elements:\n        if not isinstance(el, str) and isinstance(el, Iterable):\n            yield from iter_flatten(*el)\n        elif isinstance(el, str):\n            yield el\n        else:\n            msg = (\n                f\"Expected all elements to eventually flatten to ``str``, \"\n                f\"but got: {type(el).__name__!r}\\n\\n\"\n                f\"{el!r}\"\n            )\n            raise TypeError(msg)\n\n\ndef iter_func_def_unparse(\n    module_name: str,\n    func_name: str,\n    /,\n    *,\n    return_transform: Literal[\"assign\"] | None = None,\n    assign_to: str = \"chart\",\n) -> Iterator[str]:\n    # Planning to add pyscript code before/after\n    # Then add `ruff check` to clean up duplicate imports (on the whole thing)\n    # Optional: assign the return to `assign_to`\n    #   - Allows writing modular code that doesn't depend on the variable names in the original function\n    mod = parse_module(module_name)\n    fn = find_func_def(mod, func_name)\n    body, ret = validate_body(fn)\n    for node in body:\n        yield unparse(node)\n    yield \"\"\n    ret_value = unparse(ret)\n    if return_transform is None:\n        yield ret_value\n    elif return_transform == \"assign\":\n        yield f\"{assign_to} = {ret_value}\"\n    else:\n        msg = f\"{return_transform=}\"\n        raise NotImplementedError(msg)\n\n\ndef extract_func_def(\n    module_name: str,\n    func_name: str,\n    *,\n    format: bool = True,\n    output: Literal[\"altair-plot\", \"code-block\", \"str\"] = \"str\",\n) -> str:\n    \"\"\"\n    Extract the contents of a function for use as a code block.\n\n    Parameters\n    ----------\n    module_name\n        Absolute, dotted import style.\n    func_name\n        Name of function in ``module_name``.\n    format\n        Run through ``ruff format`` before returning.\n    output\n        Optionally, return embedded in an `rst` directive.\n\n    Notes\n    -----\n    - Functions must define all imports inline, to ensure they are propagated\n    - Must end with a single return statement\n\n    Warning\n    -------\n    Requires ``python>=3.9`` for `ast.unparse`_\n\n    Examples\n    --------\n    Transform the contents of a function into a code block::\n\n        >>> extract_func_def(\"tests.altair_theme_test\", \"alt_theme_test\", output=\"code-block\") # doctest: +SKIP\n\n    .. _ast.unparse:\n        https://docs.python.org/3.9/library/ast.html#ast.unparse\n    \"\"\"\n    if output not in {\"altair-plot\", \"code-block\", \"str\"}:\n        raise TypeError(output)\n    it = iter_func_def_unparse(module_name, func_name)\n    s = ruff_inline_docs.format(it) if format else \"\\n\".join(it)\n    if output == \"str\":\n        return s\n    else:\n        return f\".. {output}::\\n\\n{textwrap.indent(s, ' ' * 4)}\\n\"\n\n\ndef extract_func_def_embed(\n    module_name: str,\n    func_name: str,\n    /,\n    before: _Code | None = None,\n    after: _Code | None = None,\n    assign_to: str = \"chart\",\n    indent: int | None = None,\n) -> str:\n    \"\"\"\n    Extract the contents of a function, wrapping with ``before`` and ``after``.\n\n    The resulting code block is run through ``ruff`` to deduplicate imports\n    and apply consistent formatting.\n\n    Parameters\n    ----------\n    module_name\n        Absolute, dotted import style.\n    func_name\n        Name of function in ``module_name``.\n    before\n        Code inserted before ``func_name``.\n    after\n        Code inserted after ``func_name``.\n    assign_to\n        Variable name to use as the result of ``func_name``.\n\n        .. note::\n            Allows the ``after`` block to use a consistent reference.\n    indent\n        Optionally, prefix ``indent * \" \"`` to final block.\n\n        .. note::\n            Occurs **after** formatting, will not contribute to line length wrap.\n    \"\"\"\n    if before is None and after is None:\n        msg = (\n            f\"At least one additional code fragment should be provided, but:\\n\"\n            f\"{before=}, {after=}\\n\\n\"\n            f\"Use {extract_func_def.__qualname__!r} instead.\"\n        )\n        warnings.warn(msg, UserWarning, stacklevel=2)\n    unparsed = iter_func_def_unparse(\n        module_name, func_name, return_transform=\"assign\", assign_to=assign_to\n    )\n    parts = [p for p in (before, unparsed, after) if p is not None]\n    formatted = ruff_inline_docs(parts)\n    return textwrap.indent(formatted, \" \" * indent) if indent else formatted\n\n\nclass CodeMod(Protocol):\n    def __call__(self, *code: _Code) -> str:\n        \"\"\"\n        Transform some input into a single block of modified code.\n\n        Parameters\n        ----------\n        *code\n            Arbitrarily nested code fragments.\n        \"\"\"\n        ...\n\n    def _join(self, code: _Code, *, sep: str = \"\\n\") -> str:\n        \"\"\"\n        Concatenate any number of code fragments.\n\n        All nested groups are unwrapped into a flat iterable.\n        \"\"\"\n        return sep.join(iter_flatten(code))\n\n\nclass Ruff(CodeMod):\n    \"\"\"\n    Run `ruff`_ commands against code fragments or files.\n\n    By default, uses the same config as `pyproject.toml`_.\n\n    Parameters\n    ----------\n    *extend_select\n        `rule codes`_ to use **on top of** the default config.\n    ignore\n        `rule codes`_ to `ignore`_.\n    skip_magic_trailing_comma\n        Enables `skip-magic-trailing-comma`_ during formatting.\n\n        .. note::\n\n            Only use on code that is changing indent-level\n            (e.g. unwrapping function contents).\n\n    .. _ruff:\n        https://docs.astral.sh/ruff/\n    .. _pyproject.toml:\n        https://github.com/vega/altair/blob/main/pyproject.toml\n    .. _rule codes:\n        https://docs.astral.sh/ruff/rules/\n    .. _ignore:\n        https://docs.astral.sh/ruff/settings/#lint_ignore\n    .. _skip-magic-trailing-comma:\n        https://docs.astral.sh/ruff/settings/#format_skip-magic-trailing-comma\n    \"\"\"\n\n    _stdin_args: ClassVar[tuple[LiteralString, ...]] = (\n        \"--stdin-filename\",\n        \"placeholder.py\",\n    )\n    _check_args: ClassVar[tuple[LiteralString, ...]] = (\"--fix\",)\n\n    def __init__(\n        self,\n        *extend_select: str,\n        ignore: OneOrIterV[str] | None = None,\n        skip_magic_trailing_comma: bool = False,\n    ) -> None:\n        self.check_args: deque[str] = deque(self._check_args)\n        self.format_args: deque[str] = deque()\n        for c in extend_select:\n            self.check_args.extend((\"--extend-select\", c))\n        if ignore is not None:\n            self.check_args.extend(\n                (\"--ignore\", \",\".join(s for s in iter_flatten(ignore)))\n            )\n        if skip_magic_trailing_comma:\n            self.format_args.extend(\n                (\"--config\", \"format.skip-magic-trailing-comma = true\")\n            )\n\n    def write_lint_format(self, fp: Path, code: _Code, /) -> None:\n        \"\"\"\n        Combined steps of writing, `ruff check`, `ruff format`.\n\n        Parameters\n        ----------\n        fp\n            Target file to write to\n        code\n            Some (potentially) nested code fragments.\n\n        Notes\n        -----\n        - `fp` is written to first, as the size before formatting will be the smallest\n        - Better utilizes `ruff` performance, rather than `python` str and io\n        \"\"\"\n        self.check(fp, code)\n        self.format(fp)\n\n    @overload\n    def check(self, *code: _Code, decode: Literal[True] = ...) -> str:\n        \"\"\"Fixes violations and returns fixed code.\"\"\"\n\n    @overload\n    def check(self, *code: _Code, decode: Literal[False]) -> bytes:\n        \"\"\"\n        ``decode=False`` will return as ``bytes``.\n\n        Helpful if piping to another command.\n        \"\"\"\n\n    @overload\n    def check(self, _write_to: Path, /, *code: _Code) -> None:\n        \"\"\"\n        ``code`` is joined, written to provided path and then checked.\n\n        No input returned.\n        \"\"\"\n\n    def check(self, *code: Any, decode: bool = True) -> str | bytes | None:\n        \"\"\"\n        Check and fix ``ruff`` rule violations.\n\n        All cases will join ``code`` to a single ``str``.\n        \"\"\"\n        base = \"ruff\", \"check\"\n        if isinstance(code[0], Path):\n            fp = code[0]\n            fp.write_text(self._join(code[1:]), encoding=\"utf-8\")\n            subprocess.run((*base, fp, *self.check_args), check=True)\n            return None\n        r = subprocess.run(\n            (*base, *self.check_args, *self._stdin_args),\n            input=self._join(code).encode(),\n            check=True,\n            capture_output=True,\n        )\n        return r.stdout.decode() if decode else r.stdout\n\n    @overload\n    def format(self, *code: _Code) -> str:\n        \"\"\"Format arbitrarily nested input as a single block.\"\"\"\n\n    @overload\n    def format(self, _target_file: Path, /, *code: None) -> None:\n        \"\"\"\n        Format an existing file.\n\n        Running on `win32` after writing lines will ensure ``LF`` is used, and not ``CRLF``:\n\n            ruff format --diff --check _target_file\n        \"\"\"\n\n    @overload\n    def format(self, _encoded_result: bytes, /, *code: None) -> str:\n        \"\"\"Format the raw result of ``ruff.check``.\"\"\"\n\n    def format(self, *code: Any) -> str | None:\n        \"\"\"\n        Format some input code, or an existing file.\n\n        Returns decoded result unless formatting an existing file.\n        \"\"\"\n        base = \"ruff\", \"format\"\n        if len(code) == 1 and isinstance(code[0], Path):\n            subprocess.run((*base, code[0], *self.format_args), check=True)\n            return None\n        encoded = (\n            code[0]\n            if len(code) == 1 and isinstance(code[0], bytes)\n            else self._join(code).encode()\n        )\n        r = subprocess.run(\n            (*base, *self.format_args, *self._stdin_args),\n            input=encoded,\n            check=True,\n            capture_output=True,\n        )\n        return r.stdout.decode()\n\n    def __call__(self, *code: _Code) -> str:\n        return self.format(self.check(code, decode=False))\n\n\nruff_inline_docs = Ruff(\n    ignore=(\"E711\", \"F821\", \"E402\", \"B018\"), skip_magic_trailing_comma=True\n)\nruff = Ruff()\n"
  },
  {
    "path": "tools/datasets/__init__.py",
    "content": "\"\"\"\nMetadata generation from `vega/vega-datasets`_.\n\nInspired by `altair-viz/vega_datasets`_.\n\nThe core interface of this package is provided by::\n\n    tools.datasets.app\n\n.. _vega/vega-datasets:\n    https://github.com/vega/vega-datasets\n.. _altair-viz/vega_datasets:\n    https://github.com/altair-viz/vega_datasets\n\"\"\"\n\nfrom __future__ import annotations\n\nimport gzip\nimport json\nimport types\nfrom io import BytesIO\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, ClassVar, Literal\n\nfrom tools import fs\nfrom tools.codemod import ruff\nfrom tools.datasets.npm import Npm\nfrom tools.schemapi import utils\n\nif TYPE_CHECKING:\n    from collections.abc import Mapping\n    from typing import TypeAlias\n\n    import polars as pl\n\n    from tools.datasets import datapackage\n\n    _PathAlias: TypeAlias = Literal[\"typing\", \"metadata-csv\", \"metadata\", \"schemas\"]\n    PathMap: TypeAlias = Mapping[_PathAlias, Path]\n\n__all__ = [\"app\"]\n\nHEADER_COMMENT = \"\"\"\\\n# The contents of this file are automatically written by\n# tools/datasets.__init__.py. Do not modify directly.\n\"\"\"\n\n\nclass Application:\n    \"\"\"Top-level context.\"\"\"\n\n    OUT_DIR: ClassVar[Path] = fs.REPO_ROOT / \"altair\" / \"datasets\"\n\n    def __init__(self) -> None:\n        METADATA = \"metadata\"\n        out_meta = self.OUT_DIR / \"_metadata\"\n        self.paths = types.MappingProxyType[\"_PathAlias\", Path](\n            {\n                \"typing\": self.OUT_DIR / \"_typing.py\",\n                \"metadata-csv\": out_meta / f\"{METADATA}.csv.gz\",\n                \"metadata\": out_meta / f\"{METADATA}.parquet\",\n                \"schemas\": out_meta / \"schemas.json.gz\",\n            }\n        )\n        self._npm: Npm = Npm(self.paths)\n\n    @property\n    def npm(self) -> Npm:\n        return self._npm\n\n    def refresh(self, tag: Any, /, *, include_typing: bool = False) -> pl.DataFrame:\n        \"\"\"\n        Update and sync all dataset metadata files.\n\n        Parameters\n        ----------\n        tag\n            Branch or release version to build against.\n        include_typing\n            Regenerate ``altair.datasets._typing``.\n        \"\"\"\n        print(\"Syncing datasets ...\")\n        dpkg = self.npm.datapackage(tag=tag)\n        self.write_parquet(dpkg.core, self.paths[\"metadata\"])\n        self.write_json_gzip(dpkg.schemas(), self.paths[\"schemas\"])\n        self.write_csv_gzip(dpkg.metadata_csv(), self.paths[\"metadata-csv\"])\n        print(\"Finished updating datasets.\")\n\n        if include_typing:\n            self.generate_typing(dpkg)\n        return dpkg.core.collect()\n\n    def reset(self) -> None:\n        \"\"\"Remove all metadata files.\"\"\"\n        fs.rm(*self.paths.values())\n\n    def read(self, name: _PathAlias, /) -> pl.DataFrame:\n        \"\"\"Read existing metadata from file.\"\"\"\n        return self.scan(name).collect()\n\n    def scan(self, name: _PathAlias, /) -> pl.LazyFrame:\n        \"\"\"Scan existing metadata from file.\"\"\"\n        import polars as pl\n\n        fp = self.paths[name]\n        if fp.suffix == \".parquet\":\n            return pl.scan_parquet(fp)\n        elif \".csv\" in fp.suffixes:\n            return pl.scan_csv(fp)\n        elif \".json\" in fp.suffixes:\n            return pl.read_json(fp).lazy()\n        else:\n            msg = (\n                f\"Unable to read {fp.name!r} as tabular data.\\nSuffixes: {fp.suffixes}\"\n            )\n            raise NotImplementedError(msg)\n\n    def write_csv_gzip(self, frame: pl.DataFrame | pl.LazyFrame, fp: Path, /) -> None:\n        \"\"\"\n        Write ``frame`` as a `gzip`_ compressed `csv`_ file.\n\n        - *Much smaller* than a regular ``.csv``.\n        - Still readable using ``stdlib`` modules.\n\n        .. _gzip:\n            https://docs.python.org/3/library/gzip.html\n        .. _csv:\n            https://docs.python.org/3/library/csv.html\n        \"\"\"\n        if fp.suffix != \".gz\":\n            fp = fp.with_suffix(\".csv.gz\")\n        fp.touch()\n        df = frame.lazy().collect()\n        buf = BytesIO()\n        with gzip.GzipFile(fp, mode=\"wb\", mtime=0) as f:\n            df.write_csv(buf)\n            f.write(buf.getbuffer())\n\n    def write_json_gzip(self, obj: Any, fp: Path, /) -> None:\n        \"\"\"\n        Write ``obj`` as a `gzip`_ compressed ``json`` file.\n\n        .. _gzip:\n            https://docs.python.org/3/library/gzip.html\n        \"\"\"\n        if fp.suffix != \".gz\":\n            fp = fp.with_suffix(\".json.gz\")\n        fp.touch()\n        with gzip.GzipFile(fp, mode=\"wb\", mtime=0) as f:\n            f.write(json.dumps(obj).encode())\n\n    def write_parquet(self, frame: pl.DataFrame | pl.LazyFrame, fp: Path, /) -> None:\n        \"\"\"Write ``frame`` to ``fp``, with some extra safety.\"\"\"\n        fp.touch()\n        df = frame.lazy().collect()\n        df.write_parquet(fp, compression=\"zstd\", compression_level=17)\n\n    def generate_typing(self, dpkg: datapackage.DataPackage) -> None:\n        indent = \" \" * 4\n        NAME = \"Dataset\"\n        EXT = \"Extension\"\n        FIELD = \"FlFieldStr\"\n        FIELD_TYPES = (\n            \"integer\",\n            \"number\",\n            \"boolean\",\n            \"string\",\n            \"object\",\n            \"array\",\n            \"date\",\n            \"datetime\",\n            \"time\",\n            \"duration\",\n        )\n\n        contents = (\n            f\"{HEADER_COMMENT}\",\n            \"from __future__ import annotations\\n\",\n            \"import sys\",\n            \"from typing import Literal, TYPE_CHECKING, TypeAlias\",\n            utils.import_typing_extensions((3, 15), \"TypedDict\"),\n            utils.import_typing_extensions((3, 11), \"LiteralString\"),\n            \"\\n\",\n            f\"__all__ = {[NAME, EXT, dpkg._NAME_TYPED_DICT]}\\n\",\n            utils.spell_literal_alias(NAME, dpkg.dataset_names()),\n            utils.spell_literal_alias(EXT, dpkg.extensions()),\n            dpkg.typed_dict(),\n            utils.spell_literal_alias(FIELD, FIELD_TYPES),\n            '\"\"\"\\n'\n            \"String representation of `frictionless`_ `Field Types`_.\\n\\n\"\n            f\".. _frictionless:\\n{indent}https://github.com/frictionlessdata/frictionless-py\\n\"\n            f\".. _Field Types:\\n{indent}https://datapackage.org/standard/table-schema/#field-types\\n\"\n            '\"\"\"\\n',\n        )\n        ruff.write_lint_format(self.paths[\"typing\"], contents)\n\n\napp = Application()\n"
  },
  {
    "path": "tools/datasets/datapackage.py",
    "content": "\"\"\"\n``frictionless`` `datapackage`_ parsing.\n\n.. _datapackage:\n    https://datapackage.org/\n\"\"\"\n\nfrom __future__ import annotations\n\nimport textwrap\nfrom collections import deque\nfrom functools import cached_property\nfrom typing import TYPE_CHECKING, Any, ClassVar, Literal\n\nimport polars as pl\nfrom polars import col\n\nfrom tools.schemapi import utils\n\nif TYPE_CHECKING:\n    from collections.abc import Iterable, Iterator, Mapping, Sequence\n    from pathlib import Path\n\n    from altair.datasets._typing import Dataset, FlFieldStr\n    from tools.datasets.models import Package, Resource\n\n\n__all__ = [\"DataPackage\"]\n\nINDENT = \" \" * 4\n\n\nclass Column:\n    def __init__(\n        self, name: str, expr: pl.Expr, /, doc: str = \"_description_\", tp_str: str = \"\"\n    ) -> None:\n        self._name: str = name\n        self._expr: pl.Expr = expr\n        self._doc: str = doc\n        self._tp_str: str = tp_str\n\n    @property\n    def expr(self) -> pl.Expr:\n        return self._expr.alias(self._name)\n\n    @property\n    def doc(self) -> str:\n        return f\"{self._name}\\n{INDENT * 2}{self._doc}\"\n\n    def is_feature(self) -> bool:\n        return self._name.startswith(\"is_\")\n\n\nclass DataPackage:\n    NAME: ClassVar[Literal[\"dataset_name\"]] = \"dataset_name\"\n    \"\"\"\n    Main user-facing column name.\n\n    - Does not include file extension\n    - Preserves case of original file name\n    \"\"\"\n\n    sort_by: str | Sequence[str] = \"dataset_name\", \"bytes\"\n    \"\"\"Key(s) used to ensure output is deterministic.\"\"\"\n\n    _NAME_TYPED_DICT: ClassVar[Literal[\"Metadata\"]] = \"Metadata\"\n    _columns: ClassVar[Sequence[Column]]\n    _links: ClassVar[Sequence[str]]\n\n    def __init__(self, pkg: Package, base_url: str, path: Path, /) -> None:\n        self._pkg: Package = pkg\n        self._base_url: str = base_url\n        self._path: Path = path\n\n    @classmethod\n    def with_columns(cls, *columns: Column) -> type[DataPackage]:\n        cls._columns = columns\n        return cls\n\n    @classmethod\n    def with_links(cls, *links: str) -> type[DataPackage]:\n        cls._links = links\n        return cls\n\n    @property\n    def columns(self) -> Iterator[Column]:\n        yield from self._columns\n        yield self._url\n\n    @cached_property\n    def core(self) -> pl.LazyFrame:\n        \"\"\"A minimal, tabular view of ``datapackage.json``.\"\"\"\n        return pl.LazyFrame(self._resources).select(self._exprs).sort(self.sort_by)\n\n    def schemas(self) -> Mapping[Dataset, Mapping[str, FlFieldStr]]:\n        \"\"\"Reduce all datasets with schemas to a minimal mapping.\"\"\"\n        m: Any = {\n            rsrc[\"name\"]: {f[\"name\"]: f[\"type\"] for f in s[\"fields\"]}\n            for rsrc in self._resources\n            if (s := rsrc.get(\"schema\"))\n        }\n        return m\n\n    def dataset_names(self) -> Iterable[str]:\n        return self.core.select(col(self.NAME).unique().sort()).collect().to_series()\n\n    def extensions(self) -> tuple[str, ...]:\n        return tuple(\n            self.core.select(col(\"suffix\").unique().sort())\n            .collect()\n            .to_series()\n            .to_list()\n        )\n\n    # TODO: Collect, then raise if cannot guarantee uniqueness\n    def metadata_csv(self) -> pl.LazyFrame:\n        \"\"\"Variant with duplicate dataset names removed.\"\"\"\n        return self.core.filter(col(\"suffix\") != \".arrow\").sort(self.NAME)\n\n    def typed_dict(self) -> str:\n        from tools.generate_schema_wrapper import UNIVERSAL_TYPED_DICT\n\n        return UNIVERSAL_TYPED_DICT.format(\n            name=self._NAME_TYPED_DICT,\n            metaclass_kwds=\", total=False\",\n            td_args=self._metadata_td_args,\n            summary=f\"Full schema for ``{self._path.name}``.\",\n            doc=self._metadata_doc,\n            comment=\"\",\n        )\n\n    @property\n    def _exprs(self) -> Iterator[pl.Expr]:\n        return (column.expr for column in self.columns)\n\n    @property\n    def _docs(self) -> Iterator[str]:\n        return (column.doc for column in self.columns)\n\n    @property\n    def _resources(self) -> Sequence[Resource]:\n        return self._pkg[\"resources\"]\n\n    @property\n    def _metadata_doc(self) -> str:\n        NLINDENT = f\"\\n{INDENT}\"\n        return (\n            f\"{NLINDENT.join(self._docs)}\\n\\n{''.join(self._links)}\\n\"\n            f\"{textwrap.indent(self._metadata_examples, INDENT)}\"\n            f\"{INDENT}\"\n        )\n\n    @property\n    def _metadata_examples(self) -> str:\n        with pl.Config(fmt_str_lengths=25, tbl_cols=5, tbl_width_chars=80):\n            table = repr(self.core.collect())\n        return (\n            f\"\\nExamples\"\n            f\"\\n--------\\n\"\n            f\"``{self._NAME_TYPED_DICT}`` keywords form constraints to filter a table like the below sample:\\n\\n\"\n            f\"```\\n{table}\\n```\\n\"\n        )\n\n    @property\n    def _metadata_td_args(self) -> str:\n        schema = self.core.collect_schema().to_python()\n        return f\"\\n{INDENT}\".join(\n            f\"{column._name}: {column._tp_str or tp.__name__}\"\n            for column, tp in zip(self.columns, schema.values(), strict=False)\n        )\n\n    @property\n    def _url(self) -> Column:\n        expr = pl.concat_str(pl.lit(self._base_url), \"path\")\n        return Column(\"url\", expr, \"Remote url used to access dataset.\")\n\n    def features_typing(self, frame: pl.LazyFrame | pl.DataFrame, /) -> Iterator[str]:\n        \"\"\"\n        Current plan is to use type aliases in overloads.\n\n        - ``Tabular`` can be treated interchangeably\n        - ``Image`` can only work with ``url``\n        - ``(Spatial|Geo|Topo)`` can be read with ``polars``\n            - A future version may implement dedicated support https://github.com/vega/altair/pull/3631#discussion_r1845931955\n        - ``Json`` should warn when using the ``pyarrow`` backend\n        \"\"\"\n        guards = deque[str]()\n        ldf = frame.lazy()\n        for column in self.columns:\n            if not column.is_feature():\n                continue\n            guard_name = column._name\n            alias_name = guard_name.removeprefix(\"is_\").capitalize()\n            members = ldf.filter(guard_name).select(self.NAME).collect().to_series()\n            guards.append(guard_literal(alias_name, guard_name, members))\n            yield utils.spell_literal_alias(alias_name, members)\n        yield from guards\n\n\ndef path_stem(column: str | pl.Expr, /) -> pl.Expr:\n    \"\"\"\n    The final path component, minus its last suffix.\n\n    Needed since `Resource.name`_ must be lowercase.\n\n    .. _Resource.name:\n        https://specs.frictionlessdata.io/data-resource/#name\n    \"\"\"\n    path = col(column) if isinstance(column, str) else column\n    rfind = (path.str.len_bytes() - 1) - path.str.reverse().str.find(r\"\\.\")\n    return path.str.head(rfind)\n\n\ndef path_suffix(column: str | pl.Expr, /) -> pl.Expr:\n    \"\"\"\n    The final component's last suffix.\n\n    This includes the leading period. For example: '.txt'.\n    \"\"\"\n    path = col(column) if isinstance(column, str) else column\n    return path.str.tail(path.str.reverse().str.find(r\"\\.\") + 1)\n\n\ndef guard_literal(alias_name: str, guard_name: str, members: Iterable[str], /) -> str:\n    \"\"\"Type narrowing function, all members must be literal strings.\"\"\"\n    return (\n        f\"def {guard_name}(obj: Any) -> TypeIs[{alias_name}]:\\n\"\n        f\"    return obj in set({sorted(set(members))!r})\\n\"\n    )\n\n\nPATHLIB = \"https://docs.python.org/3/library/pathlib.html\"\nGEOJSON = \"https://en.wikipedia.org/wiki/GeoJSON\"\n\n\ndef link(name: str, url: str, /) -> str:\n    return f\"{INDENT}.. _{name}:\\n{INDENT * 2}{url}\\n\"\n\n\ndef note(s: str, /) -> str:\n    return f\"\\n\\n{INDENT * 2}.. note::\\n{INDENT * 3}{s}\"\n\n\nfmt = col(\"format\")\nDataPackage.with_columns(\n    Column(\n        \"dataset_name\",\n        col(\"name\"),\n        \"Name of the dataset from the resource name field.\",\n        tp_str=\"Dataset | LiteralString\",\n    ),\n    Column(\n        \"suffix\",\n        path_suffix(\"path\"),\n        \"File extension/`Path.suffix`_.\",\n        tp_str=\"Extension\",\n    ),\n    Column(\"file_name\", col(\"path\"), \"Equivalent to `Path.name`_.\"),\n    Column(\"bytes\", col(\"bytes\"), \"File size in *bytes*.\"),\n    Column(\"is_image\", fmt == \"png\", \"Only accessible via url.\"),\n    Column(\"is_tabular\", col(\"type\") == \"table\", \"Can be read as tabular data.\"),\n    Column(\"is_geo\", fmt == \"geojson\", \"`GeoJSON`_ format.\"),\n    Column(\"is_topo\", fmt == \"topojson\", \"`TopoJSON`_ format.\"),\n    Column(\n        \"is_spatial\",\n        fmt.is_in((\"geojson\", \"topojson\")),\n        \"Any geospatial format. Only natively supported by ``polars``.\",\n    ),\n    Column(\n        \"is_json\", fmt.str.contains(\"json\"), \"Not supported natively by ``pyarrow``.\"\n    ),\n    Column(\n        \"has_schema\",\n        col(\"schema\").is_not_null(),\n        \"Data types available for improved ``pandas`` parsing.\",\n    ),\n    Column(\n        \"sha\",\n        col(\"hash\").str.split(\":\").list.last(),\n        doc=(\n            \"Unique hash for the dataset.\"\n            + note(\n                f\"E.g. if the dataset did *not* change between ``v1.0.0``-``v2.0.0``;\\n\\n{INDENT * 3}\"\n                f\"then this value would remain stable.\"\n            )\n        ),\n    ),\n)\nDataPackage.with_links(\n    link(\"Path.stem\", f\"{PATHLIB}#pathlib.PurePath.stem\"),\n    link(\"Path.name\", f\"{PATHLIB}#pathlib.PurePath.name\"),\n    link(\"Path.suffix\", f\"{PATHLIB}#pathlib.PurePath.suffix\"),\n    link(\"GeoJSON\", GEOJSON),\n    link(\"TopoJSON\", f\"{GEOJSON}#TopoJSON\"),\n)\n"
  },
  {
    "path": "tools/datasets/models.py",
    "content": "\"\"\"API-related data structures.\"\"\"\n\nfrom __future__ import annotations\n\nimport sys\nfrom collections.abc import Mapping, Sequence\nfrom typing import TYPE_CHECKING, Literal\n\nif sys.version_info >= (3, 15):\n    from typing import TypedDict\nelse:\n    from typing_extensions import TypedDict\n\nif TYPE_CHECKING:\n    if sys.version_info >= (3, 11):\n        from typing import NotRequired, Required\n    else:\n        from typing_extensions import NotRequired, Required\n    from typing import TypeAlias\n\n    from altair.datasets._typing import Dataset, FlFieldStr\n\n\nCsvDialect: TypeAlias = Mapping[\n    Literal[\"csv\"], Mapping[Literal[\"delimiter\"], Literal[\"\\t\"]]\n]\nJsonDialect: TypeAlias = Mapping[\n    Literal[r\"json\"], Mapping[Literal[\"keyed\"], Literal[True]]\n]\n\n\nclass Field(TypedDict):\n    \"\"\"https://datapackage.org/standard/table-schema/#field.\"\"\"\n\n    name: str\n    type: FlFieldStr\n    description: NotRequired[str]\n\n\nclass Schema(TypedDict):\n    \"\"\"https://datapackage.org/standard/table-schema/#properties.\"\"\"\n\n    fields: Sequence[Field]\n\n\nclass Source(TypedDict, total=False):\n    title: str\n    path: Required[str]\n    email: str\n    version: str\n\n\nclass License(TypedDict):\n    name: str\n    path: str\n    title: NotRequired[str]\n\n\nclass Resource(TypedDict):\n    \"\"\"https://datapackage.org/standard/data-resource/#properties.\"\"\"\n\n    name: Dataset\n    type: Literal[\"table\", \"file\", r\"json\"]\n    description: NotRequired[str]\n    licenses: NotRequired[Sequence[License]]\n    sources: NotRequired[Sequence[Source]]\n    path: str\n    scheme: Literal[\"file\"]\n    format: Literal[\n        \"arrow\", \"csv\", \"geojson\", r\"json\", \"parquet\", \"png\", \"topojson\", \"tsv\"\n    ]\n    mediatype: Literal[\n        \"application/parquet\",\n        \"application/vnd.apache.arrow.file\",\n        \"image/png\",\n        \"text/csv\",\n        \"text/tsv\",\n        r\"text/json\",\n        \"text/geojson\",\n        \"text/topojson\",\n    ]\n    encoding: NotRequired[Literal[\"utf-8\"]]\n    hash: str\n    bytes: int\n    dialect: NotRequired[CsvDialect | JsonDialect]\n    schema: NotRequired[Schema]\n\n\nclass Contributor(TypedDict, total=False):\n    title: str\n    givenName: str\n    familyName: str\n    path: str\n    email: str\n    roles: Sequence[str]\n    organization: str\n\n\nclass Package(TypedDict):\n    \"\"\"\n    A subset of the `Data Package`_ standard.\n\n    .. _Data Package:\n        https://datapackage.org/standard/data-package/#properties\n    \"\"\"\n\n    name: Literal[\"vega-datasets\"]\n    version: str\n    homepage: str\n    description: str\n    licenses: Sequence[License]\n    contributors: Sequence[Contributor]\n    sources: Sequence[Source]\n    created: str\n    resources: Sequence[Resource]\n"
  },
  {
    "path": "tools/datasets/npm.py",
    "content": "from __future__ import annotations\n\nimport json\nimport string\nimport urllib.request\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, ClassVar, Literal, NamedTuple\nfrom urllib.request import Request\n\nfrom tools.datasets import datapackage\n\nif TYPE_CHECKING:\n    import sys\n    from urllib.request import OpenerDirector\n\n    if sys.version_info >= (3, 11):\n        from typing import LiteralString\n    else:\n        from typing_extensions import LiteralString\n    from typing import TypeAlias\n\n    from tools.datasets import PathMap\n    from tools.datasets.datapackage import DataPackage\n\n    BranchOrTag: TypeAlias = 'Literal[\"main\"] | LiteralString'\n\n\n__all__ = [\"Npm\"]\n\n\nclass NpmUrl(NamedTuple):\n    CDN: LiteralString\n    GH: LiteralString\n\n\nclass Npm:\n    \"\"\"https://www.jsdelivr.com/docs/data.jsdelivr.com#overview.\"\"\"\n\n    _opener: ClassVar[OpenerDirector] = urllib.request.build_opener()\n\n    def __init__(\n        self,\n        paths: PathMap,\n        *,\n        jsdelivr: Literal[\"jsdelivr\"] = \"jsdelivr\",\n        npm: Literal[\"npm\"] = \"npm\",\n        package: LiteralString = \"vega-datasets\",\n    ) -> None:\n        self.paths: PathMap = paths\n        self._url: NpmUrl = NpmUrl(\n            CDN=f\"https://cdn.{jsdelivr}.net/{npm}/{package}@\",\n            GH=f\"https://cdn.{jsdelivr}.net/gh/vega/{package}@\",\n        )\n\n    def _prefix(self, version: BranchOrTag, /) -> LiteralString:\n        return f\"{self.url.GH if is_branch(version) else self.url.CDN}{version}/\"\n\n    def dataset_base_url(self, version: BranchOrTag, /) -> LiteralString:\n        \"\"\"Common url prefix for all datasets derived from ``version``.\"\"\"\n        return f\"{self._prefix(version)}data/\"\n\n    @property\n    def url(self) -> NpmUrl:\n        return self._url\n\n    def file(\n        self,\n        branch_or_tag: BranchOrTag,\n        path: str,\n        /,\n    ) -> Any:\n        \"\"\"\n        Request a file from `jsdelivr` `npm`_ or `GitHub`_ endpoints.\n\n        Parameters\n        ----------\n        branch_or_tag\n            Version of the file, see `branches`_ and `tags`_.\n        path\n            Relative filepath from the root of the repo.\n\n        .. _npm:\n            https://www.jsdelivr.com/documentation#id-npm\n        .. _GitHub:\n            https://www.jsdelivr.com/documentation#id-github\n        .. _branches:\n            https://github.com/vega/vega-datasets/branches\n        .. _tags:\n            https://github.com/vega/vega-datasets/tags\n        \"\"\"\n        path = path.lstrip(\"./\")\n        suffix = Path(path).suffix\n        if suffix == \".json\":\n            headers = {\"Accept\": \"application/json\"}\n            read_fn = json.load\n        else:\n            raise NotImplementedError(path, suffix)\n        req = Request(f\"{self._prefix(branch_or_tag)}{path}\", headers=headers)\n        with self._opener.open(req) as response:\n            return read_fn(response)\n\n    def datapackage(self, *, tag: LiteralString) -> DataPackage:\n        return datapackage.DataPackage(\n            self.file(tag, \"datapackage.json\"),\n            self.dataset_base_url(tag),\n            self.paths[\"metadata\"],\n        )\n\n\ndef is_branch(s: BranchOrTag, /) -> bool:\n    return s == \"main\" or not (s.startswith(tuple(\"v\" + string.digits)))\n"
  },
  {
    "path": "tools/fs.py",
    "content": "\"\"\"Cross-platform filesystem utilities.\"\"\"\n\nfrom __future__ import annotations\n\nimport datetime as dt\nimport shutil\nimport subprocess as sp\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any\n\nif TYPE_CHECKING:\n    from collections.abc import Callable\n\n\n__all__ = [\n    \"REPO_ROOT\",\n    \"copytree\",\n    \"dir_exists\",\n    \"file_exists\",\n    \"mkdir\",\n    \"modified_time\",\n    \"path_repr\",\n    \"rm\",\n    \"run_check\",\n    \"run_stream_stdout\",\n]\n\nREPO_ROOT: Path = Path(__file__).parent.parent\n\n\ndef mkdir(*sources: str | Path, parents: bool = True) -> None:\n    \"\"\"\n    Platform independent `bash mkdir`_, using ``--parents`` option.\n\n    .. _bash mkdir:\n        https://ss64.com/bash/mkdir.html\n    \"\"\"\n    for source in sources:\n        Path(source).mkdir(parents=parents, exist_ok=True)\n\n\ndef rm(*sources: str | Path, force: bool = True) -> None:\n    \"\"\"\n    Platform independent `bash rm`_, using ``--recursive``, ``--force`` options.\n\n    .. _bash rm:\n        https://ss64.com/bash/rm.html\n    \"\"\"\n    for source in sources:\n        fp = Path(source)\n        if fp.is_file():\n            fp.unlink(missing_ok=force)\n        else:\n            shutil.rmtree(fp, ignore_errors=force)\n\n\ndef copytree(src: str | Path, dst: str | Path, *, force: bool = True):\n    \"\"\"\n    Recursively copy a directory tree and return the destination directory.\n\n    Wraps `shutil.copytree`_.\n\n    .. _shutil.copytree:\n        https://docs.python.org/3/library/shutil.html#shutil.copytree\n    \"\"\"\n    return shutil.copytree(src, dst, dirs_exist_ok=force)\n\n\ndef file_exists(file: str | Path, /) -> bool:\n    \"\"\"Fail on files created using ``Path.touch()``.\"\"\"\n    fp = Path(file)\n    return bool(fp.exists() and fp.stat().st_size)\n\n\ndef dir_exists(file: str | Path, /) -> bool:\n    fp = Path(file)\n    return fp.exists() and fp.is_dir()\n\n\ndef modified_time(file: str | Path, /) -> dt.datetime:\n    \"\"\"UTC datetime when ``file`` was last modified.\"\"\"\n    return dt.datetime.fromtimestamp(Path(file).stat().st_mtime, dt.timezone.utc)\n\n\ndef path_repr(fp: Path, /) -> str:\n    \"\"\"Return string representation w/ ``/``, relative to root of repository.\"\"\"\n    return f\"{fp.relative_to(REPO_ROOT).as_posix()!r}\"\n\n\ndef _stdout_handler(line: bytes, /) -> None:\n    \"\"\"Pass-through to ``sys.stdout``, without adding whitespace.\"\"\"\n    print(line.decode(), end=\"\")\n\n\ndef run_stream_stdout(\n    args: sp._CMD,\n    *,\n    stdout_handler: Callable[[bytes], None] = _stdout_handler,\n) -> sp.CompletedProcess[Any]:\n    \"\"\"\n    Mimic `subprocess.run`_, piping stdout back to the caller in real-time*.\n\n    Adapted from `stackoverflow-76626021`_.\n\n    Notes\n    -----\n    - `pytest`_ is line-by-line\n    - `sphinx-build`_ comes out in 3 bursts (over 8 minutes)\n    - All others only output a short message (usually 1 line)\n\n    .. _subprocess.run:\n        https://docs.python.org/3/library/subprocess.html#subprocess.run\n    .. _stackoverflow-76626021:\n        https://stackoverflow.com/questions/21953835/run-subprocess-and-print-output-to-logging/76626021#76626021\n    .. _pytest:\n        https://docs.pytest.org/en/stable/index.html\n    .. _sphinx-build:\n        https://www.sphinx-doc.org/en/master/man/sphinx-build.html\n    \"\"\"\n    with sp.Popen(args, stdout=sp.PIPE, stderr=sp.STDOUT) as process:\n        if process.stdout is not None:\n            for chunk in process.stdout:\n                stdout_handler(chunk)\n        else:\n            msg = \"stdout is None\"\n            raise NotImplementedError(msg)\n    if retcode := process.poll():\n        raise sp.CalledProcessError(retcode, process.args)\n    return sp.CompletedProcess(process.args, 0)\n\n\ndef run_check(args: sp._CMD, /) -> sp.CompletedProcess[str]:\n    \"\"\"\n    Run a command in a `subprocess`_, capturing and decoding output.\n\n    .. _subprocess:\n        https://docs.python.org/3/library/subprocess.html#subprocess.run\n    \"\"\"\n    return sp.run(args, check=True, capture_output=True, encoding=\"utf-8\")\n"
  },
  {
    "path": "tools/generate_api_docs.py",
    "content": "\"\"\"Fills the contents of doc/user_guide/api.rst based on the updated Altair schema.\"\"\"\n\nfrom __future__ import annotations\n\nimport types\nfrom pathlib import Path\nfrom types import ModuleType\nfrom typing import TYPE_CHECKING, Final\n\nimport altair as alt\n\nif TYPE_CHECKING:\n    from collections.abc import Iterator\n\nAPI_FILENAME: Final = str(Path.cwd() / \"doc\" / \"user_guide\" / \"api.rst\")\n\nAPI_TEMPLATE: Final = \"\"\"\\\n.. _api:\n\nAPI Reference\n=============\n\nThis is the class and function reference of Altair, and the following content\nis generated automatically from the code documentation strings.\nPlease refer to the `full user guide <http://altair-viz.github.io>`_ for\nfurther details, as this low-level documentation may not be enough to give\nfull guidelines on their use.\n\n.. _api-toplevel:\n\nTop-Level Objects\n-----------------\n.. currentmodule:: altair\n\n.. autosummary::\n   :toctree: generated/toplevel/\n   :nosignatures:\n\n   {toplevel_charts}\n\n.. _api-channels:\n\nEncoding Channels\n-----------------\n.. currentmodule:: altair\n\n.. autosummary::\n   :toctree: generated/channels/\n   :nosignatures:\n\n   {encoding_wrappers}\n\n.. _api-functions:\n\nAPI Functions\n-------------\n.. currentmodule:: altair\n\n.. autosummary::\n   :toctree: generated/api/\n   :nosignatures:\n\n   {api_functions}\n\n.. _api-theme:\n\nTheme\n-----\n.. currentmodule:: altair.theme\n\n.. autosummary::\n   :toctree: generated/theme/\n   :nosignatures:\n\n   {theme_objects}\n\n.. _api-core:\n\nLow-Level Schema Wrappers\n-------------------------\n.. currentmodule:: altair\n\n.. autosummary::\n   :toctree: generated/core/\n   :nosignatures:\n\n   {lowlevel_wrappers}\n\n.. _api-cls:\n\nAPI Utility Classes\n-------------------\n.. currentmodule:: altair\n\n.. autosummary::\n   :toctree: generated/api-cls/\n   :nosignatures:\n\n   {api_classes}\n\n.. _api-typing:\n\nTyping\n------\n.. currentmodule:: altair.typing\n\n.. autosummary::\n   :toctree: generated/typing/\n   :nosignatures:\n\n   {typing_objects}\n\n.. _api-datasets:\n\nDatasets\n--------\n.. currentmodule:: altair.datasets\n\n.. autosummary::\n   :toctree: generated/datasets/\n   :nosignatures:\n\n   {datasets_objects}\n\n.. _Generic:\n    https://typing.readthedocs.io/en/latest/spec/generics.html#generics\n.. _vega-datasets:\n    https://github.com/vega/vega-datasets\n\"\"\"\n\n\ndef iter_objects(\n    mod: ModuleType,\n    ignore_private: bool = True,\n    restrict_to_type: type | None = None,\n    restrict_to_subclass: type | None = None,\n) -> Iterator[str]:\n    for name in dir(mod):\n        obj = getattr(mod, name)\n        if ignore_private and name.startswith(\"_\"):\n            continue\n        if restrict_to_type is not None and not isinstance(obj, restrict_to_type):\n            continue\n        if restrict_to_subclass is not None and (\n            not (isinstance(obj, type) and issubclass(obj, restrict_to_subclass))\n        ):\n            continue\n        if hasattr(obj, \"__deprecated__\"):\n            continue\n        yield name\n\n\ndef toplevel_charts() -> list[str]:\n    return sorted(iter_objects(alt.api, restrict_to_subclass=alt.TopLevelMixin))\n\n\ndef encoding_wrappers() -> list[str]:\n    return sorted(iter_objects(alt.channels, restrict_to_subclass=alt.SchemaBase))\n\n\ndef api_functions() -> list[str]:\n    # Exclude `typing` functions/SpecialForm(s)\n    KEEP = set(alt.api.__all__) - set(alt.typing.__all__)\n    return sorted(\n        name\n        for name in iter_objects(alt.api, restrict_to_type=types.FunctionType)\n        if name in KEEP\n    )\n\n\ndef api_classes() -> list[str]:\n    # Part of the Public API, but are not inherited from `vega-lite`.\n    return [\"expr\", \"When\", \"Then\", \"ChainedWhen\"]\n\n\ndef type_hints() -> list[str]:\n    return sorted(s for s in iter_objects(alt.typing) if s in alt.typing.__all__)\n\n\ndef theme() -> list[str]:\n    sort_1 = sorted(s for s in iter_objects(alt.theme) if s in alt.theme.__all__)\n    # Display functions before `TypedDict`, but show `ThemeConfig` before `Kwds`\n    sort_2 = sorted(sort_1, key=lambda s: s.endswith(\"Kwds\"))\n    sort_3 = sorted(sort_2, key=lambda s: not s.islower())\n    return sort_3\n\n\ndef datasets() -> list[str]:\n    return alt.datasets.__all__\n\n\ndef lowlevel_wrappers() -> list[str]:\n    objects = sorted(iter_objects(alt.schema.core, restrict_to_subclass=alt.SchemaBase))\n    # The names of these two classes are also used for classes in alt.channels. Due to\n    # how imports are set up, these channel classes overwrite the two low-level classes\n    # in the top-level Altair namespace. Therefore, they cannot be imported as e.g.\n    # altair.Color (which gives you the Channel class) and therefore Sphinx won't\n    # be able to produce a documentation page.\n    objects = [o for o in objects if o not in {\"Color\", \"Text\"}]\n    return objects\n\n\ndef write_api_file() -> None:\n    print(f\"Updating API docs\\n  ->{API_FILENAME}\")\n    sep = \"\\n   \"\n    Path(API_FILENAME).write_text(\n        API_TEMPLATE.format(\n            toplevel_charts=sep.join(toplevel_charts()),\n            api_functions=sep.join(api_functions()),\n            encoding_wrappers=sep.join(encoding_wrappers()),\n            lowlevel_wrappers=sep.join(lowlevel_wrappers()),\n            api_classes=sep.join(api_classes()),\n            typing_objects=sep.join(type_hints()),\n            theme_objects=sep.join(theme()),\n            datasets_objects=sep.join(datasets()),\n        ),\n        encoding=\"utf-8\",\n    )\n\n\nif __name__ == \"__main__\":\n    write_api_file()\n"
  },
  {
    "path": "tools/generate_nightly_version.py",
    "content": "#!/usr/bin/env python3\n\"\"\"\nGenerate nightly version for Altair.\n\nThis script creates a version string based on the current date and commit hash.\n\"\"\"\n\nimport subprocess\nimport sys\nfrom datetime import datetime\nfrom pathlib import Path\n\n\ndef get_git_commit():\n    \"\"\"Get the short commit hash.\"\"\"\n    try:\n        result = subprocess.run(\n            [\"git\", \"rev-parse\", \"--short\", \"HEAD\"],\n            capture_output=True,\n            text=True,\n            check=True,\n        )\n        return result.stdout.strip()\n    except subprocess.CalledProcessError:\n        return \"unknown\"\n\n\ndef get_latest_nightly_commit():\n    \"\"\"Get the commit hash of the latest nightly build.\"\"\"\n    try:\n        # Get the latest nightly tag\n        result = subprocess.run(\n            [\"git\", \"tag\", \"--list\", \"nightly-*\", \"--sort=-version:refname\"],\n            capture_output=True,\n            text=True,\n            check=True,\n        )\n        tags = result.stdout.strip().split(\"\\n\")\n        if not tags or tags[0] == \"\":\n            return None\n\n        latest_tag = tags[0]\n        # Get the commit hash for this tag\n        result = subprocess.run(\n            [\"git\", \"rev-list\", \"-n\", \"1\", latest_tag],\n            capture_output=True,\n            text=True,\n            check=True,\n        )\n        return result.stdout.strip()\n    except subprocess.CalledProcessError:\n        return None\n\n\ndef has_changes_since_last_nightly():\n    \"\"\"Check if there are changes since the last nightly build.\"\"\"\n    latest_nightly_commit = get_latest_nightly_commit()\n    if latest_nightly_commit is None:\n        return True  # No previous nightly builds, so we should build\n\n    current_commit = subprocess.run(\n        [\"git\", \"rev-parse\", \"HEAD\"], capture_output=True, text=True, check=True\n    ).stdout.strip()\n\n    return latest_nightly_commit != current_commit\n\n\ndef generate_nightly_version():\n    \"\"\"Generate a nightly version string.\"\"\"\n    date = datetime.now().strftime(\"%Y%m%d\")\n    commit = get_git_commit()\n    return f\"{date}.dev0+{commit}\"\n\n\ndef update_version_files(version):\n    \"\"\"Update version in __init__.py and conf.py.\"\"\"\n    # Update altair/__init__.py\n    init_file = Path(\"altair/__init__.py\")\n    if init_file.exists():\n        content = init_file.read_text()\n        # Replace version line\n        lines = content.split(\"\\n\")\n        for i, line in enumerate(lines):\n            if line.startswith(\"__version__\"):\n                lines[i] = f'__version__ = \"{version}\"'\n                break\n        init_file.write_text(\"\\n\".join(lines))\n\n    # Update doc/conf.py\n    conf_file = Path(\"doc/conf.py\")\n    if conf_file.exists():\n        content = conf_file.read_text()\n        lines = content.split(\"\\n\")\n        for i, line in enumerate(lines):\n            if line.startswith(\"release =\"):\n                lines[i] = f'release = \"{version}\"'\n                break\n        conf_file.write_text(\"\\n\".join(lines))\n\n\nif __name__ == \"__main__\":\n    if len(sys.argv) > 1 and sys.argv[1] == \"--check-changes\":\n        if has_changes_since_last_nightly():\n            print(\"true\")\n            sys.exit(0)\n        else:\n            print(\"false\")\n            sys.exit(1)\n\n    version = generate_nightly_version()\n    print(f\"Generated nightly version: {version}\")\n\n    if len(sys.argv) > 1 and sys.argv[1] == \"--update\":\n        update_version_files(version)\n        print(\"Updated version files\")\n\n    print(version)\n"
  },
  {
    "path": "tools/generate_schema_wrapper.py",
    "content": "\"\"\"Generate a schema wrapper from a schema.\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport copy\nimport json\nimport sys\nimport textwrap\nfrom collections.abc import Iterable, Iterator\nfrom dataclasses import dataclass\nfrom itertools import chain\nfrom operator import attrgetter\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Final, Generic, Literal, TypeVar\nfrom urllib import request\n\nif sys.version_info >= (3, 15):\n    from typing import TypedDict\nelse:\n    from typing_extensions import TypedDict\n\nimport vl_convert as vlc\n\nsys.path.insert(0, str(Path.cwd()))\n\n\nfrom tools.codemod import ruff\nfrom tools.markup import rst_syntax_for_class\nfrom tools.schemapi import CodeSnippet, SchemaInfo, arg_kwds, arg_required_kwds, codegen\nfrom tools.schemapi.utils import (\n    RemapContext,\n    SchemaProperties,\n    TypeAliasTracer,\n    finalize_type_reprs,\n    get_valid_identifier,\n    import_type_checking,\n    import_typing_extensions,\n    indent_docstring,\n    resolve_references,\n    spell_literal,\n)\nfrom tools.vega_expr import write_expr_module\nfrom tools.versioning import VERSIONS\n\nif TYPE_CHECKING:\n    from collections.abc import Iterable, Iterator\n\n    from tools.schemapi.codegen import ArgInfo, AttrGetter\n    from vl_convert import VegaThemes\n\nT = TypeVar(\"T\", bound=\"str | Iterable[str]\")\n\nSCHEMA_VERSION: Final = VERSIONS[\"vega-lite\"]\n\n\nHEADER_COMMENT = \"\"\"\\\n# The contents of this file are automatically written by\n# tools/generate_schema_wrapper.py. Do not modify directly.\n\"\"\"\n\nHEADER: Final = f\"\"\"{HEADER_COMMENT}\nfrom __future__ import annotations\\n\n\"\"\"\n\nSCHEMA_URL_TEMPLATE: Final = \"https://vega.github.io/schema/{library}/{version}.json\"\nVL_PACKAGE_TEMPLATE = (\n    \"https://raw.githubusercontent.com/vega/vega-lite/refs/tags/{version}/package.json\"\n)\nSCHEMA_FILE = \"vega-lite-schema.json\"\nTHEMES_FILE = \"vega-themes.json\"\nEXPR_FILE: Path = (\n    Path(__file__).parent / \"..\" / \"altair\" / \"expr\" / \"__init__.py\"\n).resolve()\n\nCHANNEL_MYPY_IGNORE_STATEMENTS: Final = \"\"\"\\\n# These errors need to be ignored as they come from the overload methods\n# which trigger two kind of errors in mypy:\n# * all of them do not have an implementation in this file\n# * some of them are the only overload methods -> overloads usually only make\n#   sense if there are multiple ones\n# However, we need these overloads due to how the propertysetter works\n# mypy: disable-error-code=\"no-overload-impl, empty-body, misc\"\n\"\"\"\n\nBASE_SCHEMA: Final = \"\"\"\nclass {basename}(SchemaBase):\n    _rootschema = load_schema()\n    @classmethod\n    def _default_wrapper_classes(cls) -> Iterator[type[Any]]:\n        return _subclasses({basename})\n\"\"\"\n\nLOAD_SCHEMA: Final = '''\ndef load_schema() -> dict:\n    \"\"\"Load the json schema associated with this module's functions\"\"\"\n    schema_bytes = pkgutil.get_data(__name__, \"{schemafile}\")\n    if schema_bytes is None:\n        raise ValueError(\"Unable to load {schemafile}\")\n    return json.loads(\n        schema_bytes.decode(\"utf-8\")\n    )\n'''\n\n\nCHANNEL_MIXINS: Final = \"\"\"\nclass FieldChannelMixin:\n    _encoding_name: str\n    def to_dict(\n        self,\n        validate: bool = True,\n        ignore: list[str] | None = None,\n        context: dict[str, Any] | None = None,\n    ) -> dict | list[dict]:\n        context = context or {}\n        ignore = ignore or []\n        shorthand = self._get(\"shorthand\")  # type: ignore[attr-defined]\n        field = self._get(\"field\")  # type: ignore[attr-defined]\n\n        if shorthand is not Undefined and field is not Undefined:\n            msg = f\"{self.__class__.__name__} specifies both shorthand={shorthand} and field={field}. \"\n            raise ValueError(msg)\n\n        if isinstance(shorthand, (tuple, list)):\n            # If given a list of shorthands, then transform it to a list of classes\n            kwds = self._kwds.copy()  # type: ignore[attr-defined]\n            kwds.pop(\"shorthand\")\n            return [\n                self.__class__(sh, **kwds).to_dict(  # type: ignore[call-arg]\n                    validate=validate, ignore=ignore, context=context\n                )\n                for sh in shorthand\n            ]\n\n        if shorthand is Undefined:\n            parsed = {}\n        elif isinstance(shorthand, str):\n            data: nw.DataFrame | Any = context.get(\"data\", None)\n            parsed = parse_shorthand(shorthand, data=data)\n            type_required = \"type\" in self._kwds  # type: ignore[attr-defined]\n            type_in_shorthand = \"type\" in parsed\n            type_defined_explicitly = self._get(\"type\") is not Undefined  # type: ignore[attr-defined]\n            if not type_required:\n                # Secondary field names don't require a type argument in VegaLite 3+.\n                # We still parse it out of the shorthand, but drop it here.\n                parsed.pop(\"type\", None)\n            elif not (type_in_shorthand or type_defined_explicitly):\n                if isinstance(data, nw.DataFrame):\n                    msg = (\n                        f'Unable to determine data type for the field \"{shorthand}\";'\n                        \" verify that the field name is not misspelled.\"\n                        \" If you are referencing a field from a transform,\"\n                        \" also confirm that the data type is specified correctly.\"\n                    )\n                    raise ValueError(msg)\n                else:\n                    msg = (\n                        f\"{shorthand} encoding field is specified without a type; \"\n                        \"the type cannot be automatically inferred because \"\n                        \"the data is not specified as a pandas.DataFrame.\"\n                    )\n                    raise ValueError(msg)\n        else:\n            # Shorthand is not a string; we pass the definition to field,\n            # and do not do any parsing.\n            parsed = {\"field\": shorthand}\n        context[\"parsed_shorthand\"] = parsed\n\n        return super(FieldChannelMixin, self).to_dict(\n            validate=validate, ignore=ignore, context=context\n        )\n\n\nclass ValueChannelMixin:\n    _encoding_name: str\n    def to_dict(\n        self,\n        validate: bool = True,\n        ignore: list[str] | None = None,\n        context: dict[str, Any] | None = None,\n    ) -> dict:\n        context = context or {}\n        ignore = ignore or []\n        condition = self._get(\"condition\", Undefined)  # type: ignore[attr-defined]\n        copy = self  # don't copy unless we need to\n        if condition is not Undefined:\n            if isinstance(condition, core.SchemaBase):\n                pass\n            elif \"field\" in condition and \"type\" not in condition:\n                kwds = parse_shorthand(condition[\"field\"], context.get(\"data\", None))\n                copy = self.copy(deep=[\"condition\"])  # type: ignore[attr-defined]\n                copy[\"condition\"].update(kwds)\n        return super(ValueChannelMixin, copy).to_dict(\n            validate=validate, ignore=ignore, context=context\n        )\n\n\nclass DatumChannelMixin:\n    _encoding_name: str\n    def to_dict(\n        self,\n        validate: bool = True,\n        ignore: list[str] | None = None,\n        context: dict[str, Any] | None = None,\n    ) -> dict:\n        context = context or {}\n        ignore = ignore or []\n        datum = self._get(\"datum\", Undefined)  # type: ignore[attr-defined] # noqa\n        copy = self  # don't copy unless we need to\n        return super(DatumChannelMixin, copy).to_dict(\n            validate=validate, ignore=ignore, context=context\n        )\n\"\"\"\n\nMARK_MIXIN: Final = '''\nclass MarkMethodMixin:\n    \"\"\"A mixin class that defines mark methods\"\"\"\n\n{methods}\n'''\n\nMARK_METHOD: Final = '''\n@use_signature({decorator})\ndef mark_{mark}(self, **kwds: Any) -> Self:\n    \"\"\"Set the chart's mark to '{mark}' (see :class:`{mark_def}`).\"\"\"\n\n    copy = self.copy(deep=False)  # type: ignore[attr-defined]\n    if any(val is not Undefined for val in kwds.values()):\n        copy.mark = core.{mark_def}(type=\"{mark}\", **kwds)\n    else:\n        copy.mark = \"{mark}\"\n    return copy\n'''\n\nCONFIG_METHOD: Final = \"\"\"\n@use_signature(core.{classname})\ndef {method}(self, *args, **kwargs) -> Self:\n    copy = self.copy(deep=False)  # type: ignore[attr-defined]\n    copy.config = core.{classname}(*args, **kwargs)\n    return copy\n\"\"\"\n\nCONFIG_PROP_METHOD: Final = \"\"\"\n@use_signature(core.{classname})\ndef configure_{prop}(self, *args, **kwargs) -> Self:\n    copy = self.copy(deep=['config'])  # type: ignore[attr-defined]\n    if copy.config is Undefined:\n        copy.config = core.Config()\n    copy.config[\"{prop}\"] = core.{classname}(*args, **kwargs)\n    return copy\n\"\"\"\nUNIVERSAL_TYPED_DICT = '''\nclass {name}(TypedDict{metaclass_kwds}):{comment}\n    \"\"\"\n    {summary}\n\n    Parameters\n    ----------\n    {doc}\"\"\"\n\n    {td_args}\n'''\nENCODE_KWDS: Literal[\"EncodeKwds\"] = \"EncodeKwds\"\nTHEME_CONFIG: Literal[\"ThemeConfig\"] = \"ThemeConfig\"\nPADDING_KWDS: Literal[\"PaddingKwds\"] = \"PaddingKwds\"\nROW_COL_KWDS: Literal[\"RowColKwds\"] = \"RowColKwds\"\nTEMPORAL: Literal[\"Temporal\"] = \"Temporal\"\n\n# NOTE: `api.py` typing imports\nBIN: Literal[\"Bin\"] = \"Bin\"\nIMPUTE: Literal[\"Impute\"] = \"Impute\"\nINTO_CONDITION: Literal[\"IntoCondition\"] = \"IntoCondition\"\nCHART_DATA_TYPE: Literal[\"ChartDataType\"] = \"ChartDataType\"\n\n# NOTE: `core.py` typing imports\nDATETIME: Literal[\"DateTime\"] = \"DateTime\"\nBIN_PARAMS: Literal[\"BinParams\"] = \"BinParams\"\nIMPUTE_PARAMS: Literal[\"ImputeParams\"] = \"ImputeParams\"\nTIME_UNIT_PARAMS: Literal[\"TimeUnitParams\"] = \"TimeUnitParams\"\nSCALE: Literal[\"Scale\"] = \"Scale\"\nAXIS: Literal[\"Axis\"] = \"Axis\"\nLEGEND: Literal[\"Legend\"] = \"Legend\"\nREPEAT_REF: Literal[\"RepeatRef\"] = \"RepeatRef\"\nHEADER_COLUMN: Literal[\"Header\"] = \"Header\"\nENCODING_SORT_FIELD: Literal[\"EncodingSortField\"] = \"EncodingSortField\"\n\nENCODE_KWDS_SUMMARY: Final = (\n    \"Encoding channels map properties of the data to visual properties of the chart.\"\n)\nTHEME_CONFIG_SUMMARY: Final = (\n    \"Top-Level Configuration ``TypedDict`` for creating a consistent theme.\"\n)\nEXTRA_ITEMS_MESSAGE: Final = \"\"\"\\\n    Notes\n    -----\n    The following keys may be specified as string literals **only**:\n\n        {invalid_kwds}\n\n    See `PEP728`_ for type checker compatibility.\n\n    .. _PEP728:\n        https://peps.python.org/pep-0728/#reference-implementation\n\"\"\"\n\nENCODE_METHOD: Final = '''\nclass _EncodingMixin:\n    def encode(self, *args: Any, {method_args}) -> Self:\n        \"\"\"Map properties of the data to visual properties of the chart (see :class:`FacetedEncoding`)\n        {docstring}\"\"\"\n        kwargs = {dict_literal}\n        if args:\n            kwargs = {{k: v for k, v in kwargs.items() if v is not Undefined}}\n\n        # Convert args to kwargs based on their types.\n        kwargs = _infer_encoding_types(args, kwargs)\n        # get a copy of the dict representation of the previous encoding\n        # ignore type as copy method comes from SchemaBase\n        copy = self.copy(deep=['encoding'])  # type: ignore[attr-defined]\n        encoding = copy._get('encoding', {{}})\n        if isinstance(encoding, core.VegaLiteSchema):\n            encoding = {{k: v for k, v in encoding._kwds.items() if v is not Undefined}}\n        # update with the new encodings, and apply them to the copy\n        encoding.update(kwargs)\n        copy.encoding = core.FacetedEncoding(**encoding)\n        return copy\n'''\n\n# Enables use of ~, &, | with compositions of selection objects.\nDUNDER_PREDICATE_COMPOSITION = \"\"\"\n    def __invert__(self) -> PredicateComposition:\n        return PredicateComposition({\"not\": self.to_dict()})\n\n    def __and__(self, other: SchemaBase) -> PredicateComposition:\n        return PredicateComposition({\"and\": [self.to_dict(), other.to_dict()]})\n\n    def __or__(self, other: SchemaBase) -> PredicateComposition:\n        return PredicateComposition({\"or\": [self.to_dict(), other.to_dict()]})\n\"\"\"\n\n\n# NOTE: Not yet reasonable to generalize `TypeAliasType`, `TypeVar`\n# Revisit if this starts to become more common\nTYPING_EXTRA: Final = '''\nT = TypeVar(\"T\")\nOneOrSeq = TypeAliasType(\"OneOrSeq\", T | Sequence[T], type_params=(T,))\n\"\"\"\nOne of ``T`` specified type(s), or a `Sequence` of such.\n\nExamples\n--------\nThe parameters ``short``, ``long`` accept the same range of types::\n\n    # ruff: noqa: UP006, UP007\n\n    def func(\n        short: OneOrSeq[str | bool | float],\n        long: str | bool | float | Sequence[str | bool | float],\n    ): ...\n\"\"\"\n\nclass Value(TypedDict, Generic[T]):\n    \"\"\"\n    A `Generic`_ single item ``dict``.\n\n    Parameters\n    ----------\n    value: T\n        Wrapped value.\n\n    Returns\n    -------\n    dict\n\n    .. _Generic:\n        https://typing.readthedocs.io/en/latest/spec/generics.html#generics\n    \"\"\"\n\n    value: T\n\n\nColorHex = Annotated[\n    LiteralString,\n    re.compile(r\"#[0-9a-f]{2}[0-9a-f]{2}[0-9a-f]{2}([0-9a-f]{2})?\", re.IGNORECASE),\n]\n\"\"\"\nA `hexadecimal`_ color code.\n\nCorresponds to the ``json-schema`` string format:\n\n    {\"format\": \"color-hex\", \"type\": \"string\"}\n\nExamples\n--------\n:\n\n    \"#f0f8ff\"\n    \"#7fffd4\"\n    \"#000000\"\n    \"#0000FF\"\n    \"#0000ff80\"\n\n.. _hexadecimal:\n    https://www.w3schools.com/html/html_colors_hex.asp\n\"\"\"\n\ndef is_color_hex(obj: Any) -> TypeIs[ColorHex]:\n    \"\"\"Return ``True`` if the object is a hexadecimal color code.\"\"\"\n    # NOTE: Extracts compiled pattern from metadata,\n    # to avoid defining in multiple places.\n    it = iter(get_args(ColorHex))\n    next(it)\n    pattern: re.Pattern[str] = next(it)\n    return bool(pattern.fullmatch(obj))\n\n\n\nclass RowColKwds(TypedDict, Generic[T], total=False):\n    \"\"\"\n    A `Generic`_ two-item ``dict``.\n\n    Parameters\n    ----------\n    column: T\n    row: T\n\n    Returns\n    -------\n    dict\n\n    .. _Generic:\n        https://typing.readthedocs.io/en/latest/spec/generics.html#generics\n    \"\"\"\n\n    column: T\n    row: T\n\n\nclass PaddingKwds(TypedDict, total=False):\n    bottom: float\n    left: float\n    right: float\n    top: float\n\nTemporal: TypeAlias = date | datetime\n'''\n\n_ChannelType = Literal[\"field\", \"datum\", \"value\"]\n\n\nclass SchemaGenerator(codegen.SchemaGenerator):\n    schema_class_template = textwrap.dedent(\n        '''\n    class {classname}({basename}):\n        \"\"\"{docstring}\"\"\"\n        _schema = {schema!r}\n\n        {init_code}\n    '''\n    )\n\n\nclass MethodSchemaGenerator(SchemaGenerator):\n    \"\"\"Base template w/ an extra slot `{method_code}` after `{init_code}`.\"\"\"\n\n    schema_class_template = textwrap.dedent(\n        '''\n    class {classname}({basename}):\n        \"\"\"{docstring}\"\"\"\n        _schema = {schema!r}\n\n        {init_code}\n\n        {method_code}\n    '''\n    )\n\n\nSchGen = TypeVar(\"SchGen\", bound=SchemaGenerator)\n\n\nclass OverridesItem(TypedDict, Generic[SchGen]):\n    tp: type[SchGen]\n    kwds: dict[str, Any]\n\n\nCORE_OVERRIDES: dict[str, OverridesItem[SchemaGenerator]] = {\n    \"PredicateComposition\": OverridesItem(\n        tp=MethodSchemaGenerator, kwds={\"method_code\": DUNDER_PREDICATE_COMPOSITION}\n    )\n}\n\n\nclass FieldSchemaGenerator(SchemaGenerator):\n    schema_class_template = textwrap.dedent(\n        '''\n    @with_property_setters\n    class {classname}(FieldChannelMixin, core.{basename}):\n        \"\"\"{docstring}\"\"\"\n        _class_is_valid_at_instantiation = False\n        _encoding_name = \"{encodingname}\"\n\n        {method_code}\n\n        {init_code}\n    '''\n    )\n    haspropsetters = True\n\n\nclass ValueSchemaGenerator(SchemaGenerator):\n    schema_class_template = textwrap.dedent(\n        '''\n    @with_property_setters\n    class {classname}(ValueChannelMixin, core.{basename}):\n        \"\"\"{docstring}\"\"\"\n        _class_is_valid_at_instantiation = False\n        _encoding_name = \"{encodingname}\"\n\n        {method_code}\n\n        {init_code}\n    '''\n    )\n    haspropsetters = True\n\n\nclass DatumSchemaGenerator(SchemaGenerator):\n    schema_class_template = textwrap.dedent(\n        '''\n    @with_property_setters\n    class {classname}(DatumChannelMixin, core.{basename}):\n        \"\"\"{docstring}\"\"\"\n        _class_is_valid_at_instantiation = False\n        _encoding_name = \"{encodingname}\"\n\n        {method_code}\n\n        {init_code}\n    '''\n    )\n    haspropsetters = True\n\n\nclass ModuleDef(Generic[T]):\n    def __init__(self, contents: T, all: Iterable[str], /) -> None:\n        self.contents: T = contents\n        self.all: list[str] = list(all)\n\n\ndef schema_class(*args, **kwargs) -> str:\n    return SchemaGenerator(*args, **kwargs).schema_class()\n\n\ndef schema_url(version: str = SCHEMA_VERSION) -> str:\n    return SCHEMA_URL_TEMPLATE.format(library=\"vega-lite\", version=version)\n\n\ndef download_schemafile(\n    version: str, schemapath: Path, skip_download: bool = False\n) -> Path:\n    url = schema_url(version=version)\n    schemadir = Path(schemapath)\n    schemadir.mkdir(parents=True, exist_ok=True)\n    fp = schemadir / SCHEMA_FILE\n    if not skip_download:\n        request.urlretrieve(url, fp)\n    elif not fp.exists():\n        msg = f\"Cannot skip download: {fp!s} does not exist\"\n        raise ValueError(msg)\n    return fp\n\n\ndef _vega_lite_props_only(\n    themes: dict[VegaThemes, dict[str, Any]], props: SchemaProperties, /\n) -> Iterator[tuple[VegaThemes, dict[str, Any]]]:\n    \"\"\"\n    Removes properties that are allowed in `Vega` but not `Vega-Lite` from theme definitions.\n\n    Each theme is then nested as ``ThemeConfig[\"config\"] = ...``\n    \"\"\"\n    keep = props.keys()\n    for name, theme_spec in themes.items():\n        yield name, {\"config\": {k: v for k, v in theme_spec.items() if k in keep}}\n\n\ndef update_vega_themes(fp: Path, /, indent: str | int | None = 2) -> None:\n    root = load_schema(fp.parent / SCHEMA_FILE)\n    vl_props = SchemaInfo.from_refname(\"Config\", root).properties\n    themes = dict(_vega_lite_props_only(vlc.get_themes(), vl_props))\n    data = json.dumps(themes, indent=indent, sort_keys=True)\n    fp.write_text(data, encoding=\"utf8\")\n\n    theme_names = sorted(iter(themes))\n    TypeAliasTracer.update_aliases((\"VegaThemes\", spell_literal(theme_names)))\n\n\ndef load_schema(fp: Path, /) -> dict[str, Any]:\n    \"\"\"Reads and returns the root schema from ``fp``.\"\"\"\n    with fp.open(encoding=\"utf8\") as f:\n        root_schema = json.load(f)\n    return root_schema\n\n\ndef load_schema_with_shorthand_properties(fp: Path, /) -> dict[str, Any]:\n    schema = load_schema(fp)\n    encoding_def = \"FacetedEncoding\"\n    encoding = SchemaInfo(schema[\"definitions\"][encoding_def], rootschema=schema)\n    shorthand = {\n        \"anyOf\": [\n            {\"type\": \"string\"},\n            {\"type\": \"array\", \"items\": {\"type\": \"string\"}},\n            {\"$ref\": \"#/definitions/RepeatRef\"},\n        ],\n        \"description\": \"shorthand for field, aggregate, and type\",\n    }\n    for propschema in encoding.properties.values():\n        def_dict = get_field_datum_value_defs(propschema, schema)\n        if field_ref := def_dict.get(\"field\", None):\n            defschema: dict[str, Any] = {\"$ref\": field_ref}\n            defschema = copy.deepcopy(resolve_references(defschema, schema))\n            # For Encoding field definitions, we patch the schema by adding the\n            # shorthand property.\n            defschema[\"properties\"][\"shorthand\"] = shorthand\n            if \"required\" not in defschema:\n                defschema[\"required\"] = [\"shorthand\"]\n            elif \"shorthand\" not in defschema[\"required\"]:\n                defschema[\"required\"].append(\"shorthand\")\n            schema[\"definitions\"][field_ref.split(\"/\")[-1]] = defschema\n    return schema\n\n\ndef copy_schemapi_util() -> None:\n    \"\"\"Copy the schemapi utility into altair/utils/ and its test file to tests/utils/.\"\"\"\n    # copy the schemapi utility file\n    source_fp = Path(__file__).parent / \"schemapi\" / \"schemapi.py\"\n    destination_fp = Path(__file__).parent / \"..\" / \"altair\" / \"utils\" / \"schemapi.py\"\n\n    print(f\"Copying\\n {source_fp!s}\\n  -> {destination_fp!s}\")\n    with (\n        source_fp.open(encoding=\"utf8\") as source,\n        destination_fp.open(\"w\", encoding=\"utf8\") as dest,\n    ):\n        dest.write(HEADER_COMMENT)\n        dest.writelines(chain(source.readlines(), VERSIONS.iter_inline_literal()))\n    ruff.format(destination_fp)\n\n\ndef recursive_dict_update(schema: dict, root: dict, def_dict: dict) -> None:\n    if \"$ref\" in schema:\n        next_schema = resolve_references(schema, root)\n        if \"properties\" in next_schema:\n            definition = schema[\"$ref\"]\n            properties = next_schema[\"properties\"]\n            for k in def_dict:\n                if k in properties:\n                    def_dict[k] = definition\n        else:\n            recursive_dict_update(next_schema, root, def_dict)\n    elif \"anyOf\" in schema:\n        for sub_schema in schema[\"anyOf\"]:\n            recursive_dict_update(sub_schema, root, def_dict)\n\n\ndef get_field_datum_value_defs(\n    propschema: SchemaInfo, root: dict[str, Any]\n) -> dict[_ChannelType, str]:\n    def_dict: dict[_ChannelType, str | None] = dict.fromkeys(\n        (\"field\", \"datum\", \"value\")\n    )\n    _schema = propschema.schema\n    schema = _schema if isinstance(_schema, dict) else dict(_schema)\n    if propschema.is_reference() and \"properties\" in schema:\n        if \"field\" in schema[\"properties\"]:\n            def_dict[\"field\"] = propschema.ref\n        else:\n            msg = \"Unexpected schema structure\"\n            raise ValueError(msg)\n    else:\n        recursive_dict_update(schema, root, def_dict)\n\n    return {i: j for i, j in def_dict.items() if j}\n\n\ndef toposort(graph: dict[str, list[str]]) -> list[str]:\n    \"\"\"\n    Topological sort of a directed acyclic graph.\n\n    Parameters\n    ----------\n    graph : dict of lists\n        Mapping of node labels to list of child node labels.\n        This is assumed to represent a graph with no cycles.\n\n    Returns\n    -------\n    order : list\n        topological order of input graph.\n    \"\"\"\n    # Once we drop support for Python 3.8, this can potentially be replaced\n    # with graphlib.TopologicalSorter from the standard library.\n    stack: list[str] = []\n    visited: dict[str, Literal[True]] = {}\n\n    def visit(nodes):\n        for node in sorted(nodes, reverse=True):\n            if not visited.get(node):\n                visited[node] = True\n                visit(graph.get(node, []))\n                stack.insert(0, node)\n\n    visit(graph)\n    return stack\n\n\ndef generate_vegalite_schema_wrapper(fp: Path, /) -> ModuleDef[str]:\n    \"\"\"Generate a schema wrapper at the given path.\"\"\"\n    # TODO: generate simple tests for each wrapper\n    basename = \"VegaLiteSchema\"\n    rootschema = load_schema_with_shorthand_properties(fp)\n    definitions: dict[str, SchemaGenerator] = {}\n    graph: dict[str, list[str]] = {}\n\n    for name in rootschema[\"definitions\"]:\n        defschema = {\"$ref\": \"#/definitions/\" + name}\n        defschema_repr = {\"$ref\": \"#/definitions/\" + name}\n        name = get_valid_identifier(name)\n        if overrides := CORE_OVERRIDES.get(name):\n            tp = overrides[\"tp\"]\n            kwds = overrides[\"kwds\"]\n        else:\n            tp = SchemaGenerator\n            kwds = {}\n        definitions[name] = tp(\n            name,\n            schema=defschema,\n            schemarepr=defschema_repr,\n            rootschema=rootschema,\n            basename=basename,\n            rootschemarepr=CodeSnippet(f\"{basename}._rootschema\"),\n            **kwds,\n        )\n    for name, schema in definitions.items():\n        graph[name] = []\n        for child_name in schema.subclasses():\n            child_name = get_valid_identifier(child_name)\n            graph[name].append(child_name)\n            child: SchemaGenerator = definitions[child_name]\n            if child.basename == basename:\n                child.basename = [name]\n            else:\n                assert isinstance(child.basename, list)\n                child.basename.append(name)\n\n    # Specify __all__ explicitly so that we can exclude the ones from the list\n    # of exported classes which are also defined in the channels or api modules which takes\n    # precedent in the generated __init__.py files one and two levels up.\n    # Importing these classes from multiple modules confuses type checkers.\n    EXCLUDE = {\"Color\", \"Text\", \"LookupData\", \"Dict\", \"FacetMapping\"}\n    it = (c for c in definitions.keys() - EXCLUDE if not c.startswith(\"_\"))\n    all_ = [*sorted(it), \"Root\", \"VegaLiteSchema\", \"SchemaBase\", \"load_schema\"]\n    contents = [\n        HEADER,\n        \"from typing import Any, Literal, Union\",\n        \"import pkgutil\",\n        \"import json\\n\",\n        \"from altair.utils.schemapi import SchemaBase, Undefined, UndefinedType, _subclasses # noqa: F401\\n\",\n        import_type_checking(\n            \"from collections.abc import Iterator, Sequence\",\n            \"from datetime import date, datetime\",\n            \"from altair import Parameter\",\n            \"from altair.typing import Optional\",\n            f\"from altair.vegalite.v6.api import {CHART_DATA_TYPE}\",\n            \"from ._typing import * # noqa: F403\",\n        ),\n        f\"\\n__all__ = {all_}\\n\",\n        LOAD_SCHEMA.format(schemafile=SCHEMA_FILE),\n        BASE_SCHEMA.format(basename=basename),\n        schema_class(\n            \"Root\",\n            schema=rootschema,\n            basename=basename,\n            schemarepr=CodeSnippet(f\"{basename}._rootschema\"),\n        ),\n    ]\n\n    for name in toposort(graph):\n        contents.append(definitions[name].schema_class())\n\n    contents.append(\"\")  # end with newline\n    return ModuleDef(\"\\n\".join(contents), all_)\n\n\n@dataclass\nclass ChannelInfo:\n    supports_arrays: bool\n    deep_description: str\n    field_class_name: str\n    datum_class_name: str | None = None\n    value_class_name: str | None = None\n\n    @property\n    def is_field_only(self) -> bool:\n        return not (self.datum_class_name or self.value_class_name)\n\n    @property\n    def all_names(self) -> Iterator[str]:\n        \"\"\"All channels are expected to have a field class.\"\"\"\n        yield self.field_class_name\n        yield from self.non_field_names\n\n    @property\n    def non_field_names(self) -> Iterator[str]:\n        if self.is_field_only:\n            yield from ()\n        else:\n            if self.datum_class_name:\n                yield self.datum_class_name\n            if self.value_class_name:\n                yield self.value_class_name\n\n\ndef generate_vegalite_channel_wrappers(fp: Path, /) -> ModuleDef[list[str]]:\n    schema = load_schema_with_shorthand_properties(fp)\n    encoding_def = \"FacetedEncoding\"\n    encoding = SchemaInfo(schema[\"definitions\"][encoding_def], rootschema=schema)\n    channel_infos: dict[str, ChannelInfo] = {}\n    class_defs: list[Any] = []\n\n    for prop, propschema in encoding.properties.items():\n        def_dict = get_field_datum_value_defs(propschema, schema)\n        supports_arrays = any(\n            schema_info.is_array() for schema_info in propschema.anyOf\n        )\n        classname: str = prop[0].upper() + prop[1:]\n        channel_info = ChannelInfo(\n            supports_arrays=supports_arrays,\n            deep_description=propschema.deep_description,\n            field_class_name=classname,\n        )\n\n        for encoding_spec, definition in def_dict.items():\n            basename = definition.rsplit(\"/\", maxsplit=1)[-1]\n            basename = get_valid_identifier(basename)\n\n            gen: SchemaGenerator\n            defschema = {\"$ref\": definition}\n            kwds: dict[str, Any] = {\n                \"basename\": basename,\n                \"schema\": defschema,\n                \"rootschema\": schema,\n                \"encodingname\": prop,\n            }\n            if encoding_spec == \"field\":\n                gen = FieldSchemaGenerator(classname, nodefault=[], **kwds)\n            elif encoding_spec == \"datum\":\n                temp_name = f\"{classname}Datum\"\n                channel_info.datum_class_name = temp_name\n                gen = DatumSchemaGenerator(temp_name, nodefault=[\"datum\"], **kwds)\n            elif encoding_spec == \"value\":\n                temp_name = f\"{classname}Value\"\n                channel_info.value_class_name = temp_name\n                gen = ValueSchemaGenerator(temp_name, nodefault=[\"value\"], **kwds)\n            else:\n                raise NotImplementedError\n\n            class_defs.append(gen.schema_class())\n\n        channel_infos[prop] = channel_info\n\n    # NOTE: See https://github.com/vega/altair/pull/3482#issuecomment-2241577342\n    COMPAT_EXPORTS = (\n        \"DatumChannelMixin\",\n        \"FieldChannelMixin\",\n        \"ValueChannelMixin\",\n        \"with_property_setters\",\n    )\n    it = chain.from_iterable(info.all_names for info in channel_infos.values())\n    all_ = sorted(chain(it, COMPAT_EXPORTS))\n    imports = [\n        \"import sys\",\n        \"from typing import Any, overload, Literal, Union, TypedDict\",\n        \"import narwhals.stable.v1 as nw\",\n        \"from altair.utils import infer_encoding_types as _infer_encoding_types\",\n        \"from altair.utils import parse_shorthand\",\n        \"from altair.utils.schemapi import Undefined, with_property_setters\",\n        \"from . import core\",\n        \"from ._typing import * # noqa: F403\",\n    ]\n    TYPING_CORE = (\n        DATETIME,\n        TIME_UNIT_PARAMS,\n        SCALE,\n        AXIS,\n        LEGEND,\n        REPEAT_REF,\n        HEADER_COLUMN,\n        ENCODING_SORT_FIELD,\n    )\n    TYPING_API = INTO_CONDITION, BIN, IMPUTE\n    contents: list[str] = [\n        HEADER,\n        CHANNEL_MYPY_IGNORE_STATEMENTS,\n        *imports,\n        import_type_checking(\n            \"from collections.abc import Sequence\",\n            \"from altair import Parameter, SchemaBase\",\n            \"from altair.typing import Optional\",\n            f\"from altair.vegalite.v6.schema.core import {', '.join(TYPING_CORE)}\",\n            f\"from altair.vegalite.v6.api import {', '.join(TYPING_API)}\",\n            \"from typing import TypeAlias\",\n            textwrap.indent(import_typing_extensions((3, 11), \"Self\"), \"    \"),\n        ),\n        f\"\\n__all__ = {all_}\\n\",\n        CHANNEL_MIXINS,\n        *class_defs,\n        *generate_encoding_artifacts(\n            channel_infos, ENCODE_METHOD, facet_encoding=encoding\n        ),\n    ]\n    return ModuleDef(contents, all_)\n\n\ndef generate_vegalite_mark_mixin(fp: Path, /, markdefs: dict[str, str]) -> str:\n    schema = load_schema(fp)\n    code: list[str] = []\n\n    it_dummy = (\n        SchemaGenerator(\n            classname=f\"_{mark_def}\",\n            schema={\"$ref\": \"#/definitions/\" + mark_def},\n            rootschema=schema,\n            schemarepr={\"$ref\": \"#/definitions/\" + mark_def},\n            exclude_properties={\"type\"},\n            summary=f\"{mark_def} schema wrapper.\",\n            annotate_kwds_flag=True,  # add Any type annotation to **kwds\n        ).schema_class()\n        for mark_def in markdefs.values()\n    )\n\n    for mark_enum, mark_def in markdefs.items():\n        _def = schema[\"definitions\"][mark_enum]\n        marks: list[Any] = _def[\"enum\"] if \"enum\" in _def else [_def[\"const\"]]\n\n        for mark in marks:\n            # TODO: only include args relevant to given type?\n            mark_method = MARK_METHOD.format(\n                decorator=f\"_{mark_def}\", mark=mark, mark_def=mark_def\n            )\n            code.append(\"\\n    \".join(mark_method.splitlines()))\n\n    return \"\\n\".join(chain(it_dummy, [MARK_MIXIN.format(methods=\"\\n\".join(code))]))\n\n\ndef generate_typed_dict(\n    info: SchemaInfo,\n    name: str,\n    *,\n    summary: str | None = None,\n    groups: Iterable[str] | AttrGetter[ArgInfo, set[str]] = arg_required_kwds,\n    exclude: str | Iterable[str] | None = None,\n    override_args: Iterable[str] | None = None,\n) -> str:\n    \"\"\"\n    Return a fully typed & documented ``TypedDict``.\n\n    Parameters\n    ----------\n    info\n        JSON Schema wrapper.\n    name\n        Full target class name.\n        Include a pre/post-fix if ``SchemaInfo.title`` already exists.\n    summary\n        When provided, used instead of generated summary line.\n    groups\n        A subset of ``ArgInfo``, or a callable that can derive one.\n    exclude\n        Property name(s) to omit if they appear during iteration.\n    override_args\n        When provided, used instead of any ``ArgInfo`` related handling.\n\n        .. note::\n            See ``EncodeKwds``.\n\n    Notes\n    -----\n    - Internally handles keys that are not valid python identifiers\n    - The union of their types will be added to ``__extra_items__``\n    \"\"\"\n    TARGET: Literal[\"annotation\"] = \"annotation\"\n    arg_info = codegen.get_args(info)\n    metaclass_kwds = \", total=False\"\n    comment = \"\"\n    args_it: Iterable[str] = (\n        (\n            f\"{p}: {p_info.to_type_repr(target=TARGET, use_concrete=True)}\"\n            for p, p_info in arg_info.iter_args(groups, exclude=exclude)\n        )\n        if override_args is None\n        else override_args\n    )\n    args = \"\\n    \".join(args_it)\n    doc = indent_docstring(\n        chain.from_iterable(\n            (p, f\"    {p_info.deep_description}\")\n            for p, p_info in arg_info.iter_args(groups, exclude=exclude)\n        ),\n        indent_level=4,\n    )\n    # NOTE: The RHS eager eval is used to skip `invalid_kwds`,\n    # if they have been marked for exclusion\n    if (kwds := arg_info.invalid_kwds) and list(\n        arg_info.iter_args(kwds, exclude=exclude)\n    ):\n        metaclass_kwds = f\", closed=True{metaclass_kwds}\"\n        comment = \"  # type: ignore[call-arg]\"\n        kwds_all_tps = chain.from_iterable(\n            info.to_type_repr(as_str=False, target=TARGET, use_concrete=True)\n            for _, info in arg_info.iter_args(kwds, exclude=exclude)\n        )\n        args = (\n            f\"{args}\\n    \"\n            f\"__extra_items__: {finalize_type_reprs(kwds_all_tps, target=TARGET)}\"\n        )\n        doc = f\"{doc}\\n{EXTRA_ITEMS_MESSAGE.format(invalid_kwds=repr(sorted(kwds)))}\"\n\n    return UNIVERSAL_TYPED_DICT.format(\n        name=name,\n        metaclass_kwds=metaclass_kwds,\n        comment=comment,\n        summary=(summary or f\":class:`altair.{info.title}` ``TypedDict`` wrapper.\"),\n        doc=doc,\n        td_args=args,\n    )\n\n\ndef generate_config_typed_dicts(fp: Path, /) -> Iterator[str]:\n    KWDS: Literal[\"Kwds\"] = \"Kwds\"\n    CONFIG: Literal[\"Config\"] = \"Config\"\n    TOP_LEVEL: Literal[\"TopLevelUnitSpec\"] = \"TopLevelUnitSpec\"\n    TOP_LEVEL_EXTRAS = (\n        \"Step\",\n        \"Projection\",\n        \"Resolve\",\n        \"TitleParams\",\n        \"ViewBackground\",\n    )\n    TOP_LEVEL_EXCLUDE = {\"$schema\", \"data\", \"datasets\", \"encoding\", \"transform\"}\n    root = load_schema(fp)\n    config = SchemaInfo.from_refname(CONFIG, root)\n    theme_targets = find_theme_config_targets(config)\n    for name in TOP_LEVEL_EXTRAS:\n        theme_targets.update(\n            find_theme_config_targets(SchemaInfo.from_refname(name, root))\n        )\n\n    relevant: dict[str, SchemaInfo] = {\n        x.title: x for x in sorted(theme_targets, key=attrgetter(\"refname\"))\n    }\n\n    SchemaInfo._remap_title.update(\n        {\"HexColor\": (\"ColorHex\",), \"Padding\": (\"float\", PADDING_KWDS)}\n    )\n    SchemaInfo._remap_title.update((k, (f\"{k}{KWDS}\",)) for k in relevant)\n    config_sub: Iterator[str] = (\n        generate_typed_dict(info, name=f\"{info.title}{KWDS}\")\n        for info in relevant.values()\n    )\n    config_sub_names = (f\"{nm}{KWDS}\" for nm in relevant)\n    yield f\"__all__ = {[*config_sub_names, PADDING_KWDS, ROW_COL_KWDS, THEME_CONFIG]}\\n\\n\"\n    yield \"\\n\".join(config_sub)\n    yield generate_typed_dict(\n        SchemaInfo.from_refname(TOP_LEVEL, root),\n        THEME_CONFIG,\n        summary=THEME_CONFIG_SUMMARY,\n        groups=arg_kwds,\n        exclude=TOP_LEVEL_EXCLUDE,\n    )\n\n\ndef find_theme_config_targets(info: SchemaInfo, depth: int = 0, /) -> set[SchemaInfo]:\n    \"\"\"Equivalent to `get_all_objects`.\"\"\"\n    MAX_DEPTH = 6\n    seen: set[SchemaInfo] = set()\n    if info.is_theme_config_target() and info not in seen:\n        seen.add(info)\n    if depth < MAX_DEPTH:\n        for prop_info in info.iter_descendants():\n            seen.update(find_theme_config_targets(prop_info, depth + 1))\n    return seen\n\n\ndef generate_vegalite_config_mixin(fp: Path, /) -> str:\n    class_name = \"ConfigMethodMixin\"\n    CONFIG: Literal[\"Config\"] = \"Config\"\n    code = [\n        f\"class {class_name}:\",\n        '    \"\"\"A mixin class that defines config methods\"\"\"',\n    ]\n    info = SchemaInfo.from_refname(CONFIG, rootschema=load_schema(fp))\n\n    # configure() method\n    method = CONFIG_METHOD.format(classname=CONFIG, method=\"configure\")\n    code.append(\"\\n    \".join(method.splitlines()))\n\n    # configure_prop() methods\n    for prop, prop_info in info.properties.items():\n        classname = prop_info.refname\n        if classname and classname.endswith(CONFIG):\n            method = CONFIG_PROP_METHOD.format(classname=classname, prop=prop)\n            code.append(\"\\n    \".join(method.splitlines()))\n    return \"\\n\".join(code)\n\n\ndef generate_schema__init__(\n    *modules: str,\n    package: str,\n    expand: dict[Path, ModuleDef[Any]] | None = None,\n) -> Iterator[str]:\n    \"\"\"\n    Generate schema subpackage init contents.\n\n    Parameters\n    ----------\n    *modules\n        Module names to expose, in addition to their members::\n\n            ...schema.__init__.__all__ = [\n                ...,\n                module_1.__name__,\n                module_1.__all__,\n                module_2.__name__,\n                module_2.__all__,\n                ...,\n            ]\n    package\n        Absolute, dotted path for `schema`, e.g::\n\n            \"altair.vegalite.v6.schema\"\n    expand\n        Required for 2nd-pass, which explicitly defines the new ``__all__``, using newly generated names.\n\n        .. note::\n            The default `import idiom`_ works at runtime, and for ``pyright`` - but not ``mypy``.\n            See `issue`_.\n\n    .. _import idiom:\n        https://typing.readthedocs.io/en/latest/spec/distributing.html#library-interface-public-and-private-symbols\n    .. _issue:\n        https://github.com/python/mypy/issues/15300\n    \"\"\"\n    yield f\"# ruff: noqa: F403, F405\\n{HEADER_COMMENT}\"\n    yield f\"from {package} import {', '.join(modules)}\"\n    yield from (f\"from {package}.{mod} import *\" for mod in modules)\n    yield f\"SCHEMA_VERSION = {SCHEMA_VERSION!r}\\n\"\n    yield f\"SCHEMA_URL = {schema_url()!r}\\n\"\n    base_all: list[str] = [\"SCHEMA_URL\", \"SCHEMA_VERSION\", *modules]\n    if expand:\n        base_all.extend(\n            chain.from_iterable(v.all for k, v in expand.items() if k.stem in modules)\n        )\n        yield f\"__all__ = {base_all}\"\n    else:\n        yield f\"__all__ = {base_all}\"\n        yield from (f\"__all__ += {mod}.__all__\" for mod in modules)\n\n\ndef path_to_module_str(\n    fp: Path,\n    /,\n    root: Literal[\"altair\", \"doc\", \"sphinxext\", \"tests\", \"tools\"] = \"altair\",\n) -> str:\n    # NOTE: GH runner has 3x altair, local is 2x\n    # - Needs to be the last occurrence\n    idx = fp.parts.index(root)\n    start = idx + fp.parts.count(root) - 1 if root == \"altair\" else idx\n    parents = fp.parts[start:-1]\n    return \".\".join(parents if fp.stem == \"__init__\" else (*parents, fp.stem))\n\n\ndef vegalite_main(skip_download: bool = False) -> None:\n    version = SCHEMA_VERSION\n    vn = version.split(\".\")[0]\n    fp = (Path(__file__).parent / \"..\" / \"altair\" / \"vegalite\" / vn).resolve()\n    schemapath = fp / \"schema\"\n    schemafile = download_schemafile(\n        version=version,\n        schemapath=schemapath,\n        skip_download=skip_download,\n    )\n\n    fp_themes = schemapath / THEMES_FILE\n    print(f\"Updating themes\\n {schemafile!s}\\n  ->{fp_themes!s}\")\n    update_vega_themes(fp_themes)\n\n    # Generate __init__.py file\n    outfile = schemapath / \"__init__.py\"\n    pkg_schema = path_to_module_str(outfile)\n    print(f\"Writing {outfile!s}\")\n    ruff.write_lint_format(\n        outfile, generate_schema__init__(\"channels\", \"core\", package=pkg_schema)\n    )\n\n    TypeAliasTracer.update_aliases((\"Map\", \"Mapping[str, Any]\"))\n\n    files: dict[Path, str | Iterable[str]] = {}\n    modules: dict[Path, ModuleDef[Any]] = {}\n\n    # Generate the core schema wrappers\n    fp_core = schemapath / \"core.py\"\n    print(f\"Generating\\n {schemafile!s}\\n  ->{fp_core!s}\")\n    modules[fp_core] = generate_vegalite_schema_wrapper(schemafile)\n    files[fp_core] = modules[fp_core].contents\n\n    # Generate the channel wrappers\n    fp_channels = schemapath / \"channels.py\"\n    print(f\"Generating\\n {schemafile!s}\\n  ->{fp_channels!s}\")\n    with RemapContext(\n        {DATETIME: (TEMPORAL, DATETIME), BIN_PARAMS: (BIN,), IMPUTE_PARAMS: (IMPUTE,)}\n    ):\n        modules[fp_channels] = generate_vegalite_channel_wrappers(schemafile)\n    files[fp_channels] = modules[fp_channels].contents\n\n    # Expand `schema.__init__.__all__` with new classes\n    ruff.write_lint_format(\n        outfile,\n        generate_schema__init__(\"channels\", \"core\", package=pkg_schema, expand=modules),\n    )\n\n    # generate the mark mixin\n    markdefs = {k: f\"{k}Def\" for k in [\"Mark\", \"BoxPlot\", \"ErrorBar\", \"ErrorBand\"]}\n    fp_mixins = schemapath / \"mixins.py\"\n    print(f\"Generating\\n {schemafile!s}\\n  ->{fp_mixins!s}\")\n    mixins_imports = (\n        \"from typing import Any, Literal, Union\",\n        \"from altair.utils import use_signature, Undefined, SchemaBase\",\n        \"from . import core\",\n    )\n\n    mark_mixin = generate_vegalite_mark_mixin(schemafile, markdefs)\n    config_mixin = generate_vegalite_config_mixin(schemafile)\n    content_mixins = [\n        HEADER,\n        \"\\n\\n\",\n        \"\\n\".join(mixins_imports),\n        \"\\n\\n\",\n        import_type_checking(\n            \"import sys\",\n            \"from collections.abc import Sequence\",\n            textwrap.indent(import_typing_extensions((3, 11), \"Self\"), \"    \"),\n            \"from altair.typing import Optional\",\n            \"from ._typing import * # noqa: F403\",\n            \"from altair import Parameter\",\n        ),\n        \"\\n\\n\\n\",\n        mark_mixin,\n        \"\\n\\n\\n\",\n        config_mixin,\n    ]\n    files[fp_mixins] = content_mixins\n\n    # Generate theme-related Config hierarchy of TypedDict\n    fp_theme_config: Path = schemapath / \"_config.py\"\n    content_theme_config = [\n        HEADER,\n        \"from typing import Any, Literal, TypedDict, Union\",\n        \"import sys\",\n        f\"from ._typing import {ROW_COL_KWDS}, {PADDING_KWDS}\",\n        import_type_checking(\n            \"from collections.abc import Sequence\",\n            \"from ._typing import * # noqa: F403\",\n        ),\n        import_typing_extensions((3, 15), \"TypedDict\"),\n        \"\\n\\n\",\n        *generate_config_typed_dicts(schemafile),\n    ]\n    files[fp_theme_config] = content_theme_config\n\n    # Write `_typing.py` TypeAlias, for import in generated modules\n    fp_typing = schemapath / \"_typing.py\"\n    msg = (\n        f\"Generating\\n {schemafile!s}\\n  ->{fp_typing!s}\\n\"\n        f\"Tracer cache collected {TypeAliasTracer.n_entries!r} entries.\"\n    )\n    print(msg)\n    TypeAliasTracer.write_module(\n        fp_typing,\n        \"OneOrSeq\",\n        \"Value\",\n        \"ColorHex\",\n        \"is_color_hex\",\n        ROW_COL_KWDS,\n        PADDING_KWDS,\n        TEMPORAL,\n        header=HEADER,\n        extra=TYPING_EXTRA,\n    )\n    # Write the pre-generated modules\n    for fp, contents in files.items():\n        print(f\"Writing\\n {schemafile!s}\\n  ->{fp!s}\")\n        ruff.write_lint_format(fp, contents)\n\n\ndef generate_encoding_artifacts(\n    channel_infos: dict[str, ChannelInfo],\n    fmt_method: str,\n    *,\n    facet_encoding: SchemaInfo,\n) -> Iterator[str]:\n    \"\"\"\n    Generate ``Chart.encode()`` and related typing structures.\n\n    - `TypeAlias`(s) for each parameter to ``Chart.encode()``\n    - Mixin class that provides the ``Chart.encode()`` method\n    - `TypedDict`, utilising/describing these structures as part of https://github.com/pola-rs/polars/pull/17995.\n\n    Notes\n    -----\n    - `Map`/`Dict` stands for the return types of `alt.(datum|value)`, and any encoding channel class.\n        - See discussions in https://github.com/vega/altair/pull/3208\n    - We could be more specific about what types are accepted in the `List`\n        - but this translates poorly to an IDE\n        - `info.supports_arrays`\n    \"\"\"\n    PREFIX_INTERNAL = \"Any\"\n    PREFIX_EXPORT = \"Channel\"\n    signature_args: list[str] = []\n    internal_aliases: list[str] = []\n    export_aliases: list[str] = []\n    typed_dict_args: list[str] = []\n    signature_doc_params: list[str] = [\"\", \"Parameters\", \"----------\"]\n\n    for channel, info in channel_infos.items():\n        channel_name = f\"{channel[0].upper()}{channel[1:]}\"\n\n        names = list(info.all_names)\n        it_rst_names: Iterator[str] = (rst_syntax_for_class(c) for c in info.all_names)\n\n        docstring_types: list[str] = [\"str\", next(it_rst_names), \"Dict\"]\n        if len(names) > 1:\n            # NOTE: Another level of internal aliases are generated, for channels w/ 2-3 types.\n            # These are represent only types defined in `channels.py` and not the full range accepted.\n            any_name = f\"{PREFIX_INTERNAL}{channel_name}\"\n            internal_aliases.append(\n                f\"{any_name}: TypeAlias = Union[{', '.join(names)}]\"\n            )\n            tp_inner: str = \", \".join((\"str\", any_name, f\"{INTO_CONDITION!r}\", \"Map\"))\n        else:\n            tp_inner = \", \".join((\"str\", names[0], f\"{INTO_CONDITION!r}\", \"Map\"))\n\n        tp_inner = f\"Union[{tp_inner}]\"\n\n        if info.supports_arrays:\n            docstring_types.append(\"List\")\n            tp_inner = f\"OneOrSeq[{tp_inner}]\"\n\n        doc_types_flat: str = \", \".join(chain(docstring_types, it_rst_names))\n\n        export_aliases.append(f\"{PREFIX_EXPORT}{channel_name}: TypeAlias = {tp_inner}\")\n        # We use the full type hints instead of the alias in the signatures below\n        # as IDEs such as VS Code would else show the name of the alias instead\n        # of the expanded full type hints. The later are more useful to users.\n        typed_dict_args.append(f\"{channel}: {tp_inner}\")\n        signature_args.append(f\"{channel}: Optional[{tp_inner}] = Undefined\")\n\n        description: str = f\"    {info.deep_description}\"\n\n        signature_doc_params.extend((f\"{channel} : {doc_types_flat}\", description))\n\n    method: str = fmt_method.format(\n        method_args=\", \".join(signature_args),\n        docstring=indent_docstring(signature_doc_params, indent_level=8, lstrip=False),\n        dict_literal=\"{\" + \", \".join(f\"{kwd!r}:{kwd}\" for kwd in channel_infos) + \"}\",\n    )\n    typed_dict = generate_typed_dict(\n        facet_encoding,\n        ENCODE_KWDS,\n        summary=ENCODE_KWDS_SUMMARY,\n        override_args=typed_dict_args,\n    )\n    artifacts: Iterable[str] = (\n        *internal_aliases,\n        \"\",\n        *export_aliases,\n        method,\n        typed_dict,\n    )\n    yield from artifacts\n\n\ndef main() -> None:\n    from tools import datasets\n\n    parser = argparse.ArgumentParser(\n        prog=\"generate_schema_wrapper.py\", description=\"Generate the Altair package.\"\n    )\n    parser.add_argument(\n        \"--skip-download\", action=\"store_true\", help=\"skip downloading schema files\"\n    )\n    args = parser.parse_args()\n    VERSIONS.update_all()\n    copy_schemapi_util()\n    vegalite_main(args.skip_download)\n    write_expr_module(VERSIONS.vlc_vega, output=EXPR_FILE, header=HEADER_COMMENT)\n    datasets.app.refresh(VERSIONS[\"vega-datasets\"], include_typing=True)\n\n    # The modules below are imported after the generation of the new schema files\n    # as these modules import Altair. This allows them to use the new changes\n    from tools import generate_api_docs, update_init_file\n\n    generate_api_docs.write_api_file()\n    update_init_file.update__all__variable()\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "tools/markup.py",
    "content": "\"\"\"Tools for working with formats like ``.md``, ``.rst``.\"\"\"\n\nfrom __future__ import annotations\n\nimport re\nfrom html import unescape\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Literal\nfrom urllib import request\n\nimport mistune.util\nfrom mistune import InlineParser as _InlineParser\nfrom mistune import Markdown as _Markdown\nfrom mistune.renderers.rst import RSTRenderer as _RSTRenderer\n\nif TYPE_CHECKING:\n    from collections.abc import Iterable\n    from re import Pattern\n    from typing import TypeAlias\n\n    from mistune import BaseRenderer, BlockParser, BlockState, InlineState\n\n    Url: TypeAlias = str\n\nToken: TypeAlias = \"dict[str, Any]\"\n\n_RE_LINK: Pattern[str] = re.compile(r\"(?<=\\[)([^\\]]+)(?=\\]\\([^\\)]+\\))\", re.MULTILINE)\n_RE_SPECIAL: Pattern[str] = re.compile(r\"[*_]{2,3}|`\", re.MULTILINE)\n_RE_LIQUID_INCLUDE: Pattern[str] = re.compile(r\"( \\{% include.+%\\})\")\n\n\n_PRE_PARSE_REPLACEMENTS: tuple[str, str] = (\n    \"https://en.wikipedia.org/wiki/Uniform_distribution_(continuous)\",\n    \"https://en.wikipedia.org/wiki/Continuous_uniform_distribution\",\n)\n\"\"\"\nReplacement to apply *prior* to parsing as markdown.\n\n**HACK**: Closing parenthesis messes up markdown parsing, replace with resolved redirect wikipedia URL.\n\nTODO\n----\nRemove if this gets fixed upstream, via https://github.com/vega/vega/pull/3996\n\"\"\"\n\n\nclass RSTRenderer(_RSTRenderer):\n    def __init__(self) -> None:\n        super().__init__()\n\n    def inline_html(self, token: Token, state: BlockState) -> str:\n        html = token[\"raw\"]\n        if html == \"<br/>\":\n            return \"\\n\"\n        # HACK: https://github.com/vega/altair/pull/3787#discussion_r1939885356\n        elif re.match(r\"<span style=\\\"color: #.+;\\\">\", (html)) or html == \"</span>\":\n            return \"\"\n        else:\n            return rf\" :raw-html:`{html}` \"\n\n\nclass RSTParse(_Markdown):\n    \"\"\"\n    Minor extension to support partial `ast`_ conversion.\n\n    Only need to convert the docstring tokens to `.rst`.\n\n    .. _ast:\n        https://mistune.lepture.com/en/latest/guide.html#abstract-syntax-tree\n    \"\"\"\n\n    def __init__(\n        self,\n        renderer: BaseRenderer | Literal[\"ast\"] | None,\n        block: BlockParser | None = None,\n        inline: _InlineParser | None = None,\n        plugins=None,\n    ) -> None:\n        if renderer == \"ast\":\n            renderer = None\n        super().__init__(renderer, block, inline, plugins)\n\n    def __call__(self, s: str) -> str:\n        r = super().__call__(s)\n        if isinstance(r, str):\n            return unescape(r).replace(r\"\\ ,\", \",\").replace(r\"\\ \", \" \")\n        msg = f\"Expected `str` but got {type(r).__name__!r}\"\n        raise TypeError(msg)\n\n    def render_tokens(self, tokens: Iterable[Token], /) -> str:\n        \"\"\"\n        Render ast tokens originating from another parser.\n\n        Parameters\n        ----------\n        tokens\n            All tokens will be rendered into a single `.rst` string\n        \"\"\"\n        if self.renderer is None:\n            msg = \"Unable to render tokens without a renderer.\"\n            raise TypeError(msg)\n        state = self.block.state_cls()\n        s = self.renderer(self._iter_render(tokens, state), state)\n        return mistune.util.unescape(s)\n\n\nclass RSTParseVegaLite(RSTParse):\n    def __init__(\n        self,\n        renderer: RSTRenderer | None = None,\n        block: BlockParser | None = None,\n        inline: _InlineParser | None = None,\n        plugins=None,\n    ) -> None:\n        super().__init__(renderer or RSTRenderer(), block, inline, plugins)\n\n    def __call__(self, s: str) -> str:\n        # remove formatting from links\n        description = \"\".join(\n            _RE_SPECIAL.sub(\"\", d) if i % 2 else d\n            for i, d in enumerate(_RE_LINK.split(s))\n        )\n        # NOTE: Some entries in the Vega-Lite schema miss the second occurrence of '__'\n        # (Needs to happen pre-parse to convert into `**Default value:**` for `.rst`)\n        description = description.replace(\"__Default value: \", \"__Default value:__ \")\n\n        description = super().__call__(description)\n        # Links to the vega-lite documentation cannot be relative but instead need to\n        # contain the full URL.\n        description = description.replace(\n            \"types#datetime\", \"https://vega.github.io/vega-lite/docs/datetime.html\"\n        )\n        # Fixing ambiguous unicode, RUF001 produces RUF002 in docs\n        description = description.replace(\"’\", \"'\")  # noqa: RUF001 [RIGHT SINGLE QUOTATION MARK]\n        description = description.replace(\"–\", \"-\")  # noqa: RUF001 [EN DASH]\n        description = description.replace(\" \", \" \")  # noqa: RUF001 [NO-BREAK SPACE]\n\n        # Fixing `codespan` followed by a non-whitespace character\n        description = description.replace(\"``aggregate``d\", \"aggregated\").replace(\n            '``\"extent\"``s', \"extents\"\n        )\n        # HACK: https://github.com/vega/altair/pull/3787#discussion_r1939885356\n        description = description.replace(\"■ \", \"\")\n        return description.strip()\n\n\nclass InlineParser(_InlineParser):\n    def __init__(self, hard_wrap: bool = False) -> None:\n        super().__init__(hard_wrap)\n\n    def process_text(self, text: str, state: InlineState) -> None:\n        \"\"\"\n        Removes `liquid`_ templating markup.\n\n        .. _liquid:\n            https://shopify.github.io/liquid/\n        \"\"\"\n        state.append_token({\"type\": \"text\", \"raw\": _RE_LIQUID_INCLUDE.sub(r\"\", text)})\n\n\ndef read_ast_tokens(source: Url | Path, /) -> list[Token]:\n    \"\"\"\n    Read from ``source``, drop ``BlockState``.\n\n    Factored out to provide accurate typing.\n    \"\"\"\n    markdown = _Markdown(renderer=None, inline=InlineParser())\n    if isinstance(source, Path):\n        text = source.read_text()\n    else:\n        with request.urlopen(source) as response:\n            text = response.read().decode(\"utf-8\")\n\n    text = text.replace(*_PRE_PARSE_REPLACEMENTS)\n    tokens: Any = markdown.parse(text)\n    return tokens[0]\n\n\ndef rst_syntax_for_class(class_name: str) -> str:\n    return f\":class:`{class_name}`\"\n"
  },
  {
    "path": "tools/schemapi/__init__.py",
    "content": "\"\"\"schemapi: tools for generating Python APIs from JSON schemas.\"\"\"\n\nfrom tools.schemapi import codegen, utils\nfrom tools.schemapi.codegen import (\n    CodeSnippet,\n    arg_invalid_kwds,\n    arg_kwds,\n    arg_required_kwds,\n)\nfrom tools.schemapi.schemapi import SchemaBase, Undefined\nfrom tools.schemapi.utils import OneOrSeq, SchemaInfo\nfrom tools.vega_expr import write_expr_module\n\n__all__ = [\n    \"CodeSnippet\",\n    \"OneOrSeq\",\n    \"SchemaBase\",\n    \"SchemaInfo\",\n    \"Undefined\",\n    \"arg_invalid_kwds\",\n    \"arg_kwds\",\n    \"arg_required_kwds\",\n    \"codegen\",\n    \"utils\",\n    \"write_expr_module\",\n]\n"
  },
  {
    "path": "tools/schemapi/codegen.py",
    "content": "\"\"\"Code generation utilities.\"\"\"\n\nfrom __future__ import annotations\n\nimport re\nimport sys\nimport textwrap\nfrom collections.abc import Callable, Iterable, Iterator\nfrom dataclasses import dataclass\nfrom itertools import chain, starmap\nfrom operator import attrgetter\nfrom typing import Any, ClassVar, Final, Literal, TypeVar, Union\n\nfrom .utils import (\n    Grouped,\n    SchemaInfo,\n    indent_docstring,\n    is_valid_identifier,\n    process_description,\n)\n\nif sys.version_info >= (3, 12):\n    from typing import TypeAliasType\nelse:\n    from typing_extensions import TypeAliasType\n\n\nT1 = TypeVar(\"T1\")\nT2 = TypeVar(\"T2\")\nAttrGetter = TypeAliasType(\n    \"AttrGetter\", Callable[[T1], Union[T2, \"tuple[T2, ...]\"]], type_params=(T1, T2)\n)\n\"\"\"\nIntended to model the signature of ``operator.attrgetter``.\n\nSpelled more generically to support future extension.\n\"\"\"\n\nANON: Literal[\"_\"] = \"_\"\nDOUBLESTAR_ARGS: Literal[\"**kwds\"] = \"**kwds\"\nPOS_ONLY: Literal[\"/\"] = \"/\"\nKWD_ONLY: Literal[\"*\"] = \"*\"\n\n\nclass CodeSnippet:\n    \"\"\"Object whose repr() is a string of code.\"\"\"\n\n    def __init__(self, code: str):\n        self.code = code\n\n    def __repr__(self) -> str:\n        return self.code\n\n\n@dataclass\nclass ArgInfo:\n    nonkeyword: bool\n    required: set[str]\n    kwds: set[str]\n    invalid_kwds: set[str]\n    additional: bool\n    schema_info: SchemaInfo\n\n    def iter_args(\n        self,\n        group: Iterable[str] | AttrGetter[ArgInfo, set[str]],\n        *more_groups: Iterable[str] | AttrGetter[ArgInfo, set[str]],\n        exclude: str | Iterable[str] | None = None,\n    ) -> Iterator[tuple[str, SchemaInfo]]:\n        r\"\"\"\n        Yields (property_name, property_info).\n\n        Useful for signatures and docstrings.\n\n        Parameters\n        ----------\n        group, \\*more_groups\n            Each group will independently sorted, and chained.\n        exclude\n            Property name(s) to omit if they appear during iteration.\n        \"\"\"\n        props = self.schema_info.properties\n        it = chain.from_iterable(\n            sorted(g) for g in self._normalize_groups(group, *more_groups)\n        )\n        if exclude is not None:\n            exclude = {exclude} if isinstance(exclude, str) else set(exclude)\n            for p in it:\n                if p not in exclude:\n                    yield p, props[p]\n        else:\n            for p in it:\n                yield p, props[p]\n\n    def _normalize_groups(\n        self, *groups: Iterable[str] | AttrGetter[ArgInfo, set[str]]\n    ) -> Iterator[set[str]]:\n        for group in groups:\n            if isinstance(group, set):\n                yield group\n            elif isinstance(group, Iterable):\n                yield set(group)\n            elif callable(group):\n                result = group(self)\n                if isinstance(result, set):\n                    yield result\n                else:\n                    yield from result\n            else:\n                msg = (\n                    f\"Expected all cases to be reducible to a `set[str]`,\"\n                    f\" but got {type(group).__name__!r}\"\n                )\n                raise TypeError(msg)\n\n\narg_required_kwds: AttrGetter[ArgInfo, set[str]] = attrgetter(\"required\", \"kwds\")\narg_invalid_kwds: AttrGetter[ArgInfo, set[str]] = attrgetter(\"invalid_kwds\")\narg_kwds: AttrGetter[ArgInfo, set[str]] = attrgetter(\"kwds\")\n\n\ndef get_args(info: SchemaInfo) -> ArgInfo:\n    \"\"\"Return the list of args & kwds for building the __init__ function.\"\"\"\n    # TODO: - set additional properties correctly\n    #       - handle patternProperties etc.\n    required: set[str] = set()\n    kwds: set[str] = set()\n    invalid_kwds: set[str] = set()\n\n    # TODO: specialize for anyOf/oneOf?\n    if info.is_empty() or info.is_anyOf():\n        nonkeyword = True\n        additional = True\n    elif info.is_object():\n        invalid_kwds = {p for p in info.required if not is_valid_identifier(p)} | {\n            p for p in info.properties if not is_valid_identifier(p)\n        }\n        required = {p for p in info.required if is_valid_identifier(p)}\n        kwds = {p for p in info.properties if is_valid_identifier(p)}\n        kwds -= required\n        nonkeyword = False\n        additional = True\n        # additional = info.additionalProperties or info.patternProperties\n    else:\n        nonkeyword = True\n        additional = False\n        if info.is_allOf():\n            # recursively call function on all children\n            msg = f\"Branch is reachable with:\\n{info.raw_schema!r}\"\n            raise NotImplementedError(msg)\n            arginfo: list[ArgInfo] = [get_args(child) for child in info.allOf]\n            nonkeyword = all(args.nonkeyword for args in arginfo)\n            required = {args.required for args in arginfo}\n            kwds = {args.kwds for args in arginfo}\n            kwds -= required\n            invalid_kwds = {args.invalid_kwds for args in arginfo}\n            additional = all(args.additional for args in arginfo)\n\n    return ArgInfo(\n        nonkeyword=nonkeyword,\n        required=required,\n        kwds=kwds,\n        invalid_kwds=invalid_kwds,\n        additional=additional,\n        schema_info=info,\n    )\n\n\nclass SchemaGenerator:\n    \"\"\"\n    Class that defines methods for generating code from schemas.\n\n    Parameters\n    ----------\n    classname : string\n        The name of the class to generate\n    schema : dict\n        The dictionary defining the schema class\n    rootschema : dict (optional)\n        The root schema for the class\n    basename : string or list of strings (default: \"SchemaBase\")\n        The name(s) of the base class(es) to use in the class definition\n    schemarepr : CodeSnippet or object, optional\n        An object whose repr will be used in the place of the explicit schema.\n        This can be useful, for example, when the generated code should reference\n        a predefined schema object. The user must ensure that the schema within\n        the evaluated code is identical to the schema used to generate the code.\n    rootschemarepr : CodeSnippet or object, optional\n        An object whose repr will be used in the place of the explicit root\n        schema.\n    **kwargs : dict\n        Additional keywords for derived classes.\n    \"\"\"\n\n    schema_class_template = textwrap.dedent(\n        '''\n    class {classname}({basename}):\n        \"\"\"{docstring}\"\"\"\n        _schema = {schema!r}\n        _rootschema = {rootschema!r}\n\n        {init_code}\n    '''\n    )\n\n    init_template: Final = textwrap.dedent(\n        \"\"\"\n    def __init__({arglist}):\n        super({classname}, self).__init__({super_arglist})\n    \"\"\"\n    ).lstrip()\n\n    haspropsetters: ClassVar[bool] = False\n\n    def __init__(\n        self,\n        classname: str,\n        schema: dict[str, Any],\n        rootschema: dict | None = None,\n        basename: str | list[str] = \"SchemaBase\",\n        schemarepr: object | None = None,\n        rootschemarepr: object | None = None,\n        nodefault: list[str] | None = None,\n        *,\n        exclude_properties: Iterable[str] = (),\n        summary: str | None = None,\n        **kwargs,\n    ) -> None:\n        self.classname = classname\n        self.schema = schema\n        self.rootschema = rootschema\n        self.basename = basename\n        self.schemarepr = schemarepr\n        self.rootschemarepr = rootschemarepr\n        self.nodefault = nodefault or ()\n        self.exclude_properties: set[str] = set(exclude_properties)\n        self.summary: str = summary or f\"{self.classname} schema wrapper\"\n        self.kwargs = kwargs\n\n    def subclasses(self) -> Iterator[str]:\n        \"\"\"\n        Return an Iterator over subclass names, if any.\n\n        NOTE\n        ----\n        *Does not represent subclasses**.\n\n        Represents a ``Union`` of schemas (``SchemaInfo.anyOf``).\n        \"\"\"\n        for child in SchemaInfo(self.schema, self.rootschema).anyOf:\n            if child.is_reference():\n                yield child.refname\n\n    def schema_class(self) -> str:\n        \"\"\"Generate code for a schema class.\"\"\"\n        rootschema: dict = self.rootschema or self.schema\n        schemarepr: object = self.schemarepr or self.schema\n        rootschemarepr = self.rootschemarepr\n        if rootschemarepr is None:\n            if rootschema is self.schema:\n                rootschemarepr = CodeSnippet(\"_schema\")\n            else:\n                rootschemarepr = rootschema\n        if isinstance(self.basename, str):\n            basename = self.basename\n        else:\n            basename = \", \".join(self.basename)\n        docstring = self.docstring(indent=4)\n        init_code = self.init_code(indent=4)\n        if type(self).haspropsetters:\n            method_code = self.overload_code(indent=4)\n        else:\n            method_code = self.kwargs.pop(\"method_code\", None)\n        return self.schema_class_template.format(\n            classname=self.classname,\n            basename=basename,\n            schema=schemarepr,\n            rootschema=rootschemarepr,\n            docstring=docstring,\n            init_code=init_code,\n            method_code=method_code,\n            **self.kwargs,\n        )\n\n    @property\n    def info(self) -> SchemaInfo:\n        return SchemaInfo(self.schema, self.rootschema)\n\n    @property\n    def arg_info(self) -> ArgInfo:\n        return get_args(self.info)\n\n    def docstring(self, indent: int = 0) -> str:\n        info = self.info\n        # https://numpydoc.readthedocs.io/en/latest/format.html#short-summary\n        doc = [self.summary]\n        if info.description:\n            # https://numpydoc.readthedocs.io/en/latest/format.html#extended-summary\n            # Remove condition from description\n            desc: str = re.sub(r\"\\n\\{\\n(\\n|.)*\\n\\}\", \"\", info.description)\n            ext_summary: list[str] = process_description(desc).splitlines()\n            # Remove lines which contain the \"raw-html\" directive which cannot be processed\n            # by Sphinx at this level of the docstring. It works for descriptions\n            # of attributes which is why we do not do the same below. The removed\n            # lines are anyway non-descriptive for a user.\n            ext_summary = [line for line in ext_summary if \":raw-html:\" not in line]\n            # Only add an extended summary if the above did not result in an empty list.\n            if ext_summary:\n                doc.append(\"\")\n                doc.extend(ext_summary)\n\n        if info.properties:\n            arg_info = self.arg_info\n            it = chain.from_iterable(\n                (f\"{p} : {p_info.to_type_repr()}\", f\"    {p_info.deep_description}\")\n                for p, p_info in arg_info.iter_args(\n                    arg_info.required,\n                    arg_kwds,\n                    arg_invalid_kwds,\n                    exclude=self.exclude_properties,\n                )\n            )\n            doc.extend(chain([\"\", \"Parameters\", \"----------\", \"\"], it))\n        return indent_docstring(doc, indent_level=indent, width=100, lstrip=True)\n\n    def init_code(self, indent: int = 0) -> str:\n        \"\"\"Return code suitable for the __init__ function of a Schema class.\"\"\"\n        args, super_args = self.init_args()\n\n        initfunc = self.init_template.format(\n            classname=self.classname,\n            arglist=\", \".join(args),\n            super_arglist=\", \".join(super_args),\n        )\n        if indent:\n            initfunc = (\"\\n\" + indent * \" \").join(initfunc.splitlines())\n        return initfunc\n\n    def init_args(self) -> tuple[list[str], list[str]]:\n        info = self.info\n        arg_info = self.arg_info\n        exclude = self.exclude_properties\n\n        nodefault = set(self.nodefault)\n        arg_info.required.difference_update(nodefault, exclude)\n        arg_info.kwds.difference_update(nodefault, exclude)\n\n        args: list[str] = [\"self\"]\n        super_args: list[str] = []\n\n        self.init_kwds: list[str] = sorted(arg_info.kwds)\n        init_required: list[str] = sorted(arg_info.required)\n        _nodefault: list[str] = sorted(nodefault)\n\n        if nodefault:\n            args.extend(_nodefault)\n        elif arg_info.nonkeyword:\n            args.append(\"*args\")\n            super_args.append(\"*args\")\n\n        it = (\n            f\"{p}: {info.properties[p].to_type_repr(target='annotation', use_undefined=True)} = Undefined\"\n            for p in chain(init_required, self.init_kwds)\n        )\n        args.extend(it)\n        super_args.extend(\n            f\"{p}={p}\" for p in chain(_nodefault, init_required, self.init_kwds)\n        )\n\n        if arg_info.additional:\n            # Annotate **kwds argument when annotate_kwds_flag is set in\n            # generate_schema_wrapper.py.\n            if self.kwargs.get(\"annotate_kwds_flag\"):\n                args.append(f\"{DOUBLESTAR_ARGS}: Any\")\n            else:\n                args.append(DOUBLESTAR_ARGS)\n            super_args.append(DOUBLESTAR_ARGS)\n        return args, super_args\n\n    # TODO: Resolve 45x ``list[core.ConditionalValueDef...] annotations\n    def overload_signature(\n        self, prop: str, info: SchemaInfo | Iterable[SchemaInfo], /\n    ) -> Iterator[str]:\n        \"\"\"Yields a single, fully annotated ``@overload``, signature.\"\"\"\n        TARGET: Literal[\"annotation\"] = \"annotation\"\n        yield \"@overload\"\n        signature = \"def {0}(self, {1}) -> {2}: ...\"\n        if isinstance(info, SchemaInfo):\n            if info.properties:\n                it = (\n                    f\"{name}: {p_info.to_type_repr(target=TARGET, use_undefined=True)} = Undefined\"\n                    for name, p_info in info.properties.items()\n                )\n                content = f\"{KWD_ONLY}, {', '.join(it)}\"\n            elif isinstance(info.type, str):\n                if info.is_array() and (title := info.child(info.items).title):\n                    tp = f\"list[core.{title}]\"\n                else:\n                    tp = info.to_type_repr(target=TARGET, use_concrete=True)\n                content = f\"{ANON}: {tp}, {POS_ONLY}\"\n            else:\n                msg = f\"Assumed unreachable\\n{info!r}\"\n                raise NotImplementedError(msg)\n        else:\n            tp = SchemaInfo.to_type_repr_batched(info, target=TARGET, use_concrete=True)\n            content = f\"{ANON}: {tp}, {POS_ONLY}\"\n        yield signature.format(prop, content, self.classname)\n\n    def _overload_expand(\n        self, prop: str, info: SchemaInfo | Iterable[SchemaInfo], /\n    ) -> Iterator[str]:\n        children: Iterable[SchemaInfo]\n        if isinstance(info, SchemaInfo):\n            children = info.anyOf if info.is_anyOf() else (info,)\n        else:\n            children = info\n        for child in children:\n            if child.is_anyOf() and not child.is_union_flattenable():\n                yield from self._overload_expand(prop, child)\n            else:\n                yield from self.overload_signature(prop, child)\n\n    def overload_dispatch(self, prop: str, info: SchemaInfo, /) -> Iterator[str]:\n        \"\"\"\n        For a given property ``prop``, decide how to represent all valid signatures.\n\n        In this context, dispatching between **3** kinds of ``@overload``:\n        - ``Union``\n            1. The subset of basic types form a single signature\n                - See `thread`_ for special case handling mixed ``@overload``.\n            2. More complex types are recursed into, possibly expanding to multiple signatures\n        - Others\n            3. Only one signature is required\n\n        .. _thread:\n            https://github.com/vega/altair/pull/3659#discussion_r1818164457\n        \"\"\"\n        if info.is_anyOf():\n            grouped = Grouped(info.anyOf, SchemaInfo.is_flattenable)\n            if (expand := grouped.falsy) and len(expand) == 1 and expand[0].properties:\n                grouped.truthy.append(expand[0])\n            if flatten := grouped.truthy:\n                yield from self.overload_signature(prop, flatten)\n            if expand := grouped.falsy:\n                yield from self._overload_expand(prop, expand)\n        else:\n            yield from self.overload_signature(prop, info)\n\n    def overload_code(self, indent: int = 0) -> str:\n        \"\"\"Return all ``@overload`` for property setter methods and as an indented code block.\"\"\"\n        indented = \"\\n\" + indent * \" \"\n        it = starmap(\n            self.overload_dispatch,\n            self.arg_info.iter_args(arg_kwds, exclude=self.nodefault),\n        )\n        return indented.join(chain.from_iterable(it))\n"
  },
  {
    "path": "tools/schemapi/schemapi.py",
    "content": "from __future__ import annotations\n\nimport contextlib\nimport copy\nimport datetime as dt\nimport inspect\nimport json\nimport operator\nimport sys\nimport textwrap\nimport zoneinfo\nfrom collections import defaultdict\nfrom collections.abc import Iterable, Iterator, Mapping, Sequence\nfrom functools import partial\nfrom importlib.metadata import version as importlib_version\nfrom itertools import chain, zip_longest\nfrom math import ceil\nfrom typing import TYPE_CHECKING, Any, Final, Generic, Literal, TypeVar, cast, overload\n\nimport jsonschema\nimport jsonschema.exceptions\nimport jsonschema.validators\nimport narwhals.stable.v1 as nw\nfrom narwhals.stable.v1.dependencies import is_narwhals_series\nfrom packaging.version import Version\n\nif sys.version_info >= (3, 12):\n    from typing import Protocol, TypeAliasType, runtime_checkable\nelse:\n    from typing_extensions import Protocol, TypeAliasType, runtime_checkable\n\nif TYPE_CHECKING:\n    from types import ModuleType\n    from typing import ClassVar, TypeAlias\n\n    from jsonschema.exceptions import ValidationError\n    from referencing import Registry\n\n    from altair.typing import ChartType\n\n    if sys.version_info >= (3, 13):\n        from typing import TypeIs\n    else:\n        from typing_extensions import TypeIs\n\n    if sys.version_info >= (3, 11):\n        from typing import Never, Self\n    else:\n        from typing_extensions import Never, Self\n\n    _OptionalModule: TypeAlias = \"ModuleType | None\"\n\nValidationErrorList: TypeAlias = list[jsonschema.exceptions.ValidationError]\nGroupedValidationErrors: TypeAlias = dict[str, ValidationErrorList]\n\n# This URI is arbitrary and could be anything else. It just cannot be an empty\n# string as we need to reference the schema registered in\n# the referencing.Registry.\n_VEGA_LITE_ROOT_URI: Final = \"urn:vega-lite-schema\"\n\n# Ideally, jsonschema specification would be parsed from the current Vega-Lite\n# schema instead of being hardcoded here as a default value.\n# However, due to circular imports between this module and the altair.vegalite\n# modules, this information is not yet available at this point as altair.vegalite\n# is only partially loaded. The draft version which is used is unlikely to\n# change often so it's ok to keep this. There is also a test which validates\n# that this value is always the same as in the Vega-Lite schema.\n_DEFAULT_JSON_SCHEMA_DRAFT_URL: Final = \"http://json-schema.org/draft-07/schema#\"\n\n\n# If DEBUG_MODE is True, then schema objects are converted to dict and\n# validated at creation time. This slows things down, particularly for\n# larger specs, but leads to much more useful tracebacks for the user.\n# Individual schema classes can override this by setting the\n# class-level _class_is_valid_at_instantiation attribute to False\nDEBUG_MODE: bool = True\n\njsonschema_version_str = importlib_version(\"jsonschema\")\n\n\ndef enable_debug_mode() -> None:\n    global DEBUG_MODE\n    DEBUG_MODE = True\n\n\ndef disable_debug_mode() -> None:\n    global DEBUG_MODE\n    DEBUG_MODE = False\n\n\n@contextlib.contextmanager\ndef debug_mode(arg: bool) -> Iterator[None]:\n    global DEBUG_MODE\n    original = DEBUG_MODE\n    DEBUG_MODE = arg\n    try:\n        yield\n    finally:\n        DEBUG_MODE = original\n\n\n@overload\ndef validate_jsonschema(\n    spec: Any,\n    schema: dict[str, Any],\n    rootschema: dict[str, Any] | None = ...,\n    *,\n    raise_error: Literal[True] = ...,\n) -> Never: ...\n\n\n@overload\ndef validate_jsonschema(\n    spec: Any,\n    schema: dict[str, Any],\n    rootschema: dict[str, Any] | None = ...,\n    *,\n    raise_error: Literal[False],\n) -> jsonschema.exceptions.ValidationError | None: ...\n\n\ndef validate_jsonschema(\n    spec,\n    schema: dict[str, Any],\n    rootschema: dict[str, Any] | None = None,\n    *,\n    raise_error: bool = True,\n) -> jsonschema.exceptions.ValidationError | None:\n    \"\"\"\n    Validates the passed in spec against the schema in the context of the rootschema.\n\n    If any errors are found, they are deduplicated and prioritized\n    and only the most relevant errors are kept. Errors are then either raised\n    or returned, depending on the value of `raise_error`.\n    \"\"\"\n    errors = _get_errors_from_spec(spec, schema, rootschema=rootschema)\n    if errors:\n        leaf_errors = _get_leaves_of_error_tree(errors)\n        grouped_errors = _group_errors_by_json_path(leaf_errors)\n        grouped_errors = _subset_to_most_specific_json_paths(grouped_errors)\n        grouped_errors = _deduplicate_errors(grouped_errors)\n\n        # Nothing special about this first error but we need to choose one\n        # which can be raised\n        main_error: Any = next(iter(grouped_errors.values()))[0]\n        # All errors are then attached as a new attribute to ValidationError so that\n        # they can be used in SchemaValidationError to craft a more helpful\n        # error message. Setting a new attribute like this is not ideal as\n        # it then no longer matches the type ValidationError. It would be better\n        # to refactor this function to never raise but only return errors.\n        main_error._all_errors = grouped_errors\n        if raise_error:\n            raise main_error\n        else:\n            return main_error\n    else:\n        return None\n\n\ndef _get_errors_from_spec(\n    spec: dict[str, Any],\n    schema: dict[str, Any],\n    rootschema: dict[str, Any] | None = None,\n) -> ValidationErrorList:\n    \"\"\"\n    Uses the relevant jsonschema validator to validate the passed in spec against the schema using the rootschema to resolve references.\n\n    The schema and rootschema themselves are not validated but instead considered as valid.\n    \"\"\"\n    # We don't use jsonschema.validate as this would validate the schema itself.\n    # Instead, we pass the schema directly to the validator class. This is done for\n    # two reasons: The schema comes from Vega-Lite and is not based on the user\n    # input, therefore there is no need to validate it in the first place. Furthermore,\n    # the \"uri-reference\" format checker fails for some of the references as URIs in\n    # \"$ref\" are not encoded,\n    # e.g. '#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,\n    # (Gradient|string|null)>' would be a valid $ref in a Vega-Lite schema but\n    # it is not a valid URI reference due to the characters such as '<'.\n\n    json_schema_draft_url = _get_json_schema_draft_url(rootschema or schema)\n    validator_cls = jsonschema.validators.validator_for(\n        {\"$schema\": json_schema_draft_url}\n    )\n    validator_kwargs: dict[str, Any] = {}\n    if hasattr(validator_cls, \"FORMAT_CHECKER\"):\n        validator_kwargs[\"format_checker\"] = validator_cls.FORMAT_CHECKER\n\n    if _use_referencing_library():\n        schema = _prepare_references_in_schema(schema)\n        validator_kwargs[\"registry\"] = _get_referencing_registry(\n            rootschema or schema, json_schema_draft_url\n        )\n\n    else:\n        # No resolver is necessary if the schema is already the full schema\n        validator_kwargs[\"resolver\"] = (\n            jsonschema.RefResolver.from_schema(rootschema)\n            if rootschema is not None\n            else None\n        )\n\n    validator = validator_cls(schema, **validator_kwargs)\n    errors = list(validator.iter_errors(spec))\n    return errors\n\n\ndef _get_json_schema_draft_url(schema: dict[str, Any]) -> str:\n    return schema.get(\"$schema\", _DEFAULT_JSON_SCHEMA_DRAFT_URL)\n\n\ndef _use_referencing_library() -> bool:\n    \"\"\"In version 4.18.0, the jsonschema package deprecated RefResolver in favor of the referencing library.\"\"\"\n    return Version(jsonschema_version_str) >= Version(\"4.18\")\n\n\ndef _prepare_references_in_schema(schema: dict[str, Any]) -> dict[str, Any]:\n    # Create a copy so that $ref is not modified in the original schema in case\n    # that it would still reference a dictionary which might be attached to\n    # an Altair class _schema attribute\n    schema = copy.deepcopy(schema)\n\n    def _prepare_refs(d: dict[str, Any]) -> dict[str, Any]:\n        \"\"\"\n        Add _VEGA_LITE_ROOT_URI in front of all $ref values.\n\n        This function recursively iterates through the whole dictionary.\n\n        $ref values can only be nested in dictionaries or lists\n        as the passed in `d` dictionary comes from the Vega-Lite json schema\n        and in json we only have arrays (-> lists in Python) and objects\n        (-> dictionaries in Python) which we need to iterate through.\n        \"\"\"\n        for key, value in d.items():\n            if key == \"$ref\":\n                d[key] = _VEGA_LITE_ROOT_URI + d[key]\n            elif isinstance(value, dict):\n                d[key] = _prepare_refs(value)\n            elif isinstance(value, list):\n                prepared_values = []\n                for v in value:\n                    if isinstance(v, dict):\n                        v = _prepare_refs(v)\n                    prepared_values.append(v)\n                d[key] = prepared_values\n        return d\n\n    schema = _prepare_refs(schema)\n    return schema\n\n\n# We do not annotate the return value here as the referencing library is not always\n# available and this function is only executed in those cases.\ndef _get_referencing_registry(\n    rootschema: dict[str, Any], json_schema_draft_url: str | None = None\n) -> Registry:\n    # Referencing is a dependency of newer jsonschema versions, starting with the\n    # version that is specified in _use_referencing_library and we therefore\n    # can expect that it is installed if the function returns True.\n    # We ignore 'import' mypy errors which happen when the referencing library\n    # is not installed. That's ok as in these cases this function is not called.\n    # We also have to ignore 'unused-ignore' errors as mypy raises those in case\n    # referencing is installed.\n    import referencing  # type: ignore[import,unused-ignore]\n    import referencing.jsonschema  # type: ignore[import,unused-ignore]\n\n    if json_schema_draft_url is None:\n        json_schema_draft_url = _get_json_schema_draft_url(rootschema)\n\n    specification = referencing.jsonschema.specification_with(json_schema_draft_url)\n    resource = specification.create_resource(rootschema)\n    return referencing.Registry().with_resource(\n        uri=_VEGA_LITE_ROOT_URI, resource=resource\n    )\n\n\ndef _json_path(err: jsonschema.exceptions.ValidationError) -> str:\n    \"\"\"\n    Drop in replacement for the .json_path property of the jsonschema ValidationError class.\n\n    This is not available as property for ValidationError with jsonschema<4.0.1.\n\n    More info, see https://github.com/vega/altair/issues/3038.\n    \"\"\"\n    path = \"$\"\n    for elem in err.absolute_path:\n        if isinstance(elem, int):\n            path += \"[\" + str(elem) + \"]\"\n        else:\n            path += \".\" + elem\n    return path\n\n\ndef _group_errors_by_json_path(\n    errors: ValidationErrorList,\n) -> GroupedValidationErrors:\n    \"\"\"\n    Groups errors by the `json_path` attribute of the jsonschema ValidationError class.\n\n    This attribute contains the path to the offending element within\n    a chart specification and can therefore be considered as an identifier of an\n    'issue' in the chart that needs to be fixed.\n    \"\"\"\n    errors_by_json_path = defaultdict(list)\n    for err in errors:\n        err_key = getattr(err, \"json_path\", _json_path(err))\n        errors_by_json_path[err_key].append(err)\n    return dict(errors_by_json_path)\n\n\ndef _get_leaves_of_error_tree(\n    errors: ValidationErrorList,\n) -> ValidationErrorList:\n    \"\"\"\n    For each error in `errors`, it traverses down the \"error tree\" that is generated by the jsonschema library to find and return all \"leaf\" errors.\n\n    These are errors which have no further errors that caused it and so they are the most specific errors\n    with the most specific error messages.\n    \"\"\"\n    leaves: ValidationErrorList = []\n    for err in errors:\n        if err.context:\n            # This means that the error `err` was caused by errors in subschemas.\n            # The list of errors from the subschemas are available in the property\n            # `context`.\n            leaves.extend(_get_leaves_of_error_tree(err.context))\n        else:\n            leaves.append(err)\n    return leaves\n\n\ndef _subset_to_most_specific_json_paths(\n    errors_by_json_path: GroupedValidationErrors,\n) -> GroupedValidationErrors:\n    \"\"\"\n    Removes key (json path), value (errors) pairs where the json path is fully contained in another json path.\n\n    For example if `errors_by_json_path` has two keys, `$.encoding.X` and `$.encoding.X.tooltip`,\n    then the first one will be removed and only the second one is returned.\n\n    This is done under the assumption that more specific json paths give more helpful error messages to the user.\n    \"\"\"\n    errors_by_json_path_specific: GroupedValidationErrors = {}\n    for json_path, errors in errors_by_json_path.items():\n        if not _contained_at_start_of_one_of_other_values(\n            json_path, list(errors_by_json_path.keys())\n        ):\n            errors_by_json_path_specific[json_path] = errors\n    return errors_by_json_path_specific\n\n\ndef _contained_at_start_of_one_of_other_values(x: str, values: Sequence[str]) -> bool:\n    # Does not count as \"contained at start of other value\" if the values are\n    # the same. These cases should be handled separately\n    return any(value.startswith(x) for value in values if x != value)\n\n\ndef _deduplicate_errors(\n    grouped_errors: GroupedValidationErrors,\n) -> GroupedValidationErrors:\n    \"\"\"\n    Some errors have very similar error messages or are just in general not helpful for a user.\n\n    This function removes as many of these cases as possible and\n    can be extended over time to handle new cases that come up.\n    \"\"\"\n    grouped_errors_deduplicated: GroupedValidationErrors = {}\n    for json_path, element_errors in grouped_errors.items():\n        errors_by_validator = _group_errors_by_validator(element_errors)\n\n        deduplication_functions = {\n            \"enum\": _deduplicate_enum_errors,\n            \"additionalProperties\": _deduplicate_additional_properties_errors,\n        }\n        deduplicated_errors: ValidationErrorList = []\n        for validator, errors in errors_by_validator.items():\n            deduplication_func = deduplication_functions.get(validator)\n            if deduplication_func is not None:\n                errors = deduplication_func(errors)\n            deduplicated_errors.extend(_deduplicate_by_message(errors))\n\n        # Removes any ValidationError \"'value' is a required property\" as these\n        # errors are unlikely to be the relevant ones for the user. They come from\n        # validation against a schema definition where the output of `alt.value`\n        # would be valid. However, if a user uses `alt.value`, the `value` keyword\n        # is included automatically from that function and so it's unlikely\n        # that this was what the user intended if the keyword is not present\n        # in the first place.\n        deduplicated_errors = [\n            err for err in deduplicated_errors if not _is_required_value_error(err)\n        ]\n\n        grouped_errors_deduplicated[json_path] = deduplicated_errors\n    return grouped_errors_deduplicated\n\n\ndef _is_required_value_error(err: jsonschema.exceptions.ValidationError) -> bool:\n    return err.validator == \"required\" and err.validator_value == [\"value\"]\n\n\ndef _group_errors_by_validator(errors: ValidationErrorList) -> GroupedValidationErrors:\n    \"\"\"\n    Groups the errors by the json schema \"validator\" that caused the error.\n\n    For example if the error is that a value is not one of an enumeration in the json schema\n    then the \"validator\" is `\"enum\"`, if the error is due to an unknown property that\n    was set although no additional properties are allowed then \"validator\" is\n    `\"additionalProperties`, etc.\n    \"\"\"\n    errors_by_validator: defaultdict[str, ValidationErrorList] = defaultdict(list)\n    for err in errors:\n        # Ignore mypy error as err.validator as it wrongly sees err.validator\n        # as of type Optional[Validator] instead of str which it is according\n        # to the documentation and all tested cases\n        errors_by_validator[err.validator].append(err)  # type: ignore[index]\n    return dict(errors_by_validator)\n\n\ndef _deduplicate_enum_errors(errors: ValidationErrorList) -> ValidationErrorList:\n    \"\"\"\n    Deduplicate enum errors by removing the errors where the allowed values are a subset of another error.\n\n    For example, if `enum` contains two errors and one has `validator_value` (i.e. accepted values) [\"A\", \"B\"] and the\n    other one [\"A\", \"B\", \"C\"] then the first one is removed and the final\n    `enum` list only contains the error with [\"A\", \"B\", \"C\"].\n    \"\"\"\n    if len(errors) > 1:\n        # Values (and therefore `validator_value`) of an enum are always arrays,\n        # see https://json-schema.org/understanding-json-schema/reference/generic.html#enumerated-values\n        # which is why we can use join below\n        value_strings = [\",\".join(err.validator_value) for err in errors]  # type: ignore\n        longest_enums: ValidationErrorList = []\n        for value_str, err in zip(value_strings, errors, strict=False):\n            if not _contained_at_start_of_one_of_other_values(value_str, value_strings):\n                longest_enums.append(err)\n        errors = longest_enums\n    return errors\n\n\ndef _deduplicate_additional_properties_errors(\n    errors: ValidationErrorList,\n) -> ValidationErrorList:\n    \"\"\"\n    If there are multiple additional property errors it usually means that the offending element was validated against multiple schemas and its parent is a common anyOf validator.\n\n    The error messages produced from these cases are usually\n    very similar and we just take the shortest one. For example,\n    the following 3 errors are raised for the `unknown` channel option in\n    `alt.X(\"variety\", unknown=2)`:\n    - \"Additional properties are not allowed ('unknown' was unexpected)\"\n    - \"Additional properties are not allowed ('field', 'unknown' were unexpected)\"\n    - \"Additional properties are not allowed ('field', 'type', 'unknown' were unexpected)\".\n    \"\"\"\n    if len(errors) > 1:\n        # Test if all parent errors are the same anyOf error and only do\n        # the prioritization in these cases. Can't think of a chart spec where this\n        # would not be the case but still allow for it below to not break anything.\n        parent = errors[0].parent\n        if (\n            parent is not None\n            and parent.validator == \"anyOf\"\n            # Use [1:] as don't have to check for first error as it was used\n            # above to define `parent`\n            and all(err.parent is parent for err in errors[1:])\n        ):\n            errors = [min(errors, key=lambda x: len(x.message))]\n    return errors\n\n\ndef _deduplicate_by_message(errors: ValidationErrorList) -> ValidationErrorList:\n    \"\"\"Deduplicate errors by message. This keeps the original order in case it was chosen intentionally.\"\"\"\n    return list({e.message: e for e in errors}.values())\n\n\ndef _subclasses(cls: type[Any]) -> Iterator[type[Any]]:\n    \"\"\"Breadth-first sequence of all classes which inherit from cls.\"\"\"\n    seen = {cls}\n    current_set = {cls}\n    while current_set:\n        next_set = set()\n        for base in current_set:\n            for sub in base.__subclasses__():\n                if sub not in seen:\n                    yield sub\n                    seen.add(sub)\n                    next_set.add(sub)\n        current_set = next_set\n\n\ndef _from_array_like(obj: Iterable[Any], /) -> list[Any]:\n    # TODO @dangotbanned: Review after available (https://github.com/narwhals-dev/narwhals/pull/2110)\n    # See for what this silences for `narwhals` CI (https://github.com/narwhals-dev/narwhals/pull/2110#issuecomment-2687936504)\n    maybe_ser: Any = nw.from_native(obj, pass_through=True)\n    return maybe_ser.to_list() if is_narwhals_series(maybe_ser) else list(obj)\n\n\ndef _from_date_datetime(obj: dt.date | dt.datetime, /) -> dict[str, Any]:\n    \"\"\"\n    Parse native `datetime.(date|datetime)` into a `DateTime`_ schema.\n\n    .. _DateTime:\n        https://vega.github.io/vega-lite/docs/datetime.html\n    \"\"\"\n    result: dict[str, Any] = {\"year\": obj.year, \"month\": obj.month, \"date\": obj.day}\n    if isinstance(obj, dt.datetime):\n        if obj.time() != dt.time.min:\n            us = obj.microsecond\n            ms = us if us == 0 else us // 1_000\n            result.update(\n                hours=obj.hour, minutes=obj.minute, seconds=obj.second, milliseconds=ms\n            )\n        if tzinfo := obj.tzinfo:\n            if tzinfo in [dt.timezone.utc, zoneinfo.ZoneInfo(\"UTC\")]:\n                result[\"utc\"] = True\n            else:\n                msg = (\n                    f\"Unsupported timezone {tzinfo!r}.\\n\"\n                    \"Only `'UTC'` or naive (local) datetimes are permitted.\\n\"\n                    \"See https://altair-viz.github.io/user_guide/generated/core/altair.DateTime.html\"\n                )\n                raise TypeError(msg)\n    return result\n\n\ndef _todict(obj: Any, context: dict[str, Any] | None, np_opt: Any, pd_opt: Any) -> Any:  # noqa: C901\n    \"\"\"Convert an object to a dict representation.\"\"\"\n    if np_opt is not None:\n        np = np_opt\n        if isinstance(obj, np.ndarray):\n            return [_todict(v, context, np_opt, pd_opt) for v in obj]\n        elif isinstance(obj, np.number):\n            return float(obj)\n        elif isinstance(obj, np.datetime64):\n            result = str(obj)\n            if \"T\" not in result:\n                # See https://github.com/vega/altair/issues/1027 for why this is necessary.\n                result += \"T00:00:00\"\n            return result\n    if isinstance(obj, SchemaBase):\n        return obj.to_dict(validate=False, context=context)\n    elif isinstance(obj, (list, tuple)):\n        return [_todict(v, context, np_opt, pd_opt) for v in obj]\n    elif isinstance(obj, dict):\n        return {\n            k: _todict(v, context, np_opt, pd_opt)\n            for k, v in obj.items()\n            if v is not Undefined\n        }\n    elif isinstance(obj, SchemaLike):\n        return obj.to_dict()\n    elif pd_opt is not None and isinstance(obj, pd_opt.Timestamp):\n        return pd_opt.Timestamp(obj).isoformat()\n    elif _is_iterable(obj, exclude=(str, bytes)):\n        return _todict(_from_array_like(obj), context, np_opt, pd_opt)\n    elif isinstance(obj, dt.date):\n        return _from_date_datetime(obj)\n    else:\n        return obj\n\n\ndef _resolve_references(\n    schema: dict[str, Any], rootschema: dict[str, Any] | None = None\n) -> dict[str, Any]:\n    \"\"\"Resolve schema references until there is no $ref anymore in the top-level of the dictionary.\"\"\"\n    if _use_referencing_library():\n        registry = _get_referencing_registry(rootschema or schema)\n        # Using a different variable name to show that this is not the\n        # jsonschema.RefResolver but instead a Resolver from the referencing\n        # library\n        referencing_resolver = registry.resolver()\n        while \"$ref\" in schema:\n            schema = referencing_resolver.lookup(\n                _VEGA_LITE_ROOT_URI + schema[\"$ref\"]\n            ).contents\n    else:\n        resolver = jsonschema.RefResolver.from_schema(rootschema or schema)\n        while \"$ref\" in schema:\n            with resolver.resolving(schema[\"$ref\"]) as resolved:\n                schema = resolved\n    return schema\n\n\ndef _validator_values(errors: Iterable[ValidationError], /) -> Iterator[str]:\n    \"\"\"Unwrap each error's ``.validator_value``, convince ``mypy`` it stores a string.\"\"\"\n    for err in errors:\n        yield cast(\"str\", err.validator_value)\n\n\ndef _iter_channels(tp: type[Any], spec: Mapping[str, Any], /) -> Iterator[type[Any]]:\n    from altair import vegalite\n\n    for channel_type in (\"datum\", \"value\"):\n        if channel_type in spec:\n            name = f\"{tp.__name__}{channel_type.capitalize()}\"\n            if narrower := getattr(vegalite, name, None):\n                yield narrower\n\n\ndef _is_channel(obj: Any) -> TypeIs[dict[str, Any]]:\n    props = {\"datum\", \"value\"}\n    return (\n        _is_dict(obj)\n        and all(isinstance(k, str) for k in obj)\n        and not (props.isdisjoint(obj))\n    )\n\n\ndef _maybe_channel(tp: type[Any], spec: Any, /) -> type[Any]:\n    \"\"\"\n    Replace a channel type with a `more specific`_ one or passthrough unchanged.\n\n    Parameters\n    ----------\n    tp\n        An imported ``SchemaBase`` class.\n    spec\n        The instance that failed validation.\n\n    .. _more specific:\n        https://github.com/vega/altair/issues/2913#issuecomment-2571762700\n    \"\"\"\n    return next(_iter_channels(tp, spec), tp) if _is_channel(spec) else tp\n\n\nclass SchemaValidationError(jsonschema.ValidationError):\n    _JS_TO_PY: ClassVar[Mapping[str, str]] = {\n        \"boolean\": \"bool\",\n        \"integer\": \"int\",\n        \"number\": \"float\",\n        \"string\": \"str\",\n        \"null\": \"None\",\n        \"object\": \"Mapping[str, Any]\",\n        \"array\": \"Sequence\",\n    }\n\n    def __init__(self, obj: SchemaBase, err: jsonschema.ValidationError) -> None:\n        \"\"\"\n        A wrapper for ``jsonschema.ValidationError`` with friendlier traceback.\n\n        Parameters\n        ----------\n        obj\n            The instance that failed ``self.validate(...)``.\n        err\n            The original ``ValidationError``.\n\n        Notes\n        -----\n        We do not raise `from err` as else the resulting traceback is very long\n        as it contains part of the Vega-Lite schema.\n\n        It would also first show the less helpful `ValidationError` instead of\n        the more user friendly `SchemaValidationError`.\n        \"\"\"\n        super().__init__(**err._contents())\n        self.obj = obj\n        self._errors: GroupedValidationErrors = getattr(\n            err, \"_all_errors\", {getattr(err, \"json_path\", _json_path(err)): [err]}\n        )\n        # This is the message from err\n        self._original_message = self.message\n        self.message = self._get_message()\n\n    def __str__(self) -> str:\n        return self.message\n\n    def _get_message(self) -> str:\n        def indent_second_line_onwards(message: str, indent: int = 4) -> str:\n            modified_lines: list[str] = []\n            for idx, line in enumerate(message.split(\"\\n\")):\n                if idx > 0 and len(line) > 0:\n                    line = \" \" * indent + line\n                modified_lines.append(line)\n            return \"\\n\".join(modified_lines)\n\n        error_messages: list[str] = []\n        # Only show a maximum of 3 errors as else the final message returned by this\n        # method could get very long.\n        for errors in list(self._errors.values())[:3]:\n            error_messages.append(self._get_message_for_errors_group(errors))\n\n        message = \"\"\n        if len(error_messages) > 1:\n            error_messages = [\n                indent_second_line_onwards(f\"Error {error_id}: {m}\")\n                for error_id, m in enumerate(error_messages, start=1)\n            ]\n            message += \"Multiple errors were found.\\n\\n\"\n        message += \"\\n\\n\".join(error_messages)\n        return message\n\n    def _get_message_for_errors_group(\n        self,\n        errors: ValidationErrorList,\n    ) -> str:\n        if errors[0].validator == \"additionalProperties\":\n            # During development, we only found cases where an additionalProperties\n            # error was raised if that was the only error for the offending instance\n            # as identifiable by the json path. Therefore, we just check here the first\n            # error. However, other constellations might exist in which case\n            # this should be adapted so that other error messages are shown as well.\n            message = self._get_additional_properties_error_message(errors[0])\n        else:\n            message = self._get_default_error_message(errors=errors)\n\n        return message.strip()\n\n    def _get_additional_properties_error_message(\n        self,\n        error: jsonschema.exceptions.ValidationError,\n    ) -> str:\n        \"\"\"Output all existing parameters when an unknown parameter is specified.\"\"\"\n        altair_cls = self._get_altair_class_for_error(error)\n        param_dict_keys = inspect.signature(altair_cls).parameters.keys()\n        param_names_table = self._format_params_as_table(param_dict_keys)\n\n        # Error messages for these errors look like this:\n        # \"Additional properties are not allowed ('unknown' was unexpected)\"\n        # Line below extracts \"unknown\" from this string\n        parameter_name = error.message.split(\"('\")[-1].split(\"'\")[0]\n        message = f\"\"\"\\\n`{altair_cls.__name__}` has no parameter named '{parameter_name}'\n\nExisting parameter names are:\n{param_names_table}\nSee the help for `{altair_cls.__name__}` to read the full description of these parameters\"\"\"\n        return message\n\n    def _get_altair_class_for_error(\n        self, error: jsonschema.exceptions.ValidationError\n    ) -> type[SchemaBase]:\n        \"\"\"\n        Try to get the lowest class possible in the chart hierarchy so it can be displayed in the error message.\n\n        This should lead to more informative error messages pointing the user closer to the source of the issue.\n\n        If we did not find a suitable class based on traversing the path so we fall\n        back on the class of the top-level object which created the SchemaValidationError\n        \"\"\"\n        from altair import vegalite\n\n        for prop_name in reversed(error.absolute_path):\n            # Check if str as e.g. first item can be a 0\n            if isinstance(prop_name, str):\n                candidate = prop_name[0].upper() + prop_name[1:]\n                if tp := getattr(vegalite, candidate, None):\n                    return _maybe_channel(tp, self.instance)\n        return type(self.obj)\n\n    @staticmethod\n    def _format_params_as_table(param_dict_keys: Iterable[str]) -> str:\n        \"\"\"Format param names into a table so that they are easier to read.\"\"\"\n        param_names: tuple[str, ...]\n        name_lengths: tuple[int, ...]\n        param_names, name_lengths = zip(\n            *[\n                (name, len(name))\n                for name in param_dict_keys\n                if name not in {\"kwds\", \"self\"}\n            ],\n            strict=False,\n        )\n        # Worst case scenario with the same longest param name in the same\n        # row for all columns\n        max_name_length = max(name_lengths)\n        max_column_width = 80\n        # Output a square table if not too big (since it is easier to read)\n        num_param_names = len(param_names)\n        square_columns = ceil(num_param_names**0.5)\n        columns = min(max_column_width // max_name_length, square_columns)\n\n        # Compute roughly equal column heights to evenly divide the param names\n        def split_into_equal_parts(n: int, p: int) -> list[int]:\n            return [n // p + 1] * (n % p) + [n // p] * (p - n % p)\n\n        column_heights = split_into_equal_parts(num_param_names, columns)\n\n        # Section the param names into columns and compute their widths\n        param_names_columns: list[tuple[str, ...]] = []\n        column_max_widths: list[int] = []\n        last_end_idx: int = 0\n        for ch in column_heights:\n            param_names_columns.append(param_names[last_end_idx : last_end_idx + ch])\n            column_max_widths.append(\n                max(len(param_name) for param_name in param_names_columns[-1])\n            )\n            last_end_idx = ch + last_end_idx\n\n        # Transpose the param name columns into rows to facilitate looping\n        param_names_rows: list[tuple[str, ...]] = []\n        for li in zip_longest(*param_names_columns, fillvalue=\"\"):\n            param_names_rows.append(li)\n        # Build the table as a string by iterating over and formatting the rows\n        param_names_table: str = \"\"\n        for param_names_row in param_names_rows:\n            for num, param_name in enumerate(param_names_row):\n                # Set column width based on the longest param in the column\n                max_name_length_column = column_max_widths[num]\n                column_pad = 3\n                param_names_table += \"{:<{}}\".format(\n                    param_name, max_name_length_column + column_pad\n                )\n                # Insert newlines and spacing after the last element in each row\n                if num == (len(param_names_row) - 1):\n                    param_names_table += \"\\n\"\n        return param_names_table\n\n    def _format_type_reprs(self, errors: Iterable[ValidationError], /) -> str:\n        \"\"\"\n        Translate jsonschema types to how they appear in annotations.\n\n        Adapts parts of:\n        - `tools.schemapi.utils.sort_type_reprs`_\n        - `tools.schemapi.utils.SchemaInfo.to_type_repr`_\n\n        .. _tools.schemapi.utils.sort_type_reprs:\n            https://github.com/vega/altair/blob/48e976ef9388ce08a2e871a0f67ed012b914597a/tools/schemapi/utils.py#L1106-L1146\n        .. _tools.schemapi.utils.SchemaInfo.to_type_repr:\n            https://github.com/vega/altair/blob/48e976ef9388ce08a2e871a0f67ed012b914597a/tools/schemapi/utils.py#L449-L543\n        \"\"\"\n        to_py_types = (\n            self._JS_TO_PY.get(val, val) for val in _validator_values(errors)\n        )\n        it = sorted(to_py_types, key=str.lower)\n        it = sorted(it, key=len)\n        it = sorted(it, key=partial(operator.eq, \"None\"))\n        return f\"of type `{' | '.join(it)}`\"\n\n    def _get_default_error_message(\n        self,\n        errors: ValidationErrorList,\n    ) -> str:\n        bullet_points: list[str] = []\n        errors_by_validator = _group_errors_by_validator(errors)\n        if errs_enum := errors_by_validator.get(\"enum\", None):\n            bullet_points.extend(\n                f\"one of {val}\" for val in _validator_values(errs_enum)\n            )\n        if errs_type := errors_by_validator.get(\"type\", None):\n            bullet_points.append(self._format_type_reprs(errs_type))\n\n        # It should not matter which error is specifically used as they are all\n        # about the same offending instance (i.e. invalid value), so we can just\n        # take the first one\n        error = errors[0]\n        # Add a summary line when parameters are passed an invalid value\n        # For example: \"'asdf' is an invalid value for `stack`\n        message = f\"'{error.instance}' is an invalid value\"\n        if error.absolute_path:\n            message += f\" for `{error.absolute_path[-1]}`\"\n\n        # Add bullet points\n        if len(bullet_points) == 0:\n            message += \".\\n\\n\"\n        elif len(bullet_points) == 1:\n            message += f\". Valid values are {bullet_points[0]}.\\n\\n\"\n        else:\n            # We don't use .capitalize below to make the first letter uppercase\n            # as that makes the rest of the message lowercase\n            bullet_points = [point[0].upper() + point[1:] for point in bullet_points]\n            message += \". Valid values are:\\n\\n\"\n            message += \"\\n\".join([f\"- {point}\" for point in bullet_points])\n            message += \"\\n\\n\"\n\n        # Add unformatted messages of any remaining errors which were not\n        # considered so far. This is not expected to be used but more exists\n        # as a fallback for cases which were not known during development.\n        it = (\n            \"\\n\".join(e.message for e in errors)\n            for validator, errors in errors_by_validator.items()\n            if validator not in {\"enum\", \"type\"}\n        )\n        message += \"\".join(it)\n        return message\n\n\n_JSON_VT_co = TypeVar(\n    \"_JSON_VT_co\",\n    Literal[\"string\"],\n    Literal[\"object\"],\n    Literal[\"array\"],\n    covariant=True,\n)\n\"\"\"\nOne of a subset of JSON Schema `primitive types`_:\n\n    [\"string\", \"object\", \"array\"]\n\n.. _primitive types:\n    https://json-schema.org/draft-07/json-schema-validation#rfc.section.6.1.1\n\"\"\"\n\n_TypeMap = TypeAliasType(\n    \"_TypeMap\", Mapping[Literal[\"type\"], _JSON_VT_co], type_params=(_JSON_VT_co,)\n)\n\"\"\"\nA single item JSON Schema using the `type`_ keyword.\n\nThis may represent **one of**:\n\n    {\"type\": \"string\"}\n    {\"type\": \"object\"}\n    {\"type\": \"array\"}\n\n.. _type:\n    https://json-schema.org/understanding-json-schema/reference/type\n\"\"\"\n\n# NOTE: Type checkers want opposing things:\n# - `mypy`   : Covariant type variable \"_JSON_VT_co\" used in protocol where invariant one is expected  [misc]\n# - `pyright`: Type variable \"_JSON_VT_co\" used in generic protocol \"SchemaLike\" should be covariant [reportInvalidTypeVarUse]\n# Siding with `pyright` as this is consistent with https://github.com/python/typeshed/blob/9e506eb5e8fc2823db8c60ad561b1145ff114947/stdlib/typing.pyi#L690\n\n\n@runtime_checkable\nclass SchemaLike(Generic[_JSON_VT_co], Protocol):  # type: ignore[misc]\n    \"\"\"\n    Represents ``altair`` classes which *may* not derive ``SchemaBase``.\n\n    Attributes\n    ----------\n    _schema\n        A single item JSON Schema using the `type`_ keyword.\n\n    Notes\n    -----\n    Should be kept tightly defined to the **minimum** requirements for:\n        - Converting into a form that can be validated by `jsonschema`_.\n        - Avoiding calling ``.to_dict()`` on a class external to ``altair``.\n    - ``_schema`` is more accurately described as a ``ClassVar``\n        - See `discussion`_ for blocking issue.\n\n    .. _jsonschema:\n        https://github.com/python-jsonschema/jsonschema\n    .. _type:\n        https://json-schema.org/understanding-json-schema/reference/type\n    .. _discussion:\n        https://github.com/python/typing/discussions/1424\n    \"\"\"\n\n    _schema: _TypeMap[_JSON_VT_co]\n\n    def to_dict(self, *args, **kwds) -> Any: ...\n\n\n@runtime_checkable\nclass ConditionLike(SchemaLike[Literal[\"object\"]], Protocol):\n    \"\"\"\n    Represents the wrapped state of a conditional encoding or property.\n\n    Attributes\n    ----------\n    condition\n        One or more (predicate, statement) pairs which each form a condition.\n\n    Notes\n    -----\n    - Can be extended with additional conditions.\n    - *Does not* define a default value, but can be finalized with one.\n    \"\"\"\n\n    condition: Any\n    _schema: _TypeMap[Literal[\"object\"]] = {\"type\": \"object\"}\n\n\nclass UndefinedType:\n    \"\"\"A singleton object for marking undefined parameters.\"\"\"\n\n    __instance = None\n\n    def __new__(cls, *args, **kwargs) -> Self:\n        if not isinstance(cls.__instance, cls):\n            cls.__instance = object.__new__(cls, *args, **kwargs)\n        return cls.__instance\n\n    def __repr__(self) -> str:\n        return \"Undefined\"\n\n\nUndefined = UndefinedType()\nT = TypeVar(\"T\")\nOptional: TypeAlias = T | UndefinedType\n\"\"\"One of ``T`` specified type(s), or the ``Undefined`` singleton.\n\nExamples\n--------\nThe parameters ``short``, ``long`` accept the same range of types::\n\n    # ruff: noqa: UP006, UP007\n    from altair.typing import Optional\n\n    def func_1(\n        short: Optional[str | bool | float | dict[str, Any] | SchemaBase] = Undefined,\n        long: Union[\n            str, bool, float, Dict[str, Any], SchemaBase, UndefinedType\n        ] = Undefined,\n    ): ...\n\nThis is distinct from `typing.Optional <https://typing.readthedocs.io/en/latest/spec/historical.html#union-and-optional>`__.\n\n``altair.typing.Optional`` treats ``None`` like any other type::\n\n    # ruff: noqa: UP006, UP007\n    from altair.typing import Optional\n\n    def func_2(\n        short: Optional[str | float | dict[str, Any] | None | SchemaBase] = Undefined,\n        long: Union[\n            str, float, Dict[str, Any], None, SchemaBase, UndefinedType\n        ] = Undefined,\n    ): ...\n\"\"\"\n\n\ndef is_undefined(obj: Any) -> TypeIs[UndefinedType]:\n    \"\"\"\n    Type-safe singleton check for `UndefinedType`.\n\n    Notes\n    -----\n    - Using `obj is Undefined` does not narrow from `UndefinedType` in a union.\n        - Due to the assumption that other `UndefinedType`'s could exist.\n    - Current [typing spec advises](https://typing.readthedocs.io/en/latest/spec/concepts.html#support-for-singleton-types-in-unions) using an `Enum`.\n        - Otherwise, requires an explicit guard to inform the type checker.\n    \"\"\"\n    return obj is Undefined\n\n\n@overload\ndef _shallow_copy(obj: _CopyImpl) -> _CopyImpl: ...\n@overload\ndef _shallow_copy(obj: Any) -> Any: ...\ndef _shallow_copy(obj: _CopyImpl | Any) -> _CopyImpl | Any:\n    if isinstance(obj, SchemaBase):\n        return obj.copy(deep=False)\n    elif isinstance(obj, (list, dict)):\n        return obj.copy()\n    else:\n        return obj\n\n\n@overload\ndef _deep_copy(obj: _CopyImpl, by_ref: set[str]) -> _CopyImpl: ...\n@overload\ndef _deep_copy(obj: Any, by_ref: set[str]) -> Any: ...\ndef _deep_copy(obj: _CopyImpl | Any, by_ref: set[str]) -> _CopyImpl | Any:\n    copy = partial(_deep_copy, by_ref=by_ref)\n    if isinstance(obj, SchemaBase):\n        if copier := getattr(obj, \"__deepcopy__\", None):\n            with debug_mode(False):\n                return copier(obj)\n        args = (copy(arg) for arg in obj._args)\n        kwds = {k: (copy(v) if k not in by_ref else v) for k, v in obj._kwds.items()}\n        with debug_mode(False):\n            return obj.__class__(*args, **kwds)\n    elif isinstance(obj, list):\n        return [copy(v) for v in obj]\n    elif isinstance(obj, dict):\n        return {k: (copy(v) if k not in by_ref else v) for k, v in obj.items()}\n    else:\n        return obj\n\n\nclass SchemaBase:\n    \"\"\"\n    Base class for schema wrappers.\n\n    Each derived class should set the _schema class attribute (and optionally\n    the _rootschema class attribute) which is used for validation.\n    \"\"\"\n\n    _schema: ClassVar[dict[str, Any] | Any] = None\n    _rootschema: ClassVar[dict[str, Any] | None] = None\n    _class_is_valid_at_instantiation: ClassVar[bool] = True\n\n    def __init__(self, *args: Any, **kwds: Any) -> None:\n        # Two valid options for initialization, which should be handled by\n        # derived classes:\n        # - a single arg with no kwds, for, e.g. {'type': 'string'}\n        # - zero args with zero or more kwds for {'type': 'object'}\n        if self._schema is None:\n            msg = (\n                f\"Cannot instantiate object of type {self.__class__}: \"\n                \"_schema class attribute is not defined.\"\n                \"\"\n            )\n            raise ValueError(msg)\n\n        if kwds:\n            assert len(args) == 0\n        else:\n            assert len(args) in {0, 1}\n\n        # use object.__setattr__ because we override setattr below.\n        object.__setattr__(self, \"_args\", args)\n        object.__setattr__(self, \"_kwds\", kwds)\n\n        if DEBUG_MODE and self._class_is_valid_at_instantiation:\n            self.to_dict(validate=True)\n\n    def copy(\n        self, deep: bool | Iterable[Any] = True, ignore: list[str] | None = None\n    ) -> Self:\n        \"\"\"\n        Return a copy of the object.\n\n        Parameters\n        ----------\n        deep : boolean or list, optional\n            If True (default) then return a deep copy of all dict, list, and\n            SchemaBase objects within the object structure.\n            If False, then only copy the top object.\n            If a list or iterable, then only copy the listed attributes.\n        ignore : list, optional\n            A list of keys for which the contents should not be copied, but\n            only stored by reference.\n        \"\"\"\n        if deep is True:\n            return cast(\"Self\", _deep_copy(self, set(ignore) if ignore else set()))\n        with debug_mode(False):\n            copy = self.__class__(*self._args, **self._kwds)\n        if _is_iterable(deep):\n            for attr in deep:\n                copy[attr] = _shallow_copy(copy._get(attr))\n        return copy\n\n    def _get(self, attr, default=Undefined):\n        \"\"\"Get an attribute, returning default if not present.\"\"\"\n        attr = self._kwds.get(attr, Undefined)\n        if attr is Undefined:\n            attr = default\n        return attr\n\n    def __getattr__(self, attr):\n        # reminder: getattr is called after the normal lookups\n        if attr == \"_kwds\":\n            raise AttributeError()\n        if attr in self._kwds:\n            return self._kwds[attr]\n        else:\n            try:\n                _getattr = super().__getattr__  # pyright: ignore[reportAttributeAccessIssue]\n            except AttributeError:\n                _getattr = super().__getattribute__\n            return _getattr(attr)\n\n    def __setattr__(self, item, val) -> None:\n        self._kwds[item] = val\n\n    def __getitem__(self, item):\n        return self._kwds[item]\n\n    def __setitem__(self, item, val) -> None:\n        self._kwds[item] = val\n\n    def __repr__(self) -> str:\n        name = type(self).__name__\n        if kwds := self._kwds:\n            it = (f\"{k}: {v!r}\" for k, v in sorted(kwds.items()) if v is not Undefined)\n            args = \",\\n\".join(it).replace(\"\\n\", \"\\n  \")\n            LB, RB = \"{\", \"}\"\n            return f\"{name}({LB}\\n  {args}\\n{RB})\"\n        else:\n            return f\"{name}({self._args[0]!r})\"\n\n    def __eq__(self, other: Any) -> bool:\n        return (\n            type(self) is type(other)\n            and self._args == other._args\n            and self._kwds == other._kwds\n        )\n\n    def to_dict(\n        self,\n        validate: bool = True,\n        *,\n        ignore: list[str] | None = None,\n        context: dict[str, Any] | None = None,\n    ) -> dict[str, Any]:\n        \"\"\"\n        Return a dictionary representation of the object.\n\n        Parameters\n        ----------\n        validate : bool, optional\n            If True (default), then validate the result against the schema.\n        ignore : list[str], optional\n            A list of keys to ignore.\n        context : dict[str, Any], optional\n            A context dictionary.\n\n        Raises\n        ------\n        SchemaValidationError :\n            If ``validate`` and the result does not conform to the schema.\n\n        Notes\n        -----\n        - ``ignore``, ``context`` are usually not needed to be specified as a user.\n        - *Technical*: ``ignore`` will **not** be passed to child :meth:`.to_dict()`.\n        \"\"\"\n        context = context or {}\n        ignore = ignore or []\n        opts = _get_optional_modules(np_opt=\"numpy\", pd_opt=\"pandas\")\n\n        if self._args and not self._kwds:\n            kwds = self._args[0]\n        elif not self._args:\n            kwds = self._kwds.copy()\n            exclude = {*ignore, \"shorthand\"}\n            if parsed := context.pop(\"parsed_shorthand\", None):\n                kwds = _replace_parsed_shorthand(parsed, kwds)\n            kwds = {k: v for k, v in kwds.items() if k not in exclude}\n            if (mark := kwds.get(\"mark\")) and isinstance(mark, str):\n                kwds[\"mark\"] = {\"type\": mark}\n        else:\n            msg = f\"{type(self)} instance has both a value and properties : cannot serialize to dict\"\n            raise ValueError(msg)\n        result = _todict(kwds, context=context, **opts)\n        if validate:\n            # NOTE: Don't raise `from err`, see `SchemaValidationError` doc\n            try:\n                self.validate(result)\n            except jsonschema.ValidationError as err:\n                raise SchemaValidationError(self, err) from None\n        return result\n\n    def to_json(\n        self,\n        validate: bool = True,\n        indent: int | str | None = 2,\n        sort_keys: bool = True,\n        *,\n        ignore: list[str] | None = None,\n        context: dict[str, Any] | None = None,\n        ensure_ascii: bool = False,\n        **kwargs,\n    ) -> str:\n        \"\"\"\n        Emit the JSON representation for this object as a string.\n\n        Parameters\n        ----------\n        validate : bool, optional\n            If True (default), then validate the result against the schema.\n        indent : int, optional\n            The number of spaces of indentation to use. The default is 2.\n        sort_keys : bool, optional\n            If True (default), sort keys in the output.\n        ignore : list[str], optional\n            A list of keys to ignore.\n        context : dict[str, Any], optional\n            A context dictionary.\n        ensure_ascii : bool, optional\n            If False (default), allow UTF-8 characters in the output.\n            If True, escape non-ASCII characters.\n        **kwargs\n            Additional keyword arguments are passed to ``json.dumps()``\n\n        Raises\n        ------\n        SchemaValidationError :\n            If ``validate`` and the result does not conform to the schema.\n\n        Notes\n        -----\n        - ``ignore``, ``context`` are usually not needed to be specified as a user.\n        - *Technical*: ``ignore`` will **not** be passed to child :meth:`.to_dict()`.\n        \"\"\"\n        if ignore is None:\n            ignore = []\n        if context is None:\n            context = {}\n        dct = self.to_dict(validate=validate, ignore=ignore, context=context)\n        return json.dumps(\n            dct, indent=indent, sort_keys=sort_keys, ensure_ascii=ensure_ascii, **kwargs\n        )\n\n    @classmethod\n    def _default_wrapper_classes(cls) -> Iterator[type[SchemaBase]]:\n        \"\"\"Return the set of classes used within cls.from_dict().\"\"\"\n        return _subclasses(SchemaBase)\n\n    @classmethod\n    def from_dict(\n        cls: type[TSchemaBase], dct: dict[str, Any], validate: bool = True\n    ) -> TSchemaBase:\n        \"\"\"\n        Construct class from a dictionary representation.\n\n        Parameters\n        ----------\n        dct : dictionary\n            The dict from which to construct the class\n        validate : boolean\n            If True (default), then validate the input against the schema.\n\n        Raises\n        ------\n        jsonschema.ValidationError :\n            If ``validate`` and ``dct`` does not conform to the schema\n        \"\"\"\n        if validate:\n            cls.validate(dct)\n        converter = _FromDict(cls._default_wrapper_classes())\n        return converter.from_dict(dct, cls)\n\n    @classmethod\n    def from_json(\n        cls,\n        json_string: str,\n        validate: bool = True,\n        **kwargs: Any,\n        # Type hints for this method would get rather complicated\n        # if we want to provide a more specific return type\n    ) -> ChartType:\n        \"\"\"\n        Instantiate the object from a valid JSON string.\n\n        Parameters\n        ----------\n        json_string : string\n            The string containing a valid JSON chart specification.\n        validate : boolean\n            If True (default), then validate the input against the schema.\n        **kwargs :\n            Additional keyword arguments are passed to json.loads\n\n        Returns\n        -------\n        chart : Chart object\n            The altair Chart object built from the specification.\n        \"\"\"\n        dct: dict[str, Any] = json.loads(json_string, **kwargs)\n        return cls.from_dict(dct, validate=validate)  # type: ignore[return-value]\n\n    @classmethod\n    def validate(\n        cls, instance: dict[str, Any], schema: dict[str, Any] | None = None\n    ) -> None:\n        \"\"\"Validate the instance against the class schema in the context of the rootschema.\"\"\"\n        if schema is None:\n            schema = cls._schema\n        # For the benefit of mypy\n        assert schema is not None\n        validate_jsonschema(instance, schema, rootschema=cls._rootschema or cls._schema)\n\n    @classmethod\n    def resolve_references(cls, schema: dict[str, Any] | None = None) -> dict[str, Any]:\n        \"\"\"Resolve references in the context of this object's schema or root schema.\"\"\"\n        schema_to_pass = schema or cls._schema\n        # For the benefit of mypy\n        assert schema_to_pass is not None\n        return _resolve_references(\n            schema=schema_to_pass,\n            rootschema=(cls._rootschema or cls._schema or schema),\n        )\n\n    @classmethod\n    def validate_property(\n        cls, name: str, value: Any, schema: dict[str, Any] | None = None\n    ) -> None:\n        \"\"\"Validate a property against property schema in the context of the rootschema.\"\"\"\n        opts = _get_optional_modules(np_opt=\"numpy\", pd_opt=\"pandas\")\n        value = _todict(value, context={}, **opts)\n        props = cls.resolve_references(schema or cls._schema).get(\"properties\", {})\n        validate_jsonschema(\n            value, props.get(name, {}), rootschema=cls._rootschema or cls._schema\n        )\n\n    def __dir__(self) -> list[str]:\n        return sorted(chain(super().__dir__(), self._kwds))\n\n\ndef _get_optional_modules(**modules: str) -> dict[str, _OptionalModule]:\n    \"\"\"\n    Returns packages only if they have already been imported - otherwise they return `None`.\n\n    This is useful for `isinstance` checks.\n\n    For example, if `pandas` has not been imported, then an object is\n    definitely not a `pandas.Timestamp`.\n\n    Parameters\n    ----------\n    **modules\n        Keyword-only binding from `{alias: module_name}`.\n\n    Examples\n    --------\n    >>> import pandas as pd  # doctest: +SKIP\n    >>> import polars as pl  # doctest: +SKIP\n    >>> from altair.utils.schemapi import _get_optional_modules  # doctest: +SKIP\n    >>>\n    >>> _get_optional_modules(pd=\"pandas\", pl=\"polars\", ibis=\"ibis\")  # doctest: +SKIP\n    {\n        \"pd\": <module 'pandas' from '...'>,\n        \"pl\": <module 'polars' from '...'>,\n        \"ibis\": None,\n    }\n\n    If the user later imports ``ibis``, it would appear in subsequent calls.\n\n    >>> import ibis  # doctest: +SKIP\n    >>>\n    >>> _get_optional_modules(ibis=\"ibis\")  # doctest: +SKIP\n    {\n        \"ibis\": <module 'ibis' from '...'>,\n    }\n    \"\"\"\n    return {k: sys.modules.get(v) for k, v in modules.items()}\n\n\ndef _replace_parsed_shorthand(\n    parsed_shorthand: dict[str, Any], kwds: dict[str, Any]\n) -> dict[str, Any]:\n    \"\"\"\n    `parsed_shorthand` is added by `FieldChannelMixin`.\n\n    It's used below to replace shorthand with its long form equivalent\n    `parsed_shorthand` is removed from `context` if it exists so that it is\n    not passed to child `to_dict` function calls.\n    \"\"\"\n    # Prevent that pandas categorical data is automatically sorted\n    # when a non-ordinal data type is specified manually\n    # or if the encoding channel does not support sorting\n    if \"sort\" in parsed_shorthand and (\n        \"sort\" not in kwds or kwds[\"type\"] not in {\"ordinal\", Undefined}\n    ):\n        parsed_shorthand.pop(\"sort\")\n\n    kwds.update(\n        (k, v)\n        for k, v in parsed_shorthand.items()\n        if kwds.get(k, Undefined) is Undefined\n    )\n    return kwds\n\n\nTSchemaBase = TypeVar(\"TSchemaBase\", bound=SchemaBase)\n\n_CopyImpl = TypeVar(\"_CopyImpl\", SchemaBase, dict[Any, Any], list[Any])\n\"\"\"\nTypes which have an implementation in ``SchemaBase.copy()``.\n\nAll other types are returned **by reference**.\n\"\"\"\n\n\ndef _is_dict(obj: Any | dict[Any, Any]) -> TypeIs[dict[Any, Any]]:\n    return isinstance(obj, dict)\n\n\ndef _is_list(obj: Any | list[Any]) -> TypeIs[list[Any]]:\n    return isinstance(obj, list)\n\n\ndef _is_iterable(\n    obj: Any, *, exclude: type | tuple[type, ...] = (str, bytes)\n) -> TypeIs[Iterable[Any]]:\n    return not isinstance(obj, exclude) and isinstance(obj, Iterable)\n\n\ndef _passthrough(*args: Any, **kwds: Any) -> Any | dict[str, Any]:\n    return args[0] if args else kwds\n\n\nclass _FromDict:\n    \"\"\"\n    Class used to construct SchemaBase class hierarchies from a dict.\n\n    The primary purpose of using this class is to be able to build a hash table\n    that maps schemas to their wrapper classes. The candidate classes are\n    specified in the ``wrapper_classes`` positional-only argument to the constructor.\n    \"\"\"\n\n    _hash_exclude_keys = (\"definitions\", \"title\", \"description\", \"$schema\", \"id\")\n\n    def __init__(self, wrapper_classes: Iterable[type[SchemaBase]], /) -> None:\n        # Create a mapping of a schema hash to a list of matching classes\n        # This lets us quickly determine the correct class to construct\n        self.class_dict: dict[int, list[type[SchemaBase]]] = defaultdict(list)\n        for tp in wrapper_classes:\n            if tp._schema is not None:\n                self.class_dict[self.hash_schema(tp._schema)].append(tp)\n\n    @classmethod\n    def hash_schema(cls, schema: dict[str, Any], use_json: bool = True) -> int:\n        \"\"\"\n        Compute a python hash for a nested dictionary which properly handles dicts, lists, sets, and tuples.\n\n        At the top level, the function excludes from the hashed schema all keys\n        listed in `exclude_keys`.\n\n        This implements two methods: one based on conversion to JSON, and one based\n        on recursive conversions of unhashable to hashable types; the former seems\n        to be slightly faster in several benchmarks.\n        \"\"\"\n        if cls._hash_exclude_keys and isinstance(schema, dict):\n            schema = {\n                key: val\n                for key, val in schema.items()\n                if key not in cls._hash_exclude_keys\n            }\n        if use_json:\n            s = json.dumps(schema, sort_keys=True)\n            return hash(s)\n        else:\n\n            def _freeze(val):\n                if isinstance(val, dict):\n                    return frozenset((k, _freeze(v)) for k, v in val.items())\n                elif isinstance(val, set):\n                    return frozenset(map(_freeze, val))\n                elif isinstance(val, (list, tuple)):\n                    return tuple(map(_freeze, val))\n                else:\n                    return val\n\n            return hash(_freeze(schema))\n\n    @overload\n    def from_dict(\n        self,\n        dct: TSchemaBase,\n        tp: None = ...,\n        schema: None = ...,\n        rootschema: None = ...,\n        default_class: Any = ...,\n    ) -> TSchemaBase: ...\n    @overload\n    def from_dict(\n        self,\n        dct: dict[str, Any] | list[dict[str, Any]],\n        tp: Any = ...,\n        schema: Any = ...,\n        rootschema: Any = ...,\n        default_class: type[TSchemaBase] = ...,  # pyright: ignore[reportInvalidTypeVarUse]\n    ) -> TSchemaBase: ...\n    @overload\n    def from_dict(\n        self,\n        dct: dict[str, Any],\n        tp: None = ...,\n        schema: dict[str, Any] = ...,\n        rootschema: None = ...,\n        default_class: Any = ...,\n    ) -> SchemaBase: ...\n    @overload\n    def from_dict(\n        self,\n        dct: dict[str, Any],\n        tp: type[TSchemaBase],\n        schema: None = ...,\n        rootschema: None = ...,\n        default_class: Any = ...,\n    ) -> TSchemaBase: ...\n    @overload\n    def from_dict(\n        self,\n        dct: dict[str, Any] | list[dict[str, Any]],\n        tp: type[TSchemaBase],\n        schema: dict[str, Any],\n        rootschema: dict[str, Any] | None = ...,\n        default_class: Any = ...,\n    ) -> Never: ...\n    def from_dict(\n        self,\n        dct: dict[str, Any] | list[dict[str, Any]] | TSchemaBase,\n        tp: type[TSchemaBase] | None = None,\n        schema: dict[str, Any] | None = None,\n        rootschema: dict[str, Any] | None = None,\n        default_class: Any = _passthrough,\n    ) -> TSchemaBase | SchemaBase:\n        \"\"\"Construct an object from a dict representation.\"\"\"\n        target_tp: Any\n        current_schema: dict[str, Any]\n        if isinstance(dct, SchemaBase):\n            return dct\n        elif tp is not None:\n            current_schema = tp._schema\n            root_schema: dict[str, Any] = rootschema or tp._rootschema or current_schema\n            target_tp = tp\n        elif schema is not None:\n            # If there are multiple matches, we use the first one in the dict.\n            # Our class dict is constructed breadth-first from top to bottom,\n            # so the first class that matches is the most general match.\n            current_schema = schema\n            root_schema = rootschema or current_schema\n            matches = self.class_dict[self.hash_schema(current_schema)]\n            target_tp = matches[0] if matches else default_class\n        else:\n            msg = \"Must provide either `tp` or `schema`, but not both.\"\n            raise ValueError(msg)\n\n        from_dict = partial(self.from_dict, rootschema=root_schema)\n        # Can also return a list?\n        resolved = _resolve_references(current_schema, root_schema)\n        if \"anyOf\" in resolved or \"oneOf\" in resolved:\n            schemas = resolved.get(\"anyOf\", []) + resolved.get(\"oneOf\", [])\n            for possible in schemas:\n                try:\n                    validate_jsonschema(dct, possible, rootschema=root_schema)\n                except jsonschema.ValidationError:\n                    continue\n                else:\n                    return from_dict(dct, schema=possible, default_class=target_tp)\n\n        if _is_dict(dct):\n            # TODO: handle schemas for additionalProperties/patternProperties\n            props: dict[str, Any] = resolved.get(\"properties\", {})\n            kwds = {\n                k: (from_dict(v, schema=props[k]) if k in props else v)\n                for k, v in dct.items()\n            }\n            return target_tp(**kwds)\n        elif _is_list(dct):\n            item_schema: dict[str, Any] = resolved.get(\"items\", {})\n            return target_tp([from_dict(k, schema=item_schema) for k in dct])\n        else:\n            # NOTE: Unsure what is valid here\n            return target_tp(dct)\n\n\nclass _PropertySetter:\n    def __init__(self, prop: str, schema: dict[str, Any]) -> None:\n        self.prop = prop\n        self.schema = schema\n\n    def __get__(self, obj, cls):\n        from altair import vegalite\n\n        self.obj = obj\n        self.cls = cls\n        # The docs from the encoding class parameter (e.g. `bin` in X, Color,\n        # etc); this provides a general description of the parameter.\n        self.__doc__ = self.schema[\"description\"].replace(\"__\", \"**\")\n        property_name = f\"{self.prop}\"[0].upper() + f\"{self.prop}\"[1:]\n        if altair_prop := getattr(vegalite, property_name, None):\n            # Add the docstring from the helper class (e.g. `BinParams`) so\n            # that all the parameter names of the helper class are included in\n            # the final docstring\n            parameter_index = altair_prop.__doc__.find(\"Parameters\\n\")\n            if parameter_index > -1:\n                self.__doc__ = (\n                    altair_prop.__doc__[:parameter_index].replace(\"    \", \"\")\n                    + self.__doc__\n                    + textwrap.dedent(\n                        f\"\\n\\n    {altair_prop.__doc__[parameter_index:]}\"\n                    )\n                )\n            # For short docstrings such as Aggregate, Stack, et\n            else:\n                self.__doc__ = (\n                    altair_prop.__doc__.replace(\"    \", \"\") + \"\\n\" + self.__doc__\n                )\n            # Add signatures and tab completion for the method and parameter names\n            self.__signature__ = inspect.signature(altair_prop)\n            self.__wrapped__ = inspect.getfullargspec(altair_prop)\n            self.__name__ = altair_prop.__name__\n        else:\n            # It seems like bandPosition is the only parameter that doesn't\n            # have a helper class.\n            pass\n        return self\n\n    def __call__(self, *args: Any, **kwargs: Any):\n        obj = self.obj.copy()\n        # TODO: use schema to validate\n        obj[self.prop] = args[0] if args else kwargs\n        return obj\n\n\ndef with_property_setters(cls: type[TSchemaBase]) -> type[TSchemaBase]:\n    \"\"\"Decorator to add property setters to a Schema class.\"\"\"\n    schema = cls.resolve_references()\n    for prop, propschema in schema.get(\"properties\", {}).items():\n        setattr(cls, prop, _PropertySetter(prop, propschema))\n    return cls\n"
  },
  {
    "path": "tools/schemapi/utils.py",
    "content": "\"\"\"Utilities for working with schemas.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\nimport re\nimport sys\nimport textwrap\nimport urllib.parse\nfrom collections import deque\nfrom collections.abc import Sequence\nfrom contextlib import AbstractContextManager\nfrom copy import deepcopy\nfrom itertools import chain\nfrom keyword import iskeyword\nfrom operator import itemgetter\nfrom typing import TYPE_CHECKING, Generic, Literal, TypeVar, overload\n\nfrom tools.codemod import ruff\nfrom tools.markup import RSTParseVegaLite, rst_syntax_for_class\nfrom tools.schemapi.schemapi import _resolve_references as resolve_references\n\nif TYPE_CHECKING:\n    from collections.abc import Callable, Iterable, Iterator, KeysView, Mapping\n    from pathlib import Path\n    from re import Pattern\n    from typing import Any, ClassVar\n\n    from _typeshed import SupportsKeysAndGetItem\n\n\nif sys.version_info >= (3, 12):\n    from typing import TypeAliasType\nelse:\n    from typing_extensions import TypeAliasType\nif sys.version_info >= (3, 11):\n    from typing import LiteralString, Never\nelse:\n    from typing_extensions import LiteralString, Never\nfrom typing import TypeAlias\n\nT = TypeVar(\"T\")\n\nOneOrSeq = TypeAliasType(\"OneOrSeq\", T | Sequence[T], type_params=(T,))\nTargetType: TypeAlias = Literal[\"annotation\", \"doc\"]\n\nEXCLUDE_KEYS: frozenset[\n    Literal[\"definitions\", \"title\", \"description\", \"$schema\", \"id\"]\n] = frozenset((\"definitions\", \"title\", \"description\", \"$schema\", \"id\"))\nCOMPOUND_KEYS: tuple[Literal[\"anyOf\"], Literal[\"oneOf\"], Literal[\"allOf\"]] = (\n    \"anyOf\",\n    \"oneOf\",\n    \"allOf\",\n)\njsonschema_to_python_types: dict[str, str] = {\n    \"string\": \"str\",\n    \"number\": \"float\",\n    \"integer\": \"int\",\n    \"object\": \"Map\",\n    \"boolean\": \"bool\",\n    \"array\": \"list\",\n    \"null\": \"None\",\n}\n_STDLIB_TYPE_NAMES = frozenset(\n    (\n        \"int\",\n        \"float\",\n        \"str\",\n        \"None\",\n        \"bool\",\n        \"date\",\n        \"datetime\",\n        \"time\",\n        \"tuple\",\n        \"list\",\n        \"deque\",\n        \"dict\",\n        \"set\",\n    )\n)\n\n_VALID_IDENT: Pattern[str] = re.compile(r\"^[^\\d\\W]\\w*\\Z\", re.ASCII)\n\n_RE_LIST_MISSING_ASTERISK: Pattern[str] = re.compile(r\"^-(?=[ `\\\"a-z])\", re.MULTILINE)\n_RE_LIST_MISSING_WHITESPACE: Pattern[str] = re.compile(r\"^\\*(?=[`\\\"a-z])\", re.MULTILINE)\n\n_HASH_ENCODER = json.JSONEncoder(sort_keys=True, separators=(\",\", \":\"))\n\n\nclass _TypeAliasTracer:\n    \"\"\"\n    Recording all `enum` -> `Literal` translations.\n\n    Rewrites as `TypeAlias` to be reused anywhere, and not clog up method definitions.\n\n    Parameters\n    ----------\n    fmt\n        A format specifier to produce the `TypeAlias` name.\n\n        Will be provided a `SchemaInfo.title` as a single positional argument.\n\n    Attributes\n    ----------\n    _literals: dict[str, str]\n        `{alias_name: literal_statement}`\n    _literals_invert: dict[str, str]\n        `{literal_statement: alias_name}`\n    aliases: list[tuple[str, str]]\n        `_literals` sorted by `alias_name`\n    _imports: Sequence[str]\n        Prefined import statements to appear at beginning of module.\n    \"\"\"\n\n    def __init__(self, fmt: str = \"{}_T\") -> None:\n        self.fmt: str = fmt\n        self._literals: dict[str, str] = {}\n        self._literals_invert: dict[str, str] = {}\n        self._aliases: dict[str, str] = {}\n        self._imports: Sequence[str] = (\n            \"from __future__ import annotations\\n\",\n            \"import sys\",\n            \"from datetime import date, datetime\",\n            \"from collections.abc import Sequence, Mapping\",\n            \"from typing import Annotated, Any, Generic, Literal, TypeAlias, TypeVar, Union, get_args\",\n            \"import re\",\n            import_typing_extensions(\n                (3, 15), \"TypedDict\", reason=\"https://peps.python.org/pep-0728/\"\n            ),\n            import_typing_extensions((3, 13), \"TypeIs\"),\n            import_typing_extensions((3, 12), \"TypeAliasType\"),\n            import_typing_extensions((3, 11), \"LiteralString\"),\n        )\n\n    def _update_literals(self, name: str, tp: str, /) -> None:\n        \"\"\"Produces an inverted index, to reuse a `Literal` when `SchemaInfo.title` is empty.\"\"\"\n        self._literals[name] = tp\n        self._literals_invert[tp] = name\n\n    def add_literal(\n        self, info: SchemaInfo, tp: str, /, *, replace: bool = False\n    ) -> str:\n        \"\"\"\n        `replace=True` returns the eventual alias name.\n\n        - Doing so will mean that the `_typing` module must be written first, before the source of `info`.\n        - Otherwise, `ruff` will raise an error during `check`/`format`, as the import will be invalid.\n        - Where a `title` is not found, an attempt will be made to find an existing alias definition that had one.\n        \"\"\"\n        if info.title:\n            alias = self.fmt.format(info.title)\n            if alias not in self._literals:\n                self._update_literals(alias, tp)\n            if replace:\n                tp = alias\n        elif (alias := self._literals_invert.get(tp, \"\")) and replace:\n            tp = alias\n        elif replace and info.is_union_literal():\n            # Handles one very specific edge case `WindowFieldDef`\n            # - Has an anonymous enum union\n            # - One of the members is declared afterwards\n            # - SchemaBase needs to be first, as the union won't be internally sorted\n            it = (\n                self.add_literal(el, spell_literal(el.literal), replace=True)\n                for el in info.anyOf\n            )\n            tp = f\"Union[SchemaBase, {', '.join(it)}]\"\n        return tp\n\n    def add_union(\n        self, info: SchemaInfo, tp_iter: Iterator[str], /, *, replace: bool = False\n    ) -> str:\n        if title := info.title:\n            alias = self.fmt.format(title)\n            if alias not in self._aliases:\n                self.update_aliases(\n                    (alias, f\"Union[{', '.join(sort_type_reprs(tp_iter))}]\")\n                )\n            return alias if replace else title\n        else:\n            msg = f\"Unsupported operation.\\nRequires a title.\\n\\n{info!r}\"\n            raise NotImplementedError(msg)\n\n    def update_aliases(self, *name_statement: tuple[str, str]) -> None:\n        \"\"\"\n        Adds `(name, statement)` pairs to the definitions.\n\n        These types should support annotations in generated code, but\n        are not required to be derived from the schema itself.\n\n        Each tuple will appear in the generated module as::\n\n            name: TypeAlias = statement\n\n        All aliases will be written in runtime-scope, therefore\n        externally dependent types should be declared as regular imports.\n        \"\"\"\n        self._aliases.update(name_statement)\n\n    def generate_aliases(self) -> Iterator[str]:\n        \"\"\"Represents a line per `TypeAlias` declaration.\"\"\"\n        for name, statement in self._aliases.items():\n            yield f\"{name}: TypeAlias = {statement}\"\n\n    def is_cached(self, tp: str, /, *, include_concrete: bool = False) -> bool:\n        \"\"\"\n        Applies to both docstring and type hints.\n\n        Currently used as a sort key, to place literals/aliases last.\n        \"\"\"\n        return (\n            tp in self._literals_invert or tp in self._literals or tp in self._aliases\n        ) or (include_concrete and self.fmt.format(tp) in self._literals)\n\n    def write_module(\n        self, fp: Path, *extra_all: str, header: LiteralString, extra: LiteralString\n    ) -> None:\n        \"\"\"\n        Write all collected `TypeAlias`'s to `fp`.\n\n        Parameters\n        ----------\n        fp\n            Path to new module.\n        *extra_all\n            Any manually spelled types to be exported.\n        header\n            `tools.generate_schema_wrapper.HEADER`.\n        extra\n            `tools.generate_schema_wrapper.TYPING_EXTRA`.\n        \"\"\"\n        static = (header, \"\\n\", *self._imports, \"\\n\\n\")\n        self.update_aliases(*sorted(self._literals.items(), key=itemgetter(0)))\n        all_ = [*iter(self._aliases), *extra_all]\n        it = chain(\n            static,\n            [f\"__all__ = {all_}\", \"\\n\\n\", extra],\n            self.generate_aliases(),\n        )\n        ruff.write_lint_format(fp, it)\n\n    @property\n    def n_entries(self) -> int:\n        \"\"\"Number of unique `TypeAlias` definitions collected.\"\"\"\n        return len(self._literals)\n\n\ndef get_valid_identifier(\n    prop: str,\n    replacement_character: str = \"\",\n    allow_unicode: bool = False,\n    url_decode: bool = True,\n) -> str:\n    \"\"\"\n    Given a string property, generate a valid Python identifier.\n\n    Parameters\n    ----------\n    prop: string\n        Name of property to decode.\n    replacement_character: string, default ''\n        The character to replace invalid characters with.\n    allow_unicode: boolean, default False\n        If True, then allow Python 3-style unicode identifiers.\n    url_decode: boolean, default True\n        If True, decode URL characters in identifier names.\n\n    Examples\n    --------\n    >>> get_valid_identifier(\"my-var\")\n    'myvar'\n\n    >>> get_valid_identifier(\"if\")\n    'if_'\n\n    >>> get_valid_identifier(\"$schema\", \"_\")\n    '_schema'\n\n    >>> get_valid_identifier(\"$*#$\")\n    '_'\n\n    >>> get_valid_identifier(\"Name%3Cstring%3E\")\n    'Namestring'\n    \"\"\"\n    # Decode URL characters.\n    if url_decode:\n        prop = urllib.parse.unquote(prop)\n\n    # Deal with []\n    prop = prop.replace(\"[]\", \"Array\")\n\n    # First substitute-out all non-valid characters.\n    flags = re.UNICODE if allow_unicode else re.ASCII\n    valid = re.sub(r\"\\W\", replacement_character, prop, flags=flags)\n\n    # If nothing is left, use just an underscore\n    if not valid:\n        valid = \"_\"\n\n    # first character must be a non-digit. Prefix with an underscore\n    # if needed\n    if re.match(r\"^[\\d\\W]\", valid):\n        valid = \"_\" + valid\n\n    # if the result is a reserved keyword, then add an underscore at the end\n    if iskeyword(valid):\n        valid += \"_\"\n    return valid\n\n\ndef is_valid_identifier(s: str, /) -> bool:\n    \"\"\"Return ``True`` if ``s`` contains a valid Python identifier.\"\"\"\n    return _VALID_IDENT.match(s) is not None and not iskeyword(s)\n\n\nclass SchemaProperties:\n    \"\"\"A wrapper for properties within a schema.\"\"\"\n\n    def __init__(\n        self,\n        properties: Mapping[str, Any],\n        schema: Mapping[str, Any],\n        rootschema: Mapping[str, Any] | None = None,\n    ) -> None:\n        self._properties: Mapping[str, Any] = properties\n        self._schema: Mapping[str, Any] = schema\n        self._rootschema: Mapping[str, Any] = rootschema or schema\n\n    def __bool__(self) -> bool:\n        return bool(self._properties)\n\n    def __dir__(self) -> list[str]:\n        return list(self._properties.keys())\n\n    def __getattr__(self, attr) -> SchemaInfo:\n        return self[attr]\n\n    def __getitem__(self, attr) -> SchemaInfo:\n        dct = self._properties[attr]\n        if \"definitions\" in self._schema and \"definitions\" not in dct:\n            dct = dict(definitions=self._schema[\"definitions\"], **dct)\n        return SchemaInfo(dct, self._rootschema)\n\n    def __iter__(self) -> Iterator[str]:\n        return iter(self._properties)\n\n    def __len__(self) -> int:\n        return len(self._properties)\n\n    def items(self) -> Iterator[tuple[str, SchemaInfo]]:\n        return ((key, self[key]) for key in self)\n\n    def keys(self) -> KeysView[str]:\n        return self._properties.keys()\n\n    def values(self) -> Iterator[SchemaInfo]:\n        return (self[key] for key in self)\n\n\nclass SchemaInfo:\n    \"\"\"A wrapper for inspecting a JSON schema.\"\"\"\n\n    _remap_title: ClassVar[dict[str, Sequence[str]]] = {}\n\n    def __init__(\n        self, schema: Mapping[str, Any], rootschema: Mapping[str, Any] | None = None\n    ) -> None:\n        if not rootschema:\n            rootschema = schema\n        self.raw_schema: Mapping[str, Any]\n        self.rootschema: Mapping[str, Any]\n        self.schema: Mapping[str, Any]\n        object.__setattr__(self, \"raw_schema\", schema)\n        object.__setattr__(self, \"rootschema\", rootschema)\n        object.__setattr__(self, \"schema\", resolve_references(schema, rootschema))  # type: ignore\n\n    @classmethod\n    def from_refname(cls, refname: str, /, rootschema: Mapping[str, Any]) -> SchemaInfo:\n        return cls({\"$ref\": f\"#/definitions/{refname}\"}, rootschema)\n\n    def __setattr__(self, name: str, value: Any) -> Never:\n        msg = f\"{type(self).__name__!r} is immutable.\\nCould not assign self.{name} = {value}\"\n        raise TypeError(msg)\n\n    def __hash__(self) -> int:\n        return hash(_HASH_ENCODER.encode(self.schema))\n\n    def __eq__(self, value: object) -> bool:\n        if isinstance(value, SchemaInfo):\n            if self.ref:\n                return self.ref == value.ref\n            return self.schema == value.schema\n        return False\n\n    def child(self, schema: dict[str, Any]) -> SchemaInfo:\n        return self.__class__(schema, rootschema=self.rootschema)\n\n    def iter_descendants(self) -> Iterator[SchemaInfo]:\n        \"\"\"Yields `properties`, `anyOf`, `items`.\"\"\"\n        if \"properties\" in self.schema:\n            yield from self.properties.values()\n        if \"anyOf\" in self.schema:\n            yield from self.anyOf\n        if self.items:\n            yield self.child(self.items)\n\n    def __repr__(self) -> str:\n        keys = []\n        for key in sorted(self.schema.keys()):\n            val = self.schema[key]\n            rval = repr(val).replace(\"\\n\", \"\")\n            if len(rval) > 30:\n                rval = rval[:30] + \"...\"\n            if key == \"definitions\":\n                rval = \"{...}\"\n            elif key == \"properties\":\n                rval = \"{\\n    \" + \"\\n    \".join(sorted(map(repr, val))) + \"\\n  }\"\n            keys.append(f'\"{key}\": {rval}')\n        return \"SchemaInfo({\\n  \" + \"\\n  \".join(keys) + \"\\n})\"\n\n    @property\n    def title(self) -> str:\n        if self.is_reference():\n            return get_valid_identifier(self.refname)\n        else:\n            return \"\"\n\n    @overload\n    def to_type_repr(\n        self,\n        *,\n        as_str: Literal[True] = ...,\n        target: TargetType = ...,\n        use_concrete: bool = ...,\n        use_undefined: bool = ...,\n    ) -> str: ...\n    @overload\n    def to_type_repr(\n        self,\n        *,\n        as_str: Literal[False],\n        target: TargetType = ...,\n        use_concrete: bool = ...,\n        use_undefined: bool = ...,\n    ) -> list[str]: ...\n    def to_type_repr(  # noqa: C901\n        self,\n        *,\n        as_str: bool = True,\n        target: TargetType = \"doc\",\n        use_concrete: bool = False,\n        use_undefined: bool = False,\n    ) -> str | list[str]:\n        \"\"\"\n        Return the python type representation of ``SchemaInfo``.\n\n        Includes `altair` classes, standard `python` types, etc.\n\n        Parameters\n        ----------\n        as_str\n            Return as a string.\n            Should only be ``False`` during internal recursive calls.\n        target: {\"annotation\", \"doc\"}\n            Where the representation will be used.\n        use_concrete\n            Avoid base classes/wrappers that don't provide type info.\n        use_undefined\n            Wrap the result in ``altair.typing.Optional``.\n        \"\"\"\n        tps: set[str] = set()\n        FOR_TYPE_HINTS: bool = target == \"annotation\"\n\n        if self.title:\n            if target == \"annotation\":\n                tps.update(self.title_to_type_reprs(use_concrete=use_concrete))\n            elif target == \"doc\":\n                tps.add(rst_syntax_for_class(self.title))\n\n        if self.is_empty():\n            tps.add(\"Any\")\n        elif self.is_literal():\n            tp_str = spell_literal(self.literal)\n            if FOR_TYPE_HINTS:\n                tp_str = TypeAliasTracer.add_literal(self, tp_str, replace=True)\n            tps.add(tp_str)\n        elif FOR_TYPE_HINTS and self.is_union_literal():\n            it: Iterator[str] = chain.from_iterable(el.literal for el in self.anyOf)\n            tp_str = TypeAliasTracer.add_literal(self, spell_literal(it), replace=True)\n            tps.add(tp_str)\n        elif self.is_anyOf():\n            it_nest = (\n                s.to_type_repr(target=target, as_str=False, use_concrete=use_concrete)\n                for s in self.anyOf\n            )\n            tps.update(maybe_rewrap_literal(chain.from_iterable(it_nest)))\n        elif FOR_TYPE_HINTS and self.is_type_alias_union():\n            it = (\n                SchemaInfo(dict(self.schema, type=tp)).to_type_repr(\n                    target=target, use_concrete=use_concrete\n                )\n                for tp in self.type\n            )\n            tps.add(TypeAliasTracer.add_union(self, it, replace=True))\n        elif isinstance(self.type, list):\n            # We always use title if possible for nested objects\n            tps.update(\n                SchemaInfo(dict(self.schema, type=tp)).to_type_repr(\n                    target=target, use_concrete=use_concrete\n                )\n                for tp in self.type\n            )\n        elif self.is_array():\n            tps.add(\n                spell_nested_sequence(self, target=target, use_concrete=use_concrete)\n            )\n        elif self.type in jsonschema_to_python_types:\n            if self.is_object() and use_concrete:\n                ...  # HACK: Fall-through case to avoid `dict` added to `TypedDict`\n            elif self.is_object() and target == \"doc\":\n                tps.add(\"dict\")\n            else:\n                tps.add(jsonschema_to_python_types[self.type])\n        else:\n            msg = \"No Python type representation available for this schema\"\n            raise ValueError(msg)\n\n        if use_concrete:\n            if tps >= {\"ColorHex\", TypeAliasTracer.fmt.format(\"ColorName\"), \"str\"}:\n                # HACK: Remove regular `str` if HEX & CSS color codes are present as well\n                tps.discard(\"str\")\n            elif len(tps) == 0 and as_str:\n                # HACK: There is a single case that ends up empty here\n                # See: https://github.com/vega/altair/pull/3536#discussion_r1714344162\n                tps = {\"Map\"}\n        return (\n            finalize_type_reprs(tps, target=target, use_undefined=use_undefined)\n            if as_str\n            else sort_type_reprs(tps)\n        )\n\n    @classmethod\n    def to_type_repr_batched(\n        cls,\n        infos: Iterable[SchemaInfo],\n        /,\n        *,\n        target: TargetType = \"doc\",\n        use_concrete: bool = False,\n        use_undefined: bool = False,\n    ) -> str:\n        \"\"\"\n        Return the python type representation of multiple ``SchemaInfo``.\n\n        Intended to handle a subset of a ``Union``.\n\n        Parameters\n        ----------\n        infos\n            Schemas to collapse into a single representation.\n        target: {\"annotation\", \"doc\"}\n            Where the representation will be used.\n        use_concrete\n            Avoid base classes/wrappers that don't provide type info.\n        use_undefined\n            Wrap the result in ``altair.typing.Optional``.\n\n        See Also\n        --------\n        - ``SchemaInfo.to_type_repr``\n        \"\"\"\n        it: Iterator[str] = chain.from_iterable(\n            info.to_type_repr(\n                as_str=False,\n                target=target,\n                use_concrete=use_concrete,\n                use_undefined=False,\n            )\n            for info in infos\n        )\n        return finalize_type_reprs(it, target=target, use_undefined=use_undefined)\n\n    def title_to_type_reprs(self, *, use_concrete: bool) -> set[str]:\n        \"\"\"\n        Possibly use ``self.title`` as a type, or provide alternative(s).\n\n        Parameters\n        ----------\n        use_concrete\n            Avoid base classes/wrappers that don't provide type info.\n        \"\"\"\n        tp_param: set[str] = {\"ExprRef\", \"ParameterExtent\"}\n        # In these cases, a `VariableParameter` is also always accepted.\n        # It could be difficult to differentiate `(Variable|Selection)Parameter`, with typing.\n        # TODO: A solution could be defining `Parameter` as generic over either `param` or `param_type`.\n        # - Rewriting the init logic to not use an `Undefined` default.\n        # - Any narrowing logic could be factored-out into `is_(selection|variable)_parameter` guards.\n        EXCLUDE_TITLE: set[str] = tp_param | {\"RelativeBandSize\"}\n        \"\"\"\n        `RelativeBandSize` excluded as it has a single property `band`,\n        but all instances also accept `float`.\n        \"\"\"\n        REMAP_TITLE = SchemaInfo._remap_title\n        title: str = self.title\n        tps: set[str] = set()\n        if not use_concrete:\n            tps.add(\"SchemaBase\")\n            # NOTE: To keep type hints simple, we annotate with `SchemaBase` for all subclasses.\n            if title in tp_param:\n                tps.add(\"Parameter\")\n            if self.is_datetime():\n                tps.add(\"Temporal\")\n            if self.is_top_level_spec_data():\n                tps.add(\"ChartDataType\")\n        elif self.is_value():\n            value = self.properties[\"value\"]\n            t = value.to_type_repr(target=\"annotation\", use_concrete=use_concrete)\n            tps.add(f\"Value[{t}]\")\n        elif self.is_rowcol():\n            row = self.properties[\"row\"]\n            t = row.to_type_repr(target=\"annotation\", use_concrete=use_concrete)\n            tps.add(f\"RowColKwds[{t}]\")\n        elif title in REMAP_TITLE:\n            tps.update(REMAP_TITLE[title])\n        elif (\n            (title not in EXCLUDE_TITLE)\n            and not TypeAliasTracer.is_cached(title, include_concrete=use_concrete)\n            and not self.is_union()\n            and not self.is_format()\n            and not self.is_array()\n            and not self.is_type_alias()\n            and not self.additionalProperties\n        ):\n            tps.add(title)\n        return tps\n\n    @property\n    def properties(self) -> SchemaProperties:\n        return SchemaProperties(\n            self.schema.get(\"properties\", {}), self.schema, self.rootschema\n        )\n\n    @property\n    def definitions(self) -> SchemaProperties:\n        return SchemaProperties(\n            self.schema.get(\"definitions\", {}), self.schema, self.rootschema\n        )\n\n    @property\n    def required(self) -> list[str]:\n        return self.schema.get(\"required\", [])\n\n    @property\n    def patternProperties(self) -> dict[str, Any]:\n        return self.schema.get(\"patternProperties\", {})\n\n    @property\n    def additionalProperties(self) -> bool:\n        return self.schema.get(\"additionalProperties\", True)\n\n    @property\n    def type(self) -> str | list[Any]:\n        return self.schema.get(\"type\", \"\")\n\n    @property\n    def anyOf(self) -> Iterator[SchemaInfo]:\n        for s in self.schema.get(\"anyOf\", []):\n            yield self.child(s)\n\n    @property\n    def oneOf(self) -> Iterator[SchemaInfo]:\n        for s in self.schema.get(\"oneOf\", []):\n            yield self.child(s)\n\n    @property\n    def allOf(self) -> Iterator[SchemaInfo]:\n        for s in self.schema.get(\"allOf\", []):\n            yield self.child(s)\n\n    @property\n    def not_(self) -> SchemaInfo:\n        return self.child(self.schema.get(\"not\", {}))\n\n    @property\n    def items(self) -> dict[str, Any]:\n        return self.schema.get(\"items\", {})\n\n    @property\n    def enum(self) -> list[str]:\n        return self.schema.get(\"enum\", [])\n\n    @property\n    def const(self) -> str:\n        return self.schema.get(\"const\", \"\")\n\n    @property\n    def literal(self) -> list[str]:\n        return self.schema.get(\"enum\", [self.const])\n\n    @property\n    def refname(self) -> str:\n        return self.raw_schema.get(\"$ref\", \"#/\").split(\"/\")[-1]\n\n    @property\n    def ref(self) -> str:\n        return self.raw_schema.get(\"$ref\", \"\")\n\n    @property\n    def description(self) -> str:\n        return self._get_description(include_sublevels=False)\n\n    @property\n    def deep_description(self) -> str:\n        return process_description(self._get_description(include_sublevels=True))\n\n    def _get_description(self, include_sublevels: bool = False) -> str:\n        desc = self.raw_schema.get(\"description\", self.schema.get(\"description\", \"\"))\n        if not desc and include_sublevels:\n            for item in self.anyOf:\n                sub_desc = item._get_description(include_sublevels=False)\n                if desc and sub_desc:\n                    raise ValueError(\n                        \"There are multiple potential descriptions which could\"\n                        + \" be used for the currently inspected schema. You'll need to\"\n                        + \" clarify which one is the correct one.\\n\"\n                        + str(self.schema)\n                    )\n                if sub_desc:\n                    desc = sub_desc\n        return desc\n\n    def is_reference(self) -> bool:\n        return \"$ref\" in self.raw_schema\n\n    def is_enum(self) -> bool:\n        return \"enum\" in self.schema\n\n    def is_const(self) -> bool:\n        return \"const\" in self.schema\n\n    def is_literal(self) -> bool:\n        \"\"\"\n        Return True for `const`_ or `enum`_ values.\n\n        JSON Schema distinguishes between singular/multiple values.\n\n        But we annotate them both the same way:\n\n            ConstInfo = Literal[\"single value\"]\n            EnumInfo = Literal[\"value 1\", \"value 2\", \"value 3\"]\n\n        .. _const:\n            https://json-schema.org/understanding-json-schema/reference/const\n        .. _enum:\n            https://json-schema.org/understanding-json-schema/reference/enum\n        \"\"\"\n        return not ({\"enum\", \"const\"}.isdisjoint(self.schema))\n\n    def is_empty(self) -> bool:\n        return not (self.schema.keys() - EXCLUDE_KEYS)\n\n    def is_compound(self) -> bool:\n        return any(key in self.schema for key in COMPOUND_KEYS)\n\n    def is_anyOf(self) -> bool:\n        return \"anyOf\" in self.schema\n\n    def is_allOf(self) -> bool:\n        return \"allOf\" in self.schema\n\n    def is_oneOf(self) -> bool:\n        return \"oneOf\" in self.schema\n\n    def is_not(self) -> bool:\n        return \"not\" in self.schema\n\n    def is_object(self) -> bool:\n        if self.type == \"object\":\n            return True\n        elif self.type:\n            return False\n        elif (\n            self.properties\n            or self.required\n            or self.additionalProperties\n            or self.patternProperties\n        ):\n            return True\n        else:\n            msg = \"Unclear whether schema.is_object() is True\"\n            raise ValueError(msg)\n\n    def is_value(self) -> bool:\n        return self.is_object() and self.properties.keys() == {\"value\"}\n\n    def is_rowcol(self) -> bool:\n        props = self.properties\n        return (\n            self.is_object()\n            and props.keys() == {\"column\", \"row\"}\n            and props[\"column\"] == props[\"row\"]\n        )\n\n    def is_array(self) -> bool:\n        return self.type == \"array\"\n\n    def is_union(self) -> bool:\n        \"\"\"\n        Candidate for ``Union`` type alias.\n\n        Not a real class.\n        \"\"\"\n        return self.is_anyOf() and not self.type\n\n    def is_union_literal(self) -> bool:\n        \"\"\"\n        Candidate for reducing to a single ``Literal`` alias.\n\n        E.g. `BinnedTimeUnit`\n        \"\"\"\n        return self.is_union() and all(el.is_literal() for el in self.anyOf)\n\n    def is_primitive(self) -> bool:\n        \"\"\"\n        A basic JSON Schema `type`_ or an array of **only** basic types.\n\n        .. _type:\n        https://json-schema.org/understanding-json-schema/reference/type\n        \"\"\"\n        TP = \"type\"\n        return (self.schema.keys() == {TP}) or (\n            self.is_array() and self.child(self.items).is_primitive()\n        )\n\n    def is_flattenable(self) -> bool:\n        \"\"\"\n        Represents a range of cases we want to annotate in ``@overload``(s).\n\n        Examples\n        --------\n        The following are non-exhaustive examples, using ``python`` types.\n\n        Base cases look like:\n\n            Literal[\"left\", \"center\", \"right\"]\n            float\n            Sequence[str]\n\n        We also include compound cases, but only when **every** member meets these criteria:\n\n            Literal[\"pad\", \"none\", \"fit\"] | None\n            float | Sequence[float]\n            Sequence[str] | str | bool | float | None\n        \"\"\"\n        return self.is_literal() or self.is_primitive() or self.is_union_flattenable()\n\n    def is_union_flattenable(self) -> bool:\n        \"\"\"\n        Represents a fully flattenable ``Union``.\n\n        Used to prevent ``@overload`` explosion in ``channels.py``\n\n        Requires **every** member of the ``Union`` satisfies *at least* **one** the criteria.\n\n        See Also\n        --------\n        - ``SchemaInfo.is_literal``\n        - ``SchemaInfo.is_array``\n        - ``SchemaInfo.is_primitive``\n        - ``SchemaInfo.is_flattenable``\n        \"\"\"\n        if not self.is_union():\n            return False\n        else:\n            fns = (\n                SchemaInfo.is_literal,\n                SchemaInfo.is_array,\n                SchemaInfo.is_primitive,\n                SchemaInfo.is_union_flattenable,\n            )\n            return all(any(fn(el) for fn in fns) for el in self.anyOf)\n\n    def is_format(self) -> bool:\n        \"\"\"\n        Represents a string format specifier.\n\n        These do not currently produce useful classes (e.g. ``HexColor``, ``URI``).\n\n        See Also\n        --------\n        [python-jsonschema](https://python-jsonschema.readthedocs.io/en/latest/faq/#my-schema-specifies-format-validation-why-do-invalid-instances-seem-valid)\n        \"\"\"\n        return (self.schema.keys() == {\"format\", \"type\"}) and self.type == \"string\"\n\n    def is_type_alias(self) -> bool:\n        \"\"\"\n        Represents a name assigned to a literal type.\n\n        At the time of writing, most of these are:\n\n            SchemaInfo.schema = {\"type\": \"string\"}\n\n        The resulting annotation then becomes, e.g. ``FieldName``:\n\n            arg: str | FieldName\n\n        Where both of the above represent:\n\n            arg = \"name 1\"\n            arg = FieldName(\"name 1\")\n\n        The latter is not useful and adds noise.\n\n        ``Dict`` is very similar case, with a *slightly* different schema:\n\n            SchemaInfo.schema = {\"additionalProperties\": {}, \"type\": \"object\"}\n        \"\"\"\n        TP = \"type\"\n        ADDITIONAL = \"additionalProperties\"\n        keys = self.schema.keys()\n        return (\n            (\n                (keys == {TP})\n                or (keys == {TP, ADDITIONAL} and self.schema[ADDITIONAL] == {})\n            )\n            and isinstance(self.type, str)\n            and self.type in jsonschema_to_python_types\n        )\n\n    def is_type_alias_union(self) -> bool:\n        \"\"\"\n        Represents a name assigned to a list of literal types.\n\n        Example:\n\n            {\"PrimitiveValue\": {\"type\": [\"number\", \"string\", \"boolean\", \"null\"]}}\n\n        Translating from JSON -> Python, this is the same as an ``\"anyOf\"`` -> ``Union``.\n\n        The distinction in the schema is purely due to these types being defined in the draft, rather than definitions.\n        \"\"\"\n        TP = \"type\"\n        return (\n            self.schema.keys() == {TP}\n            and isinstance(self.type, list)\n            and bool(self.title)\n        )\n\n    def is_theme_config_target(self) -> bool:\n        \"\"\"\n        Return `True` for candidates  classes in ``ThemeConfig`` hierarchy of ``TypedDict``(s).\n\n        Satisfying these rules ensures:\n        - we generate meaningful annotations\n        - they improve autocompletion, without overwhelming the UX\n        \"\"\"\n        EXCLUDE = {\"ExprRef\", \"ParameterPredicate\", \"RelativeBandSize\"}\n        return bool(\n            self.ref\n            and self.refname not in EXCLUDE\n            and self.properties\n            and self.type == \"object\"\n            and not self.is_value()\n            and \"field\" not in self.required\n            and not (iskeyword(next(iter(self.required), \"\")))\n        )\n\n    def is_datetime(self) -> bool:\n        return self.refname == \"DateTime\"\n\n    def is_top_level_spec_data(self) -> bool:\n        return self.refname == \"Data\"\n\n\nclass Grouped(Generic[T]):\n    \"\"\"\n    Simple group-by like utility.\n\n    Intended for consuming an iterator in full, splitting into true/false cases.\n\n    Parameters\n    ----------\n    iterable\n        Elements to divide into two groups.\n    predicate\n        Function to classify each element.\n\n    Attributes\n    ----------\n    truthy: deque[T]\n        Elements which pass ``predicate``.\n    falsy: deque[T]\n        Elements which fail ``predicate``.\n    \"\"\"\n\n    def __init__(\n        self, iterable: Iterable[T], /, predicate: Callable[[T], bool]\n    ) -> None:\n        truthy, falsy = deque[T](), deque[T]()\n        for el in iterable:\n            if predicate(el):\n                truthy.append(el)\n            else:\n                falsy.append(el)\n        self.truthy: deque[T] = truthy\n        self.falsy: deque[T] = falsy\n\n\nclass RemapContext(AbstractContextManager):\n    \"\"\"\n    Context Manager to temporarily apply substitution rules for ``SchemaInfo``.\n\n    Upon exiting, the original rules will be in effect.\n\n    Notes\n    -----\n    The constructor accepts arguments exactly the same way as ``dict``.\n    \"\"\"\n\n    def __init__(\n        self,\n        m: SupportsKeysAndGetItem[str, Sequence[str]]\n        | Iterable[tuple[str, Sequence[str]]] = (),\n        /,\n        **kwds: Sequence[str],\n    ) -> None:\n        self._mapping: Mapping[str, Sequence[str]] = dict(m, **kwds)\n        self._orig: Mapping[str, Sequence[str]]\n\n    def __enter__(self) -> Any:\n        self._orig = deepcopy(SchemaInfo._remap_title)\n        SchemaInfo._remap_title.update(self._mapping)\n        return self\n\n    def __exit__(self, *args) -> None:\n        SchemaInfo._remap_title = dict(**self._orig)\n        del self._orig\n\n\ndef flatten(container: Iterable) -> Iterable:\n    \"\"\"\n    Flatten arbitrarily flattened list.\n\n    From https://stackoverflow.com/a/10824420\n    \"\"\"\n    for i in container:\n        if isinstance(i, (list, tuple)):\n            yield from flatten(i)\n        else:\n            yield i\n\n\ndef finalize_type_reprs(\n    tps: Iterable[str],\n    /,\n    *,\n    target: TargetType,\n    use_undefined: bool = False,\n) -> str:\n    \"\"\"\n    Deduplicates, sorts, and returns ``tps`` as a single string.\n\n    Parameters\n    ----------\n    tps\n        Collected type representations.\n    target\n        Destination for the type.\n\n        .. note::\n            `\"doc\"` skips ``(Union|Optional)`` wrappers.\n\n    use_undefined\n        Wrap the result in `altair.typing.Optional`.\n        Avoids exposing `UndefinedType`.\n    \"\"\"\n    return _collapse_type_repr(\n        sort_type_reprs(tps), target=target, use_undefined=use_undefined\n    )\n\n\ndef _collapse_type_repr(\n    tps: Iterable[str],\n    /,\n    *,\n    target: TargetType,\n    use_undefined: bool = False,\n) -> str:\n    \"\"\"\n    Flatten unique types into a single string.\n\n    See Also\n    --------\n    - ``utils.finalize_type_reprs``\n    \"\"\"\n    tp_str = \", \".join(tps)\n    if target == \"doc\":\n        return tp_str\n    elif target == \"annotation\":\n        if \",\" in tp_str:\n            tp_str = f\"Union[{tp_str}]\"\n        return f\"Optional[{tp_str}]\" if use_undefined else tp_str\n    else:\n        msg = f\"Unexpected {target=}.\\nUse one of {['annotation', 'doc']!r}\"\n        raise TypeError(msg)\n\n\ndef sort_type_reprs(tps: Iterable[str], /) -> list[str]:\n    \"\"\"\n    Shorter types are usually the more relevant ones, e.g. `str` instead of `SchemaBase`.\n\n    We use `set`_ for unique elements, but the lack of ordering requires additional sorts:\n    - If types have same length names, order would still be non-deterministic\n    - Hence, we sort as well by type name as a tie-breaker, see `sort-stability`_.\n    - Using ``str.lower`` gives priority to `builtins`_.\n    - Lower priority is given to generated aliases from ``TypeAliasTracer``.\n        - These are purely to improve autocompletion\n    - ``None`` will always appear last.\n\n    Related\n    -------\n    - https://github.com/vega/altair/pull/3573#discussion_r1747121600\n\n    Examples\n    --------\n    >>> sort_type_reprs([\"float\", \"None\", \"bool\", \"Chart\", \"float\", \"bool\", \"Chart\", \"str\"])\n    ['str', 'bool', 'float', 'Chart', 'None']\n\n    >>> sort_type_reprs((\"None\", \"int\", \"Literal[5]\", \"int\", \"float\"))\n    ['int', 'float', 'Literal[5]', 'None']\n\n    >>> sort_type_reprs({\"date\", \"int\", \"str\", \"datetime\", \"Date\"})\n    ['int', 'str', 'date', 'datetime', 'Date']\n\n    .. _set:\n        https://docs.python.org/3/tutorial/datastructures.html#sets\n    .. _sort-stability:\n        https://docs.python.org/3/howto/sorting.html#sort-stability-and-complex-sorts\n    .. _builtins:\n        https://docs.python.org/3/library/functions.html\n    \"\"\"\n    dedup = tps if isinstance(tps, set) else set(tps)\n    it = sorted(dedup, key=str.lower)  # Quinary sort\n    it = sorted(it, key=len)  # Quaternary sort\n    it = sorted(it, key=TypeAliasTracer.is_cached)  # Tertiary sort\n    it = sorted(it, key=is_not_stdlib)  # Secondary sort\n    it = sorted(it, key=is_none)  # Primary sort\n    return it\n\n\ndef is_not_stdlib(s: str, /) -> bool:\n    \"\"\"\n    Sort key.\n\n    Places a subset of stdlib types at the **start** of list.\n    \"\"\"\n    return s not in _STDLIB_TYPE_NAMES\n\n\ndef is_none(s: str, /) -> bool:\n    \"\"\"\n    Sort key.\n\n    Always places ``None`` at the **end** of list.\n    \"\"\"\n    return s == \"None\"\n\n\ndef spell_nested_sequence(\n    info: SchemaInfo, *, target: TargetType, use_concrete: bool\n) -> str:\n    \"\"\"\n    Return a type representation for an array.\n\n    Notes\n    -----\n    A list is invariant in its type parameter.\n\n    This means that ``list[str]`` is not a subtype of ``list[FieldName | str]``\n    and hence we would need to explicitly write out the combinations,\n    so in this case:\n\n        Accepted: list[FieldName] | list[str] | list[FieldName | str]\n\n    However, this can easily explode to too many combinations.\n\n    Furthermore, we would also need to add additional entries\n    for e.g. ``int`` wherever a ``float`` is accepted which would lead to very\n    long code.\n\n    As suggested in the `mypy docs`_ we revert to using ``Sequence``.\n\n    This includes ``list``, ``tuple`` and many others supported by ``SchemaBase.to_dict``.\n\n    The original example becomes:\n\n        Accepted: Sequence[FieldName | str]\n\n    .. _mypy docs:\n        https://mypy.readthedocs.io/en/stable/common_issues.html#variance\n\n    \"\"\"\n    child: SchemaInfo = info.child(info.items)\n    s = child.to_type_repr(target=target, use_concrete=use_concrete)\n    return f\"Sequence[{s}]\"\n\n\ndef spell_literal(it: Iterable[str], /, *, quote: bool = True) -> str:\n    \"\"\"\n    Combine individual ``str`` type reprs into a single ``Literal``.\n\n    Parameters\n    ----------\n    it\n        Type representations.\n    quote\n        Call ``repr()`` on each element in ``it``.\n\n        .. note::\n            Set to ``False`` if performing a second pass.\n    \"\"\"\n    it_el: Iterable[str] = (f\"{s!r}\" for s in it) if quote else it\n    return f\"Literal[{', '.join(it_el)}]\"\n\n\ndef spell_literal_alias(\n    alias_name: str, members: Iterable[str], /, *, quote: bool = True\n) -> str:\n    \"\"\"\n    Wraps ``utils.spell_literal`` as a ``TypeAlias``.\n\n    Examples\n    --------\n    >>> spell_literal_alias(\"Animals\", (\"Dog\", \"Cat\", \"Fish\"))\n    \"Animals: TypeAlias = Literal['Dog', 'Cat', 'Fish']\"\n\n    >>> spell_literal_alias(\"Digits\", \"0123456789\")\n    \"Digits: TypeAlias = Literal['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\"\n\n    >>> spell_literal_alias(\"LessThanFive\", (repr(i) for i in range(5)))\n    \"LessThanFive: TypeAlias = Literal['0', '1', '2', '3', '4']\"\n    \"\"\"\n    return f\"{alias_name}: TypeAlias = {spell_literal(members, quote=quote)}\"\n\n\ndef maybe_rewrap_literal(it: Iterable[str], /) -> Iterator[str]:\n    \"\"\"\n    Where `it` may contain one or more `\"enum\"`, `\"const\"`, flatten to a single `Literal[...]`.\n\n    All other type representations are yielded unchanged.\n    \"\"\"\n    seen: set[str] = set()\n    for s in it:\n        if s.startswith(\"Literal[\"):\n            seen.add(unwrap_literal(s))\n        else:\n            yield s\n    if seen:\n        yield spell_literal(sorted(seen), quote=False)\n\n\ndef unwrap_literal(tp: str, /) -> str:\n    \"\"\"`\"Literal['value']\"` -> `\"value\"`.\"\"\"\n    return re.sub(r\"Literal\\[(.+)\\]\", r\"\\g<1>\", tp)\n\n\ndef import_type_checking(*imports: str) -> str:\n    \"\"\"Write an `if TYPE_CHECKING` block.\"\"\"\n    imps = \"\\n\".join(f\"    {s}\" for s in imports)\n    return (\n        f\"from typing import TYPE_CHECKING\\n\\n\"\n        f\"if TYPE_CHECKING:\\n\"\n        f\"    # ruff: noqa: F405\\n\"\n        f\"{imps}\\n\"\n    )\n\n\ndef import_typing_extensions(\n    version_added: tuple[float, float],\n    /,\n    *symbol_names: str,\n    reason: str | None = None,\n    include_sys: bool = False,\n) -> str:\n    major, minor = version_added\n    names = \", \".join(symbol_names)\n    line_1 = \"import sys\\n\" if include_sys else \"\\n\"\n    comment = f\" # {reason}\" if reason else \"\"\n    return (\n        f\"{line_1}\"\n        f\"if sys.version_info >= ({major}, {minor}):{comment}\\n    \"\n        f\"from typing import {names}\\n\"\n        f\"else:\\n    \"\n        f\"from typing_extensions import {names}\"\n    )\n\n\nTypeAliasTracer: _TypeAliasTracer = _TypeAliasTracer(\"{}_T\")\n\"\"\"An instance of `_TypeAliasTracer`.\n\nCollects a cache of unique `Literal` types used globally.\n\nThese are then converted to `TypeAlias` statements, written to another module.\n\nAllows for a single definition to be reused multiple times,\nrather than repeating long literals in every method definition.\n\"\"\"\n\n\ndef indent_docstring(  # noqa: C901\n    lines: Iterable[str], indent_level: int, width: int = 100, lstrip=True\n) -> str:\n    \"\"\"Indent a docstring for use in generated code.\"\"\"\n    final_lines = []\n    if not isinstance(lines, list):\n        lines = list(lines)\n    if len(lines) > 1:\n        lines += [\"\"]\n\n    for i, line in enumerate(lines):\n        stripped = line.lstrip()\n        if stripped:\n            leading_space = len(line) - len(stripped)\n            indent = indent_level + leading_space\n            wrapper = textwrap.TextWrapper(\n                width=width - indent,\n                initial_indent=indent * \" \",\n                subsequent_indent=indent * \" \",\n                break_long_words=False,\n                break_on_hyphens=False,\n                drop_whitespace=True,\n            )\n            list_wrapper = textwrap.TextWrapper(\n                width=width - indent,\n                initial_indent=indent * \" \" + \"* \",\n                subsequent_indent=indent * \" \" + \"  \",\n                break_long_words=False,\n                break_on_hyphens=False,\n                drop_whitespace=True,\n            )\n            for line in stripped.split(\"\\n\"):\n                line_stripped = line.lstrip()\n                line_stripped = fix_docstring_issues(line_stripped)\n                if line_stripped == \"\":\n                    final_lines.append(\"\")\n                elif line_stripped.startswith(\"* \"):\n                    final_lines.extend(list_wrapper.wrap(line_stripped[2:]))\n                # Matches lines where an attribute is mentioned followed by the accepted\n                # types (lines starting with a character sequence that\n                # does not contain white spaces or '*' followed by ' : ').\n                # It therefore matches 'condition : anyOf(...' but not '**Notes** : ...'\n                # These lines should not be wrapped at all but appear on one line\n                elif re.match(r\"[^\\s*]+ : \", line_stripped):\n                    final_lines.append(indent * \" \" + line_stripped)\n                else:\n                    final_lines.extend(wrapper.wrap(line_stripped))\n\n        # If this is the last line, put in an indent\n        elif i + 1 == len(lines):\n            final_lines.append(indent_level * \" \")\n        # If it's not the last line, this is a blank line that should not indent.\n        else:\n            final_lines.append(\"\")\n    # Remove any trailing whitespaces on the right side\n    stripped_lines = []\n    for i, line in enumerate(final_lines):\n        if i + 1 == len(final_lines):\n            stripped_lines.append(line)\n        else:\n            stripped_lines.append(line.rstrip())\n    # Join it all together\n    wrapped = \"\\n\".join(stripped_lines)\n    if lstrip:\n        wrapped = wrapped.lstrip()\n    return wrapped\n\n\ndef fix_docstring_issues(docstring: str) -> str:\n    \"\"\"\n    All lists should start with `\"* \"`.\n\n    1. Fixes the ones which either do not have `\" \"` and/or start with `\"-\"` replacing `\"-\"` ->  `\"*\"` and then adding `\" \"` where necessary.\n    2. Now add a `\" \"` where a `\"*\"` is followed by one of the characters in the square brackets of the regex pattern.\n\n    Parameters\n    ----------\n    docstring\n        A processed docstring line.\n    \"\"\"\n    return _RE_LIST_MISSING_WHITESPACE.sub(\n        \"* \", _RE_LIST_MISSING_ASTERISK.sub(\"*\", docstring)\n    )\n\n\nrst_parse: RSTParseVegaLite = RSTParseVegaLite()\n\n\n# TODO: Investigate `mistune.Markdown.(before|after)_render_hooks`.\ndef process_description(description: str) -> str:\n    \"\"\"Parse a JSON encoded markdown description into an `RST` string.\"\"\"\n    return rst_parse(description)\n"
  },
  {
    "path": "tools/sync_website.py",
    "content": "from __future__ import annotations\n\nimport argparse\nimport os\nfrom typing import TYPE_CHECKING\n\nfrom tools import fs\n\nif TYPE_CHECKING:\n    from pathlib import Path\n    from typing import Literal\n\nDOC_REPO_ORG: Literal[\"altair-viz\"] = \"altair-viz\"\nGITHUB: Literal[\"github\"] = \"github\"\nWEBSITE: str = f\"{DOC_REPO_ORG}.{GITHUB}.io\"\nDOC_REPO_URL: str = f\"https://{GITHUB}.com/{DOC_REPO_ORG}/{WEBSITE}.git\"\n\n\nDOC_DIR: Path = fs.REPO_ROOT / \"doc\"\nDOC_BUILD_DIR: Path = DOC_DIR / \"_build\"\nDOC_REPO_DIR: Path = DOC_BUILD_DIR / WEBSITE\nDOC_HTML_DIR: Path = DOC_BUILD_DIR / \"html\"\nDOC_BUILD_INFO: Path = DOC_HTML_DIR / \".buildinfo\"\n\nCMD_CLONE = \"git\", \"clone\", DOC_REPO_URL\nCMD_PULL = \"git\", \"pull\"\nCMD_HEAD_HASH = \"git\", \"rev-parse\", \"HEAD\"\nCMD_ADD = \"git\", \"add\", \".\", \"--all\", \"--force\"\nCMD_COMMIT = \"git\", \"commit\", \"-m\"\nCMD_PUSH = \"git\", \"push\", \"origin\", \"master\"\n\nCOMMIT_MSG_PREFIX = \"doc build for commit\"\nUNTRACKED = \".git\"\n\n\ndef clone_or_sync_repo() -> None:\n    os.chdir(DOC_BUILD_DIR)\n    if not DOC_REPO_DIR.exists():\n        print(f\"Cloning repo {WEBSITE!r}\\n  -> {fs.path_repr(DOC_REPO_DIR)}\")\n        fs.run_stream_stdout(CMD_CLONE)\n    else:\n        print(f\"Using existing cloned altair directory {fs.path_repr(DOC_REPO_DIR)}\")\n        os.chdir(DOC_REPO_DIR)\n        print(f\"Syncing {WEBSITE!r}\\n  -> {fs.path_repr(DOC_REPO_DIR)} ...\")\n        fs.run_stream_stdout(CMD_PULL)\n\n\ndef remove_tracked_files() -> None:\n    os.chdir(DOC_REPO_DIR)\n    print(f\"Removing all tracked files from {fs.path_repr(DOC_REPO_DIR)} ...\")\n    for fp in DOC_REPO_DIR.iterdir():\n        if fp.name == UNTRACKED:\n            continue\n        fs.rm(fp)\n\n\ndef sync_from_html_build() -> None:\n    print(f\"Syncing files from {fs.path_repr(DOC_HTML_DIR)} ...\")\n    copy_ret = fs.copytree(DOC_HTML_DIR, DOC_REPO_DIR)\n    print(f\"Successful copy to: {fs.path_repr(copy_ret)}\")\n\n\ndef generate_commit_message() -> str:\n    os.chdir(DOC_REPO_DIR)\n    print(\"Generating commit message ...\")\n    return f\"{COMMIT_MSG_PREFIX} {fs.run_check(CMD_HEAD_HASH).stdout.strip()}\"\n\n\ndef add_commit_push_github(msg: str, /, *, dry_run: bool) -> None:\n    os.chdir(DOC_REPO_DIR)\n    print(\"Pushing ...\")\n    cmd_commit = *CMD_COMMIT, msg\n    cmd_push = (*CMD_PUSH, \"--dry-run\") if dry_run else CMD_PUSH\n    commands = (CMD_ADD, cmd_commit, cmd_push)\n    for command in commands:\n        fs.run_stream_stdout(command)\n\n\ndef ensure_build_html() -> None:\n    if not fs.dir_exists(DOC_HTML_DIR):\n        raise FileNotFoundError(DOC_HTML_DIR)\n    if not DOC_BUILD_INFO.exists():\n        raise FileNotFoundError(DOC_BUILD_INFO)\n    fs.mkdir(DOC_REPO_DIR)\n    time = fs.modified_time(DOC_BUILD_INFO).isoformat(\" \", \"seconds\")\n    print(f\"Docs last build time: {time!r}\")\n\n\ndef main(*, dry_run: bool = False) -> None:\n    ensure_build_html()\n    commit_message = generate_commit_message()\n    clone_or_sync_repo()\n    remove_tracked_files()\n    sync_from_html_build()\n    add_commit_push_github(commit_message, dry_run=dry_run)\n\n\nif __name__ == \"__main__\":\n    parser = argparse.ArgumentParser(prog=\"sync_website.py\")\n    parser.add_argument(\"--dry-run\", action=\"store_true\")\n    args = parser.parse_args()\n    main(dry_run=args.dry_run)\n"
  },
  {
    "path": "tools/update_init_file.py",
    "content": "\"\"\"Updates the attribute __all__ in altair/__init__.py based on the updated Altair schema.\"\"\"\n\nfrom __future__ import annotations\n\nimport collections.abc as cabc\nimport typing as t\nimport typing_extensions as te\nfrom collections.abc import Sequence\nfrom importlib import import_module as _import_module\nfrom importlib.util import find_spec as _find_spec\nfrom inspect import getattr_static, ismodule\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\n\nfrom tools.codemod import ruff\n\nif TYPE_CHECKING:\n    from collections.abc import Iterable, Iterator\n\n_TYPING_CONSTRUCTS: set[t.Any] = {\n    te.TypeAlias,\n    t.TypeVar,\n    t.cast,\n    t.overload,\n    te.runtime_checkable,\n    list,\n    dict,\n    tuple,\n    t.Any,\n    t.Literal,\n    t.Union,\n    cabc.Iterable,\n    t.Protocol,\n    te.Protocol,\n    Sequence,\n    t.IO,\n    annotations,\n    te.Required,\n    te.TypedDict,\n    t.TypedDict,\n    te.Self,\n    te.deprecated,\n    te.TypeAliasType,\n}\n\nDYNAMIC_ALL: tuple[te.LiteralString, ...] = (\"altair.vegalite.v6\",)\n\n\ndef update__all__variable() -> None:\n    \"\"\"\n    Updates the __all__ variable to all relevant attributes of top-level Altair.\n\n    This is for example useful to hide deprecated attributes from code completion in\n    Jupyter.\n    \"\"\"\n    # Read existing file content\n    import altair as alt\n\n    init_path = normalize_source(\"altair\")\n    lines = extract_lines(init_path, strip_chars=\"\\n\")\n\n    # Find first and last line of the definition of __all__\n    first_definition_line = None\n    last_definition_line = None\n    for idx, line in enumerate(lines):\n        if line.startswith(\"__all__ =\"):\n            first_definition_line = idx\n        elif first_definition_line is not None and line.startswith(\"]\"):\n            last_definition_line = idx\n            break\n    assert first_definition_line is not None\n    assert last_definition_line is not None\n\n    # Put file back together, replacing old definition of __all__ with new one, keeping\n    # the rest of the file as is\n    new_lines = [\n        *lines[:first_definition_line],\n        f\"__all__ = {relevant_attributes(alt.__dict__)}\",\n        *lines[last_definition_line + 1 :],\n    ]\n    # Write new version of altair/__init__.py\n    # Format file content with ruff\n    ruff.write_lint_format(init_path, new_lines)\n\n    for source in DYNAMIC_ALL:\n        print(f\"Updating `__all__`\\n {source!r}\\n  ->{normalize_source(source)!s}\")\n        update_dynamic__all__(source)\n\n\ndef relevant_attributes(namespace: dict[str, t.Any], /) -> list[str]:\n    \"\"\"\n    Figure out which attributes in `__all__` are relevant.\n\n    Returns an alphabetically sorted list, to insert into `__all__`.\n\n    Parameters\n    ----------\n    namespace\n        A module dict, like `altair.__dict__`\n    \"\"\"\n    from altair.vegalite.v6.schema import _typing\n\n    # NOTE: Exclude any `TypeAlias` that were reused in a runtime definition.\n    # Required for imports from `_typing`, outside of a `TYPE_CHECKING` block.\n    _TYPING_CONSTRUCTS.update(\n        (\n            v\n            for k, v in _typing.__dict__.items()\n            if (not k.startswith(\"__\")) and _is_hashable(v)\n        )\n    )\n    it = (\n        name\n        for name, attr in namespace.items()\n        if (not name.startswith(\"_\")) and _is_relevant(attr, name)\n    )\n    return sorted(it)\n\n\ndef _is_hashable(obj: t.Any) -> bool:\n    \"\"\"Guard to prevent an `in` check occurring on mutable objects.\"\"\"\n    try:\n        return bool(hash(obj))\n    except TypeError:\n        return False\n\n\ndef _is_relevant(attr: t.Any, name: str, /) -> bool:\n    \"\"\"Predicate logic for filtering attributes.\"\"\"\n    if (\n        getattr_static(attr, \"_deprecated\", False)\n        or attr is TYPE_CHECKING\n        or (_is_hashable(attr) and attr in _TYPING_CONSTRUCTS)\n        or name in {\"pd\", \"jsonschema\"}\n        or getattr_static(attr, \"__deprecated__\", False)\n    ):\n        return False\n    elif ismodule(attr):\n        # Only include modules which are part of Altair. This excludes built-in\n        # modules (they do not have a __file__ attribute), standard library,\n        # and third-party packages.\n        return getattr_static(attr, \"__file__\", \"\").startswith(str(Path.cwd()))\n    else:\n        return True\n\n\ndef _retrieve_all(name: str, /) -> list[str]:\n    \"\"\"Import `name` and return a defined ``__all__``.\"\"\"\n    found = _import_module(name).__all__\n    if not found:\n        msg = (\n            f\"Expected to find a populated `__all__` for {name!r},\\nbut got: {found!r}\"\n        )\n        raise AttributeError(msg)\n    return found\n\n\ndef normalize_source(src: str | Path, /) -> Path:\n    \"\"\"\n    Return the ``Path`` representation of a module/package.\n\n    Returned unchanged if already a ``Path``.\n    \"\"\"\n    if isinstance(src, str):\n        if src == \"altair\" or src.startswith(\"altair.\"):\n            if (spec := _find_spec(src)) and (origin := spec.origin):\n                src = origin\n            else:\n                raise ModuleNotFoundError(src, spec)\n        return Path(src)\n    else:\n        return src\n\n\ndef extract_lines(fp: Path, /, strip_chars: str | None = None) -> list[str]:\n    \"\"\"Return all lines in ``fp`` with whitespace stripped.\"\"\"\n    with Path(fp).open(encoding=\"utf-8\") as f:\n        lines = f.readlines()\n        if not lines:\n            msg = f\"Found no content when reading lines for:\\n{lines!r}\"\n            raise NotImplementedError(msg)\n    return [line.strip(strip_chars) for line in lines]\n\n\ndef _normalize_import_lines(lines: Iterable[str]) -> Iterator[str]:\n    \"\"\"\n    Collapses file content to contain one line per import source.\n\n    Preserves only lines **before** an existing ``__all__``.\n    \"\"\"\n    it: Iterator[str] = iter(lines)\n    for line in it:\n        if line.endswith(\"(\"):\n            line = line.rstrip(\"( \")\n            for s_line in it:\n                if s_line.endswith(\",\"):\n                    line = f\"{line} {s_line}\"\n                elif s_line.endswith(\")\"):\n                    break\n                else:\n                    NotImplementedError(f\"Unexpected line:\\n{s_line!r}\")\n            yield line.rstrip(\",\")\n        elif line.startswith(\"__all__\"):\n            break\n        else:\n            yield line\n\n\ndef process_lines(lines: Iterable[str], /) -> Iterator[str]:\n    \"\"\"Normalize imports, follow ``*``(s), reconstruct `__all__``.\"\"\"\n    _all: set[str] = set()\n    for line in _normalize_import_lines(lines):\n        if line.startswith(\"#\") or line == \"\":\n            yield line\n        elif \"import\" in line:\n            origin_stmt, members = line.split(\" import \", maxsplit=1)\n            if members == \"*\":\n                _, origin = origin_stmt.split(\"from \")\n                targets = _retrieve_all(origin)\n            else:\n                targets = members.split(\", \")\n            _all.update(targets)\n            yield line\n        else:\n            msg = f\"Unexpected line:\\n{line!r}\"\n            raise NotImplementedError(msg)\n    yield f\"__all__ = {sorted(_all)}\"\n\n\ndef update_dynamic__all__(source: str | Path, /) -> None:\n    \"\"\"\n    ## Relies on all `*` imports leading to an `__all__`.\n\n    Acceptable `source`:\n\n        \"altair.package.subpackage.etc\"\n        Path(...)\n\n    \"\"\"\n    fp = normalize_source(source)\n    content = process_lines(extract_lines(fp))\n    ruff.write_lint_format(fp, content)\n\n\nif __name__ == \"__main__\":\n    update__all__variable()\n"
  },
  {
    "path": "tools/vega_expr.py",
    "content": "\"\"\"\nParsing `Vega Expressions`_ docs to write the ``alt.expr`` module.\n\n.. _Vega Expressions:\n   https://vega.github.io/vega/docs/expressions/\n\"\"\"\n\nfrom __future__ import annotations\n\nimport dataclasses\nimport enum\nimport keyword\nimport re\nfrom collections import deque\nfrom inspect import getmembers\nfrom itertools import chain\nfrom textwrap import TextWrapper as _TextWrapper\nfrom textwrap import indent\nfrom typing import TYPE_CHECKING, Any, ClassVar, Literal, overload\n\nfrom tools.codemod import ruff\nfrom tools.markup import RSTParse, Token, read_ast_tokens\nfrom tools.markup import RSTRenderer as _RSTRenderer\nfrom tools.schemapi.schemapi import SchemaBase as _SchemaBase\n\nif TYPE_CHECKING:\n    import sys\n    from collections.abc import Callable, Iterable, Iterator, Mapping, Sequence\n    from pathlib import Path\n    from re import Match, Pattern\n\n    from mistune import BlockState\n\n    if sys.version_info >= (3, 11):\n        from typing import LiteralString, Self\n    else:\n        from typing_extensions import LiteralString, Self\n    from _typeshed import SupportsKeysAndGetItem\n\n    from tools.markup import Url\n\n__all__ = [\"parse_expressions\", \"write_expr_module\"]\n\n\n# NOTE: Urls/fragments\nVEGA_DOCS_URL: LiteralString = \"https://vega.github.io/vega/docs/\"\nEXPRESSIONS_DOCS_URL: LiteralString = f\"{VEGA_DOCS_URL}expressions/\"\nEXPRESSIONS_URL_TEMPLATE = \"https://raw.githubusercontent.com/vega/vega/refs/tags/{version}/docs/docs/expressions.md\"\n\n\n# NOTE: Regex patterns\nFUNCTION_DEF_LINE: Pattern[str] = re.compile(\n    r\"<a name=\\\"(?P<name>.+)\\\" href=\\\"#(.+)\\\">\"\n)\nSENTENCE_BREAK: Pattern[str] = re.compile(r\"(?<!\\.)\\. \")\n\n# NOTE: `mistune` token keys/values\nTYPE: Literal[r\"type\"] = r\"type\"\nRAW: Literal[\"raw\"] = \"raw\"\nSOFTBREAK: Literal[\"softbreak\"] = \"softbreak\"\nTEXT: Literal[\"text\"] = \"text\"\nCHILDREN: Literal[\"children\"] = \"children\"\n\n# NOTE: Punctuation/markers\nELLIPSIS: Literal[\"...\"] = \"...\"\nOPEN_PAREN: Literal[\"(\"] = \"(\"\nCLOSE_PAREN: Literal[\")\"] = \")\"\nOPEN_BRACKET: Literal[\"[\"] = \"[\"\nCLOSE_BRACKET: Literal[\"]\"] = \"]\"\nINLINE_OVERLOAD: Literal[\" |\"] = \" |\"\n\nMETHOD_INDENT: LiteralString = 8 * \" \"\nSECTION_BREAK: Literal[\"\\n\\n\"] = \"\\n\\n\"\n\n# NOTE: `altair` types (for annotations)\nRETURN_WRAPPER: LiteralString = \"FunctionExpression\"\nRETURN_ANNOTATION: LiteralString = \"Expression\"\n\"\"\"\nThe annotation is intentionally *less* specific than the real type.\n\n``Expression`` is shorter, while preserving all the user-facing functionality\n\"\"\"\n\nCONST_WRAPPER: LiteralString = \"ConstExpression\"\nCLS_META: LiteralString = \"_ExprMeta\"\nINPUT_ANNOTATION: LiteralString = \"IntoExpression\"\n\n# NOTE: `python`/`mypy` related literals\nNONE: Literal[r\"None\"] = r\"None\"\nSTAR_ARGS: Literal[\"*args\"] = \"*args\"\nDECORATOR: LiteralString = r\"@classmethod\"\nIGNORE_OVERRIDE: LiteralString = r\"# type: ignore[override]\"\nIGNORE_MISC: LiteralString = r\"# type: ignore[misc]\"\n\nMODULE_PRE = '''\\\n{header}\n\"\"\"Tools for creating transform & filter expressions with a python syntax.\"\"\"\n\nfrom __future__ import annotations\n\nimport sys\nfrom typing import Any, TYPE_CHECKING\n\nfrom altair.expr.core import {const}, {func}\nfrom altair.vegalite.v6.schema.core import ExprRef as _ExprRef\n\nif sys.version_info >= (3, 12):\n    from typing import override\nelse:\n    from typing_extensions import override\n\nif TYPE_CHECKING:\n    from altair.expr.core import {return_ann}, {input_ann}\n\n\nclass {metaclass}(type):\n    \"\"\"\n    Metaclass for :class:`expr`.\n\n    Currently providing read-only class properties, representing JavaScript constants.\n    \"\"\"\n\n    @property\n    def NaN(cls) -> {return_ann}:\n        \"\"\"Not a number (same as JavaScript literal NaN).\"\"\"\n        return {const}(\"NaN\")\n\n    @property\n    def LN10(cls) -> {return_ann}:\n        \"\"\"The natural log of 10 (alias to Math.LN10).\"\"\"\n        return {const}(\"LN10\")\n\n    @property\n    def E(cls) -> {return_ann}:\n        \"\"\"The transcendental number e (alias to Math.E).\"\"\"\n        return {const}(\"E\")\n\n    @property\n    def LOG10E(cls) -> {return_ann}:\n        \"\"\"The base 10 logarithm e (alias to Math.LOG10E).\"\"\"\n        return {const}(\"LOG10E\")\n\n    @property\n    def LOG2E(cls) -> {return_ann}:\n        \"\"\"The base 2 logarithm of e (alias to Math.LOG2E).\"\"\"\n        return {const}(\"LOG2E\")\n\n    @property\n    def SQRT1_2(cls) -> {return_ann}:\n        \"\"\"The square root of 0.5 (alias to Math.SQRT1_2).\"\"\"\n        return {const}(\"SQRT1_2\")\n\n    @property\n    def LN2(cls) -> {return_ann}:\n        \"\"\"The natural log of 2 (alias to Math.LN2).\"\"\"\n        return {const}(\"LN2\")\n\n    @property\n    def SQRT2(cls) -> {return_ann}:\n        \"\"\"The square root of 2 (alias to Math.SQRT1_2).\"\"\"\n        return {const}(\"SQRT2\")\n\n    @property\n    def PI(cls) -> {return_ann}:\n        \"\"\"The transcendental number pi (alias to Math.PI).\"\"\"\n        return {const}(\"PI\")\n'''\n\nMODULE_POST = \"\"\"\\\n_ExprType = expr\n# NOTE: Compatibility alias for previous type of `alt.expr`.\n# `_ExprType` was not referenced in any internal imports/tests.\n\"\"\"\n\nCLS_DOC = \"\"\"\n    Utility providing *constants* and *classmethods* to construct expressions.\n\n    `Expressions`_ can be used to write basic formulas that enable custom interactions.\n\n    Alternatively, an `inline expression`_ may be defined via :class:`expr()`.\n\n    Parameters\n    ----------\n    expr: str\n        A `vega expression`_ string.\n\n    Returns\n    -------\n    ``ExprRef``\n\n    .. _Expressions:\n        https://altair-viz.github.io/user_guide/interactions/expressions.html\n    .. _inline expression:\n       https://altair-viz.github.io/user_guide/interactions/expressions.html#inline-expressions\n    .. _vega expression:\n       https://vega.github.io/vega/docs/expressions/\n\n    Examples\n    --------\n    >>> import altair as alt\n\n    >>> bind_range = alt.binding_range(min=100, max=300, name=\"Slider value:  \")\n    >>> param_width = alt.param(bind=bind_range, name=\"param_width\")\n    >>> param_color = alt.param(\n    ...     expr=alt.expr.if_(param_width < 200, \"red\", \"black\"),\n    ...     name=\"param_color\",\n    ... )\n    >>> y = alt.Y(\"yval\").axis(titleColor=param_color)\n\n    >>> y\n    Y({\n      axis: {'titleColor': Parameter('param_color', VariableParameter({\n        expr: if((param_width < 200),'red','black'),\n        name: 'param_color'\n      }))},\n      shorthand: 'yval'\n    })\n    \"\"\"\n\nCLS_TEMPLATE = '''\\\nclass expr({base}, metaclass={metaclass}):\n    \"\"\"{doc}\\n{links}\"\"\"\n\n    @override\n    def __new__(cls: type[{base}], expr: str) -> {base}:  {type_ignore}\n        return {base}(expr=expr)\n'''\n\nMETHOD_SIGNATURE = (\n    \"\"\"def {title}(cls{sep}{param_list}{marker}) -> {return_ann}:{type_ignore}\"\"\"\n)\n\nMETHOD_TEMPLATE = '''\\\n    {decorator}\n    {signature}\n        \"\"\"\n        {doc}\n        \"\"\"\n        return {return_wrapper}({name}, {body_params})\n'''\n\n\ndef _override_predicate(obj: Any, /) -> bool:\n    return callable(obj) and not (name := obj.__name__).startswith(\"_\")  # noqa: F841\n\n\n_SCHEMA_BASE_MEMBERS: frozenset[str] = frozenset(\n    nm for nm, _ in getmembers(_SchemaBase, _override_predicate)\n)\n\n\nclass RSTRenderer(_RSTRenderer):\n    def __init__(self) -> None:\n        super().__init__()\n\n    def link(self, token: Token, state: BlockState) -> str:\n        \"\"\"Store link url, for appending at the end of doc.\"\"\"\n        attrs = token[\"attrs\"]\n        url = expand_urls(attrs[\"url\"])\n        text = self.render_children(token, state)\n        text = text.replace(\"`\", \"\")\n        inline = f\"`{text}`_\"\n        state.env[\"ref_links\"][text] = {\"url\": url}\n        return inline\n\n    def _with_links(self, s: str, links: dict[str, Any] | Any, /) -> str:\n        it = chain.from_iterable(\n            (f\".. _{ref_name}:\", f\"    {attrs['url']}\")\n            for ref_name, attrs in links.items()\n        )\n        return \"\\n\".join(chain([s], it))\n\n    def __call__(self, tokens: Iterable[Token], state: BlockState) -> str:\n        result = super().__call__(tokens, state)\n        if links := state.env.get(\"ref_links\", {}):\n            return self._with_links(result, links)\n        else:\n            return result\n\n\nparser: RSTParse = RSTParse(RSTRenderer())\ntext_wrap = _TextWrapper(\n    width=100,\n    break_long_words=False,\n    break_on_hyphens=False,\n    initial_indent=METHOD_INDENT,\n    subsequent_indent=METHOD_INDENT,\n)\n\n\nclass ReplaceMany:\n    \"\"\"\n    Perform many ``1:1`` replacements on a given text.\n\n    Structured wrapper around a `dict`_ and `re.sub`_.\n\n    Parameters\n    ----------\n    mapping\n        Optional initial mapping.\n    fmt_match\n        **Combined** format string/regex pattern.\n        Receives the keys of the final ``self._mapping`` as a positional argument.\n\n        .. note::\n            Special characters must be escaped **first**, if present.\n\n    fmt_replace\n        Format string applied to a successful match, after substitution.\n        Receives ``self._mapping[key]`` as a positional argument.\n\n    .. _dict:\n        https://docs.python.org/3/library/stdtypes.html#mapping-types-dict\n    .. _re.sub:\n        https://docs.python.org/3/library/re.html#re.sub\n\n    Examples\n    --------\n    Providing a mapping during construction:\n\n        >>> string = \"The dog chased the cat, chasing the mouse. Poor mouse\"\n        >>> animal_replacer = ReplaceMany({\"dog\": \"cat\"})\n        >>> animal_replacer(string)\n        'The cat chased the cat, chasing the mouse. Poor mouse'\n\n    Updating with new replacements:\n\n        >>> animal_replacer.update({\"cat\": \"mouse\", \"mouse\": \"dog\"}, duck=\"rabbit\")\n        >>> animal_replacer(string, refresh=True)\n        'The cat chased the mouse, chasing the dog. Poor dog'\n\n    Further calls will continue using the most recent update:\n\n        >>> animal_replacer(\"duck\")\n        'rabbit'\n    \"\"\"\n\n    def __init__(\n        self,\n        mapping: Mapping[str, str] | None = None,\n        /,\n        fmt_match: str = \"(?P<key>{0})\",\n        fmt_replace: str = \"{0}\",\n    ) -> None:\n        self._mapping: dict[str, str] = dict(mapping) if mapping else {}\n        self._fmt_match: str = fmt_match\n        self._fmt_replace: str = fmt_replace\n        self.pattern: Pattern[str]\n        self.repl: Callable[[Match[str]], str]\n        self._is_prepared: bool = False\n\n    def update(\n        self,\n        m: SupportsKeysAndGetItem[str, str] | Iterable[tuple[str, str]],\n        /,\n        **kwds: str,\n    ) -> None:\n        \"\"\"Update replacements mapping.\"\"\"\n        self._mapping.update(m, **kwds)\n\n    def clear(self) -> None:\n        \"\"\"Reset replacements mapping.\"\"\"\n        self._mapping.clear()\n\n    def refresh(self) -> None:\n        \"\"\"\n        Compile replacement pattern and generate substitution function.\n\n        Notes\n        -----\n        Should be called **after** all (old, new) pairs have been collected.\n        \"\"\"\n        self.pattern = self._compile()\n        self.repl = self._replacer()\n        self._is_prepared = True\n\n    def __call__(self, s: str, count: int = 0, /, refresh: bool = False) -> str:\n        \"\"\"\n        Replace the leftmost non-overlapping occurrences of ``self.pattern`` in ``s`` using ``self.repl``.\n\n        Wraps `re.sub`_\n\n        .. _re.sub:\n            https://docs.python.org/3/library/re.html#re.sub\n        \"\"\"\n        if not self._is_prepared or refresh:\n            self.refresh()\n        return self.pattern.sub(self.repl, s, count)\n\n    def _compile(self) -> Pattern[str]:\n        if not self._mapping:\n            name = self._mapping.__qualname__  # type: ignore[attr-defined]\n            msg = (\n                f\"Requires {name!r} to be populated, but got:\\n{name}={self._mapping!r}\"\n            )\n            raise TypeError(msg)\n        return re.compile(rf\"{self._fmt_match.format('|'.join(self._mapping))}\")\n\n    def _replacer(self) -> Callable[[Match[str]], str]:\n        def repl(m: Match[str], /) -> str:\n            return self._fmt_replace.format(self._mapping[m[\"key\"]])\n\n        return repl\n\n    def __getitem__(self, key: str) -> str:\n        return self._mapping[key]\n\n    def __setitem__(self, key: str, value: str) -> None:\n        self._mapping[key] = value\n\n    def __repr__(self) -> str:\n        return f\"{type(self).__name__}(\\n    {self._mapping!r}\\n)\"\n\n\nclass Special(enum.Enum):\n    \"\"\"\n    Special-case identifiers.\n\n    Representing ``VegaExprDef`` states that may be otherwise ambiguous.\n    \"\"\"\n\n    NO_PARAMETERS = enum.auto()\n\n\nclass VegaExprDef:\n    \"\"\"\n    ``SchemaInfo``-like, but operates on `expressions.md`_.\n\n    .. _expressions.md:\n        https://raw.githubusercontent.com/vega/vega/main/docs/docs/expressions.md\n    \"\"\"\n\n    remap_title: ClassVar[ReplaceMany] = ReplaceMany(\n        fmt_match=r\"(?P<key>{0})\\(\", fmt_replace=\"{0}(\"\n    )\n\n    def __init__(self, name: str, children: Sequence[Token], /) -> None:\n        self.name: str = name\n        self._children: Sequence[Token] = children\n        self.parameters: list[VegaExprParam] = []\n        self.doc: str = \"\"\n        self.signature: str = \"\"\n        self._special: set[Special] = set()\n\n    def get_links(self, rst_renderer: RSTRenderer) -> dict[str, str]:\n        \"\"\"Retrieve dict of link text to link url.\"\"\"\n        from mistune import BlockState\n\n        links = {}\n        state = BlockState()\n        for t in self._children:\n            if t.get(\"type\") == \"link\" and (url := t.get(\"attrs\", {}).get(\"url\")):\n                text = rst_renderer.render_children(t, state)\n                text = text.replace(\"`\", \"\")\n                links[text] = expand_urls(url)\n\n        return links\n\n    def with_doc(self) -> Self:\n        \"\"\"\n        Parses docstring content in full.\n\n        Accessible via ``self.doc``\n        \"\"\"\n        s: str = parser.render_tokens(self._doc_tokens())\n        s = italics_to_backticks(s, self.parameter_names(variadic=False))\n        s = type(self).remap_title(s)\n        self.doc = format_doc(s)\n        return self\n\n    def with_parameters(self) -> Self:\n        \"\"\"\n        Parses signature content into an intermediate representation.\n\n        Accessible via  ``self.parameters``.\n        \"\"\"\n        split: Iterator[str] = self._split_signature_tokens(exclude_name=True)\n        self.parameters = list(VegaExprParam.from_texts(split))\n        if not self.parameters:\n            self._special.add(Special.NO_PARAMETERS)\n        return self\n\n    def with_signature(self) -> Self:\n        \"\"\"\n        Parses ``self.parameters`` into a full signature definition line.\n\n        Accessible via  ``self.signature``\n        \"\"\"\n        param_list = (\n            VegaExprParam.star_args()\n            if self.is_overloaded()\n            else \", \".join(p.render() for p in self.parameters)\n        )\n        self.signature = METHOD_SIGNATURE.format(\n            title=self.title,\n            sep=\"\" if self.is_no_parameters() else \",\",\n            param_list=param_list,\n            marker=\"\" if (self.is_variadic() or self.is_no_parameters()) else \", /\",\n            return_ann=RETURN_ANNOTATION,\n            type_ignore=(\n                f\"  {IGNORE_OVERRIDE}\" if self.is_incompatible_override() else \"\"\n            ),\n        )\n        return self\n\n    def parameter_names(self, *, variadic: bool = True) -> Iterator[str]:\n        \"\"\"Pass ``variadic=False`` to omit names like``*args``.\"\"\"\n        if self.parameters:\n            it: Iterator[str] = (\n                (p.name for p in self.parameters)\n                if variadic\n                else (p.name for p in self.parameters if not p.variadic)\n            )\n            yield from it\n        elif self.is_no_parameters():\n            yield from ()\n        else:\n            msg = (\n                f\"Cannot provide `parameter_names` until they have been initialized via:\\n\"\n                f\"{type(self).__name__}.with_parameters()\\n\\n\"\n                f\"{self!r}\"\n            )\n            raise TypeError(msg)\n\n    def render(self) -> str:\n        \"\"\"Return fully parsed method definition.\"\"\"\n        if self.is_overloaded():\n            body_params = STAR_ARGS[1:]\n        else:\n            body_params = (\n                f\"({self.parameters[0].name},)\"\n                if len(self.parameters) == 1\n                else f\"({','.join(self.parameter_names())})\"\n            )\n        return METHOD_TEMPLATE.format(\n            decorator=DECORATOR,\n            signature=self.signature,\n            doc=self.doc,\n            return_wrapper=RETURN_WRAPPER,\n            name=f\"{self.name!r}\",\n            body_params=body_params,\n        )\n\n    @property\n    def title(self) -> str:\n        \"\"\"\n        Use for the method definition, but not when calling internally.\n\n        Updates ``remap_title`` class variable for documentation example substitutions.\n        \"\"\"\n        title = f\"{self.name}_\" if self.is_keyword() else self.name\n        type(self).remap_title.update({self.name: f\"alt.expr.{title}\"})\n        return title\n\n    def _signature_tokens(self) -> Iterator[Token]:\n        \"\"\"\n        Target for signature appears between 2 softbreak tokens.\n\n        - Proceeds to the first token **after** a softbreak\n        - Yield **only** text tokens\n        - Skips all inline html tags\n        - Stops at 2nd softbreak\n        \"\"\"\n        it: Iterator[Token] = iter(self)\n        current = next(it)\n        while current[TYPE] != SOFTBREAK:\n            current = next(it)\n        next(it)\n        for target in it:\n            if target[TYPE] == TEXT:\n                yield target\n            elif target[TYPE] == SOFTBREAK:\n                break\n            else:\n                continue\n\n    def _split_signature_tokens(self, *, exclude_name: bool = False) -> Iterator[str]:\n        \"\"\"\n        Normalize the text content of the signature.\n\n        Examples\n        --------\n        The following definition:\n\n            <a name=\"sequence\" href=\"#sequence\">#</a>\n            <b>sequence</b>([<i>start</i>, ]<i>stop</i>[, <i>step</i>])<br/>\n            Returns an array containing an arithmetic sequence of numbers.\n            ...\n\n        Will yield:\n\n            ['sequence', '(', '[', 'start', ']', 'stop', '[', 'step', ']', ')']\n\n        When called with ``exclude_name=True``:\n\n            ['(', '[', 'start', ']', 'stop', '[', 'step', ']', ')']\n        \"\"\"\n        EXCLUDE_INNER: set[str] = {self.name} if exclude_name else set()\n        EXCLUDE: set[str] = {\", \"} | EXCLUDE_INNER\n        for token in self._signature_tokens():\n            raw: str = token[RAW]\n            if raw == OPEN_PAREN:\n                yield raw\n            elif raw.startswith(OPEN_PAREN):\n                yield raw[0]\n                for s in raw[1:].split(\",\"):\n                    if (clean := s.strip(\" -\")) not in EXCLUDE_INNER:\n                        yield from VegaExprDef._split_markers(clean)\n            elif (clean := raw.strip(\", -\")) not in EXCLUDE:\n                yield from VegaExprDef._split_markers(clean)\n\n    @staticmethod\n    def _split_markers(s: str, /) -> Iterator[str]:\n        \"\"\"\n        When ``s`` ends with one of these markers:\n\n            \")\", \"]\", \"...\", \" |\"\n\n        - Split ``s`` into rest, match\n            - using the length of the match to index\n        - Append match to ``end``\n        - Recurse\n        \"\"\"  # noqa: D400\n        if s.isalnum():\n            yield s\n            return\n\n        end: list[str] = []\n        original = s  # Save original string to detect changes\n\n        if s.endswith(CLOSE_PAREN):\n            end.append(CLOSE_PAREN)\n            s = s[:-1]\n        elif s.endswith(CLOSE_BRACKET):\n            end.append(CLOSE_BRACKET)\n            s = s[:-1]\n        elif s.endswith(ELLIPSIS):\n            end.append(ELLIPSIS)\n            s = s[:-3]\n        elif s.endswith(INLINE_OVERLOAD):\n            end.append(INLINE_OVERLOAD)\n            s = s[:-2]\n\n        if s == original:\n            # Nothing was removed; avoid infinite recursion\n            yield s\n        elif len(s) == 1:\n            yield s\n        elif len(s) > 1:\n            yield from VegaExprDef._split_markers(s)\n\n        yield from end\n\n    def _doc_tokens(self) -> Sequence[Token]:\n        \"\"\"Return the slice of `self.children` that contains docstring content.\"\"\"\n        for idx, item in enumerate(self):\n            if item[TYPE] == SOFTBREAK and self[idx + 1][TYPE] == TEXT:\n                return self[idx + 1 :]\n            else:\n                continue\n        msg = (\n            f\"Expected to find a text node marking the start of docstring content.\\n\"\n            f\"Failed for:\\n\\n{self!r}\"\n        )\n        raise NotImplementedError(msg)\n\n    def is_callable(self) -> bool:\n        \"\"\"\n        Rough filter for excluding `constants`_.\n\n        - Most of the parsing is to handle varying signatures.\n        - Constants can just be referenced by name, so can skip those\n\n        Notes\n        -----\n        - Overwriting the <a name> with the rendered text\n        - required for `clamprange` -> `clampRange`\n\n        .. _constants:\n            https://vega.github.io/vega/docs/expressions/#constants\n        \"\"\"\n        if self.is_overloaded_string_array() or self.is_bound_variable_name():\n            return False\n        it: Iterator[Token] = iter(self)\n        current: str = next(it, {}).get(RAW, \"\")\n        name: str = self.name.casefold()\n        while current.casefold() != name:\n            if (el := next(it, None)) is not None:\n                current = el.get(RAW, \"\")\n            else:\n                return False\n        if current != self.name:\n            self.name = current\n        next(it)\n        return next(it).get(RAW, \"\").startswith(OPEN_PAREN)\n\n    def is_bound_variable_name(self) -> bool:\n        \"\"\"\n        ``Vega`` `bound variables`_.\n\n        These do not provide signatures:\n\n            {\"datum\", \"event\", \"signal\"}\n\n        .. _bound variables:\n            https://vega.github.io/vega/docs/expressions/#bound-variables\n        \"\"\"\n        RESERVED_NAMES: set[str] = {\"datum\", \"event\", \"signal\"}\n        return self.name in RESERVED_NAMES\n\n    def is_overloaded(self) -> bool:\n        \"\"\"\n        Covers the `color functions`_.\n\n        These look like:\n\n            lab(l, a, b[, opacity]) | lab(specifier)\n\n        Looping of parameters is for signatures like `sequence`_:\n\n            sequence([start, ]stop[, step])\n\n        The optional first parameter, followed by a required one would need an\n        ``@overload`` in ``python``.\n\n        .. _color functions:\n            https://vega.github.io/vega/docs/expressions/#color-functions\n        .. _sequence:\n            https://vega.github.io/vega/docs/expressions/#sequence\n        \"\"\"\n        for idx, item in enumerate(self):\n            if item[TYPE] == TEXT and item.get(RAW, \"\").endswith(INLINE_OVERLOAD):\n                return self[idx + 1][TYPE] == SOFTBREAK\n            else:\n                continue\n        for idx, p in enumerate(self.parameters):\n            if not p.required:\n                others = self.parameters[idx + 1 :]\n                if not others:\n                    return False\n                else:\n                    return any(sp.required for sp in others)\n\n        return False\n\n    def is_overloaded_string_array(self) -> bool:\n        \"\"\"\n        HACK: There are string/array functions that overlap.\n\n        - the `.md` handles this by prefixing the `<a name=...` for the string version\n        - This is very different to the handled overload kinds\n        - Both definitions have full documentation and appear under different sections\n            - Unlike color functions, sequence\n            - These are inline\n        \"\"\"\n        return self.name.startswith(\"string_\")\n\n    def is_keyword(self) -> bool:\n        return keyword.iskeyword(self.name)\n\n    def is_incompatible_override(self) -> bool:\n        \"\"\"\n        ``self.title`` shadows an unrelated ``SchemaBase`` method.\n\n        Requires an ignore comment for a type checker.\n        \"\"\"\n        return self.title in _SCHEMA_BASE_MEMBERS\n\n    def is_variadic(self) -> bool:\n        \"\"\"Position-only parameter separator `\"/\"` not allowed after `\"*\"` parameter.\"\"\"\n        return self.is_overloaded() or any(p.variadic for p in self.parameters)\n\n    def is_no_parameters(self) -> bool:\n        \"\"\"\n        Signature has been parsed for parameters, but none were present.\n\n        For example the definition for `now`_ would **only** return ``True``\n        after calling ``self.with_parameters()``.\n\n        .. _now:\n            https://vega.github.io/vega/docs/expressions/#now\n        \"\"\"\n        return bool(self._special) and Special.NO_PARAMETERS in self._special\n\n    def __iter__(self) -> Iterator[Token]:\n        yield from self._children\n\n    @overload\n    def __getitem__(self, index: int) -> Token: ...\n    @overload\n    def __getitem__(self, index: slice) -> Sequence[Token]: ...\n    def __getitem__(self, index: int | slice) -> Token | Sequence[Token]:\n        return self._children.__getitem__(index)\n\n    def __repr__(self) -> str:\n        return (\n            f\"{type(self).__name__}(\\n    \"\n            f\"name={self.name!r},\\n    \"\n            f\"parameters={self.parameters!r},\\n    \"\n            f\"doc={self.doc!r}\\n\"\n            \")\"\n        )\n\n    @classmethod\n    def from_tokens(cls, tokens: Iterable[Token], /) -> Iterator[Self]:\n        \"\"\"\n        Lazy, filtered partial parser.\n\n        Applies a series of filters before rendering everything but the docs.\n\n        Parameters\n        ----------\n        tokens\n            `ast tokens`_ produced by ``mistune``\n\n        .. _ast tokens:\n            https://mistune.lepture.com/en/latest/guide.html#abstract-syntax-tree\n        \"\"\"\n        for tok in tokens:\n            if (\n                (children := tok.get(CHILDREN)) is not None\n                and (child := next(iter(children)).get(RAW)) is not None\n                and (match := FUNCTION_DEF_LINE.match(child))\n                and (node := cls(match[\"name\"], children)).is_callable()\n            ):\n                yield node.with_parameters().with_signature()\n\n\n@dataclasses.dataclass\nclass VegaExprParam:\n    name: str\n    required: bool\n    variadic: bool = False\n\n    @staticmethod\n    def star_args() -> LiteralString:\n        return f\"{STAR_ARGS}: Any\"\n\n    def render(self) -> str:\n        \"\"\"Return as an annotated parameter, with a default if needed.\"\"\"\n        if self.required:\n            return f\"{self.name}: {INPUT_ANNOTATION}\"\n        elif not self.variadic:\n            return f\"{self.name}: {INPUT_ANNOTATION} = {NONE}\"\n        else:\n            return self.star_args()\n\n    @classmethod\n    def from_texts(cls, raw_texts: Iterable[str], /) -> Iterator[Self]:\n        \"\"\"Yields an ordered parameter list.\"\"\"\n        is_required: bool = True\n        for s in raw_texts:\n            if s not in {OPEN_PAREN, CLOSE_PAREN}:\n                if s == OPEN_BRACKET:\n                    is_required = False\n                    continue\n                elif s == CLOSE_BRACKET:\n                    is_required = True\n                    continue\n                elif s.isalnum():\n                    yield cls(s, required=is_required)\n                elif s == ELLIPSIS:\n                    yield cls(STAR_ARGS, required=False, variadic=True)\n                else:\n                    continue\n\n\ndef expand_urls(url: str, /) -> str:\n    if url.startswith(\"#\"):\n        url = f\"{EXPRESSIONS_DOCS_URL}{url}\"\n    else:\n        url = url.replace(r\"../\", VEGA_DOCS_URL)\n    return url\n\n\ndef format_doc(doc: str, /) -> str:\n    \"\"\"\n    Format rendered docstring content.\n\n    Primarily used to prevent wrapping on `summary line`_ and references.\n\n    Notes\n    -----\n    - Source is very different to `vega-lite`\n    - There are no real sections, so these are created here\n    - Single line docs are unchanged\n    - Multi-line have everything following the first line wrapped.\n        - With a double break inserted for a summary line\n    - Reference-like links section (if present) are also omitted from wrapping\n\n    .. _summary line:\n        https://numpydoc.readthedocs.io/en/latest/format.html#short-summary\n    \"\"\"\n    sentences: deque[str] = deque(SENTENCE_BREAK.split(doc))\n    if len(sentences) > 1:\n        references: str = \"\"\n        summary = f\"{sentences.popleft()}.\\n\"\n        last_line = sentences.pop().strip()\n        sentences = deque(f\"{s}. \" for s in sentences)\n        if SECTION_BREAK in last_line:\n            last_line, references = last_line.split(SECTION_BREAK, maxsplit=1)\n        sentences.append(last_line)\n        sentences = deque(text_wrap.wrap(\"\".join(sentences)))\n        sentences.appendleft(summary)\n        if references:\n            sentences.extend((\"\", indent(references, METHOD_INDENT)))\n        return \"\\n\".join(sentences)\n    elif SECTION_BREAK in doc:\n        # NOTE: 2 cases have a single line with a reference\n        summary, references = doc.split(SECTION_BREAK, maxsplit=1)\n        return \"\\n\".join((summary, \"\", indent(references, METHOD_INDENT)))\n    else:\n        return sentences.pop().strip()\n\n\ndef italics_to_backticks(s: str, names: Iterable[str], /) -> str:\n    \"\"\"\n    Perform a targeted replacement, considering links.\n\n    Parameters\n    ----------\n    s\n        String containing rendered `.rst`.\n    names\n        Group of names the replacement applies to.\n\n    Notes\n    -----\n    - Avoids adding backticks to parameter names that are also used in a link.\n    - All cases of these are for `unit|units`.\n\n    Examples\n    --------\n    >>> italics_to_backticks(\n    ...     \"some text and *name* and more text but also *other* text\",\n    ...     (\"name\", \"other\"),\n    ... )\n    'some text and ``name`` and more text but also ``other`` text'\n    \"\"\"\n    pattern = rf\"(?P<not_link_start>[^`_])\\*(?P<name>{'|'.join(names)})\\*(?P<not_link_end>[^`])\"\n    return re.sub(pattern, r\"\\g<not_link_start>``\\g<name>``\\g<not_link_end>\", s)\n\n\ndef parse_expressions(source: Url | Path, /) -> Iterator[VegaExprDef]:\n    \"\"\"\n    Download remote or read local `.md` resource and eagerly parse signatures of relevant definitions.\n\n    Yields with docs to ensure each can use all remapped names, regardless of the order they appear.\n    \"\"\"\n    tokens = read_ast_tokens(source)\n    expr_defs = tuple(VegaExprDef.from_tokens(tokens))\n    VegaExprDef.remap_title.refresh()\n    for expr_def in expr_defs:\n        yield expr_def.with_doc()\n\n\ndef write_expr_module(version: str, output: Path, *, header: str) -> None:\n    \"\"\"\n    Parse an ``expressions.md`` into a ``.py`` module.\n\n    Parameters\n    ----------\n    version\n        Vega release version, e.g. ``\"v5.30.0\"``.\n    output\n        Target path to write to.\n    \"\"\"\n    version = version if version.startswith(\"v\") else f\"v{version}\"\n    url = EXPRESSIONS_URL_TEMPLATE.format(version=version)\n\n    # Retrieve all of the links used in expr method docstrings,\n    # so we can include them in the class docstrings, so that sphinx\n    # will find them.\n    expr_defs = parse_expressions(url)\n\n    links = {}\n    rst_renderer = RSTRenderer()\n    for expr_def in expr_defs:\n        links.update(expr_def.get_links(rst_renderer))\n\n    links_rst = []\n    for anchor, link_target in links.items():\n        links_rst.append(f\"    .. _{anchor}:\\n       {link_target}\")\n\n    content = (\n        MODULE_PRE.format(\n            header=header,\n            metaclass=CLS_META,\n            const=CONST_WRAPPER,\n            return_ann=RETURN_ANNOTATION,\n            input_ann=INPUT_ANNOTATION,\n            func=RETURN_WRAPPER,\n        ),\n        CLS_TEMPLATE.format(\n            base=\"_ExprRef\",\n            metaclass=CLS_META,\n            doc=CLS_DOC,\n            links=\"\\n\".join(links_rst),\n            type_ignore=IGNORE_MISC,\n        ),\n    )\n    contents = chain(\n        content,\n        (expr_def.render() for expr_def in parse_expressions(url)),\n        [MODULE_POST],\n    )\n    print(f\"Generating\\n {url!s}\\n  ->{output!s}\")\n    ruff.write_lint_format(output, contents)\n"
  },
  {
    "path": "tools/versioning.py",
    "content": "\"\"\"\nVersioning utils, specific to `vega projects`_.\n\nIncludes non-`python` projects.\n\n.. _vega projects:\n    https://github.com/vega\n\nExamples\n--------\n>>> from tools.versioning import VERSIONS  # doctest: +SKIP\n>>> VERSIONS[\"vega-lite\"]  # doctest: +SKIP\n'v6.1.0'\n\n>>> VERSIONS  # doctest: +SKIP\n{'vega-datasets': 'v3',\n 'vega-embed': '7',\n 'vega-lite': 'v6.1.0',\n 'vegafusion': '1.5.0',\n 'vl-convert-python': '1.8.0'}\n\"\"\"\n\nfrom __future__ import annotations\n\nimport sys\nfrom collections import deque\nfrom itertools import chain\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, ClassVar, Literal\n\nif sys.version_info >= (3, 11):\n    import tomllib\nelse:\n    # NOTE: See https://github.com/hukkin/tomli?tab=readme-ov-file#building-a-tomlitomllib-compatibility-layer\n    import tomli as tomllib\nfrom packaging.requirements import Requirement\nfrom packaging.version import parse as parse_version\n\nimport vl_convert as vlc\nfrom tools.schemapi.utils import spell_literal\n\nif TYPE_CHECKING:\n    from collections.abc import (\n        ItemsView,\n        Iterable,\n        Iterator,\n        KeysView,\n        Mapping,\n        Sequence,\n    )\n\n    if sys.version_info >= (3, 11):\n        from typing import LiteralString\n    else:\n        from typing_extensions import LiteralString\n    from typing import TypeAlias\n\n__all__ = [\"VERSIONS\"]\n\n_REPO_ROOT: Path = Path(__file__).parent.parent\n_JUPYTER_INDEX = \"altair/jupyter/js/index.js\"\n_PYPROJECT: Literal[\"pyproject.toml\"] = \"pyproject.toml\"\n_LOWER_BOUNDS = frozenset((\">=\", \"==\", \"~=\", \"===\"))\n\nVegaProjectPy: TypeAlias = Literal[\"vegafusion\", \"vl-convert-python\"]\nVegaProject: TypeAlias = Literal[\n    \"vega-datasets\", \"vega-embed\", \"vega-lite\", \"vegafusion\", \"vl-convert-python\"\n]\n\nVERSIONS: _Versions\n\"\"\"Singleton ``_Versions`` instance.\"\"\"\n\n\ndef _read_pyproject_toml(fp: Path | None = None, /) -> dict[str, Any]:\n    source = fp or Path(__file__).parent.parent / _PYPROJECT\n    return tomllib.loads(source.read_text(\"utf-8\"))\n\n\ndef _keypath(mapping: Mapping[str, Any], path: Iterable[str], /) -> Any:\n    \"\"\"Get a nested table from ``mapping`` by following ``path``.\"\"\"\n    mut = dict[str, Any](**mapping)\n    for key in path:\n        mut = mut[key]\n    return mut\n\n\nclass _Versions:\n    _TABLE_PATH: ClassVar[Sequence[LiteralString]] = \"tool\", \"altair\", \"vega\"\n    \"\"\"\n    The table header path split by ``\".\"``::\n\n        [tool.altair.vega] -> \"tool\", \"altair\", \"vega\"\n    \"\"\"\n    _PY_DEPS_PATH: ClassVar[Sequence[LiteralString]] = (\n        \"project\",\n        \"optional-dependencies\",\n    )\n    _PY_DEPS: ClassVar[frozenset[VegaProjectPy]] = frozenset(\n        (\"vl-convert-python\", \"vegafusion\")\n    )\n\n    _CONST_NAME: ClassVar[Literal[\"VERSIONS\"]] = \"VERSIONS\"\n    \"\"\"Variable name for the exported literal.\"\"\"\n\n    _mapping: Mapping[VegaProject, str]\n\n    def __init__(self) -> None:\n        pyproject = _read_pyproject_toml()\n        py_deps = _keypath(pyproject, self._PY_DEPS_PATH)\n        js_deps = _keypath(pyproject, self._TABLE_PATH)\n        all_deps = chain(js_deps.items(), self._iter_py_deps_versions(py_deps))\n        self._mapping = dict(sorted(all_deps))\n\n    def __getitem__(self, key: VegaProject) -> str:\n        return self._mapping[key]\n\n    def __repr__(self) -> str:\n        return repr(self._mapping)\n\n    def projects(self) -> KeysView[VegaProject]:\n        return self._mapping.keys()\n\n    def items(self) -> ItemsView[VegaProject, str]:\n        return self._mapping.items()\n\n    @property\n    def vlc_vega(self) -> str:\n        \"\"\"\n        Returns version of `Vega`_ bundled with `vl-convert`_.\n\n        .. _Vega:\n            https://github.com/vega/vega\n        .. _vl-convert:\n            https://github.com/vega/vl-convert\n        \"\"\"\n        return vlc.get_vega_version()\n\n    @property\n    def vlc_vega_embed(self) -> str:\n        \"\"\"\n        Returns version of `Vega-Embed`_ bundled with `vl-convert`_.\n\n        .. _Vega-Embed:\n            https://github.com/vega/vega-embed\n        .. _vl-convert:\n            https://github.com/vega/vl-convert\n        \"\"\"\n        return vlc.get_vega_embed_version()\n\n    @property\n    def vlc_vega_themes(self) -> str:\n        \"\"\"\n        Returns version of `Vega-Themes`_ bundled with `vl-convert`_.\n\n        .. _Vega-Themes:\n            https://github.com/vega/vega-themes\n        .. _vl-convert:\n            https://github.com/vega/vl-convert.\n        \"\"\"\n        return vlc.get_vega_themes_version()\n\n    @property\n    def vlc_vegalite(self) -> list[str]:\n        \"\"\"\n        Returns versions of `Vega-Lite`_ bundled with `vl-convert`_.\n\n        .. _Vega-Lite:\n            https://github.com/vega/vega-lite\n        .. _vl-convert:\n            https://github.com/vega/vl-convert\n        \"\"\"\n        return vlc.get_vegalite_versions()\n\n    @property\n    def _annotation(self) -> str:\n        return f\"Mapping[{spell_literal(self.projects())}, str]\"\n\n    @property\n    def _header(self) -> str:\n        return f\"[{'.'.join(self._TABLE_PATH)}]\"\n\n    def iter_inline_literal(self) -> Iterator[str]:\n        \"\"\"\n        Yields the ``[tool.altair.vega]`` table as an inline ``dict``.\n\n        Includes a type annotation and docstring.\n\n        Notes\n        -----\n        - Write at the bottom of ``altair.utils.schemapi``.\n        - Used in ``altair.utils._importers``.\n        \"\"\"\n        yield f\"{self._CONST_NAME}: {self._annotation} = {self!r}\\n\"\n        yield '\"\"\"\\n'\n        yield (\n            \"Version pins for non-``python`` `vega projects`_.\\n\\n\"\n            \"Notes\\n\"\n            \"-----\\n\"\n            f\"When cutting a new release, make sure to update ``{self._header}`` in ``pyproject.toml``.\\n\\n\"\n            \".. _vega projects:\\n\"\n            \"    https://github.com/vega\\n\"\n        )\n        yield '\"\"\"\\n'\n\n    def update_all(self) -> None:\n        \"\"\"Update all static version pins.\"\"\"\n        print(\"Updating Vega project pins\")\n        self.update_vega_embed()\n\n    def update_vega_embed(self) -> None:\n        \"\"\"Updates the **Vega-Lite** version used in ``JupyterChart``.\"\"\"\n        fp = _REPO_ROOT / _JUPYTER_INDEX\n        embed = self[\"vega-embed\"]\n        vega = parse_version(self.vlc_vega).major\n        vegalite = self[\"vega-lite\"].lstrip(\"v\")\n        stmt = f'import vegaEmbed from \"https://esm.sh/vega-embed@{embed}?deps=vega@{vega}&deps=vega-lite@{vegalite}\";\\n'\n\n        with fp.open(\"r\", encoding=\"utf-8\", newline=\"\\n\") as f:\n            lines = deque(f.readlines())\n        lines.popleft()\n        print(f\"Updating import in {fp.as_posix()!r}, to:\\n  {stmt!r}\")\n        lines.appendleft(stmt)\n        with fp.open(\"w\", encoding=\"utf-8\", newline=\"\\n\") as f:\n            f.writelines(lines)\n\n    def _iter_py_deps_versions(\n        self, dep_groups: dict[str, Sequence[str]], /\n    ) -> Iterator[tuple[VegaProjectPy, str]]:\n        \"\"\"\n        Extract the name and lower version bound for all Vega python packages.\n\n        Parameters\n        ----------\n        dep_groups\n            Mapping of dependency/extra groups to requirement strings.\n\n            .. note::\n                It is expected that this is **either** `project.optional-dependencies`_ or `dependency-groups`_.\n\n        .. _project.optional-dependencies:\n            https://packaging.python.org/en/latest/specifications/pyproject-toml/#dependencies-optional-dependencies\n        .. _dependency-groups:\n            https://peps.python.org/pep-0735/\n        \"\"\"\n        for deps in dep_groups.values():\n            for req_string in deps:\n                req = Requirement(req_string)\n                if req.name in self._PY_DEPS:\n                    it = (\n                        parse_version(sp.version)\n                        for sp in req.specifier\n                        if sp.operator in _LOWER_BOUNDS\n                    )\n                    version = str(min(it))\n                    yield req.name, version  # type: ignore[misc]\n\n\ndef __getattr__(name: str) -> _Versions:\n    if name == \"VERSIONS\":\n        global VERSIONS\n        VERSIONS = _Versions()\n        return VERSIONS\n    else:\n        msg = f\"module {__name__!r} has no attribute {name!r}\"\n        raise AttributeError(msg)\n"
  }
]