informatics-isi-edu / deriva-webapps

Deriva-based web applications
Apache License 2.0
2 stars 1 forks source link

Configurable plot app container #163

Closed jrchudy closed 7 months ago

jrchudy commented 1 year ago

The plot app currently resizes to the size of its parent container, but in plot app part of the setup defines "dynamic styles" for the PlotlyChart component. This dynamic style is hardcoding the width to 80% of the plot app container width (browser width or iframe width).

As part of the changes for issue #160 , we are changing this calculation to 95% instead so plot uses the whitespace better on smaller screens and in iframes (dev.gudmap.org has a bar plot in an iframe for example).

We want to include a property in plot-config for data modelers to specify what this container width should be. Since this is for the "whole" plot app (width on either side of all plots and selectors), it should be at the top level of the plot configuration next to plots called app_width:

'config-name': {
  `app_width`:             percentage width to use for the whole plot app (as percent or decimal?)
  `headTitle`:             ...,
  `top_right_link_text`:   ...,
  `plots`:                 [ {...}, ... ]
}

Needs discussion: