Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add documentation for initial interval selection date ranges #3815

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dsmedia
Copy link
Contributor

@dsmedia dsmedia commented Mar 8, 2025

This pull request adds documentation to parameters.rst to explain how to set initial date ranges for interval selections using Python's native datetime.date and datetime.datetime objects.

Changes:

  • Added a new sub-subsection "Setting Initial Values" within the "Interval Selections" subsection of parameters.rst.
  • Included a code example demonstrating how to use alt.selection_interval with the value parameter and Python datetime.date objects to set an initial date range.
  • The new section is placed before the existing explanation of how interval selections work, maintaining the overall structure of the "Selection Types" section.

Context:

This documentation update addresses issue #3643, which requested clarification on how to use initial values in selection intervals with dates. This enhancement is made possible by the recent improvements to datetime support in Altair (PRs #3653 and #3662).

This PR specifically focuses on documenting the usage within parameters.rst. Further documentation updates related to #3643, such as adding information to the selection documentation and potentially the times_and_dates section, may be considered in separate pull requests.

Testing:

  • Verified that the documentation renders correctly locally.
  • Tested the code example and confirmed it works as expected.

Link to issue #3643
Link to PR #3653
Link to PR #3662

dsmedia added 2 commits March 8, 2025 13:03
This commit adds a new "Setting Initial Values" subsection to the
"Interval Selections" documentation in `parameters.rst`.  It explains
how to use the `value` parameter with `datetime.date` and
`datetime.datetime` objects to set an initial range for interval
selections.  This addresses issue vega#3643.
@dsmedia dsmedia marked this pull request as ready for review March 8, 2025 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant