nodeplotlib icon indicating copy to clipboard operation
nodeplotlib copied to clipboard

Responsive Chart Error

Open Andreyra1 opened this issue 3 years ago • 2 comments

The plot only adjusts to the window size when the window is less than half of the screen width.

OS: Mac OS 12.4 Browser: Any

Window is aprx. 40% of screen width: CleanShot 2022-06-22 at 18 33 43@2x

Window is full screen: CleanShot 2022-06-22 at 18 33 29@2x

Andreyra1 avatar Jun 22 '22 16:06 Andreyra1

Hey, thanks for your report. It is already responsive, however the logic for the grid is the following:

:host {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  grid-gap: 8px;
  margin: 12px;
  grid-template-rows: auto;
}

This means it creates more columns the larger the window gets. What would you expect to happen? I could imagine to have a select in the toolbar or below the toolbar to adjust the number of columns manually.

ngfelixl avatar Jul 05 '22 07:07 ngfelixl

Thank you for the reply.

Maybe creating columns makes sense only if there are multiple charts. Since when there is only one, it just doesn't use all the space available.

Or an option to adjust the number of columns manually is fine too.

Andreyra1 avatar Jul 20 '22 11:07 Andreyra1