-
-
Notifications
You must be signed in to change notification settings - Fork 831
Closed
Description
To enable responsive sizing on width or weight, vega-lite allow the "container" option.
However, Altair throws an error:
source = pd.DataFrame(
{
"a": ["A", "B", "C", "D", "E", "F", "G", "H", "I"],
"b": [28, 55, 43, 91, 81, 53, 19, 87, 52],
}
)
chart = (
alt.Chart(source, width="container", height=120)
.mark_bar()
.encode(x="a", y="b")
.to_json()
)'container' is not of type 'number'.
Is there a way to allow responsive size in Altair?
As a side note, I use altair with vega-embed to display vega-lite plot on a Flask app.
Metadata
Metadata
Assignees
Labels
No labels