Skip to content

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

Open
SR0725 wants to merge 2 commits into
vega:mainfrom
SR0725:docs/interactive-number-input
Open

docs: add number input to date input example#4091
SR0725 wants to merge 2 commits into
vega:mainfrom
SR0725:docs/interactive-number-input

Conversation

@SR0725

@SR0725 SR0725 commented Aug 1, 2026

Copy link
Copy Markdown

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
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.

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