fix: update Altair tooltip type inference for compatibility#3234
Merged
fix: update Altair tooltip type inference for compatibility#3234
Conversation
|
Performance benchmarks:
|
Collaborator
|
@souro26 thanks for the PR! Does the same API works for versions below Altair v5? |
Collaborator
|
From the looks of it I think @souro26 used pure python logic and is not using an Altair API to make the type inference right? So I guess it might work for all versions |
Contributor
Author
|
Yes, the change avoids relying on Altair utility APIs and instead does explicit type assignment in python. I also verified it locally against Altair v4, and it behaves the same there, so it should work for all versions i think. |
sanika-n
approved these changes
Feb 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3233
Summary
Fixes a visualization failure with newer versions of Altair caused by the use of a removed utility function. This restores compatibility and allows visualization tests to pass on Altair v5+.
Bug / Issue
The Altair-based space visualization used
alt.utils.infer_vegalite_type_for_pandas, which was removed in Altair v5+.This caused visualization-related tests to fail with an
AttributeError,notably
test_call_space_drawer_full.Implementation
infer_vegalite_type_for_pandasutility.quantitativefor numeric valuesnominalfor non-numeric valuesThis aligns with Altair v5+ requirements when data is not provided as a pandas DataFrame
Testing
All visualization tests pass after the change.
Additional Notes
This change is limited to visualization components and is intended solely to
address dependency compatibility with newer Altair versions.