observablehq / observablehq/plot

The tip mark should respect the associated scale’s (local) time zone, if present

Open
#2,050 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

when using x: { type: "time", ... } the a axis ticks are using correct local timezone, but the tip: "x" is still showing with utc timezones,

image

Plot.plot({
  color: { legend:true },
  x: { type: "time", domain: [new Date(Date.UTC(2024,3,8,-8)), new Date] },
  marks: [
    Plot.rectY(
      dataArticlesList,
      Plot.binX({y:"count", fill:"count"}, {x:"created_at", interval: d3.timeHour, tip: "x"})),
    Plot.ruleY([0]),
  ],
  width,
})

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 with the supplied Plot.plot reproduction using a time x scale, d3.timeHour, and tip: "x". Compare the tip’s displayed timezone with the associated scale’s local timezone and the axis ticks; done means the tip respects that local timezone when one is present.

Written by the indexing model from the issue text.

Assessment

Tech stack
d3, javascript
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.