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:
should app-width be a percent value (0-100) or a decimal (0.0-1.0)?
should other formats be supported (pixel width)
alternative solution: this can be achieved by defining the width of the iframe but doesn't change this value inside the plot app. results may not be as expected
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 to80%
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
calledapp_width
:Needs discussion:
app-width
be a percent value (0-100) or a decimal (0.0-1.0)?