Layout() appears to swap the rows for columns. Any help appreciated

The bohek example for layout() shows:

layout([
[bollinger],
[sliders, plot],
[p1, p2, p3],
])

Which duplicates what I want.

The problem is then I duplicate this layout() the rows and columns are swapped from what the example shows.

my layout is:
[[Div(id=‘1969’, …)], [Figure(id=‘1003’, …), Figure(id=‘1270’, …)], [Figure(id=‘1536’, …), Figure(id=‘1793’, …)]]

reformatted for display is::

[
[Div(id=‘1969’, …)],
[Figure(id=‘1003’, …), Figure(id=‘1270’, …)],
[Figure(id=‘1536’, …), Figure(id=‘1793’, …)]
]

But gets displayed is:
Div (aka header) Figure 1003 Figure 1536
Figure 1270 Figure 1793

The code:

    def buttonpress_save_html(self):
        all_items = [[Div(text=f"<h1>{self.get_text(self.text_dashboard_title)}</h1>")]]

        if len(self.plots):
            all_items.append(list(self.chunks(self.plots, self.column_count)))

        print(all_items) # Output of this print is shown as my layout above
        self.plot_page = layout([all_items])
        save(self.plot_page)

@mmahler It’s not really possible to speculate without code to run. The very best way to help others help you is to provide a complete Minimal Reproducible Example.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.