You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a simple Flet app structure with NavigationRailBar (on the left) and specific content (on the right).
In the NavigationRailBar I have a routing to different pages. These pages have a ft.Container. For one route I'd like to show a MatplotlibChart. And in best case with different buttons to interact with the app.
Good -> If I would put the MatplotlibChart as a container to the content of the main ft.Container everything works fine and the chart is shown
Good -> If I would put the MatplotlibChart as a container to a ft.Row() and then to the content of the main ft.Container everything works fine and the chart is shown as well
Not good -> If I would put the MatplotlibChart as a container to a ft.Column() and then to the content of the main ft.Container the chart isn't shown anylonger. The page is empty
def MyPageWithTheMatplotlibChart(router):
fig, ax = plt.subplots(figsize=(11,11))
[...] any content for the plot
model_container = ft.Container(MatplotlibChart(fig, expand=True))
# good
return model_container
# good
return ft.Row([model_container])
# not good
return ft.Column([model_container])
Does anyone have any idea what I'm doing wrong or observed similar behavior with MatplotlibChart or elsewhere?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
I have a simple Flet app structure with NavigationRailBar (on the left) and specific content (on the right).
In the NavigationRailBar I have a routing to different pages. These pages have a ft.Container. For one route I'd like to show a MatplotlibChart. And in best case with different buttons to interact with the app.
Good -> If I would put the MatplotlibChart as a container to the content of the main ft.Container everything works fine and the chart is shown
Good -> If I would put the MatplotlibChart as a container to a ft.Row() and then to the content of the main ft.Container everything works fine and the chart is shown as well
Not good -> If I would put the MatplotlibChart as a container to a ft.Column() and then to the content of the main ft.Container the chart isn't shown anylonger. The page is empty
In my Router class:
In my specific MyPageWithTheMatplotlibChart view:
Does anyone have any idea what I'm doing wrong or observed similar behavior with MatplotlibChart or elsewhere?
Code sample
No response
Error message
No response
------------------------------------------------------
Beta Was this translation helpful? Give feedback.
All reactions