Closed dreamtori closed 3 months ago
Hi team,
When we generate a facet chart, an error occurs while rendering the altair facet chart.
error message Facetchart object has no attribute 'width'
I'd really appreciate your help. many thanks!
minimal example
from shiny.express import input, ui from shinywidgets import render_altair ui.input_selectize("var", "Select variable", choices=["bill_length_mm", "body_mass_g"]) @render_altair def hist(): import altair as alt from palmerpenguins import load_penguins df = load_penguins() return ( alt.Chart(df) .mark_bar() .encode(x=alt.X(f"{input.var()}:Q", bin=True), y="count()") ).facet(column='species:N')
Thanks! I was quite surprised to learn that vega doesn't support specifying height/width on a FacetChart, so the sizing will be awkward/non-responsive, but @render_altair won't error on it anymore.
FacetChart
@render_altair
Description
Hi team,
When we generate a facet chart, an error occurs while rendering the altair facet chart.
error message Facetchart object has no attribute 'width'
I'd really appreciate your help. many thanks!
What I Did
minimal example