Skip to content

docs: add number input to date input example - #4091

Merged
joelostblom merged 4 commits into
vega:mainfrom
SR0725:docs/interactive-number-input
Aug 12, 2026
Merged

joelostblom merged 4 commits into
vega:mainfrom
SR0725:docs/interactive-number-input

Conversation

@SR0725

@SR0725 SR0725 commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

What I changed

  • added an HTML number input to the existing date-input gallery example
  • used the date value to filter the x-axis range and the minimum visitor count to filter y-axis values
  • kept matching arguments-syntax and methods-syntax versions
  • removed the separate number-input example so the related controls stay on one gallery page

This covers the number-input example suggested in #3403 without adding another gallery entry.

Testing

  • uv run --frozen pytest tests/test_examples.py -k interactive_date_input -q -n0 -p no:cacheprovider (6 passed)
  • uv run --frozen task ruff-check
  • uv run --frozen task doc-build -- --clean --no-autosummary (build succeeded with one warning in doc/gallery/index.rst, which this PR does not modify)

@joelostblom

Copy link
Copy Markdown
Contributor

Thanks for the PR @SR0725 ! Instead of making a new example, I wonder if we can combine this with the recently added example from #4088? Could you add the number input there as well and have it filter the y-axis? Or feel free to come up with a new example that can combine both. We have quite a lot of gallery examples, so it would be nice if related functionality like this can be in the same example.

@SR0725 SR0725 changed the title docs: add number input gallery example docs: add number input to date input example Aug 1, 2026
@SR0725

SR0725 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

That makes sense. I folded the number input into interactive_date_input: the date parameter filters the x-axis range, and minimum_visitors filters the y values. I also removed the standalone number-input files. The focused example tests pass 6/6, ruff passes, and the local docs build succeeds. Updated in 10f2e20.

@joelostblom joelostblom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I will add a line for the threshold and will then merge

Co-authored-by: Joel Ostblom <joelostblom@users.noreply.github.com>

@joelostblom joelostblom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again!

@joelostblom
joelostblom enabled auto-merge (squash) August 12, 2026 16:25
@joelostblom
joelostblom merged commit a745566 into vega:main Aug 12, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants