observablehq / observablehq/plot

Facet wrapping

Open
#277 7 comments 77 reactions 1 assignee View on GitHub

@Fil is already working on this.

Since Mar 27, 2021.

enhancement
Dominant language
HTML
Stars
5.4k
Forks
244
PR merge metrics
No merged PRs in 30d

Description

We can create a grid facet with:

    x: d => (f(d) % 5),
    y: d => Math.floor(f(d) / 5)

where f returns an integer, maybe d => groups.indexOf(d.group).

Can we make it easier to compute the gridded facet, and to draw its mark)? (In this case we can't use fx/fy for the facet ticks, and also need a way to draw the facet's tick inside or below the frame at a fixed point.)

Examples:

Capture d’écran 2021-03-27 à 18 44 33

https://observablehq.com/d/61ca1967e419b882

Capture d’écran 2021-01-14 à 18 19 45
https://observablehq.com/@data-workflows/geofacet & https://github.com/observablehq/plot/pull/101

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.