I would like to ask how to create a figure that can be switched depending on the data in the linked datasource to show the data using say circles or using bar plot. The issue is that if it is in the case of
circles the axis are continuous, but in the case of bar plot I want the x axis using factors. So I cannot just reat both the circles and barplots and set one of them to visible.
The data in the data source themselves dynamically change based on feedback from widgets.
I initially tried to solve this by creating two separate figures (one for circles one for bar plots) and tried to replace each other in the children array of a layout, but this seems to completely destroy several of the automatic bindings, and I could find much on such dynamical layout changes on the forums to work with other than warnings that exactly such bad things are likely to happen.
add them both together and toggle their visibility appropriately
add one at a time and swap them out appropriately
It sounds like you tried the second approach, which I have seen used successfully on many occasions, but had some issues. But it is impossible to speculate without a Minimal Reproducible Example.
Can you please be a bit more specific on how to āadd them both together and toggle their visibility appropriatelyā. From the documentation I read so far it is not possible to hide whole figures?
I see, so there is actually a visible property on figures. Somehow I thought I read somewhere there insāt.
Also what wasnāt clear to me is if the layout is going to adjust if part of it becomes not visible, but apparently it does.
Yeah I donāt understand how it magically just adjusts the layout accordingly in a nice intuitive way either⦠it just works and iām not complaining