Get help from the marimo community

Updated 2 months ago

mo.ui.altair_chart error with timestamp and aggregation encode

At a glance

The post describes an issue where making a selection on a chart results in an error if a timestamp column is used, but no error occurs if the timestamp column is not used. Community members discuss the issue, with one noting that the problem was fixed in version 0.9.34 but that reactive binding doesn't work on chart selection. Another community member requests the code to reproduce the issue, and the original poster shares a notebook. A community member provides a fix for the issue in a pull request. Additionally, the discussion touches on a multi-column feature that is still experimental but can be accessed through the app settings.

Useful resources
making selection on chart results in error if timestamp is used:
unsupported operand type(s) for /: 'str' and 'int'
no error if timestamp column isn't used in encode
Attachment
image.png
l
M
16 comments
the error appears on 0.9.33. tried 0.9.34 which seems to have fixed the issue but reactive binding doesn't work on chart selection, nothing from chart.value
Yep this was just fixed in latest. Can you share the code where you get no results from chart selection
here's the dataframe used for the chart
Attachment
image.png
can you share copy/pastable code with the reproduciton?
appreciate the attention, here's the notebook
$ uv tool run marimo@0.9.34 edit --sandbox --port 2730 at.py
that really helps
btw, out of topic here, is there example or script for this multi-column feature? https://x.com/themylesfiles/status/1864475849526816937 , i know it's still experimental, great to have it to save ui real estate, long scrolling is kind of tiring and context distracting ๐Ÿ™‚
can't wait for it to become part of ui widgets
@lovuikeng its in the Settings Modal > Labs > Multi-column
yes, i'd noticed but don't know how to use it, i mean i don't see option to create multi column
Oh itโ€™s in the column width option in the top right app settings
i see, shall try, thanks๐Ÿ™
font size too adjust itself accordingly, NICE! really neat, thank you for such great addition to marimo ๐Ÿš€
Add a reply
Sign up and join the conversation on Discord