Skip to content

Stacked bar charts renders blank #6

@cassiebuhler

Description

@cassiebuhler

Describe the bug
If you change the "group_by" toggle multiple times in a row, the stacked bar chart will render blank. Sometimes the data will eventually loads, but if it does, the formatting will be off.

To Reproduce
Steps to reproduce the behavior:

  1. Change buttons on group_by (it usually happens after I change the group 6-10 times).

Expected behavior
It should render the chart

Screenshots

Image

And if it does eventually render, this is what it looks like
Image

Desktop:

  • OS: OS 15.4
  • Browser: Chrome version 135.0.7049.85

Additional context

  • It doesn't happen with the base app (CA-30x30), despite the stacked bar chart code being nearly the same.
  • It also happened before I added the acre toggle (so increasing the # of columns in the dataframe didn't seem to impact it)
  • Adding time.sleep(0.2) before st.altair_chart() doesn't fix it.
  • Displaying invisible markdown right before doesn't fix it (e.g. st.markdown("<!-- force chart render -->", unsafe_allow_html=True))
  • Writing something out right before (e.g. st.dataframe(df_bar_30x30.head())) seems to fix it (or at least I can't replicate the bug then).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions