observablehq / observablehq/plot

A midX/midY transform?

Open
#1,452 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

It might be nice to have a transform that takes x1 and x2 and derives an x channel, as the mid helper does internally (preserving dates as needed). And if you had an x channel and an interval option, it could derive an x that represents the midpoint of the associated intervals. And same for y.

Ref. https://talk.observablehq.com/t/mid-align-axisx-in-a-plot/7857/1

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.

Research direction

Start by reviewing the existing mid helper and the handling of x, y, x1, x2, and interval channels. Clarify the intended API for midpoint derivation, including date preservation and both axes; done means the behavior and scope are agreed before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
d3, javascript
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.