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

Issue 887/automate legend font change #200

Closed StRhys closed 1 year ago

StRhys commented 1 year ago

Previously to get the updated legend font and have centred legends, users would have to go in and manually resave each chart, this ticket forced a new layout on each chart, so they don't have to be resaved.

To test Copy the src folder from chart builder and paste into dd-cms/volto/src/addons/chart-builder, replacing the one in there. Then run a cms climate change instance, head to the adaptation dashboard (which currently has the old style for legends in prod), the charts should now have the updated styling. See below for before and after. The changes are, font is now 16px and GDS Transport, along with the legend being centred.

before image

after image

StRhys commented 1 year ago

Is this something we'll need to keep forever as the new correct way of laying out a chart? Or just a stopgap until all charts get resaved? Do we have a way of easily checking our progress through that? I just wonder if there'll always be this thing called 'new' and eventually we'll need a 'newNew' etc

Not a reason not to merge this, just some related work to consider :)

I'm hoping this should just be a stopgap until all charts are using the updated fonts. but yeah, that won't be until they are all resaved and no quick way of seeing which ones. It might be worth looking at an alternative method forcing a chart to resave or perhaps making this one a more permanent feature, in case we need to update the legend fonts again.