datavisguide icon indicating copy to clipboard operation
datavisguide copied to clipboard

Legend location recommendations

Open phewson opened this issue 1 year ago • 2 comments

I know this isn't the best citation going, but it illustrates the point very well Glamour of Graphics. I agree with the point that we read graphs in a certain order, and that legends that are located out of flow can hinder reading. It would be worth checking the evidence and making a recommendation. Essentially, the argument is that the default position for a legend should be between the title and the chart, and not on the right hand side.

(The reason I'm a little hesitant is that I've found it difficult to follow the evidence myself)

phewson avatar Oct 03 '24 11:10 phewson

We made some guidance on where to put legends as part of the Government Analysis Function guidance on effective charts and tables as well as use of colour.

In a nutshell, we recommend avoiding legends completely and labelling features directly if you can. If a legend, is essential we advocate embedding the legend within the body of the chart, close to the data. This is to reduce the effort on the part of the reader to locate contextual information, and to mitigate against use of colour as the sole means of conveying information, which fails W3C web accessibility criteria. These days, we assume that the vast majority of charts we produce will be viewed online.

zarbspace avatar Oct 09 '24 12:10 zarbspace

Thanks @phewson and @zarbspace! These are all really useful resources and we'll definitely add some links to these them in the guide. Would either/both of you be interested in making an edit to the legends section of the guide to address these points?

If so, this is the file to edit: https://github.com/royal-statistical-society/datavisguide/blob/main/docs/principles.qmd#L305

(Any issues, just let me know. Equally, if you're not interested in contributing the guide directly, I can draft something and perhaps ask you to review it).

nrennie avatar Nov 13 '24 12:11 nrennie