-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Plotting not interacting well with Altair schema wrappers (x=alt.X(...)) #19159
Comments
Thanks for the report, will take a look |
Following up as promised in vega/altair#3635 (comment) The issue is stemming from #18625 (comment) Retrospective read@joelostblom flagged Applying that change would have looked like: Expected diff
def _add_tooltip(chart: alt.Chart, /) -> alt.Chart:
- chart.mark = {"type": chart.mark, "tooltip": True}
+ if isinstance(chart.mark, str):
+ chart.mark = {"type": chart.mark, "tooltip": True}
+ else:
+ chart.mark.tooltip = True
return chart In the same thread, I was focusing on the testing aspect in (#18625 (comment)) and (#18625 (review)) I definitely overlooked the change from SuggestionAs mentioned in vega/altair#3635 (comment), simply pass in self._chart.mark_...(tooltip=True).encode(**encodings, **kwargs).interactive() I don't think the consideration of You would only need to handle that case if you parameterized this: polars/py-polars/polars/dataframe/plotting.py Lines 48 to 52 in 44439d9
Like: alt.Chart(df, mark="bar") |
thanks so much @dangotbanned ! can confirm this works well |
Thank you @MarcoGorelli @dangotbanned for looking into this! |
Checks
Reproducible example
Log output
No response
Issue description
Polars plot not using the altair wrapper the right way.
Expected behavior
We should get a usual histogram plot.
Installed versions
The text was updated successfully, but these errors were encountered: