Mady
Mady8mo ago

Output size too large

I keep getting "Your output is too large" when I'm dealing with larger datasets, particularly in charting them in Altair and organizing the charts with tabs inside an accordion. Are there any other suggested workarounds besides just splitting them into more accordions?
2 Replies
Myles Scolnick
Myles Scolnick8mo ago
Currently it’s probably as accordions. I’ll take a look and see if there is a better workaround or something we can change to improve this @Mady - actually since mo.ui.tabs are an element with a value, you could put nothing in it and just use it to track state, and then conditionally render the chart
# In one cell
match_stats = mo.ui.tabs(
{
"Average": "",
"Max": "",
}
)
match_stats

# In another cell
def render_match_stats():
if match_stats.value == "Average":
return matchAvgCombined
elif match_stats.value == "Max":
return matchMaxCombined
else:
return None

render_match_stats()
# In one cell
match_stats = mo.ui.tabs(
{
"Average": "",
"Max": "",
}
)
match_stats

# In another cell
def render_match_stats():
if match_stats.value == "Average":
return matchAvgCombined
elif match_stats.value == "Max":
return matchMaxCombined
else:
return None

render_match_stats()
in the meantime too, im going to look if i can create an API for mo.ui.tabs(lazy=True) i currently have proof-of-concept for mo.ui.tabs(lazy=True), hopefully can get it to you today
Mady
MadyOP8mo ago
Thank you! For now I'm just letting it not display the affected charts if it's too large