Skip to content

altair v6.0.0 breaking change #1127

Description

@Jhsmit

It looks like altair v6.0.0 has changes which render use in solara broken

For example the docs example no longer works: https://solara.dev/documentation/components/viz/altair#figurealtair

Traceback (most recent call last):
  File "/root/solara/.venv/lib/python3.12/site-packages/reacton/core.py", line 1702, in _render
    root_element = el.component.f(*el.args, **el.kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/solara/solara/components/figure_altair.py", line 31, in FigureAltair
    raise KeyError(f"{key4} and {key5} not in mimebundle:\n\n{bundle}")
KeyError: "application/vnd.vegalite.v4+json and application/vnd.vegalite.v5+json not in mimebundle:\n\n{'application/vnd.vegalite.v6.json': {'config': {'view': {'continuousWidth': 300, 'continuousHeight': 300}}, 'data': {'name': 'data-7684334a68ab74ba4c3ca7d0ceaeb461'}, 'mark': {'type': 'bar'}, 'encoding': {'x': {'field': 'a', 'type': 'nominal'}, 'y': {'field': 'b', 'type': 'quantitative'}}, '$schema': 'https://vega.github.io/schema/vega-lite/v6.1.0.json', 'datasets': {'data-7684334a68ab74ba4c3ca7d0ceaeb461': [{'a': 'A', 'b': 28}, {'a': 'B', 'b': 55}, {'a': 'C', 'b': 43}, {'a': 'D', 'b': 91}, {'a': 'E', 'b': 81}, {'a': 'F', 'b': 53}, {'a': 'G', 'b': 19}, {'a': 'H', 'b': 87}, {'a': 'I', 'b': 52}]}}, 'text/plain': '<VegaLite 6 object>\\n\\nIf you see this message, it means the renderer has not been properly enabled\\nfor the frontend that you are using. For more information, see\\nhttps://altair-viz.github.io/user_guide/display_frontends.html#troubleshooting\\n'}"

Downgrading to altair 5.5.0 fixes the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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