Guidelines
Suggest edit

Set reference gridlines near 20% opacity

For static charts with reference lines, use gridline opacity near 20% on the plotting area to improve readability and mitigate intrusive or imperceptible guides for web viewers.

  • purpose:refine
  • basis:empirical
  • quality:readability
  • lever:encoding
  • channel:opacity:use
  • component:axis:use
  • polish:hierarchy

advice

Gridline opacity

Set gridline opacity to a moderate default instead of making the lines fully strong or barely visible. For example, start chart gridlines near alpha 0.2 so they remain perceptible without sitting in front of the data.

reason

Why moderate opacity works

Reference lines need to stay visible enough to guide reading while remaining visually behind the marks that carry the data. A middle opacity preserves this background role better than extremes.

Mechanism: Moderate opacity keeps gridlines usable as reference structure without making them act like foreground marks or disappear into the background.

Evidence: In the gridline alpha experiment, the crowdsourced results matched the prior pattern across background intensities and plot densities and supported alpha 0.2 as a safe default. The paper also found that operating system, screen resolution, and color depth shifted chosen alpha values, so the default is robust but not universal. (Heer & Bostock, 2010)

context

Use when gridlines need to stay in the background

  • User Goal: Keep reference lines visible but unobtrusive.
  • Task: Support chart reading without pulling attention away from the data marks.
  • Data: Quantitative plots with a visible plotting area and gridlines.
  • Chart Setting: Static web chart shown on mixed user displays.
  • Audience: Web viewers using unknown monitor settings.
  • Success Criterion: Gridlines are perceptible, but do not form a fence in front of the data.

exceptions

Do not treat 0.2 as display calibration

Break it when: You can calibrate the chart for a known display configuration with known gamma or contrast behavior. Why: The paper found that operating system, screen resolution, and color depth affected chosen alpha values.

costs

Costs of a fixed opacity default

Sacrifice: A single default will not be optimal on every display. Risk: On some screens, alpha 0.2 can still look too dark or too faint. Mitigation: Start near 0.2, then tune if you control the target display.

mistakes

Common opacity mistake

Mistake: Using fully opaque or nearly invisible gridlines as the default. Why it fails: One extreme makes the lines intrusive, and the other removes their value as reference structure.

check

How to check gridline opacity

Failure Sign: The grid either looks like a fence in front of the chart or fades so much that it is no longer usable. Quick Check: Review the chart and ask whether the gridlines are clearly visible while still sitting behind the marks. Stronger Test: Check the chart on different operating systems or displays and see whether viewers adjust the gridlines much darker or lighter than the default.

fix

How to fix gridline opacity

  • Move gridline opacity toward about 0.2 as the starting point.
  • Lower opacity if the gridlines visually sit in front of the data.
  • Raise opacity if the gridlines are too faint to guide reading.
  • If the target display is known, tune opacity for that display instead of relying only on the generic default.

References

Heer, J., & Bostock, M. (2010). Crowdsourcing graphical perception: using mechanical turk to assess visualization design. Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, 203–212. https://doi.org/10.1145/1753326.1753357