Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic plots size for smaller resolution #85

Closed
riccardoporreca opened this issue Jan 30, 2019 · 0 comments
Closed

Dynamic plots size for smaller resolution #85

riccardoporreca opened this issue Jan 30, 2019 · 0 comments
Assignees

Comments

@riccardoporreca
Copy link
Member

riccardoporreca commented Jan 30, 2019

Plots in the SmaRP app are currently fixed to 800px width, which makes them only partially visible in smaller browser windows / screens. There is also no horizontal scroll bar on the page.

The approach here is to make sure the plot width does exceed the column size, and the height is adjusted accordingly. This can be achieved with CSS as follows:

  • set a max-width: 100% property
  • adjust the height depending on the @media size (keeping the aspect ratio is tricky and would require some JavaScript)

Note that resizing the window will not re-render the googleVis plots, so the effect of resizing this will be seen upon a change to the inputs causing a re-rendering of the plots.

As part of this, the legend labels should be written using spaces instead of underscore _, similar to what done in the Report (#82)

@riccardoporreca riccardoporreca self-assigned this Jan 30, 2019
riccardoporreca added a commit that referenced this issue Jan 30, 2019
* Dynamic plot size via CSS `max-width: 100%` and `@media`-dependent height, and using relative gvis `chartArea`.
* More meaningful plot IDs.
* Use spaces and no `_` for the labels.
riccardoporreca added a commit that referenced this issue Jan 30, 2019
gabrielfoix added a commit that referenced this issue Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant