Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tx0c opened this issue Apr 10, 2024 · 1 comment

Comments

@tx0c
Copy link

tx0c commented Apr 10, 2024

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,
})
@mbostock
Copy link
Member

You currently need to use the format option to change how the tip mark formats channel values. But yes, perhaps the tip mark could check whether the channel’s associated scale is in local time.

@mbostock mbostock changed the title bug: the tip content is not honoring x axis is using "type": "time" means local timezone hours, should show local time intervals instead of utc The tip mark should respect the associated scale’s (local) time zone, if present Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants