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

fix: mo.ui.altair_chart when give by the user #2924

Merged
merged 2 commits into from
Nov 22, 2024
Merged

Conversation

mscolnick
Copy link
Contributor

@mscolnick mscolnick commented Nov 21, 2024

Fixes #2901

If selection params are already added by the users, we should not automatically the default chart/legend selection and just use the users.

Copy link

vercel bot commented Nov 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 22, 2024 3:00pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 22, 2024 3:00pm

if _has_selection_param(chart):
# Log a warning if the user has set chart_selection
# but the chart already has a selection param
print("chart_selection", chart_selection)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
print("chart_selection", chart_selection)

if _has_legend_param(chart):
# Log a warning if the user has set legend_selection
# but the chart already has a legend param
print("legend_selection", legend_selection)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
print("legend_selection", legend_selection)

akshayka
akshayka previously approved these changes Nov 22, 2024
Copy link
Contributor

@akshayka akshayka left a comment

Choose a reason for hiding this comment

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

Looks good except for some print statements that got left in

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.

Altair Chart with .selection_point not working when the Altair chart is a layering of two charts.
2 participants