GSS-Cogs / chart-builder

The Chart Builder is a proof-of-concept app to understand the feasibility of using a CSV file (or SPARQL query) to generate and customise a chart or data visualisation
https://chart-builder-no4vxskx7a-nw.a.run.app
2 stars 0 forks source link

Responsive chart margins #101

Closed charlesons closed 2 years ago

charlesons commented 2 years ago

As an further iteration towards responsive charts that display well on mobile devices make an experimental implementation of responsive chart margins.

charlesons commented 2 years ago

Analysed the options and documented implementation recommendations. To be discussed with team to decide the best approach to take.

https://github.com/GSS-Cogs/chart-builder/wiki/Responsive-charts

charlesons commented 2 years ago

Moving to sprint backlog until team have agreed the best approach to take.

TahaRana97 commented 2 years ago

Put some time in the diary to discuss next steps

charlesons commented 2 years ago

Added to agenda for discussion at the DD-CMS design meeting on 04/07/2022 at 14.30

charlesons commented 2 years ago

The issue of optimising the amount of space taken up by the margins of charts and figure blocks has now been resolved by changes in the figure design and in the best practice applied to creating charts.

  1. The latest figure block design no longer has a shaded background which in turn means there's no need to create left and right padding for that background to look balanced. The net result is more space for chart display.

  2. In terms of best practice in creating charts we are encouraging authors to keep the left and right margins as small as possible whilst retaining clear readability of the Y axis label. For most charts in the Climate Change 2 portal a left margin of 50px is sufficient to keep the Y axis label separated from the Y axis tick labels. The net result is more space for chart series to be plotted - and a better overall appearance on mobile.

With the above points in mind we are closing this issue, but are aware that further improvements are possible in the general goal of creating responsive charts.