a facet or facetAnchor: "all" option?

Aperta
#2,014 1 commento 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript

Direzione di ricerca

Inizia dalla documentazione delle opzioni di facet mark e dal test e dai dati Observable collegati per capire come vengono gestiti attualmente i facet vuoti e facetAnchor. Confronta il comportamento richiesto di all-facet frame con il workaround esistente basato su mark duplicati e aggiorna l’esempio della documentazione e i test pertinenti in modo che, al completamento, il frame venga dimostrato sia sui facet non vuoti sia su quelli vuoti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

In this Plot:
facetAnchor

Plot.plot({
  marginLeft: 60,
  marks: [
    Plot.frame({ fill: "silver" }),
    Plot.barX(data, { x: "Cantidad", fx: "type", fy: "p28" })
  ]
})

we would like the silver frame to be present on all facets, including the empty ones (represented with an orange stroke). Should we add a facet: "all" or facetAnchor: "all" option?

(The orange stroke was added with Plot.frame({ stroke: "orange", facetAnchor: "empty" })).

The chart can be fixed currently by duplicating the mark:
[Plot.frame({ fill: "silver" }), Plot.frame({ fill: "silver",facetAnchor: "empty" })],

but it shows that something is missing.

Test & data: https://observablehq.com/d/faf63a6fe3950d75

(Feature request suggested by @rusosnith)

relevant links in the documentation:

(there is a small error on the axis page, where it says "null - show on every facet" it should say "null - show on every non-empty facet")

Lingua principale
HTML
Stelle
5.4k
Fork
251
Merge medio
2g 1h
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di observablehq/plot

Tutte le issue di observablehq/plot

Issue simili

Altre issue su Data Visualization

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.