owid-grapher
owid-grapher copied to clipboard
Ability to control the share of entity names shown by default on scatter plot
Core problem
For the AI Project I'm making a bunch of time scatter charts, and sometimes the fact that the entity names show by default makes the chart very busy and hard to read.
Two example charts: GPU price-performance, where it's just way too busy and you can barely see the points, and ImageNet performance, where one of the names slightly occludes the line for "Human baseline."
It's very important to have all the entity names in these charts. I foresee more examples of this coming up as I make more charts.
Selected solution (updated 2022-08-02)
Add an option to turn off entity names being shown by default, so that they're only shown on hover.
- [ ] Add a new option to the grapher schema
- [ ] Use the new option to disable entity names on scatterplots
- [ ] Ensure it works for explorers too
Alternatives
Add a variable control control what that lets you choose what share of names are shown -- from 100% (show all entity names) to 0% (show none, only show them on hover).
Context
Add any other context or screenshots about the feature request here.
After discussion with @danyx23, seems that we should do the simple thing first (allow you to disable the labels), and only if the labelling algorithm easily allows it, optionally consider reducing label density.
If I remember correctly, the labelling algorithm only cares about whether there are overlaps between text labels.
A thing to tweak might be the minimum distance to the next label such that a higher value leads to less labels close together.