open-contracting / pelican-frontend

Reports the quality of OCDS data
https://pelican-frontend.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Use alternative to donuts #5

Closed jpmckinney closed 1 year ago

jpmckinney commented 3 years ago

Donuts are bad, because the only visual elements with which I can do quantitative comparisons are the arcs of the circle. Better alternatives are:

https://www.perceptualedge.com/articles/visual_business_intelligence/save_the_pies_for_dessert.pdf

jpmckinney commented 1 year ago

I haven't tested what happens if a bar chart has too many codes (with a pie chart, Google Charts uses sliceVisibilityThreshold to hide small slices). If it becomes a problem, we can change the logic when there are over a certain number of codes to either group values into an “Other” bar, or render a pie chart.

After:

Before:

Screenshot 2023-08-13 at 9 17 33 PM

After:

Screenshot 2023-08-13 at 9 19 33 PM
jpmckinney commented 1 year ago

Separately: I tried to add a vertical line for the min/max thresholds, but the "line" style of annotation doesn't work on bar charts (e.g. try changing LineChart to BarChart in https://jsfiddle.net/6zahewst/6/)

jpmckinney commented 1 year ago

I changed the custom bar charts to use Google Charts as well:

Before:

Screenshot 2023-08-13 at 10 22 52 PM

After:

Screenshot 2023-08-13 at 10 22 59 PM